]> git.saurik.com Git - wxWidgets.git/blob - include/wx/app.h
no changes
[wxWidgets.git] / include / wx / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/app.h
3 // Purpose: wxAppBase class and macros used for declaration of wxApp
4 // derived class in the user code
5 // Author: Julian Smart
6 // Modified by:
7 // Created: 01/02/97
8 // RCS-ID: $Id$
9 // Copyright: (c) Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_APP_H_BASE_
14 #define _WX_APP_H_BASE_
15
16 // ----------------------------------------------------------------------------
17 // headers we have to include here
18 // ----------------------------------------------------------------------------
19
20 #include "wx/event.h" // for the base class
21
22 #if wxUSE_GUI
23 #include "wx/window.h" // for wxTopLevelWindows
24 #endif // wxUSE_GUI
25
26 #include "wx/build.h"
27 #include "wx/init.h" // we must declare wxEntry()
28
29 class WXDLLIMPEXP_BASE wxAppConsole;
30 class WXDLLIMPEXP_BASE wxAppTraits;
31 class WXDLLIMPEXP_BASE wxCmdLineParser;
32 class WXDLLIMPEXP_BASE wxLog;
33 class WXDLLIMPEXP_BASE wxMessageOutput;
34
35 class WXDLLEXPORT wxEventLoop;
36
37 // ----------------------------------------------------------------------------
38 // typedefs
39 // ----------------------------------------------------------------------------
40
41 // the type of the function used to create a wxApp object on program start up
42 typedef wxAppConsole* (*wxAppInitializerFunction)();
43
44 // ----------------------------------------------------------------------------
45 // constants
46 // ----------------------------------------------------------------------------
47
48 enum
49 {
50 wxPRINT_WINDOWS = 1,
51 wxPRINT_POSTSCRIPT = 2
52 };
53
54 // ----------------------------------------------------------------------------
55 // support for framebuffer ports
56 // ----------------------------------------------------------------------------
57
58 #if wxUSE_GUI
59 // VS: Fullscreen/framebuffer application needs to choose display mode prior
60 // to wxWindows initialization. This class holds information about display
61 // mode. It is used by wxApp::Set/GetDisplayMode.
62 class WXDLLIMPEXP_CORE wxDisplayModeInfo
63 {
64 public:
65 wxDisplayModeInfo() : m_ok(FALSE) {}
66 wxDisplayModeInfo(unsigned width, unsigned height, unsigned depth)
67 : m_width(width), m_height(height), m_depth(depth), m_ok(TRUE) {}
68
69 unsigned GetWidth() const { return m_width; }
70 unsigned GetHeight() const { return m_height; }
71 unsigned GetDepth() const { return m_depth; }
72 bool IsOk() const { return m_ok; }
73
74 private:
75 unsigned m_width, m_height, m_depth;
76 bool m_ok;
77 };
78 #endif // wxUSE_GUI
79
80
81 // ----------------------------------------------------------------------------
82 // wxAppConsole: wxApp for non-GUI applications
83 // ----------------------------------------------------------------------------
84
85 class WXDLLIMPEXP_BASE wxAppConsole : public wxEvtHandler
86 {
87 public:
88 // ctor and dtor
89 wxAppConsole();
90 virtual ~wxAppConsole();
91
92
93 // the virtual functions which may/must be overridden in the derived class
94 // -----------------------------------------------------------------------
95
96 // This is the very first function called for a newly created wxApp object,
97 // it is used by the library to do the global initialization. If, for some
98 // reason, you must override it (instead of just overriding OnInit(), as
99 // usual, for app-specific initializations), do not forget to call the base
100 // class version!
101 virtual bool Initialize(int& argc, wxChar **argv);
102
103 // This gives wxCocoa a chance to call OnInit() with a memory pool in place
104 virtual bool CallOnInit() { return OnInit(); }
105
106 // Called before OnRun(), this is a good place to do initialization -- if
107 // anything fails, return false from here to prevent the program from
108 // continuing. The command line is normally parsed here, call the base
109 // class OnInit() to do it.
110 virtual bool OnInit();
111
112 // this is here only temproary hopefully (FIXME)
113 virtual bool OnInitGui() { return true; }
114
115 // This is the replacement for the normal main(): all program work should
116 // be done here. When OnRun() returns, the programs starts shutting down.
117 virtual int OnRun() = 0;
118
119 // This is only called if OnInit() returned true so it's a good place to do
120 // any cleanup matching the initializations done there.
121 virtual int OnExit();
122
123 // This is the very last function called on wxApp object before it is
124 // destroyed. If you override it (instead of overriding OnExit() as usual)
125 // do not forget to call the base class version!
126 virtual void CleanUp();
127
128 // Called when a fatal exception occurs, this function should take care not
129 // to do anything which might provoke a nested exception! It may be
130 // overridden if you wish to react somehow in non-default way (core dump
131 // under Unix, application crash under Windows) to fatal program errors,
132 // however extreme care should be taken if you don't want this function to
133 // crash.
134 virtual void OnFatalException() { }
135
136 // Called from wxExit() function, should terminate the application a.s.a.p.
137 virtual void Exit();
138
139
140 // application info: name, description, vendor
141 // -------------------------------------------
142
143 // NB: all these should be set by the application itself, there are no
144 // reasonable default except for the application name which is taken to
145 // be argv[0]
146
147 // set/get the application name
148 wxString GetAppName() const
149 {
150 return m_appName.empty() ? m_className : m_appName;
151 }
152 void SetAppName(const wxString& name) { m_appName = name; }
153
154 // set/get the app class name
155 wxString GetClassName() const { return m_className; }
156 void SetClassName(const wxString& name) { m_className = name; }
157
158 // set/get the vendor name
159 const wxString& GetVendorName() const { return m_vendorName; }
160 void SetVendorName(const wxString& name) { m_vendorName = name; }
161
162
163 // cmd line parsing stuff
164 // ----------------------
165
166 // all of these methods may be overridden in the derived class to
167 // customize the command line parsing (by default only a few standard
168 // options are handled)
169 //
170 // you also need to call wxApp::OnInit() from YourApp::OnInit() for all
171 // this to work
172
173 #if wxUSE_CMDLINE_PARSER
174 // this one is called from OnInit() to add all supported options
175 // to the given parser (don't forget to call the base class version if you
176 // override it!)
177 virtual void OnInitCmdLine(wxCmdLineParser& parser);
178
179 // called after successfully parsing the command line, return TRUE
180 // to continue and FALSE to exit (don't forget to call the base class
181 // version if you override it!)
182 virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
183
184 // called if "--help" option was specified, return TRUE to continue
185 // and FALSE to exit
186 virtual bool OnCmdLineHelp(wxCmdLineParser& parser);
187
188 // called if incorrect command line options were given, return
189 // FALSE to abort and TRUE to continue
190 virtual bool OnCmdLineError(wxCmdLineParser& parser);
191 #endif // wxUSE_CMDLINE_PARSER
192
193
194 // miscellaneous customization functions
195 // -------------------------------------
196
197 // create the app traits object to which we delegate for everything which
198 // either should be configurable by the user (then he can change the
199 // default behaviour simply by overriding CreateTraits() and returning his
200 // own traits object) or which is GUI/console dependent as then wxAppTraits
201 // allows us to abstract the differences behind the common façade
202 wxAppTraits *GetTraits();
203
204 // the functions below shouldn't be used now that we have wxAppTraits
205 #if WXWIN_COMPATIBILITY_2_4
206
207 #if wxUSE_LOG
208 // override this function to create default log target of arbitrary
209 // user-defined class (default implementation creates a wxLogGui
210 // object) -- this log object is used by default by all wxLogXXX()
211 // functions.
212 virtual wxLog *CreateLogTarget();
213 #endif // wxUSE_LOG
214
215 // similar to CreateLogTarget() but for the global wxMessageOutput
216 // object
217 virtual wxMessageOutput *CreateMessageOutput();
218
219 #endif // WXWIN_COMPATIBILITY_2_4
220
221
222 // event processing functions
223 // --------------------------
224
225 // this method allows to filter all the events processed by the program, so
226 // you should try to return quickly from it to avoid slowing down the
227 // program to the crawl
228 //
229 // return value should be -1 to continue with the normal event processing,
230 // or TRUE or FALSE to stop further processing and pretend that the event
231 // had been already processed or won't be processed at all, respectively
232 virtual int FilterEvent(wxEvent& event);
233
234 // process all events in the wxPendingEvents list -- it is necessary to
235 // call this function to process posted events. This happens during each
236 // event loop iteration in GUI mode but if there is no main loop, it may be
237 // also called directly.
238 virtual void ProcessPendingEvents();
239
240 // doesn't do anything in this class, just a hook for GUI wxApp
241 virtual bool Yield(bool WXUNUSED(onlyIfNeeded) = false) { return true; }
242
243 // make sure that idle events are sent again
244 virtual void WakeUpIdle() { }
245
246
247 // debugging support
248 // -----------------
249
250 // this function is called when an assert failure occurs, the base class
251 // version does the normal processing (i.e. shows the usual assert failure
252 // dialog box)
253 //
254 // the arguments are the place where the assert occured, the text of the
255 // assert itself and the user-specified message
256 #ifdef __WXDEBUG__
257 virtual void OnAssert(const wxChar *file,
258 int line,
259 const wxChar *cond,
260 const wxChar *msg);
261 #endif // __WXDEBUG__
262
263 // check that the wxBuildOptions object (constructed in the application
264 // itself, usually the one from IMPLEMENT_APP() macro) matches the build
265 // options of the library and abort if it doesn't
266 static bool CheckBuildOptions(const char *optionsSignature,
267 const char *componentName);
268 #if WXWIN_COMPATIBILITY_2_4
269 static bool CheckBuildOptions(const wxBuildOptions& buildOptions)
270 {
271 return CheckBuildOptions(buildOptions.m_signature, "your program");
272 }
273 #endif
274
275 // implementation only from now on
276 // -------------------------------
277
278 // helpers for dynamic wxApp construction
279 static void SetInitializerFunction(wxAppInitializerFunction fn)
280 { ms_appInitFn = fn; }
281 static wxAppInitializerFunction GetInitializerFunction()
282 { return ms_appInitFn; }
283
284 // accessors for ms_appInstance field (external code might wish to modify
285 // it, this is why we provide a setter here as well, but you should really
286 // know what you're doing if you call it), wxTheApp is usually used instead
287 // of GetInstance()
288 static wxAppConsole *GetInstance() { return ms_appInstance; }
289 static void SetInstance(wxAppConsole *app) { ms_appInstance = app; }
290
291
292 // command line arguments (public for backwards compatibility)
293 int argc;
294 wxChar **argv;
295
296 protected:
297 // the function which creates the traits object when GetTraits() needs it
298 // for the first time
299 virtual wxAppTraits *CreateTraits();
300
301
302 // function used for dynamic wxApp creation
303 static wxAppInitializerFunction ms_appInitFn;
304
305 // the one and only global application object
306 static wxAppConsole *ms_appInstance;
307
308
309 // application info (must be set from the user code)
310 wxString m_vendorName, // vendor name (ACME Inc)
311 m_appName, // app name
312 m_className; // class name
313
314 // the class defining the application behaviour, NULL initially and created
315 // by GetTraits() when first needed
316 wxAppTraits *m_traits;
317
318
319 // the application object is a singleton anyhow, there is no sense in
320 // copying it
321 DECLARE_NO_COPY_CLASS(wxAppConsole)
322 };
323
324 // ----------------------------------------------------------------------------
325 // wxAppBase: the common part of wxApp implementations for all platforms
326 // ----------------------------------------------------------------------------
327
328 #if wxUSE_GUI
329
330 class WXDLLIMPEXP_CORE wxAppBase : public wxAppConsole
331 {
332 public:
333 wxAppBase();
334 virtual ~wxAppBase();
335
336 // the virtual functions which may/must be overridden in the derived class
337 // -----------------------------------------------------------------------
338
339 // very first initialization function
340 //
341 // Override: very rarely
342 virtual bool Initialize(int& argc, wxChar **argv);
343
344 // a platform-dependent version of OnInit(): the code here is likely to
345 // depend on the toolkit. default version does nothing.
346 //
347 // Override: rarely.
348 virtual bool OnInitGui();
349
350 // called to start program execution - the default version just enters
351 // the main GUI loop in which events are received and processed until
352 // the last window is not deleted (if GetExitOnFrameDelete) or
353 // ExitMainLoop() is called. In console mode programs, the execution
354 // of the program really starts here
355 //
356 // Override: rarely in GUI applications, always in console ones.
357 virtual int OnRun();
358
359 // a matching function for OnInit()
360 virtual int OnExit();
361
362 // very last clean up function
363 //
364 // Override: very rarely
365 virtual void CleanUp();
366
367
368 // the worker functions - usually not used directly by the user code
369 // -----------------------------------------------------------------
370
371 // execute the main GUI loop, the function returns when the loop ends
372 virtual int MainLoop();
373
374 // exit the main loop thus terminating the application
375 virtual void Exit();
376
377 // exit the main GUI loop during the next iteration (i.e. it does not
378 // stop the program immediately!)
379 virtual void ExitMainLoop();
380
381 // returns true if the program is initialized, i.e. OnInit() has been
382 // completed successfully
383 virtual bool Initialized() = 0;
384
385 // returns TRUE if there are unprocessed events in the event queue
386 virtual bool Pending();
387
388 // process the first event in the event queue (blocks until an event
389 // appears if there are none currently, use Pending() if this is not
390 // wanted), returns false if the event loop should stop and true
391 // otherwise
392 virtual bool Dispatch();
393
394 // process all currently pending events right now
395 //
396 // it is an error to call Yield() recursively unless the value of
397 // onlyIfNeeded is TRUE
398 //
399 // WARNING: this function is dangerous as it can lead to unexpected
400 // reentrancies (i.e. when called from an event handler it
401 // may result in calling the same event handler again), use
402 // with _extreme_ care or, better, don't use at all!
403 virtual bool Yield(bool onlyIfNeeded = FALSE) = 0;
404
405 // this virtual function is called in the GUI mode when the application
406 // becomes idle and normally just sends wxIdleEvent to all interested
407 // parties
408 //
409 // it should return TRUE if more idle events are needed, FALSE if not
410 virtual bool ProcessIdle();
411
412 // Send idle event to window and all subwindows
413 // Returns TRUE if more idle time is requested.
414 virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
415
416 // Perform standard OnIdle behaviour: call from port's OnIdle
417 void OnIdle(wxIdleEvent& event);
418
419
420 // top level window functions
421 // --------------------------
422
423 // return TRUE if our app has focus
424 virtual bool IsActive() const { return m_isActive; }
425
426 // set the "main" top level window
427 void SetTopWindow(wxWindow *win) { m_topWindow = win; }
428
429 // return the "main" top level window (if it hadn't been set previously
430 // with SetTopWindow(), will return just some top level window and, if
431 // there are none, will return NULL)
432 virtual wxWindow *GetTopWindow() const
433 {
434 if (m_topWindow)
435 return m_topWindow;
436 else if (wxTopLevelWindows.GetCount() > 0)
437 return wxTopLevelWindows.GetFirst()->GetData();
438 else
439 return (wxWindow *)NULL;
440 }
441
442 // control the exit behaviour: by default, the program will exit the
443 // main loop (and so, usually, terminate) when the last top-level
444 // program window is deleted. Beware that if you disable this behaviour
445 // (with SetExitOnFrameDelete(FALSE)), you'll have to call
446 // ExitMainLoop() explicitly from somewhere.
447 void SetExitOnFrameDelete(bool flag)
448 { m_exitOnFrameDelete = flag ? Yes : No; }
449 bool GetExitOnFrameDelete() const
450 { return m_exitOnFrameDelete == Yes; }
451
452
453 // display mode, visual, printing mode, ...
454 // ------------------------------------------------------------------------
455
456 // Get display mode that is used use. This is only used in framebuffer
457 // wxWin ports (such as wxMGL).
458 virtual wxDisplayModeInfo GetDisplayMode() const { return wxDisplayModeInfo(); }
459 // Set display mode to use. This is only used in framebuffer wxWin
460 // ports (such as wxMGL). This method should be called from
461 // wxApp::OnInitGui
462 virtual bool SetDisplayMode(const wxDisplayModeInfo& WXUNUSED(info)) { return TRUE; }
463
464 // set use of best visual flag (see below)
465 void SetUseBestVisual( bool flag ) { m_useBestVisual = flag; }
466 bool GetUseBestVisual() const { return m_useBestVisual; }
467
468 // set/get printing mode: see wxPRINT_XXX constants.
469 //
470 // default behaviour is the normal one for Unix: always use PostScript
471 // printing.
472 virtual void SetPrintMode(int WXUNUSED(mode)) { }
473 int GetPrintMode() const { return wxPRINT_POSTSCRIPT; }
474
475
476 // command line parsing (GUI-specific)
477 // ------------------------------------------------------------------------
478
479 #if wxUSE_CMDLINE_PARSER
480 virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
481 virtual void OnInitCmdLine(wxCmdLineParser& parser);
482 #endif
483
484 // miscellaneous other stuff
485 // ------------------------------------------------------------------------
486
487 // called by toolkit-specific code to set the app status: active (we have
488 // focus) or not and also the last window which had focus before we were
489 // deactivated
490 virtual void SetActive(bool isActive, wxWindow *lastFocus);
491
492
493 protected:
494 // delete all objects in wxPendingDelete list
495 void DeletePendingObjects();
496
497 // override base class method to use GUI traits
498 virtual wxAppTraits *CreateTraits();
499
500
501 // the main event loop of the application (may be NULL if the loop hasn't
502 // been started yet or has already terminated)
503 wxEventLoop *m_mainLoop;
504
505 // the main top level window (may be NULL)
506 wxWindow *m_topWindow;
507
508 // if Yes, exit the main loop when the last top level window is deleted, if
509 // No don't do it and if Later -- only do it once we reach our OnRun()
510 //
511 // the explanation for using this strange scheme is given in appcmn.cpp
512 enum
513 {
514 Later = -1,
515 No,
516 Yes
517 } m_exitOnFrameDelete;
518
519 // TRUE if the apps whats to use the best visual on systems where
520 // more than one are available (Sun, SGI, XFree86 4.0 ?)
521 bool m_useBestVisual;
522
523 // does any of our windows has focus?
524 bool m_isActive;
525
526
527 DECLARE_NO_COPY_CLASS(wxAppBase)
528 };
529
530 #endif // wxUSE_GUI
531
532 // ----------------------------------------------------------------------------
533 // now include the declaration of the real class
534 // ----------------------------------------------------------------------------
535
536 #if wxUSE_GUI
537 #if defined(__WXMSW__)
538 #include "wx/msw/app.h"
539 #elif defined(__WXMOTIF__)
540 #include "wx/motif/app.h"
541 #elif defined(__WXMGL__)
542 #include "wx/mgl/app.h"
543 #elif defined(__WXGTK__)
544 #include "wx/gtk/app.h"
545 #elif defined(__WXX11__)
546 #include "wx/x11/app.h"
547 #elif defined(__WXMAC__)
548 #include "wx/mac/app.h"
549 #elif defined(__WXCOCOA__)
550 #include "wx/cocoa/app.h"
551 #elif defined(__WXPM__)
552 #include "wx/os2/app.h"
553 #endif
554 #else // !GUI
555 // allow using just wxApp (instead of wxAppConsole) in console programs
556 typedef wxAppConsole wxApp;
557 #endif // GUI/!GUI
558
559 // ----------------------------------------------------------------------------
560 // the global data
561 // ----------------------------------------------------------------------------
562
563 // for compatibility, we define this macro to access the global application
564 // object of type wxApp
565 //
566 // note that instead of using of wxTheApp in application code you should
567 // consider using DECLARE_APP() after which you may call wxGetApp() which will
568 // return the object of the correct type (i.e. MyApp and not wxApp)
569 //
570 // the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
571 // console mode it does nothing at all
572 #define wxTheApp ((wxApp *)wxApp::GetInstance())
573
574 // ----------------------------------------------------------------------------
575 // global functions
576 // ----------------------------------------------------------------------------
577
578 // event loop related functions only work in GUI programs
579 // ------------------------------------------------------
580
581 // Force an exit from main loop
582 extern void WXDLLIMPEXP_BASE wxExit();
583
584 // Yield to other apps/messages
585 extern bool WXDLLIMPEXP_BASE wxYield();
586
587 // Yield to other apps/messages
588 extern void WXDLLIMPEXP_BASE wxWakeUpIdle();
589
590 // ----------------------------------------------------------------------------
591 // macros for dynamic creation of the application object
592 // ----------------------------------------------------------------------------
593
594 // Having a global instance of this class allows wxApp to be aware of the app
595 // creator function. wxApp can then call this function to create a new app
596 // object. Convoluted, but necessary.
597
598 class WXDLLIMPEXP_BASE wxAppInitializer
599 {
600 public:
601 wxAppInitializer(wxAppInitializerFunction fn)
602 { wxApp::SetInitializerFunction(fn); }
603 };
604
605 // Here's a macro you can use if your compiler really, really wants main() to
606 // be in your main program (e.g. hello.cpp). Now IMPLEMENT_APP should add this
607 // code if required.
608
609 #define IMPLEMENT_WXWIN_MAIN_CONSOLE \
610 int main(int argc, char **argv) { return wxEntry(argc, argv); }
611
612 #if !wxUSE_GUI || !defined(__WXMSW__)
613 #define IMPLEMENT_WXWIN_MAIN \
614 IMPLEMENT_WXWIN_MAIN_CONSOLE
615 #elif defined(__WXMSW__)
616 // we need HINSTANCE declaration to define WinMain()
617 #include "wx/msw/wrapwin.h"
618
619 #ifdef SW_SHOWNORMAL
620 #define wxSW_SHOWNORMAL SW_SHOWNORMAL
621 #else
622 #define wxSW_SHOWNORMAL 0
623 #endif
624
625 #define IMPLEMENT_WXWIN_MAIN \
626 extern int wxEntry(HINSTANCE hInstance, \
627 HINSTANCE hPrevInstance = NULL, \
628 char *pCmdLine = NULL, \
629 int nCmdShow = wxSW_SHOWNORMAL); \
630 extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
631 HINSTANCE hPrevInstance, \
632 char *lpCmdLine, \
633 int nCmdShow) \
634 { \
635 return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); \
636 }
637 #else
638 #define IMPLEMENT_WXWIN_MAIN
639 #endif
640
641 #ifdef __WXUNIVERSAL__
642 #include "wx/univ/theme.h"
643
644 #define IMPLEMENT_WX_THEME_SUPPORT \
645 WX_USE_THEME(win32); \
646 WX_USE_THEME(gtk);
647 #else
648 #define IMPLEMENT_WX_THEME_SUPPORT
649 #endif
650
651 // Use this macro if you want to define your own main() or WinMain() function
652 // and call wxEntry() from there.
653 #define IMPLEMENT_APP_NO_MAIN(appname) \
654 wxAppConsole *wxCreateApp() \
655 { \
656 wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
657 "your program"); \
658 return new appname; \
659 } \
660 wxAppInitializer \
661 wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
662 appname& wxGetApp() { return *(appname *)wxTheApp; }
663
664 // Same as IMPLEMENT_APP() normally but doesn't include themes support in
665 // wxUniversal builds
666 #define IMPLEMENT_APP_NO_THEMES(appname) \
667 IMPLEMENT_APP_NO_MAIN(appname) \
668 IMPLEMENT_WXWIN_MAIN
669
670 // Use this macro exactly once, the argument is the name of the wxApp-derived
671 // class which is the class of your application.
672 #define IMPLEMENT_APP(appname) \
673 IMPLEMENT_APP_NO_THEMES(appname) \
674 IMPLEMENT_WX_THEME_SUPPORT
675
676 // Same as IMPLEMENT_APP(), but for console applications.
677 #define IMPLEMENT_APP_CONSOLE(appname) \
678 IMPLEMENT_APP_NO_MAIN(appname) \
679 IMPLEMENT_WXWIN_MAIN_CONSOLE
680
681 // this macro can be used multiple times and just allows you to use wxGetApp()
682 // function
683 #define DECLARE_APP(appname) extern appname& wxGetApp();
684
685 #endif // _WX_APP_H_BASE_
686