vfs: check userland buffers before reading them.
[haiku.git] / src / apps / poorman / PoorManLoggingView.h
blob4203505f79cddc453b917d77fe73d3355019ed7d
1 /* PoorManLoggingView.h
3 * Philip Harrison
4 * Started: 5/12/2004
5 * Version: 0.1
6 */
8 #ifndef POOR_MAN_LOGGING_VIEW_H
9 #define POOR_MAN_LOGGING_VIEW_H
11 #include <View.h>
12 #include <TextControl.h>
13 #include <Button.h>
14 #include <CheckBox.h>
17 class PoorManLoggingView: public BView {
18 public:
19 PoorManLoggingView(const char* name);
21 void SetLogConsoleValue(bool state)
23 if (state)
24 fLogConsole->SetValue(B_CONTROL_ON);
25 else
26 fLogConsole->SetValue(B_CONTROL_OFF);
29 bool LogConsoleValue()
31 return (fLogConsole->Value() == B_CONTROL_ON);
34 void SetLogFileValue(bool state)
36 if (state)
37 fLogFile->SetValue(B_CONTROL_ON);
38 else
39 fLogFile->SetValue(B_CONTROL_OFF);
42 bool LogFileValue()
44 return (fLogFile->Value() == B_CONTROL_ON);
47 const char* LogFileName()
49 return fLogFileName->Text();
52 void SetLogFileName(const char* log)
54 fLogFileName->SetText(log);
57 private:
58 // Logging Tab
59 // Console Logging
60 BCheckBox* fLogConsole;
61 // File Logging
62 BCheckBox* fLogFile;
63 BTextControl* fLogFileName;
64 BButton * fCreateLogFile;
67 #endif