xref: /haiku/src/apps/poorman/PoorManLoggingView.h (revision 2600324b57fa31cdea1627d584d314f2a579c4a8)
1 /* PoorManLoggingView.h
2  *
3  *	Philip Harrison
4  *	Started: 5/12/2004
5  *	Version: 0.1
6  */
7 
8 #ifndef POOR_MAN_LOGGING_VIEW_H
9 #define POOR_MAN_LOGGING_VIEW_H
10 
11 #include <View.h>
12 #include <TextControl.h>
13 #include <Button.h>
14 #include <CheckBox.h>
15 
16 
17 class PoorManLoggingView: public BView
18 {
19 public:
20 				PoorManLoggingView(BRect, const char *name);
21 
22 		void	SetLogConsoleValue(bool state) {if (state) logConsole->SetValue(B_CONTROL_ON);
23 												else logConsole->SetValue(B_CONTROL_OFF); }
24 		bool	LogConsoleValue() { return (logConsole->Value() == B_CONTROL_ON) ? true : false; }
25 		void	SetLogFileValue(bool state) {if (state) logFile->SetValue(B_CONTROL_ON);
26 												else logFile->SetValue(B_CONTROL_OFF); }
27 		bool	LogFileValue() { return (logFile->Value() == B_CONTROL_ON) ? true : false; }
28 const	char *	LogFileName() { return logFileName->Text(); }
29 		void	SetLogFileName(const char * log) { logFileName->SetText(log); }
30 private:
31 		// Logging Tab
32 
33 			// Console Logging
34 			BCheckBox		*	logConsole;
35 			// File Logging
36 			BCheckBox		*	logFile;
37 			BTextControl	*	logFileName;
38 			BButton			*	createLogFile;
39 };
40 
41 #endif
42