OSDN Git Service

Merge "Update samples to use new getMotionRanges() API." into honeycomb-mr1
[android-x86/development.git] / simulator / app / LogPrefsDialog.h
1 //
2 // Copyright 2005 The Android Open Source Project
3 //
4 // Log preferences modal dialog.
5 //
6 #ifndef _SIM_LOG_PREFS_DIALOG_H
7 #define _SIM_LOG_PREFS_DIALOG_H
8
9 /*
10  * Declaration of log preferences dialog.  This class defines the outer
11  * wrapper as well as all of the pages.
12  */
13 class LogPrefsDialog : public wxDialog {
14     DECLARE_EVENT_TABLE()
15
16 public:
17     LogPrefsDialog(wxWindow* parent);
18     virtual ~LogPrefsDialog(void);
19
20     void CreateControls(void);
21
22     /* these correspond to radio buttons */
23     typedef enum HeaderFormat {
24         kHFFull = 0,
25         kHFBrief,
26         kHFMinimal,
27         kHFInternal,        // special -- used for internally generated msgs
28     };
29
30     /*
31      * Values edited in the preference pages.  By Windows convention,
32      * these are public.
33      */
34     /* format options */
35     HeaderFormat mHeaderFormat;
36     bool        mSingleLine;        // put whole message on one line?
37     int         mExtraSpacing;      // double/triple-space messages?
38     int         mPointSize;         // text size
39     bool        mUseColor;          // colorful messages?
40     bool        mFontMonospace;     // use monospace font?
41
42     /* limit options */
43     int         mDisplayMax;
44     int         mPoolSizeKB;
45
46     /* file options */
47     bool        mWriteFile;
48     wxString    mFileName;
49     bool        mTruncateOld;
50
51 private:
52     bool TransferDataToWindow(void);
53     bool TransferDataFromWindow(void);
54
55     wxPanel* CreateFormatPage(wxBookCtrlBase* parent);
56     wxPanel* CreateLimitsPage(wxBookCtrlBase* parent);
57     wxPanel* CreateFilesPage(wxBookCtrlBase* parent);
58
59     void OnWriteFile(wxCommandEvent& event);
60     void EnableFileControls(bool enable);
61
62     /* main notebook; for aesthetic reasons we may want a Choicebook */
63     wxNotebook    mNotebook;
64
65     enum {
66         kMinWidth = 300,        // minimum prefs dialog width, in pixels
67     };
68 };
69
70 #endif // _SIM_LOG_PREFS_DIALOG_H