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
17class PoorManLoggingView: public BView {
18public:
19							PoorManLoggingView(const char* name);
20
21	void SetLogConsoleValue(bool state)
22	{
23		if (state)
24			fLogConsole->SetValue(B_CONTROL_ON);
25		else
26			fLogConsole->SetValue(B_CONTROL_OFF);
27	}
28
29	bool LogConsoleValue()
30	{
31		return (fLogConsole->Value() == B_CONTROL_ON);
32	}
33
34	void SetLogFileValue(bool state)
35	{
36		if (state)
37			fLogFile->SetValue(B_CONTROL_ON);
38		else
39			fLogFile->SetValue(B_CONTROL_OFF);
40	}
41
42	bool LogFileValue()
43	{
44		return (fLogFile->Value() == B_CONTROL_ON);
45	}
46
47	const char* LogFileName()
48	{
49		return fLogFileName->Text();
50	}
51
52	void SetLogFileName(const char* log)
53	{
54		fLogFileName->SetText(log);
55	}
56
57private:
58			// Logging Tab
59			// Console Logging
60			BCheckBox*		fLogConsole;
61			// File Logging
62			BCheckBox*		fLogFile;
63			BTextControl*	fLogFileName;
64			BButton	*		fCreateLogFile;
65};
66
67#endif
68