renamed julian's private makefile, it's in the way
[wxWidgets.git] / utils / configtool / src / wxconfigtool.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wxconfigtool.h
3 // Purpose: Generic application class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 2002-09-04
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _AP_WXCONFIGTOOL_H_
13 #define _AP_WXCONFIGTOOL_H_
14
15 #ifdef __GNUG__
16 #pragma interface "wxconfigtool.cpp"
17 #endif
18
19 #include "wx/docview.h"
20 #include "wx/help.h"
21
22 #ifdef __WXMSW__
23 #include "wx/msw/helpchm.h"
24 #else
25 #include "wx/html/helpctrl.h"
26 #endif
27
28 #include "appsettings.h"
29
30 class ctMainFrame;
31 class ctConfigToolDoc;
32
33 /*!
34 * \brief The application class.
35 * The application class controls initialisation,
36 * cleanup and other application-wide issues.
37 */
38
39 class ctApp: public wxApp
40 {
41 public:
42 /// Constructor.
43 ctApp();
44
45 /// Destructor.
46 ~ctApp();
47
48 // Accessors
49
50 /// Returns the application directory.
51 wxString GetAppDir() const { return m_appDir; }
52
53 /// Prepends the current app program directory to the name.
54 wxString GetFullAppPath(const wxString& filename) const;
55
56 /// Returns an object containing the application settings.
57 ctSettings& GetSettings() { return m_settings; }
58
59 /// Returns the file history object.
60 wxFileHistory& GetFileHistory() { return m_fileHistory; }
61
62 /// Returns the notebook window.
63 wxNotebook* GetNotebookWindow() { return m_notebookWindow; }
64
65 /// Returns TRUE if the application should show tooltips.
66 virtual bool UsingTooltips();
67
68 /// Returns the help controller object for the manual.
69 wxHelpControllerBase& GetHelpController() { return *m_helpController; }
70
71 /// Returns the help controller object for the wxWindows reference manual.
72 wxHelpControllerBase& GetReferenceHelpController() { return *m_helpControllerReference; }
73
74 /// Returns the document manager object.
75 wxDocManager* GetDocManager() const { return m_docManager; }
76
77 /// Returns the main frame.
78 ctMainFrame* GetMainFrame();
79
80 // Operations
81
82 /// Called on application initialisation.
83 bool OnInit(void);
84
85 /// Called on application exit.
86 int OnExit(void);
87
88 /// Loads config info from the registry or a file.
89 virtual bool LoadConfig();
90
91 /// Saves config info to the registry or a file.
92 virtual bool SaveConfig();
93
94 /// The help controller needs to be cleared before wxWindows
95 /// cleanup happens.
96 void ClearHelpControllers() ;
97
98 protected:
99 /// The application directory.
100 wxString m_appDir;
101
102 /// Global print data, to remember settings during the session.
103 wxPrintData m_printData;
104
105 /// Global page setup data.
106 wxPageSetupDialogData m_pageSetupData;
107
108 /// Notebook window.
109 wxNotebook* m_notebookWindow;
110
111 /// The help controller object.
112 wxHelpControllerBase* m_helpController;
113
114 /// The help controller object (reference manual).
115 wxHelpControllerBase* m_helpControllerReference;
116
117 /// The file history.
118 wxFileHistory m_fileHistory;
119
120 /// The configuration data.
121 ctSettings m_settings;
122
123 /// The document manager.
124 wxDocManager* m_docManager;
125
126 public:
127 DECLARE_EVENT_TABLE()
128 };
129
130 DECLARE_APP(ctApp)
131
132 /////////////////////////////////////////////////
133 // Menu ids
134 /////////////////////////////////////////////////
135
136 // File menu ids
137 #define ctID_SAVE_SETUP_FILE 1001
138 #define ctID_SAVE_CONFIGURE_COMMAND 1002
139 #define ctID_GO 1003
140
141 // Edit menu ids
142 #define ctID_ADD_ITEM 1030
143 #define ctID_ADD_ITEM_CHECKBOX 1031
144 #define ctID_ADD_ITEM_RADIOBUTTON 1032
145 #define ctID_ADD_ITEM_STRING 1033
146 #define ctID_ADD_ITEM_GROUP 1034
147 #define ctID_ADD_ITEM_CHECK_GROUP 1035
148 #define ctID_ADD_ITEM_RADIO_GROUP 1036
149 #define ctID_DELETE_ITEM 1037
150 #define ctID_RENAME_ITEM 1038
151 #define ctID_CUSTOM_PROPERTY 1039
152 #define ctID_ADD_CUSTOM_PROPERTY 1040
153 #define ctID_EDIT_CUSTOM_PROPERTY 1041
154 #define ctID_DELETE_CUSTOM_PROPERTY 1042
155
156 // View menu ids
157 #define ctID_SETTINGS 1020
158 #define ctID_SHOW_TOOLBAR 1021
159
160 // Help menu ids
161 #define ctID_GOTO_WEBSITE 1050
162 #define ctID_ITEM_HELP 1051
163 #define ctID_REFERENCE_CONTENTS 1052
164
165 // Taskbar menu ids
166 #define ctID_TASKBAR_EXIT_APP 1202
167 #define ctID_TASKBAR_SHOW_APP 1203
168
169 // Tree context menu
170 #define ctID_TREE_PASTE_BEFORE 1300
171 #define ctID_TREE_PASTE_AFTER 1301
172 #define ctID_TREE_PASTE_AS_CHILD 1302
173 #define ctID_TREE_COPY 1303
174 #define ctID_TREE_CUT 1304
175
176 /////////////////////////////////////////////////
177 // Window/control ids
178 /////////////////////////////////////////////////
179
180 // Settings dialogs
181 #define ctID_SETTINGS_GENERAL 1500
182
183 // Regenerate setup.h/configure command
184 #define ctID_REGENERATE 1600
185
186 #endif
187 // _AP_WXCONFIGTOOL_H_
188