Implement wx-prefixed macros versions of DECLARE/IMPLEMENT_APP_* macros.
Implement compatibility aliases for non-prefixed macro names. Require a final semicolon where possible. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,11 +24,11 @@
|
||||
objects in the application (see wxAppConsole::FilterEvent)
|
||||
@li implement Apple-specific event handlers (see wxAppConsole::MacXXX functions)
|
||||
|
||||
You should use the macro IMPLEMENT_APP(appClass) in your application
|
||||
You should use the macro wxIMPLEMENT_APP(appClass) in your application
|
||||
implementation file to tell wxWidgets how to create an instance of your
|
||||
application class.
|
||||
|
||||
Use DECLARE_APP(appClass) in a header file if you want the ::wxGetApp() function
|
||||
Use wxDECLARE_APP(appClass) in a header file if you want the ::wxGetApp() function
|
||||
(which returns a reference to your application object) to be visible to other
|
||||
files.
|
||||
|
||||
@@ -856,35 +856,37 @@ public:
|
||||
|
||||
/**
|
||||
This is used in headers to create a forward declaration of the ::wxGetApp()
|
||||
function implemented by IMPLEMENT_APP().
|
||||
function implemented by wxIMPLEMENT_APP().
|
||||
|
||||
It creates the declaration <tt>className& wxGetApp()</tt>.
|
||||
It creates the declaration <tt>className& wxGetApp()</tt>
|
||||
(requires a final semicolon).
|
||||
|
||||
@header{wx/app.h}
|
||||
|
||||
Example:
|
||||
|
||||
@code
|
||||
DECLARE_APP(MyApp)
|
||||
wxDECLARE_APP(MyApp);
|
||||
@endcode
|
||||
*/
|
||||
#define DECLARE_APP( className )
|
||||
#define wxDECLARE_APP( className )
|
||||
|
||||
/**
|
||||
This is used in the application class implementation file to make the
|
||||
application class known to wxWidgets for dynamic construction.
|
||||
Note that this macro requires a final semicolon.
|
||||
|
||||
@header{wx/app.h}
|
||||
|
||||
Example:
|
||||
|
||||
@code
|
||||
IMPLEMENT_APP(MyApp)
|
||||
wxIMPLEMENT_APP(MyApp);
|
||||
@endcode
|
||||
|
||||
@see DECLARE_APP().
|
||||
@see wxDECLARE_APP()
|
||||
*/
|
||||
#define IMPLEMENT_APP( className )
|
||||
#define wxIMPLEMENT_APP( className )
|
||||
|
||||
//@}
|
||||
|
||||
@@ -904,10 +906,10 @@ wxApp *wxTheApp;
|
||||
|
||||
/**
|
||||
This function doesn't exist in wxWidgets but it is created by using the
|
||||
IMPLEMENT_APP() macro.
|
||||
wxIMPLEMENT_APP() macro.
|
||||
|
||||
Thus, before using it anywhere but in the same module where this macro is
|
||||
used, you must make it available using DECLARE_APP().
|
||||
used, you must make it available using wxDECLARE_APP().
|
||||
|
||||
The advantage of using this function compared to directly using the global
|
||||
::wxTheApp pointer is that the latter is of type wxApp* and so wouldn't
|
||||
@@ -1060,11 +1062,11 @@ void wxExit();
|
||||
@def wxDISABLE_DEBUG_SUPPORT()
|
||||
|
||||
Use this macro to disable all debugging code in release build when not
|
||||
using IMPLEMENT_APP().
|
||||
using wxIMPLEMENT_APP().
|
||||
|
||||
Currently this macro disables assert checking and debug and trace level
|
||||
logging messages in release build (i.e. when @c NDEBUG is defined). It is
|
||||
used by IMPLEMENT_APP() macro so you only need to use it explicitly if you
|
||||
used by wxIMPLEMENT_APP() macro so you only need to use it explicitly if you
|
||||
don't use this macro but initialize wxWidgets directly (e.g. calls
|
||||
wxEntry() or wxEntryStart() itself).
|
||||
|
||||
|
@@ -249,10 +249,10 @@ void wxDisableAsserts();
|
||||
@def wxDISABLE_ASSERTS_IN_RELEASE_BUILD
|
||||
|
||||
Use this macro to disable asserts in release build when not using
|
||||
IMPLEMENT_APP().
|
||||
wxIMPLEMENT_APP().
|
||||
|
||||
By default, assert message boxes are suppressed in release build by
|
||||
IMPLEMENT_APP() which uses this macro. If you don't use IMPLEMENT_APP()
|
||||
wxIMPLEMENT_APP() which uses this macro. If you don't use wxIMPLEMENT_APP()
|
||||
because your application initializes wxWidgets directly (e.g. calls
|
||||
wxEntry() or wxEntryStart() itself) but still want to suppress assert
|
||||
notifications in release build you need to use this macro directly.
|
||||
|
@@ -90,7 +90,7 @@ void wxEntryCleanup();
|
||||
Initialize the library (may be called as many times as needed, but each
|
||||
call to wxInitialize() must be matched by wxUninitialize()).
|
||||
|
||||
With this function you may avoid DECLARE_APP() and IMPLEMENT_APP() macros
|
||||
With this function you may avoid wxDECLARE_APP() and wxIMPLEMENT_APP() macros
|
||||
and use wxInitialize() and wxUninitialize() dynamically in the
|
||||
program startup and termination.
|
||||
|
||||
|
@@ -1415,7 +1415,7 @@ void wxVLogSysError(const char* formatString, va_list argPtr);
|
||||
@def wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
|
||||
|
||||
Use this macro to disable logging at debug and trace levels in release
|
||||
build when not using IMPLEMENT_APP().
|
||||
build when not using wxIMPLEMENT_APP().
|
||||
|
||||
@see wxDISABLE_DEBUG_SUPPORT(),
|
||||
wxDISABLE_ASSERTS_IN_RELEASE_BUILD(),
|
||||
|
Reference in New Issue
Block a user