]> git.saurik.com Git - wxWidgets.git/blob - interface/app.h
many formatting fixes to wxSizer docs
[wxWidgets.git] / interface / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: app.h
3 // Purpose: interface of wxApp
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 /**
11 @class wxAppConsole
12 @wxheader{app.h}
13
14 This class is essential for writing console-only or hybrid apps without
15 having to define wxUSE_GUI=0.
16
17 @todo MORE INFO
18
19 @library{wxbase}
20 @category{appmanagement}
21
22 @see @ref overview_app
23 */
24 class wxAppConsole : public wxEvtHandler
25 {
26 protected:
27 /**
28 Creates the wxAppTraits object when GetTraits() needs it for the first time.
29
30 @see wxAppTraits
31 */
32 virtual wxAppTraits* CreateTraits();
33
34 public:
35
36 /**
37 Constructor.
38 */
39 wxAppConsole();
40
41 /**
42 Destructor.
43 */
44 virtual ~wxAppConsole();
45
46 /**
47 Dispatches the next event in the windowing system event queue.
48 Blocks until an event appears if there are none currently
49 (use Pending() if this is not wanted).
50
51 This can be used for programming event loops, e.g.
52
53 @code
54 while (app.Pending())
55 Dispatch();
56 @endcode
57
58 @return @false if the event loop should stop and @true otherwise.
59
60 @see Pending()
61 */
62 virtual bool Dispatch();
63
64 /**
65 Call this to explicitly exit the main message (event) loop.
66 You should normally exit the main loop (and the application) by deleting
67 the top window.
68 */
69 virtual void ExitMainLoop();
70
71 /**
72 This function is called before processing any event and allows the application
73 to preempt the processing of some events.
74
75 If this method returns -1 the event is processed normally, otherwise either
76 @true or @false should be returned and the event processing stops immediately
77 considering that the event had been already processed (for the former return
78 value) or that it is not going to be processed at all (for the latter one).
79 */
80 virtual int FilterEvent(wxEvent& event);
81
82 /**
83 Returns the user-readable application name.
84
85 The difference between this string and the one returned by GetAppName() is that
86 this one is meant to be shown to the user and so should be used for the window
87 titles, page headers and so on while the other one should be only used internally,
88 e.g. for the file names or configuration file keys.
89 By default, returns the same string as GetAppName().
90
91 @wxsince{2.9.0}
92 */
93 wxString GetAppDisplayName() const;
94
95 /**
96 Returns the application name.
97
98 @remarks wxWidgets sets this to a reasonable default before calling
99 OnInit(), but the application can reset it at will.
100
101 @see GetAppDisplayName()
102 */
103 wxString GetAppName() const;
104
105 /**
106 Gets the class name of the application. The class name may be used in a
107 platform specific manner to refer to the application.
108
109 @see SetClassName()
110 */
111 wxString GetClassName() const;
112
113 /**
114 Returns the one and only global application object.
115 Usually ::wxTheApp is usead instead.
116
117 @see SetInstance()
118 */
119 static wxAppConsole* GetInstance();
120
121 /**
122 Returns a pointer to the wxAppTraits object for the application.
123 If you want to customize the wxAppTraits object, you must override the
124 CreateTraits() function.
125 */
126 wxAppTraits* GetTraits();
127
128 /**
129 Returns the user-readable vendor name. The difference between this string
130 and the one returned by GetVendorName() is that this one is meant to be shown
131 to the user and so should be used for the window titles, page headers and so on
132 while the other one should be only used internally, e.g. for the file names or
133 configuration file keys.
134
135 By default, returns the same string as GetVendorName().
136
137 @wxsince{2.9.0}
138 */
139 const wxString& GetVendorDisplayName() const;
140
141 /**
142 Returns the application's vendor name.
143 */
144 const wxString& GetVendorName() const;
145
146 /**
147 This function simply invokes the given method @a func of the specified
148 event handler @a handler with the @a event as parameter. It exists solely
149 to allow to catch the C++ exceptions which could be thrown by all event
150 handlers in the application in one place: if you want to do this, override
151 this function in your wxApp-derived class and add try/catch clause(s) to it.
152 */
153 virtual void HandleEvent(wxEvtHandler* handler,
154 wxEventFunction func,
155 wxEvent& event) const;
156
157 /**
158 Returns @true if the main event loop is currently running, i.e. if the
159 application is inside OnRun().
160
161 This can be useful to test whether events can be dispatched. For example,
162 if this function returns @false, non-blocking sockets cannot be used because
163 the events from them would never be processed.
164 */
165 static bool IsMainLoopRunning();
166
167 /**
168 Mac specific. Called in response of an "open-application" Apple event.
169 Override this to create a new document in your app.
170 */
171 virtual void MacNewFile();
172
173 /**
174 Mac specific. Called in response of an "open-document" Apple event.
175
176 You need to override this method in order to open a document file after the
177 user double clicked on it or if the document file was dropped on either the
178 running application or the application icon in Finder.
179 */
180 virtual void MacOpenFile(const wxString& fileName);
181
182 /**
183 Mac specific. Called in response of a "get-url" Apple event.
184 */
185 virtual void MacOpenURL(const wxString& url);
186
187 /**
188 Mac specific. Called in response of a "print-document" Apple event.
189 */
190 virtual void MacPrintFile(const wxString& fileName);
191
192 /**
193 Mac specific. Called in response of a "reopen-application" Apple event.
194 */
195 virtual void MacReopenApp();
196
197 /**
198 Called by wxWidgets on creation of the application. Override this if you wish
199 to provide your own (environment-dependent) main loop.
200
201 @returns Returns 0 under X, and the wParam of the WM_QUIT message under
202 Windows.
203 */
204 virtual int MainLoop();
205
206 /**
207 This function is called when an assert failure occurs, i.e. the condition
208 specified in wxASSERT() macro evaluated to @false.
209
210 It is only called in debug mode (when @c __WXDEBUG__ is defined) as
211 asserts are not left in the release code at all.
212 The base class version shows the default assert failure dialog box proposing to
213 the user to stop the program, continue or ignore all subsequent asserts.
214
215 @param file
216 the name of the source file where the assert occurred
217 @param line
218 the line number in this file where the assert occurred
219 @param func
220 the name of the function where the assert occurred, may be
221 empty if the compiler doesn't support C99 __FUNCTION__
222 @param cond
223 the condition of the failed assert in text form
224 @param msg
225 the message specified as argument to wxASSERT_MSG or wxFAIL_MSG, will
226 be @NULL if just wxASSERT or wxFAIL was used
227 */
228 virtual void OnAssertFailure(const wxChar file, int line,
229 const wxChar func,
230 const wxChar cond,
231 const wxChar msg);
232
233 /**
234 Called when command line parsing fails (i.e. an incorrect command line option
235 was specified by the user). The default behaviour is to show the program usage
236 text and abort the program.
237
238 Return @true to continue normal execution or @false to return
239 @false from OnInit() thus terminating the program.
240
241 @see OnInitCmdLine()
242 */
243 virtual bool OnCmdLineError(wxCmdLineParser& parser);
244
245 /**
246 Called when the help option (@c --help) was specified on the command line.
247 The default behaviour is to show the program usage text and abort the program.
248
249 Return @true to continue normal execution or @false to return
250 @false from OnInit() thus terminating the program.
251
252 @see OnInitCmdLine()
253 */
254 virtual bool OnCmdLineHelp(wxCmdLineParser& parser);
255
256 /**
257 Called after the command line had been successfully parsed. You may override
258 this method to test for the values of the various parameters which could be
259 set from the command line.
260
261 Don't forget to call the base class version unless you want to suppress
262 processing of the standard command line options.
263 Return @true to continue normal execution or @false to return @false from
264 OnInit() thus terminating the program.
265
266 @see OnInitCmdLine()
267 */
268 virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
269
270 /**
271 This function is called if an unhandled exception occurs inside the main
272 application event loop. It can return @true to ignore the exception and to
273 continue running the loop or @false to exit the loop and terminate the
274 program. In the latter case it can also use C++ @c throw keyword to
275 rethrow the current exception.
276
277 The default behaviour of this function is the latter in all ports except under
278 Windows where a dialog is shown to the user which allows him to choose between
279 the different options. You may override this function in your class to do
280 something more appropriate.
281
282 Finally note that if the exception is rethrown from here, it can be caught in
283 OnUnhandledException().
284 */
285 virtual bool OnExceptionInMainLoop();
286
287 /**
288 Override this member function for any processing which needs to be
289 done as the application is about to exit. OnExit is called after
290 destroying all application windows and controls, but before
291 wxWidgets cleanup. Note that it is not called at all if
292 OnInit() failed.
293
294 The return value of this function is currently ignored, return the same
295 value as returned by the base class method if you override it.
296 */
297 virtual int OnExit();
298
299 /**
300 This function may be called if something fatal happens: an unhandled
301 exception under Win32 or a a fatal signal under Unix, for example. However,
302 this will not happen by default: you have to explicitly call
303 wxHandleFatalExceptions() to enable this.
304
305 Generally speaking, this function should only show a message to the user and
306 return. You may attempt to save unsaved data but this is not guaranteed to
307 work and, in fact, probably won't.
308
309 @see wxHandleFatalExceptions()
310 */
311 virtual void OnFatalException();
312
313 /**
314 This must be provided by the application, and will usually create the
315 application's main window, optionally calling SetTopWindow().
316
317 You may use OnExit() to clean up anything initialized here, provided
318 that the function returns @true.
319
320 Notice that if you want to to use the command line processing provided by
321 wxWidgets you have to call the base class version in the derived class
322 OnInit().
323
324 Return @true to continue processing, @false to exit the application
325 immediately.
326 */
327 virtual bool OnInit();
328
329 /**
330 Called from OnInit() and may be used to initialize the parser with the
331 command line options for this application. The base class versions adds
332 support for a few standard options only.
333 */
334 virtual void OnInitCmdLine(wxCmdLineParser& parser);
335
336 /**
337 This virtual function is where the execution of a program written in wxWidgets
338 starts. The default implementation just enters the main loop and starts
339 handling the events until it terminates, either because ExitMainLoop() has
340 been explicitly called or because the last frame has been deleted and
341 GetExitOnFrameDelete() flag is @true (this is the default).
342
343 The return value of this function becomes the exit code of the program, so it
344 should return 0 in case of successful termination.
345 */
346 virtual int OnRun();
347
348 /**
349 This function is called when an unhandled C++ exception occurs inside
350 OnRun() (the exceptions which occur during the program startup and shutdown
351 might not be caught at all). Notice that by now the main event loop has been
352 terminated and the program will exit, if you want to prevent this from happening
353 (i.e. continue running after catching an exception) you need to override
354 OnExceptionInMainLoop().
355
356 The default implementation shows information about the exception in debug build
357 but does nothing in the release build.
358 */
359 virtual void OnUnhandledException();
360
361 /**
362 Returns @true if unprocessed events are in the window system event queue.
363
364 @see Dispatch()
365 */
366 virtual bool Pending();
367
368 /**
369 Set the application name to be used in the user-visible places such as window
370 titles. See GetAppDisplayName() for more about the differences between the
371 display name and name.
372 */
373 void SetAppDisplayName(const wxString& name);
374
375 /**
376 Sets the name of the application. This name should be used for file names,
377 configuration file entries and other internal strings. For the user-visible
378 strings, such as the window titles, the application display name set by
379 SetAppDisplayName() is used instead.
380
381 By default the application name is set to the name of its executable file.
382
383 @see GetAppName()
384 */
385 void SetAppName(const wxString& name);
386
387 /**
388 Sets the class name of the application. This may be used in a platform specific
389 manner to refer to the application.
390
391 @see GetClassName()
392 */
393 void SetClassName(const wxString& name);
394
395 /**
396 Allows external code to modify global ::wxTheApp, but you should really
397 know what you're doing if you call it.
398
399 @param app
400 Replacement for the global application object.
401
402 @see GetInstance()
403 */
404 static void SetInstance(wxAppConsole* app);
405
406 /**
407 Set the vendor name to be used in the user-visible places.
408 See GetVendorDisplayName() for more about the differences between the
409 display name and name.
410 */
411 void SetVendorDisplayName(const wxString& name);
412
413 /**
414 Sets the name of application's vendor. The name will be used
415 in registry access. A default name is set by wxWidgets.
416
417 @see GetVendorName()
418 */
419 void SetVendorName(const wxString& name);
420
421 /**
422 Yields control to pending messages in the windowing system.
423
424 This can be useful, for example, when a time-consuming process writes to a
425 text window. Without an occasional yield, the text window will not be updated
426 properly, and on systems with cooperative multitasking, such as Windows 3.1
427 other processes will not respond.
428
429 Caution should be exercised, however, since yielding may allow the
430 user to perform actions which are not compatible with the current task.
431 Disabling menu items or whole menus during processing can avoid unwanted
432 reentrance of code: see ::wxSafeYield for a better function.
433
434 Note that Yield() will not flush the message logs. This is intentional as
435 calling Yield() is usually done to quickly update the screen and popping up
436 a message box dialog may be undesirable. If you do wish to flush the log
437 messages immediately (otherwise it will be done during the next idle loop
438 iteration), call wxLog::FlushActive.
439
440 Calling Yield() recursively is normally an error and an assert failure is
441 raised in debug build if such situation is detected. However if the
442 @a onlyIfNeeded parameter is @true, the method will just silently
443 return @false instead.
444 */
445 virtual bool Yield(bool onlyIfNeeded = false);
446
447 /**
448 Number of command line arguments (after environment-specific processing).
449 */
450 int argc;
451
452 /**
453 Command line arguments (after environment-specific processing).
454
455 Under Windows and Linux/Unix, you should parse the command line
456 arguments and check for files to be opened when starting your
457 application. Under OS X, you need to override MacOpenFile()
458 since command line arguments are used differently there.
459
460 You may use the wxCmdLineParser to parse command line arguments.
461 */
462 wxChar** argv;
463 };
464
465
466
467
468 /**
469 @class wxApp
470 @wxheader{app.h}
471
472 The wxApp class represents the application itself. It is used to:
473
474 @li set and get application-wide properties;
475 @li implement the windowing system message or event loop;
476 @li initiate application processing via wxApp::OnInit;
477 @li allow default processing of events not handled by other
478 objects in the application.
479
480 You should use the macro IMPLEMENT_APP(appClass) in your application
481 implementation file to tell wxWidgets how to create an instance of your
482 application class.
483
484 Use DECLARE_APP(appClass) in a header file if you want the wxGetApp function
485 (which returns a reference to your application object) to be visible to other
486 files.
487
488 @library{wxbase}
489 @category{appmanagement}
490
491 @see @ref overview_app
492 */
493 class wxApp : public wxAppConsole
494 {
495 public:
496 /**
497 Constructor. Called implicitly with a definition of a wxApp object.
498 */
499 wxApp();
500
501 /**
502 Destructor. Will be called implicitly on program exit if the wxApp
503 object is created on the stack.
504 */
505 virtual ~wxApp();
506
507 /**
508 Returns @true if the application will exit when the top-level frame is deleted.
509
510 @see SetExitOnFrameDelete()
511 */
512 bool GetExitOnFrameDelete() const;
513
514 /**
515 Returns @true if the application will use the best visual on systems that support
516 different visuals, @false otherwise.
517
518 @see SetUseBestVisual()
519 */
520 bool GetUseBestVisual() const;
521
522 /**
523 Returns a pointer to the top window.
524
525 @remarks If the top window hasn't been set using SetTopWindow(),
526 this function will find the first top-level window
527 (frame or dialog) and return that.
528
529 @see SetTopWindow()
530 */
531 virtual wxWindow* GetTopWindow() const;
532
533 /**
534 Returns @true if the application is active, i.e. if one of its windows is
535 currently in the foreground.
536
537 If this function returns @false and you need to attract users attention to
538 the application, you may use wxTopLevelWindow::RequestUserAttention to do it.
539 */
540 bool IsActive() const;
541
542 /**
543 Windows-only function for processing a message. This function is called
544 from the main message loop, checking for windows that may wish to process it.
545
546 The function returns @true if the message was processed, @false otherwise.
547 If you use wxWidgets with another class library with its own message loop,
548 you should make sure that this function is called to allow wxWidgets to
549 receive messages. For example, to allow co-existence with the Microsoft
550 Foundation Classes, override the PreTranslateMessage function:
551
552 @code
553 // Provide wxWidgets message loop compatibility
554 BOOL CTheApp::PreTranslateMessage(MSG *msg)
555 {
556 if (wxTheApp && wxTheApp->ProcessMessage((WXMSW *)msg))
557 return true;
558 else
559 return CWinApp::PreTranslateMessage(msg);
560 }
561 @endcode
562 */
563 bool ProcessMessage(WXMSG* msg);
564
565 /**
566 Sends idle events to a window and its children.
567 Please note that this function is internal to wxWidgets and shouldn't be used
568 by user code.
569
570 @remarks These functions poll the top-level windows, and their children,
571 for idle event processing. If @true is returned, more OnIdle
572 processing is requested by one or more window.
573
574 @see wxIdleEvent
575 */
576 bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
577
578 /**
579 Allows the programmer to specify whether the application will exit when the
580 top-level frame is deleted.
581
582 @param flag
583 If @true (the default), the application will exit when the top-level frame
584 is deleted. If @false, the application will continue to run.
585
586 @see GetExitOnFrameDelete(), @ref overview_app_shutdown
587 */
588 void SetExitOnFrameDelete(bool flag);
589
590 /**
591 Allows external code to modify global ::wxTheApp, but you should really
592 know what you're doing if you call it.
593
594 @param app
595 Replacement for the global application object.
596
597 @see GetInstance()
598 */
599 static void SetInstance(wxAppConsole* app);
600
601 /**
602 Allows runtime switching of the UI environment theme.
603
604 Currently implemented for wxGTK2-only.
605 Return @true if theme was successfully changed.
606
607 @param theme
608 The name of the new theme or an absolute path to a gtkrc-theme-file
609 */
610 virtual bool SetNativeTheme(const wxString& theme);
611
612 /**
613 Sets the 'top' window. You can call this from within OnInit() to let wxWidgets
614 know which is the main window. You don't have to set the top window;
615 it is only a convenience so that (for example) certain dialogs without parents
616 can use a specific window as the top window. If no top window is specified by the
617 application, wxWidgets just uses the first frame or dialog in its top-level window
618 list, when it needs to use the top window.
619
620 @param window
621 The new top window.
622
623 @see GetTopWindow(), OnInit()
624 */
625 void SetTopWindow(wxWindow* window);
626
627 /**
628 Allows the programmer to specify whether the application will use the best
629 visual on systems that support several visual on the same display. This is typically
630 the case under Solaris and IRIX, where the default visual is only 8-bit whereas
631 certain applications are supposed to run in TrueColour mode.
632
633 Note that this function has to be called in the constructor of the wxApp
634 instance and won't have any effect when called later on.
635 This function currently only has effect under GTK.
636
637 @param flag
638 If @true, the app will use the best visual.
639 @param forceTrueColour
640 If @true then the application will try to force using a TrueColour
641 visual and abort the app if none is found.
642 */
643 void SetUseBestVisual(bool flag, bool forceTrueColour = false);
644 };
645
646
647
648 // ============================================================================
649 // Global functions/macros
650 // ============================================================================
651
652
653 /** @ingroup group_funcmacro_rtti */
654 //@{
655
656 /**
657 This is used in headers to create a forward declaration of the wxGetApp()
658 function implemented by IMPLEMENT_APP().
659
660 It creates the declaration @a className wxGetApp(void).
661
662 @header{wx/app.h}
663
664 Example:
665
666 @code
667 DECLARE_APP(MyApp)
668 @endcode
669 */
670 #define DECLARE_APP( className )
671
672 /**
673 This is used in the application class implementation file to make the
674 application class known to wxWidgets for dynamic construction.
675
676 @header{wx/app.h}
677
678 Example:
679
680 @code
681 IMPLEMENT_APP(MyApp)
682 @endcode
683
684 @see DECLARE_APP().
685 */
686 #define IMPLEMENT_APP( className )
687
688 //@}
689
690
691
692 /**
693 The global pointer to the singleton wxApp object.
694
695 @see wxApp::GetInstance()
696 */
697 wxApp *wxTheApp;
698
699
700
701 /** @ingroup group_funcmacro_appinitterm */
702 //@{
703
704 /**
705 This function doesn't exist in wxWidgets but it is created by using the
706 IMPLEMENT_APP() macro.
707
708 Thus, before using it anywhere but in the same module where this macro is
709 used, you must make it available using DECLARE_APP().
710
711 The advantage of using this function compared to directly using the global
712 ::wxTheApp pointer is that the latter is of type wxApp* and so wouldn't
713 allow you to access the functions specific to your application class but
714 not present in wxApp while wxGetApp() returns the object of the right type.
715
716 @header{wx/app.h}
717 */
718 wxAppDerivedClass& wxGetApp();
719
720 /**
721 If @a doIt is @true, the fatal exceptions (also known as general protection
722 faults under Windows or segmentation violations in the Unix world) will be
723 caught and passed to wxApp::OnFatalException.
724
725 By default, i.e. before this function is called, they will be handled in
726 the normal way which usually just means that the application will be
727 terminated. Calling wxHandleFatalExceptions() with @a doIt equal to @false
728 will restore this default behaviour.
729
730 Notice that this function is only available if @c wxUSE_ON_FATAL_EXCEPTION
731 is 1 and under Windows platform this requires a compiler with support for
732 SEH (structured exception handling) which currently means only Microsoft
733 Visual C++ or a recent Borland C++ version.
734
735 @header{wx/app.h}
736 */
737 bool wxHandleFatalExceptions(bool doIt = true);
738
739 /**
740 This function is used in wxBase only and only if you don't create
741 wxApp object at all. In this case you must call it from your
742 @c main() function before calling any other wxWidgets functions.
743
744 If the function returns @false the initialization could not be performed,
745 in this case the library cannot be used and wxUninitialize() shouldn't be
746 called neither.
747
748 This function may be called several times but wxUninitialize() must be
749 called for each successful call to this function.
750
751 @header{wx/app.h}
752 */
753 bool wxInitialize();
754
755 /**
756 This function is for use in console (wxBase) programs only. It must be called
757 once for each previous successful call to wxInitialize().
758
759 @header{wx/app.h}
760 */
761 void wxUninitialize();
762
763 /**
764 This function wakes up the (internal and platform dependent) idle system,
765 i.e. it will force the system to send an idle event even if the system
766 currently @e is idle and thus would not send any idle event until after
767 some other event would get sent. This is also useful for sending events
768 between two threads and is used by the corresponding functions
769 wxPostEvent() and wxEvtHandler::AddPendingEvent().
770
771 @header{wx/app.h}
772 */
773 void wxWakeUpIdle();
774
775 /**
776 Calls wxApp::Yield.
777
778 @deprecated
779 This function is kept only for backwards compatibility. Please use
780 the wxApp::Yield method instead in any new code.
781
782 @header{wx/app.h}
783 */
784 bool wxYield();
785
786 /**
787 This function is similar to wxYield, except that it disables the user input to
788 all program windows before calling wxYield and re-enables it again
789 afterwards. If @a win is not @NULL, this window will remain enabled,
790 allowing the implementation of some limited user interaction.
791 Returns the result of the call to ::wxYield.
792
793 @header{wx/app.h}
794 */
795 bool wxSafeYield(wxWindow* win = NULL, bool onlyIfNeeded = false);
796
797 /**
798 This function initializes wxWidgets in a platform-dependent way. Use this if you
799 are not using the default wxWidgets entry code (e.g. main or WinMain).
800
801 For example, you can initialize wxWidgets from an Microsoft Foundation Classes
802 (MFC) application using this function.
803
804 @note This overload of wxEntry is available under all platforms.
805
806 @see wxEntryStart()
807
808 @header{wx/app.h}
809 */
810 int wxEntry(int& argc, wxChar** argv);
811
812 /**
813 See wxEntry(int&,wxChar**) for more info about this function.
814
815 Notice that under Windows CE platform, and only there, the type of @a pCmdLine
816 is @c wchar_t *, otherwise it is @c char *, even in Unicode build.
817
818 @remarks To clean up wxWidgets, call wxApp::OnExit followed by the static
819 function wxApp::CleanUp. For example, if exiting from an MFC application
820 that also uses wxWidgets:
821 @code
822 int CTheApp::ExitInstance()
823 {
824 // OnExit isn't called by CleanUp so must be called explicitly.
825 wxTheApp->OnExit();
826 wxApp::CleanUp();
827
828 return CWinApp::ExitInstance();
829 }
830 @endcode
831
832 @header{wx/app.h}
833 */
834 int wxEntry(HINSTANCE hInstance,
835 HINSTANCE hPrevInstance = NULL,
836 char* pCmdLine = NULL,
837 int nCmdShow = SW_SHOWNORMAL);
838
839 //@}
840
841
842
843 /** @ingroup group_funcmacro_procctrl */
844 //@{
845
846 /**
847 Exits application after calling wxApp::OnExit.
848
849 Should only be used in an emergency: normally the top-level frame
850 should be deleted (after deleting all other frames) to terminate the
851 application. See wxCloseEvent and wxApp.
852
853 @header{wx/app.h}
854 */
855 void wxExit();
856
857 //@}
858