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