]> git.saurik.com Git - wxWidgets.git/blame - utils/configtool/src/wxconfigtool.h
wxURI is enough for the basic url operations.
[wxWidgets.git] / utils / configtool / src / wxconfigtool.h
CommitLineData
d7463f75
JS
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
71ada1a5 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
f8105809 16#pragma interface "wxconfigtool.cpp"
d7463f75
JS
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
30class ctMainFrame;
31class ctConfigToolDoc;
32
33/*!
34 * \brief The application class.
35 * The application class controls initialisation,
36 * cleanup and other application-wide issues.
37 */
38
39class ctApp: public wxApp
40{
41public:
42 /// Constructor.
43 ctApp();
44
45 /// Destructor.
254a2129 46 ~ctApp(){};
d7463f75
JS
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
4fe30bce 65 /// Returns true if the application should show tooltips.
d7463f75
JS
66 virtual bool UsingTooltips();
67
68 /// Returns the help controller object for the manual.
69 wxHelpControllerBase& GetHelpController() { return *m_helpController; }
70
be5a51fb 71 /// Returns the help controller object for the wxWidgets reference manual.
d7463f75
JS
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
be5a51fb 94 /// The help controller needs to be cleared before wxWidgets
d7463f75
JS
95 /// cleanup happens.
96 void ClearHelpControllers() ;
97
98protected:
99 /// The application directory.
100 wxString m_appDir;
101
d7463f75
JS
102 /// Notebook window.
103 wxNotebook* m_notebookWindow;
104
105 /// The help controller object.
106 wxHelpControllerBase* m_helpController;
107
108 /// The help controller object (reference manual).
109 wxHelpControllerBase* m_helpControllerReference;
110
111 /// The file history.
112 wxFileHistory m_fileHistory;
113
114 /// The configuration data.
115 ctSettings m_settings;
116
117 /// The document manager.
118 wxDocManager* m_docManager;
119
120public:
121DECLARE_EVENT_TABLE()
122};
123
124DECLARE_APP(ctApp)
125
126/////////////////////////////////////////////////
127// Menu ids
128/////////////////////////////////////////////////
129
130// File menu ids
131#define ctID_SAVE_SETUP_FILE 1001
132#define ctID_SAVE_CONFIGURE_COMMAND 1002
afc51590 133#define ctID_GO 1003
d7463f75
JS
134
135// Edit menu ids
136#define ctID_ADD_ITEM 1030
137#define ctID_ADD_ITEM_CHECKBOX 1031
138#define ctID_ADD_ITEM_RADIOBUTTON 1032
139#define ctID_ADD_ITEM_STRING 1033
140#define ctID_ADD_ITEM_GROUP 1034
141#define ctID_ADD_ITEM_CHECK_GROUP 1035
142#define ctID_ADD_ITEM_RADIO_GROUP 1036
143#define ctID_DELETE_ITEM 1037
144#define ctID_RENAME_ITEM 1038
145#define ctID_CUSTOM_PROPERTY 1039
146#define ctID_ADD_CUSTOM_PROPERTY 1040
147#define ctID_EDIT_CUSTOM_PROPERTY 1041
148#define ctID_DELETE_CUSTOM_PROPERTY 1042
149
150// View menu ids
151#define ctID_SETTINGS 1020
152#define ctID_SHOW_TOOLBAR 1021
153
154// Help menu ids
155#define ctID_GOTO_WEBSITE 1050
156#define ctID_ITEM_HELP 1051
157#define ctID_REFERENCE_CONTENTS 1052
158
159// Taskbar menu ids
160#define ctID_TASKBAR_EXIT_APP 1202
161#define ctID_TASKBAR_SHOW_APP 1203
162
163// Tree context menu
164#define ctID_TREE_PASTE_BEFORE 1300
165#define ctID_TREE_PASTE_AFTER 1301
166#define ctID_TREE_PASTE_AS_CHILD 1302
167#define ctID_TREE_COPY 1303
168#define ctID_TREE_CUT 1304
169
170/////////////////////////////////////////////////
171// Window/control ids
172/////////////////////////////////////////////////
173
174// Settings dialogs
175#define ctID_SETTINGS_GENERAL 1500
176
177// Regenerate setup.h/configure command
178#define ctID_REGENERATE 1600
179
180#endif
181 // _AP_WXCONFIGTOOL_H_
182