remove the 1-space indentation from remaining pages; mark with @todo tags parts of the docs which need to be written yet

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-22 17:49:09 +00:00
parent dc28cdf8d4
commit 928f1a076c
28 changed files with 3869 additions and 3866 deletions

View File

@@ -9,207 +9,207 @@
/**
@page page_cppconst Preprocessor symbols defined by wxWidgets
@page page_cppconst Preprocessor symbols defined by wxWidgets
These are preprocessor symbols used in the wxWidgets source, grouped
by category (and sorted by alphabetical order inside each category).
All of these macros except for the @c wxUSE_XXX variety is defined if the
corresponding condition is @true and undefined if it isn't, so they should be
always tested using @ifdef_ and not @if_.
These are preprocessor symbols used in the wxWidgets source, grouped
by category (and sorted by alphabetical order inside each category).
All of these macros except for the @c wxUSE_XXX variety is defined if the
corresponding condition is @true and undefined if it isn't, so they should be
always tested using @ifdef_ and not @if_.
@li @ref page_cppconst_guisystem
@li @ref page_cppconst_os
@li @ref page_cppconst_cpu
@li @ref page_cppconst_hardware
@li @ref page_cppconst_compiler
@li @ref page_cppconst_featuretests
@li @ref page_cppconst_miscellaneous
@li @ref page_cppconst_guisystem
@li @ref page_cppconst_os
@li @ref page_cppconst_cpu
@li @ref page_cppconst_hardware
@li @ref page_cppconst_compiler
@li @ref page_cppconst_featuretests
@li @ref page_cppconst_miscellaneous
<hr>
<hr>
@section page_cppconst_guisystem GUI system
@section page_cppconst_guisystem GUI system
@beginDefList
@itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
@itemdef{__WIN32__, Win32 API}
@itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI $== 0$)}
@itemdef{__WXCOCOA__, OS X using Cocoa API}
@itemdef{__WXDFB__, wxUniversal using DirectFB}
@itemdef{__WXWINCE__, Windows CE}
@itemdef{__WXGTK__, GTK+}
@itemdef{__WXGTK12__, GTK+ 1.2 or higher}
@itemdef{__WXGTK20__, GTK+ 2.0 or higher}
@itemdef{__WXGTK24__, GTK+ 2.4 or higher}
@itemdef{__WXGTK26__, GTK+ 2.6 or higher}
@itemdef{__WXGTK210__, GTK+ 2.10 or higher}
@itemdef{__WXMOTIF__, Motif}
@itemdef{__WXMOTIF20__, Motif 2.0 or higher}
@itemdef{__WXMAC__, Mac OS all targets}
@itemdef{__WXMAC_CLASSIC__, MacOS for Classic}
@itemdef{__WXMAC_CARBON__, MacOS for Carbon CFM (running under Classic or OSX)
@beginDefList
@itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
@itemdef{__WIN32__, Win32 API}
@itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI $== 0$)}
@itemdef{__WXCOCOA__, OS X using Cocoa API}
@itemdef{__WXDFB__, wxUniversal using DirectFB}
@itemdef{__WXWINCE__, Windows CE}
@itemdef{__WXGTK__, GTK+}
@itemdef{__WXGTK12__, GTK+ 1.2 or higher}
@itemdef{__WXGTK20__, GTK+ 2.0 or higher}
@itemdef{__WXGTK24__, GTK+ 2.4 or higher}
@itemdef{__WXGTK26__, GTK+ 2.6 or higher}
@itemdef{__WXGTK210__, GTK+ 2.10 or higher}
@itemdef{__WXMOTIF__, Motif}
@itemdef{__WXMOTIF20__, Motif 2.0 or higher}
@itemdef{__WXMAC__, Mac OS all targets}
@itemdef{__WXMAC_CLASSIC__, MacOS for Classic}
@itemdef{__WXMAC_CARBON__, MacOS for Carbon CFM (running under Classic or OSX)
or true OS X Mach-O Builds}
@itemdef{__WXMAC_OSX__, MacOS X Carbon Mach-O Builds}
@itemdef{__WXMGL__, SciTech Soft MGL (__WXUNIVERSAL__ will be also defined)}
@itemdef{__WXMSW__, Any Windows}
@itemdef{__WXOSX__, Any Mac OS X port (either Carbon or Cocoa)}
@itemdef{__WXPALMOS__, PalmOS}
@itemdef{__WXPM__, OS/2 native Presentation Manager}
@itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)}
@itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x}
@itemdef{__WXX11__, wxX11 (__WXUNIVERSAL__ will be also defined)}
@itemdef{__WXWINE__, WINE (i.e. WIN32 on Unix)}
@itemdef{__WXUNIVERSAL__, wxUniversal port, always defined in addition
@itemdef{__WXMAC_OSX__, MacOS X Carbon Mach-O Builds}
@itemdef{__WXMGL__, SciTech Soft MGL (__WXUNIVERSAL__ will be also defined)}
@itemdef{__WXMSW__, Any Windows}
@itemdef{__WXOSX__, Any Mac OS X port (either Carbon or Cocoa)}
@itemdef{__WXPALMOS__, PalmOS}
@itemdef{__WXPM__, OS/2 native Presentation Manager}
@itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)}
@itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x}
@itemdef{__WXX11__, wxX11 (__WXUNIVERSAL__ will be also defined)}
@itemdef{__WXWINE__, WINE (i.e. WIN32 on Unix)}
@itemdef{__WXUNIVERSAL__, wxUniversal port, always defined in addition
to one of the symbols above so this should be tested first.}
@itemdef{__X__, any X11-based GUI toolkit except GTK+}
@endDefList
@itemdef{__X__, any X11-based GUI toolkit except GTK+}
@endDefList
There are two wxWidgets ports to Mac OS. One of them, wxMac, exists in two versions:
Classic and Carbon. The Classic version is the only one to work on Mac OS version 8.
The Carbon version may be built either as CFM or Mach-O (binary format, like ELF)
and the former may run under OS 9 while the latter only runs under OS X.
Finally, there is a new Cocoa port which can only be used under OS X. To
summarize:
There are two wxWidgets ports to Mac OS. One of them, wxMac, exists in two versions:
Classic and Carbon. The Classic version is the only one to work on Mac OS version 8.
The Carbon version may be built either as CFM or Mach-O (binary format, like ELF)
and the former may run under OS 9 while the latter only runs under OS X.
Finally, there is a new Cocoa port which can only be used under OS X. To
summarize:
@li If you want to test for all Mac platforms, classic and OS X, you
@li If you want to test for all Mac platforms, classic and OS X, you
should test both @c __WXMAC__ and @c __WXCOCOA__.
@li If you want to test for any GUI Mac port under OS X, use
@li If you want to test for any GUI Mac port under OS X, use
@c __WXOSX__.
@li If you want to test for any port under Mac OS X, including, for
@li If you want to test for any port under Mac OS X, including, for
example, wxGTK and also wxBase, use @c __DARWIN__ (see below).
The convention is to use the @c __WX prefix for these
symbols, although this has not always been followed.
The convention is to use the @c __WX prefix for these
symbols, although this has not always been followed.
@section page_cppconst_os Operating systems
@section page_cppconst_os Operating systems
@beginDefList
@itemdef{__APPLE__, any Mac OS version}
@itemdef{__AIX__, AIX}
@itemdef{__BSD__, Any *BSD system}
@itemdef{__CYGWIN__, Cygwin: Unix on Win32}
@itemdef{__DARWIN__, Mac OS X using the BSD Unix C library
@beginDefList
@itemdef{__APPLE__, any Mac OS version}
@itemdef{__AIX__, AIX}
@itemdef{__BSD__, Any *BSD system}
@itemdef{__CYGWIN__, Cygwin: Unix on Win32}
@itemdef{__DARWIN__, Mac OS X using the BSD Unix C library
(as opposed to using the Metrowerks MSL C/C++ library)}
@itemdef{__DATA_GENERAL__, DG-UX}
@itemdef{__DOS_GENERAL__, DOS (used with wxMGL only)}
@itemdef{__FREEBSD__, FreeBSD}
@itemdef{__HPUX__, HP-UX (Unix)}
@itemdef{__GNU__, GNU Hurd}
@itemdef{__LINUX__, Linux}
@itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
@itemdef{__OSF__, OSF/1}
@itemdef{__PALMOS__, PalmOS}
@itemdef{__SGI__, IRIX}
@itemdef{__SOLARIS__, Solaris}
@itemdef{__SUN__, Any Sun}
@itemdef{__SUNOS__, Sun OS}
@itemdef{__SVR4__, SystemV R4}
@itemdef{__SYSV__, SystemV generic}
@itemdef{__ULTRIX__, Ultrix}
@itemdef{__UNIX__, any Unix}
@itemdef{__UNIX_LIKE__, Unix, BeOS or VMS}
@itemdef{__VMS__, VMS}
@itemdef{__WINDOWS__, any Windows}
@itemdef{__WINE__, Wine}
@endDefList
@itemdef{__DATA_GENERAL__, DG-UX}
@itemdef{__DOS_GENERAL__, DOS (used with wxMGL only)}
@itemdef{__FREEBSD__, FreeBSD}
@itemdef{__HPUX__, HP-UX (Unix)}
@itemdef{__GNU__, GNU Hurd}
@itemdef{__LINUX__, Linux}
@itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
@itemdef{__OSF__, OSF/1}
@itemdef{__PALMOS__, PalmOS}
@itemdef{__SGI__, IRIX}
@itemdef{__SOLARIS__, Solaris}
@itemdef{__SUN__, Any Sun}
@itemdef{__SUNOS__, Sun OS}
@itemdef{__SVR4__, SystemV R4}
@itemdef{__SYSV__, SystemV generic}
@itemdef{__ULTRIX__, Ultrix}
@itemdef{__UNIX__, any Unix}
@itemdef{__UNIX_LIKE__, Unix, BeOS or VMS}
@itemdef{__VMS__, VMS}
@itemdef{__WINDOWS__, any Windows}
@itemdef{__WINE__, Wine}
@endDefList
@section page_cppconst_cpu Hardware architectures (CPU)
@section page_cppconst_cpu Hardware architectures (CPU)
Note that not all of these symbols are always defined, it depends on the
compiler used.
Note that not all of these symbols are always defined, it depends on the
compiler used.
@beginDefList
@itemdef{__ALPHA__, DEC Alpha architecture}
@itemdef{__INTEL__, Intel i386 or compatible}
@itemdef{__IA64__, Intel 64 bit architecture}
@itemdef{__POWERPC__, Motorola Power PC}
@endDefList
@beginDefList
@itemdef{__ALPHA__, DEC Alpha architecture}
@itemdef{__INTEL__, Intel i386 or compatible}
@itemdef{__IA64__, Intel 64 bit architecture}
@itemdef{__POWERPC__, Motorola Power PC}
@endDefList
@section page_cppconst_hardware Hardware type
@section page_cppconst_hardware Hardware type
@beginDefList
@itemdef{__SMARTPHONE__, Generic mobile devices with phone buttons and a small display}
@itemdef{__PDA__, Personal digital assistant, usually with touch screen}
@itemdef{__HANDHELD__, Small but powerful computer, usually with a keyboard}
@itemdef{__POCKETPC__, Microsoft-powered PocketPC devices with touch-screen}
@itemdef{__WINCE_STANDARDSDK__, Microsoft-powered Windows CE devices, for generic Windows CE applications}
@itemdef{__WINCE_NET__, Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater)}
@itemdef{WIN32_PLATFORM_WFSP, Microsoft-powered smartphone}
@endDefList
@beginDefList
@itemdef{__SMARTPHONE__, Generic mobile devices with phone buttons and a small display}
@itemdef{__PDA__, Personal digital assistant, usually with touch screen}
@itemdef{__HANDHELD__, Small but powerful computer, usually with a keyboard}
@itemdef{__POCKETPC__, Microsoft-powered PocketPC devices with touch-screen}
@itemdef{__WINCE_STANDARDSDK__, Microsoft-powered Windows CE devices, for generic Windows CE applications}
@itemdef{__WINCE_NET__, Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater)}
@itemdef{WIN32_PLATFORM_WFSP, Microsoft-powered smartphone}
@endDefList
@section page_cppconst_compiler Compilers
@section page_cppconst_compiler Compilers
@beginDefList
@itemdef{__BORLANDC__, Borland C++. The value of the macro corresponds
@beginDefList
@itemdef{__BORLANDC__, Borland C++. The value of the macro corresponds
to the compiler version: $500$ is $5.0$.}
@itemdef{__DJGPP__, DJGPP}
@itemdef{__DIGITALMARS__, Digital Mars}
@itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
@itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
@itemdef{__MINGW32__, MinGW}
@itemdef{__MWERKS__, CodeWarrior MetroWerks compiler}
@itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
@itemdef{__SYMANTECC__, Symantec C++}
@itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
@itemdef{__VISUALC__, Microsoft Visual C++, see also wxCHECK_VISUALC_VERSION.
@itemdef{__DJGPP__, DJGPP}
@itemdef{__DIGITALMARS__, Digital Mars}
@itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
@itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
@itemdef{__MINGW32__, MinGW}
@itemdef{__MWERKS__, CodeWarrior MetroWerks compiler}
@itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
@itemdef{__SYMANTECC__, Symantec C++}
@itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
@itemdef{__VISUALC__, Microsoft Visual C++, see also wxCHECK_VISUALC_VERSION.
The value of this macro corresponds to the compiler version:
@c 1020 for @c 4.2 (the first supported version), @c 1100 for
@c 5.0, @c 1200 for @c 6.0 and so on. For convenience, the symbols
__VISUALCn__ are also defined for each major compiler version from
5 to 9, i.e. you can use tests such @ifdef_ __VISUALC7__ to test
for compiler version being precisely 7.}
@itemdef{__XLC__, AIX compiler}
@itemdef{__WATCOMC__, Watcom C++. The value of this macro corresponds to
@itemdef{__XLC__, AIX compiler}
@itemdef{__WATCOMC__, Watcom C++. The value of this macro corresponds to
the compiler version, @c 1100 is @c 11.0 and @c 1200 is OpenWatcom.}
@itemdef{_WIN32_WCE, Windows CE version}
@endDefList
@itemdef{_WIN32_WCE, Windows CE version}
@endDefList
@section page_cppconst_featuretests Feature tests
@section page_cppconst_featuretests Feature tests
Some library features may not be always available even if they were selected
by the user. To make it possible to check if this is the case, the library
predefines the symbols in the form @c wxHAS_FEATURE. Unlike
@c wxUSE_FEATURE symbols which are defined by the library user (directly
in @c setup.h or by running configure script) and which must be always
defined as either $0$ or $1$, the @c wxHAS symbols are only defined if
the corresponding feature is available and not defined at all otherwise.
Some library features may not be always available even if they were selected
by the user. To make it possible to check if this is the case, the library
predefines the symbols in the form @c wxHAS_FEATURE. Unlike
@c wxUSE_FEATURE symbols which are defined by the library user (directly
in @c setup.h or by running configure script) and which must be always
defined as either $0$ or $1$, the @c wxHAS symbols are only defined if
the corresponding feature is available and not defined at all otherwise.
Currently the following symbols exist:
Currently the following symbols exist:
@beginDefList
@itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in size.}
@itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in size.}
@itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.}
@itemdef{wxHAS_RADIO_MENU_ITEMS,
@beginDefList
@itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in size.}
@itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in size.}
@itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.}
@itemdef{wxHAS_RADIO_MENU_ITEMS,
Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).}
@itemdef{wxHAS_RAW_KEY_CODES, Defined if raw key codes (see wxKeyEvent::GetRawKeyCode are supported.}
@itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in wxRegEx.}
@itemdef{wxHAS_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.}
@endDefList
@itemdef{wxHAS_RAW_KEY_CODES, Defined if raw key codes (see wxKeyEvent::GetRawKeyCode are supported.}
@itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in wxRegEx.}
@itemdef{wxHAS_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.}
@endDefList
@section page_cppconst_miscellaneous Miscellaneous
@section page_cppconst_miscellaneous Miscellaneous
@beginDefList
@itemdef{__WXWINDOWS__,
@beginDefList
@itemdef{__WXWINDOWS__,
always defined in wxWidgets applications, see also wxCHECK_VERSION}
@itemdef{__WXDEBUG__, defined in debug mode, undefined in release mode}
@itemdef{wxUSE_XXX,
@itemdef{__WXDEBUG__, defined in debug mode, undefined in release mode}
@itemdef{wxUSE_XXX,
if defined as $1$, feature XXX is active, see the
@ref page_wxusedef (the symbols of this form are always defined,
use @if_ and not @ifdef_ to test for them)}
@itemdef{WX_PRECOMP,
@itemdef{WX_PRECOMP,
is defined if precompiled headers (PCH) are in use. In
this case, @c wx/wxprec.h includes @c wx/wx.h which, in turn,
includes a number of wxWidgets headers thus making it unnecessary to include
@@ -217,31 +217,31 @@
and so the usual idiom which allows to support both cases is to first include
@c wx/wxprec.h} and then, inside @ifndef_ WX_PRECOMP, individual
headers you need.}
@itemdef{_UNICODE and UNICODE, both are defined if wxUSE_UNICODE is set to @c 1}
@itemdef{wxUSE_GUI,
@itemdef{_UNICODE and UNICODE, both are defined if wxUSE_UNICODE is set to @c 1}
@itemdef{wxUSE_GUI,
this particular feature test macro is defined to $1$
when compiling or using the library with the GUI features activated,
if it is defined as @c 0, only wxBase is available.}
@itemdef{wxUSE_BASE,
@itemdef{wxUSE_BASE,
only used by wxWidgets internally (defined as $1$ when
building wxBase code, either as a standalone library or as part of the
monolithic wxWidgets library, defined as $0$ when building GUI library only)}
@itemdef{wxNO_RTTI, is defined if the compiler RTTI support has been switched off}
@itemdef{wxNO_EXCEPTIONS,
@itemdef{wxNO_RTTI, is defined if the compiler RTTI support has been switched off}
@itemdef{wxNO_EXCEPTIONS,
is defined if the compiler support for C++ exceptions has been switched off}
@itemdef{wxNO_THREADS,
@itemdef{wxNO_THREADS,
if this macro is defined, the compilation options
don't include compiler flags needed for multithreaded code generation. This
implies that wxUSE_THREADS is $0$ and also that other (non-wx-based) threading
packages cannot be used neither.}
@itemdef{WXMAKINGDLL_XXX,
@itemdef{WXMAKINGDLL_XXX,
used internally and defined when building the
library @c XXX as a DLL; when a monolithic wxWidgets build is used only a
single @c WXMAKINGDLL symbol is defined}
@itemdef{WXUSINGDLL,
@itemdef{WXUSINGDLL,
defined when compiling code which uses wxWidgets as a DLL/shared library}
@itemdef{WXBUILDING,
@itemdef{WXBUILDING,
defined when building wxWidgets itself, whether as a static or shared library}
@endDefList
@endDefList
*/

View File

@@ -9,14 +9,14 @@
/**
@page page_keycodes Keycodes
@page page_keycodes Keycodes
@header{wx/defs.h}
@header{wx/defs.h}
Keypresses are represented by an enumerated type, wxKeyCode. The possible
values are the ASCII character codes, plus the following:
Keypresses are represented by an enumerated type, wxKeyCode. The possible
values are the ASCII character codes, plus the following:
@verbatim
@verbatim
WXK_BACK = 8
WXK_TAB = 9
WXK_RETURN = 13
@@ -149,6 +149,6 @@
WXK_SPECIAL18,
WXK_SPECIAL19,
WXK_SPECIAL20
@endverbatim
@endverbatim
*/

View File

@@ -9,13 +9,13 @@
/**
@page page_keymodifiers Key Modifiers
@page page_keymodifiers Key Modifiers
@header{wx/defs.h}
@header{wx/defs.h}
The following key modifier constants are defined:
The following key modifier constants are defined:
@verbatim
@verbatim
enum wxKeyModifier
{
wxMOD_NONE = 0x0000,
@@ -31,12 +31,12 @@
#endif
wxMOD_ALL = 0xffff
};
@endverbatim
@endverbatim
Notice that @c wxMOD_CMD should be used instead of @c wxMOD_CONTROL
in portable code to account for the fact that although
@c Control modifier exists under Mac OS, it is not used for the same
purpose as under Windows or Unix there while the special Mac-specific
@c Command modifier is used in exactly the same way.
Notice that @c wxMOD_CMD should be used instead of @c wxMOD_CONTROL
in portable code to account for the fact that although
@c Control modifier exists under Mac OS, it is not used for the same
purpose as under Windows or Unix there while the special Mac-specific
@c Command modifier is used in exactly the same way.
*/

View File

@@ -9,16 +9,18 @@
/**
@page page_languagecodes Language identifiers
@page page_languagecodes Language identifiers
The following wxLanguage constants may be used to specify the language
in wxLocale::Init and are returned by wxLocale::GetSystemLanguage:
The following wxLanguage constants may be used to specify the language
in wxLocale::Init and are returned by wxLocale::GetSystemLanguage:
<!-- generated code begins here -->
<!-- generated code begins here -->
This enum is generated by misc/languages/genlang.py
When making changes, please put them into misc/languages/langtabl.txt
@todo ADAPT THE PYTHON SCRIPTS TO GENERATE HERE THE LIST
<!-- generated code ends here -->
This enum is generated by misc/languages/genlang.py
When making changes, please put them into misc/languages/langtabl.txt
<!-- generated code ends here -->
*/

View File

@@ -9,148 +9,148 @@
/**
@page page_stdevtid Standard event identifiers
@page page_stdevtid Standard event identifiers
wxWidgets defines a special identifier value @c wxID_ANY which is used in
the following two situations:
wxWidgets defines a special identifier value @c wxID_ANY which is used in
the following two situations:
@li when creating a new window you may specify @c wxID_ANY to let
@li when creating a new window you may specify @c wxID_ANY to let
wxWidgets assign an unused identifier to it automatically
@li when installing an event handler using either the event table
@li when installing an event handler using either the event table
macros or wxEvtHandler::Connect,
you may use it to indicate that you want to handle the events
coming from any control, regardless of its identifier
Another standard special identifier value is @c wxID_NONE: this is a value
which is not matched by any other id.
Another standard special identifier value is @c wxID_NONE: this is a value
which is not matched by any other id.
wxWidgets also defines a few standard command identifiers which may be used by
the user code and also are sometimes used by wxWidgets itself. These reserved
identifiers are all in the range between @c wxID_LOWEST and
@c wxID_HIGHEST and, accordingly, the user code should avoid defining its
own constants in this range (e.g. by using wxNewId()).
wxWidgets also defines a few standard command identifiers which may be used by
the user code and also are sometimes used by wxWidgets itself. These reserved
identifiers are all in the range between @c wxID_LOWEST and
@c wxID_HIGHEST and, accordingly, the user code should avoid defining its
own constants in this range (e.g. by using wxNewId()).
@verbatim
wxID_LOWEST = 4999,
@verbatim
wxID_LOWEST = 4999,
wxID_OPEN,
wxID_CLOSE,
wxID_NEW,
wxID_SAVE,
wxID_SAVEAS,
wxID_REVERT,
wxID_EXIT,
wxID_UNDO,
wxID_REDO,
wxID_HELP,
wxID_PRINT,
wxID_PRINT_SETUP,
wxID_PAGE_SETUP,
wxID_PREVIEW,
wxID_ABOUT,
wxID_HELP_CONTENTS,
wxID_HELP_INDEX,
wxID_HELP_SEARCH,
wxID_HELP_COMMANDS,
wxID_HELP_PROCEDURES,
wxID_HELP_CONTEXT,
wxID_CLOSE_ALL,
wxID_PREFERENCES,
wxID_OPEN,
wxID_CLOSE,
wxID_NEW,
wxID_SAVE,
wxID_SAVEAS,
wxID_REVERT,
wxID_EXIT,
wxID_UNDO,
wxID_REDO,
wxID_HELP,
wxID_PRINT,
wxID_PRINT_SETUP,
wxID_PAGE_SETUP,
wxID_PREVIEW,
wxID_ABOUT,
wxID_HELP_CONTENTS,
wxID_HELP_INDEX,
wxID_HELP_SEARCH,
wxID_HELP_COMMANDS,
wxID_HELP_PROCEDURES,
wxID_HELP_CONTEXT,
wxID_CLOSE_ALL,
wxID_PREFERENCES,
wxID_EDIT = 5030,
wxID_CUT,
wxID_COPY,
wxID_PASTE,
wxID_CLEAR,
wxID_FIND,
wxID_DUPLICATE,
wxID_SELECTALL,
wxID_DELETE,
wxID_REPLACE,
wxID_REPLACE_ALL,
wxID_PROPERTIES,
wxID_EDIT = 5030,
wxID_CUT,
wxID_COPY,
wxID_PASTE,
wxID_CLEAR,
wxID_FIND,
wxID_DUPLICATE,
wxID_SELECTALL,
wxID_DELETE,
wxID_REPLACE,
wxID_REPLACE_ALL,
wxID_PROPERTIES,
wxID_VIEW_DETAILS,
wxID_VIEW_LARGEICONS,
wxID_VIEW_SMALLICONS,
wxID_VIEW_LIST,
wxID_VIEW_SORTDATE,
wxID_VIEW_SORTNAME,
wxID_VIEW_SORTSIZE,
wxID_VIEW_SORTTYPE,
wxID_VIEW_DETAILS,
wxID_VIEW_LARGEICONS,
wxID_VIEW_SMALLICONS,
wxID_VIEW_LIST,
wxID_VIEW_SORTDATE,
wxID_VIEW_SORTNAME,
wxID_VIEW_SORTSIZE,
wxID_VIEW_SORTTYPE,
wxID_FILE = 5050,
wxID_FILE1,
wxID_FILE2,
wxID_FILE3,
wxID_FILE4,
wxID_FILE5,
wxID_FILE6,
wxID_FILE7,
wxID_FILE8,
wxID_FILE9,
wxID_FILE = 5050,
wxID_FILE1,
wxID_FILE2,
wxID_FILE3,
wxID_FILE4,
wxID_FILE5,
wxID_FILE6,
wxID_FILE7,
wxID_FILE8,
wxID_FILE9,
// Standard button and menu IDs
wxID_OK = 5100,
wxID_CANCEL,
wxID_APPLY,
wxID_YES,
wxID_NO,
wxID_STATIC,
wxID_FORWARD,
wxID_BACKWARD,
wxID_DEFAULT,
wxID_MORE,
wxID_SETUP,
wxID_RESET,
wxID_CONTEXT_HELP,
wxID_YESTOALL,
wxID_NOTOALL,
wxID_ABORT,
wxID_RETRY,
wxID_IGNORE,
wxID_ADD,
wxID_REMOVE,
// Standard button and menu IDs
wxID_OK = 5100,
wxID_CANCEL,
wxID_APPLY,
wxID_YES,
wxID_NO,
wxID_STATIC,
wxID_FORWARD,
wxID_BACKWARD,
wxID_DEFAULT,
wxID_MORE,
wxID_SETUP,
wxID_RESET,
wxID_CONTEXT_HELP,
wxID_YESTOALL,
wxID_NOTOALL,
wxID_ABORT,
wxID_RETRY,
wxID_IGNORE,
wxID_ADD,
wxID_REMOVE,
wxID_UP,
wxID_DOWN,
wxID_HOME,
wxID_REFRESH,
wxID_STOP,
wxID_INDEX,
wxID_UP,
wxID_DOWN,
wxID_HOME,
wxID_REFRESH,
wxID_STOP,
wxID_INDEX,
wxID_BOLD,
wxID_ITALIC,
wxID_JUSTIFY_CENTER,
wxID_JUSTIFY_FILL,
wxID_JUSTIFY_RIGHT,
wxID_JUSTIFY_LEFT,
wxID_UNDERLINE,
wxID_INDENT,
wxID_UNINDENT,
wxID_ZOOM_100,
wxID_ZOOM_FIT,
wxID_ZOOM_IN,
wxID_ZOOM_OUT,
wxID_UNDELETE,
wxID_REVERT_TO_SAVED,
wxID_BOLD,
wxID_ITALIC,
wxID_JUSTIFY_CENTER,
wxID_JUSTIFY_FILL,
wxID_JUSTIFY_RIGHT,
wxID_JUSTIFY_LEFT,
wxID_UNDERLINE,
wxID_INDENT,
wxID_UNINDENT,
wxID_ZOOM_100,
wxID_ZOOM_FIT,
wxID_ZOOM_IN,
wxID_ZOOM_OUT,
wxID_UNDELETE,
wxID_REVERT_TO_SAVED,
// System menu IDs (used by wxUniv)
wxID_SYSTEM_MENU = 5200,
wxID_CLOSE_FRAME,
wxID_MOVE_FRAME,
wxID_RESIZE_FRAME,
wxID_MAXIMIZE_FRAME,
wxID_ICONIZE_FRAME,
wxID_RESTORE_FRAME,
// System menu IDs (used by wxUniv)
wxID_SYSTEM_MENU = 5200,
wxID_CLOSE_FRAME,
wxID_MOVE_FRAME,
wxID_RESIZE_FRAME,
wxID_MAXIMIZE_FRAME,
wxID_ICONIZE_FRAME,
wxID_RESTORE_FRAME,
// IDs used by generic file dialog (13 consecutive starting from this value)
wxID_FILEDLGG = 5900,
// IDs used by generic file dialog (13 consecutive starting from this value)
wxID_FILEDLGG = 5900,
// IDs used by generic file ctrl (4 consecutive starting from this value)
wxID_FILECTRL = 5950,
// IDs used by generic file ctrl (4 consecutive starting from this value)
wxID_FILECTRL = 5950,
wxID_HIGHEST = 5999
@endverbatim
wxID_HIGHEST = 5999
@endverbatim
*/

View File

@@ -9,70 +9,70 @@
/**
@page page_stockitems Stock items
@page page_stockitems Stock items
Window IDs for which stock buttons and menu items are created
(see the wxButton constructor and the wxMenuItem constructor):
Window IDs for which stock buttons and menu items are created
(see the wxButton constructor and the wxMenuItem constructor):
@beginDefList
@itemdef{<b>Stock ID</b>, <b>Stock label</b>}
@itemdef{wxID_ABOUT, "&About"}
@itemdef{wxID_ADD, "Add" and}
@itemdef{wxID_APPLY, "&Apply"}
@itemdef{wxID_BOLD, "&Bold"}
@itemdef{wxID_CANCEL, "&Cancel"}
@itemdef{wxID_CLEAR, "&Clear"}
@itemdef{wxID_CLOSE, "&Close"}
@itemdef{wxID_COPY, "&Copy"}
@itemdef{wxID_CUT, "Cu&t"}
@itemdef{wxID_DELETE, "&Delete"}
@itemdef{wxID_EDIT, "&Edit"}
@itemdef{wxID_FIND, "&Find"}
@itemdef{wxID_FILE, "&File"}
@itemdef{wxID_REPLACE, "Find and rep&lace"}
@itemdef{wxID_BACKWARD, "&Back"}
@itemdef{wxID_DOWN, "&Down"}
@itemdef{wxID_FORWARD, "&Forward"}
@itemdef{wxID_UP, "&Up"}
@itemdef{wxID_HELP, "&Help"}
@itemdef{wxID_HOME, "&Home"}
@itemdef{wxID_INDENT, "Indent"}
@itemdef{wxID_INDEX, "&Index"}
@itemdef{wxID_ITALIC, "&Italic"}
@itemdef{wxID_JUSTIFY_CENTER, "Centered"}
@itemdef{wxID_JUSTIFY_FILL, "Justified"}
@itemdef{wxID_JUSTIFY_LEFT, "Align Left"}
@itemdef{wxID_JUSTIFY_RIGHT, "Align Right"}
@itemdef{wxID_NEW, "&New"}
@itemdef{wxID_NO, "&No"}
@itemdef{wxID_OK, "&OK"}
@itemdef{wxID_OPEN, "&Open"}
@itemdef{wxID_PASTE, "&Paste"}
@itemdef{wxID_PREFERENCES, "&Preferences"}
@itemdef{wxID_PRINT, "&Print"}
@itemdef{wxID_PREVIEW, "Print previe&w"}
@itemdef{wxID_PROPERTIES, "&Properties"}
@itemdef{wxID_EXIT, "&Quit"}
@itemdef{wxID_REDO, "&Redo"}
@itemdef{wxID_REFRESH, "Refresh"}
@itemdef{wxID_REMOVE, "Remove"}
@itemdef{wxID_REVERT_TO_SAVED, "Revert to Saved"}
@itemdef{wxID_SAVE, "&Save"}
@itemdef{wxID_SAVEAS, "Save &As..."}
@itemdef{wxID_SELECTALL, "Select all"}
@itemdef{wxID_STOP, "&Stop"}
@itemdef{wxID_UNDELETE, "Undelete"}
@itemdef{wxID_UNDERLINE, "&Underline"}
@itemdef{wxID_UNDO, "&Undo"}
@itemdef{wxID_UNINDENT, "&Unindent"}
@itemdef{wxID_YES, "&Yes"}
@itemdef{wxID_ZOOM_100, "&Actual Size"}
@itemdef{wxID_ZOOM_FIT, "Zoom to &Fit"}
@itemdef{wxID_ZOOM_IN, "Zoom &In"}
@itemdef{wxID_ZOOM_OUT, "Zoom &Out"}
@endDefList
@beginDefList
@itemdef{<b>Stock ID</b>, <b>Stock label</b>}
@itemdef{wxID_ABOUT, "&About"}
@itemdef{wxID_ADD, "Add" and}
@itemdef{wxID_APPLY, "&Apply"}
@itemdef{wxID_BOLD, "&Bold"}
@itemdef{wxID_CANCEL, "&Cancel"}
@itemdef{wxID_CLEAR, "&Clear"}
@itemdef{wxID_CLOSE, "&Close"}
@itemdef{wxID_COPY, "&Copy"}
@itemdef{wxID_CUT, "Cu&t"}
@itemdef{wxID_DELETE, "&Delete"}
@itemdef{wxID_EDIT, "&Edit"}
@itemdef{wxID_FIND, "&Find"}
@itemdef{wxID_FILE, "&File"}
@itemdef{wxID_REPLACE, "Find and rep&lace"}
@itemdef{wxID_BACKWARD, "&Back"}
@itemdef{wxID_DOWN, "&Down"}
@itemdef{wxID_FORWARD, "&Forward"}
@itemdef{wxID_UP, "&Up"}
@itemdef{wxID_HELP, "&Help"}
@itemdef{wxID_HOME, "&Home"}
@itemdef{wxID_INDENT, "Indent"}
@itemdef{wxID_INDEX, "&Index"}
@itemdef{wxID_ITALIC, "&Italic"}
@itemdef{wxID_JUSTIFY_CENTER, "Centered"}
@itemdef{wxID_JUSTIFY_FILL, "Justified"}
@itemdef{wxID_JUSTIFY_LEFT, "Align Left"}
@itemdef{wxID_JUSTIFY_RIGHT, "Align Right"}
@itemdef{wxID_NEW, "&New"}
@itemdef{wxID_NO, "&No"}
@itemdef{wxID_OK, "&OK"}
@itemdef{wxID_OPEN, "&Open"}
@itemdef{wxID_PASTE, "&Paste"}
@itemdef{wxID_PREFERENCES, "&Preferences"}
@itemdef{wxID_PRINT, "&Print"}
@itemdef{wxID_PREVIEW, "Print previe&w"}
@itemdef{wxID_PROPERTIES, "&Properties"}
@itemdef{wxID_EXIT, "&Quit"}
@itemdef{wxID_REDO, "&Redo"}
@itemdef{wxID_REFRESH, "Refresh"}
@itemdef{wxID_REMOVE, "Remove"}
@itemdef{wxID_REVERT_TO_SAVED, "Revert to Saved"}
@itemdef{wxID_SAVE, "&Save"}
@itemdef{wxID_SAVEAS, "Save &As..."}
@itemdef{wxID_SELECTALL, "Select all"}
@itemdef{wxID_STOP, "&Stop"}
@itemdef{wxID_UNDELETE, "Undelete"}
@itemdef{wxID_UNDERLINE, "&Underline"}
@itemdef{wxID_UNDO, "&Undo"}
@itemdef{wxID_UNINDENT, "&Unindent"}
@itemdef{wxID_YES, "&Yes"}
@itemdef{wxID_ZOOM_100, "&Actual Size"}
@itemdef{wxID_ZOOM_FIT, "Zoom to &Fit"}
@itemdef{wxID_ZOOM_IN, "Zoom &In"}
@itemdef{wxID_ZOOM_OUT, "Zoom &Out"}
@endDefList
Note that some of the IDs listed above have also a stock accelerator
and an help string associated.
Note that some of the IDs listed above have also a stock accelerator
and an help string associated.
*/

View File

@@ -9,351 +9,351 @@
/**
@page page_wxusedef wxUSE preprocessor symbols defined by wxWidgets
@page page_wxusedef wxUSE preprocessor symbols defined by wxWidgets
This section documents the wxUSE preprocessor symbols used in the wxWidgets
source, grouped by category (and sorted by alphabetical order inside each
category). These symbols are always defined and whether the given feature is
active or not depends on their value: if defined as @c 1, feature is active,
otherwise it is disabled. Because of this these symbols should be always tested
using @if_ and not @ifdef_.
This section documents the wxUSE preprocessor symbols used in the wxWidgets
source, grouped by category (and sorted by alphabetical order inside each
category). These symbols are always defined and whether the given feature is
active or not depends on their value: if defined as @c 1, feature is active,
otherwise it is disabled. Because of this these symbols should be always tested
using @if_ and not @ifdef_.
@li @ref page_wxusedef_multi
@li @ref page_wxusedef_unix
@li @ref page_wxusedef_x11
@li @ref page_wxusedef_gtk
@li @ref page_wxusedef_mac
@li @ref page_wxusedef_motif
@li @ref page_wxusedef_cocoa
@li @ref page_wxusedef_os2
@li @ref page_wxusedef_msw
@li @ref page_wxusedef_univ
@li @ref page_wxusedef_multi
@li @ref page_wxusedef_unix
@li @ref page_wxusedef_x11
@li @ref page_wxusedef_gtk
@li @ref page_wxusedef_mac
@li @ref page_wxusedef_motif
@li @ref page_wxusedef_cocoa
@li @ref page_wxusedef_os2
@li @ref page_wxusedef_msw
@li @ref page_wxusedef_univ
<hr>
<hr>
@section page_wxusedef_multi Generic wxUSE preprocessor symbols
@section page_wxusedef_multi Generic wxUSE preprocessor symbols
@beginDefList
@itemdef{wxUSE_ABOUTDLG, Use wxAboutDialogInfo class.}
@itemdef{wxUSE_ACCEL, Use wxAcceleratorTable/Entry classes and support for them in wxMenu, wxMenuBar.}
@itemdef{wxUSE_AFM_FOR_POSTSCRIPT, In wxPostScriptDC class use AFM (adobe font metrics) file for character widths.}
@itemdef{wxUSE_ANIMATIONCTRL, Use wxAnimationCtrl class.}
@itemdef{wxUSE_APPLE_IEEE, IEEE Extended to/from double routines; see src/common/extended.c file.}
@itemdef{wxUSE_ARCHIVE_STREAMS, Enable streams for archive formats.}
@itemdef{wxUSE_AUI, Use AUI (dockable windows) library.}
@itemdef{wxUSE_BASE64, Enables Base64 support.}
@itemdef{wxUSE_BITMAPCOMBOBOX, Use wxBitmapComboBox class.}
@itemdef{wxUSE_BMPBUTTON, Use wxBitmapButton class.}
@itemdef{wxUSE_BUSYINFO, Use wxBusyInfo class.}
@itemdef{wxUSE_BUTTON, Use wxButton class.}
@itemdef{wxUSE_CALENDARCTRL, Use wxCalendarCtrl class.}
@itemdef{wxUSE_CARET, Use wxCaret class.}
@itemdef{wxUSE_CHECKBOX, Use wxCheckBox class.}
@itemdef{wxUSE_CHECKLISTBOX, Use wxCheckListBox class.}
@itemdef{wxUSE_CHOICE, Use wxChoice class.}
@itemdef{wxUSE_CHOICEBOOK, Use wxChoicebook class.}
@itemdef{wxUSE_CHOICEDLG, Use wxSingleChoiceDialog, or wxMultiChoiceDialog classes.}
@itemdef{wxUSE_CLIPBOARD, Use wxClipboard class.}
@itemdef{wxUSE_CMDLINE_PARSER, Use wxCmdLineParser class.}
@itemdef{wxUSE_COLLPANE, Use wxCollapsiblePane class.}
@itemdef{wxUSE_COLOURDLG, Use wxColourDialog class.}
@itemdef{wxUSE_COLOURPICKERCTRL, Use wxColourPickerCtrl class.}
@itemdef{wxUSE_COMBOBOX, Use wxComboBox class.}
@itemdef{wxUSE_COMBOCTRL, Use wxComboCtrl class.}
@itemdef{wxUSE_CONFIG, Use wxConfig and related classes.}
@itemdef{wxUSE_CONFIG_NATIVE, When enabled use native OS configuration instead of the wxFileConfig class.}
@itemdef{wxUSE_CONSOLE_EVENTLOOP, Enable event loop in console programs.}
@itemdef{wxUSE_CONSTRAINTS, Use wxLayoutConstraints}
@itemdef{wxUSE_CONTROLS, If set to $0$, no classes deriving from wxControl can be used.}
@itemdef{wxUSE_DATAOBJ, Use wxDataObject and related classes.}
@itemdef{wxUSE_DATAVIEWCTRL, Use wxDataViewCtrl class.}
@itemdef{wxUSE_DATEPICKCTRL, Use wxDatePickerCtrl class.}
@itemdef{wxUSE_DATETIME, Use wxDateTime and related classes.}
@itemdef{wxUSE_DBGHELP, Use wxDbgHelpDLL class.}
@itemdef{wxUSE_DEBUG_CONTEXT, Use wxDebugContext class.}
@itemdef{wxUSE_DEBUG_NEW_ALWAYS, See @ref overview_debugging}
@itemdef{wxUSE_DEBUGREPORT, Use wxDebugReport class.}
@itemdef{wxUSE_DIALUP_MANAGER, Use wxDialUpManager and related classes.}
@itemdef{wxUSE_DIRDLG, Use wxDirDialog class.}
@itemdef{wxUSE_DIRPICKERCTRL, Use wxDirPickerCtrl class.}
@itemdef{wxUSE_DISPLAY, Use wxDisplay and related classes.}
@itemdef{wxUSE_DOC_VIEW_ARCHITECTURE, Use wxDocument and related classes.}
@itemdef{wxUSE_DRAG_AND_DROP, Use Drag and drop classes.}
@itemdef{wxUSE_DRAGIMAGE, Use wxDragImage class.}
@itemdef{wxUSE_DYNAMIC_LOADER, Use wxPluginManager and related classes. Requires wxDynamicLibrary}
@itemdef{wxUSE_DYNLIB_CLASS, Use wxDynamicLibrary}
@itemdef{wxUSE_EDITABLELISTBOX, Use wxEditableListBox class.}
@itemdef{wxUSE_EXCEPTIONS, Use exception handling.}
@itemdef{wxUSE_EXPAT, enable XML support using expat parser.}
@itemdef{wxUSE_EXTENDED_RTTI, Use extended RTTI, see also Runtime class information (RTTI)}
@itemdef{wxUSE_FFILE, Use wxFFile class.}
@itemdef{wxUSE_FILE, Use wxFile class.}
@itemdef{wxUSE_FILECONFIG, Use wxFileConfig class.}
@itemdef{wxUSE_FILECTRL, Use wxFileCtrl class.}
@itemdef{wxUSE_FILEDLG, Use wxFileDialog class.}
@itemdef{wxUSE_FILEPICKERCTRL, Use wxFilePickerCtrl class.}
@itemdef{wxUSE_FILESYSTEM, Use wxFileSystem and related classes.}
@itemdef{wxUSE_FINDREPLDLG, Use wxFindReplaceDialog class.}
@itemdef{wxUSE_FONTDLG, Use wxFontDialog class.}
@itemdef{wxUSE_FONTENUM, Use wxFontEnumerator class.}
@itemdef{wxUSE_FONTMAP, Use wxFontMapper class.}
@itemdef{wxUSE_FONTPICKERCTRL, Use wxFontPickerCtrl class.}
@itemdef{wxUSE_FS_ARCHIVE, Use virtual archive filesystems like wxArchiveFSHandler in wxFileSystem class.}
@itemdef{wxUSE_FS_INET, Use virtual HTTP/FTP filesystems like wxInternetFSHandler in wxFileSystem class.}
@itemdef{wxUSE_FS_ZIP, Please use wxUSE_FS_ARCHIVE instead.}
@itemdef{wxUSE_FSVOLUME, Use wxFSVolume class.}
@itemdef{wxUSE_GAUGE, Use wxGauge class.}
@itemdef{wxUSE_GENERIC_DRAGIMAGE, Used in wxDragImage sample.}
@itemdef{wxUSE_GENERIC_DRAWELLIPSE, See comment in wx/dc.h file.}
@itemdef{wxUSE_GEOMETRY, Use common geometry classes}
@itemdef{wxUSE_GIF, Use GIF wxImageHandler}
@itemdef{wxUSE_GLCANVAS, Enables OpenGL support.}
@itemdef{wxUSE_GLOBAL_MEMORY_OPERATORS, Override global operators @c new and @c delete to use wxWidgets memory leak detection}
@itemdef{wxUSE_GRAPHICS_CONTEXT, Use wxGraphicsContext and related classes.}
@itemdef{wxUSE_GRID, Use wxGrid and related classes.}
@itemdef{wxUSE_GUI, Use the GUI classes; if set to $0$ only non-GUI classes are available.}
@itemdef{wxUSE_HELP, Use wxHelpController and related classes.}
@itemdef{wxUSE_HTML, Use wxHtmlWindow and related classes.}
@itemdef{wxUSE_HYPERLINKCTRL, Use wxHyperlinkCtrl}
@itemdef{wxUSE_ICO_CUR, Support Windows ICO and CUR formats.}
@itemdef{wxUSE_IFF, Enables the wxImage handler for Amiga IFF images.}
@itemdef{wxUSE_IMAGE, Use wxImage and related classes.}
@itemdef{wxUSE_IMAGLIST, Use wxImageList class.}
@itemdef{wxUSE_INTL, Use wxLocale and related classes.}
@itemdef{wxUSE_IOSTREAMH, Use header "iostream.h" instead of "iostream".}
@itemdef{wxUSE_IPC, Use interprocess communication classes.}
@itemdef{wxUSE_IPV6, Use experimental wxIPV6address and related classes.}
@itemdef{wxUSE_JOYSTICK, Use wxJoystick class.}
@itemdef{wxUSE_LIBJPEG, Enables JPEG format support (requires libjpeg).}
@itemdef{wxUSE_LIBPNG, Enables PNG format support (requires libpng). Also requires wxUSE_ZLIB.}
@itemdef{wxUSE_LIBTIFF, Enables TIFF format support (requires libtiff).}
@itemdef{wxUSE_LISTBOOK, Use wxListbook class.}
@itemdef{wxUSE_LISTBOX, Use wxListBox class.}
@itemdef{wxUSE_LISTCTRL, Use wxListCtrl class.}
@itemdef{wxUSE_LOG, Use wxLog and related classes.}
@itemdef{wxUSE_LOG_DEBUG, Enabled when wxLog used with __WXDEBUG__ defined.}
@itemdef{wxUSE_LOG_DIALOG, Use wxLogDialog class.}
@itemdef{wxUSE_LOGGUI, Use wxLogGui class.}
@itemdef{wxUSE_LOGWINDOW, Use wxLogFrame class.}
@itemdef{wxUSE_LONGLONG, Use wxLongLong class.}
@itemdef{wxUSE_LONGLONG_NATIVE, Use native <tt>long long</tt> type in wxLongLong implementation.}
@itemdef{wxUSE_LONGLONG_WX, Use generic wxLongLong implementation.}
@itemdef{wxUSE_MDI, Use wxMDIParentFrame, and wxMDIChildFrame}
@itemdef{wxUSE_MDI_ARCHITECTURE, Use MDI-based document-view classes.}
@itemdef{wxUSE_MEDIACTRL, Use wxMediaCtrl.}
@itemdef{wxUSE_MEMORY_TRACING, Use wxWidgets memory leak detection, not recommended if using another memory debugging tool.}
@itemdef{wxUSE_MENUS, Use wxMenu and related classes.}
@itemdef{wxUSE_METAFILE, Use wxMetaFile and related classes.}
@itemdef{wxUSE_MIMETYPE, Use wxFileType class.}
@itemdef{wxUSE_MINIFRAME, Use wxMiniFrame class.}
@itemdef{wxUSE_MOUSEWHEEL, Support mouse wheel events.}
@itemdef{wxUSE_MSGDLG, Use wxMessageDialog class and wxMessageBox function.}
@itemdef{wxUSE_NATIVE_STATUSBAR, Use native wxStatusBar class.}
@itemdef{wxUSE_NOTEBOOK, Use wxNotebook and related classes.}
@itemdef{wxUSE_NUMBERDLG, Use wxNumberEntryDialog class.}
@itemdef{wxUSE_ODCOMBOBOX, Use wxOwnerDrawnComboBox class.}
@itemdef{wxUSE_ON_FATAL_EXCEPTION, Catch signals in wxApp::OnFatalException method.}
@itemdef{wxUSE_OPENGL, Please use wxUSE_GLCANVAS to test for enabled OpenGL support instead.}
@itemdef{wxUSE_OWNER_DRAWN, Use interface for owner-drawn GUI elements.}
@itemdef{wxUSE_PALETTE, Use wxPalette and related classes.}
@itemdef{wxUSE_PCX, Enables wxImage PCX handler.}
@itemdef{wxUSE_PNM, Enables wxImage PNM handler.}
@itemdef{wxUSE_POPUPWIN, Use wxPopupWindow class.}
@itemdef{wxUSE_POSTSCRIPT, Use wxPostScriptPrinter class.}
@itemdef{wxUSE_PRINTF_POS_PARAMS, Use wxVsnprintf which supports positional parameters.}
@itemdef{wxUSE_PRINTING_ARCHITECTURE, Enable printer classes.}
@itemdef{wxUSE_PROGRESSDLG, Enables progress dialog classes.}
@itemdef{wxUSE_PROTOCOL, Use wxProtocol and derived classes.}
@itemdef{wxUSE_PROTOCOL_FILE, Use wxFileProto class. (requires wxProtocol)}
@itemdef{wxUSE_PROTOCOL_FTP, Use wxFTP class. (requires wxProtocol)}
@itemdef{wxUSE_PROTOCOL_HTTP, Use wxHTTP class. (requireswxProtocol)}
@itemdef{wxUSE_RADIOBOX, Use wxRadioBox class.}
@itemdef{wxUSE_RADIOBTN, Use wxRadioButton class.}
@itemdef{wxUSE_REGEX, Use wxRegEx class.}
@itemdef{wxUSE_RICHTEXT, Use wxRichTextCtrl class.}
@itemdef{wxUSE_RICHTEXT_XML_HANDLER, See src/xrc/xh_richtext.cpp file.}
@itemdef{wxUSE_SASH, Use wxSashWindow class.}
@itemdef{wxUSE_SCROLLBAR, Use wxScrollBar class.}
@itemdef{wxUSE_SEARCHCTRL, Use wxSearchCtrl class.}
@itemdef{wxUSE_SELECT_DISPATCHER, Use wxSelectDispatcher class.}
@itemdef{wxUSE_SLIDER, Use wxSlider class.}
@itemdef{wxUSE_SNGLINST_CHECKER, Use wxSingleInstanceChecker class.}
@itemdef{wxUSE_SOCKETS, Enables Network address classes.}
@itemdef{wxUSE_SOUND, Use wxSound class.}
@itemdef{wxUSE_SPINBTN, Use wxSpinButton class.}
@itemdef{wxUSE_SPINCTRL, Use wxSpinCtrl class.}
@itemdef{wxUSE_SPLASH, Use wxSplashScreen class.}
@itemdef{wxUSE_SPLINES, Provide methods for spline drawing in wxDC.}
@itemdef{wxUSE_SPLITTER, Use wxSplitterWindow class.}
@itemdef{wxUSE_STACKWALKER, Enables wxStackWalker and related classes.}
@itemdef{wxUSE_STARTUP_TIPS, Use startup tips, wxTipProvider class.}
@itemdef{wxUSE_STATBMP, Use wxStaticBitmap class.}
@itemdef{wxUSE_STATBOX, Use wxStaticBox class.}
@itemdef{wxUSE_STATLINE, Use wxStaticLine class.}
@itemdef{wxUSE_STATTEXT, Use wxStaticText class.}
@itemdef{wxUSE_STATUSBAR, Use wxStatusBar class.}
@itemdef{wxUSE_STC, Use wxStyledTextCtrl.}
@itemdef{wxUSE_STD_IOSTREAM, Use standard C++ stream classes.}
@itemdef{wxUSE_STD_STRING, Use standard C++ string classes.}
@itemdef{wxUSE_STDPATHS, Use wxStandardPaths class.}
@itemdef{wxUSE_STL, Use Standard Template Library for the container classes and wxString implementation.}
@itemdef{wxUSE_STOPWATCH, Use wxStopWatch class.}
@itemdef{wxUSE_STREAMS, Enable stream classes.}
@itemdef{wxUSE_SVG, Use wxSVGFileDC class.}
@itemdef{wxUSE_SYSTEM_OPTIONS, Use wxSystemOptions class.}
@itemdef{wxUSE_TAB_DIALOG, Use the obsolete wxTabControl class.}
@itemdef{wxUSE_TARSTREAM, Enable Tar files support.}
@itemdef{wxUSE_TASKBARICON, Use wxTaskBarIcon class.}
@itemdef{wxUSE_TEXTBUFFER, Use wxTextBuffer class.}
@itemdef{wxUSE_TEXTCTRL, Use wxTextCtrl class.}
@itemdef{wxUSE_TEXTDLG, Use wxTextEntryDialog class.}
@itemdef{wxUSE_TEXTFILE, Use wxTextFile class.}
@itemdef{wxUSE_TGA, Enable wxImage TGA handler.}
@itemdef{wxUSE_THREADS, Use wxThread and related classes.}
@itemdef{wxUSE_TIMER, Use wxTimer class.}
@itemdef{wxUSE_TIPWINDOW, Use wxTipWindow class.}
@itemdef{wxUSE_TOGGLEBTN, Use wxToggleButton class.}
@itemdef{wxUSE_TOOLBAR, Use wxToolBar class.}
@itemdef{wxUSE_TOOLBAR_NATIVE, Use native wxToolBar class.}
@itemdef{wxUSE_TOOLBOOK, Use wxToolbook class.}
@itemdef{wxUSE_TOOLTIPS, Use wxToolTip class.}
@itemdef{wxUSE_TREEBOOK, Use wxTreebook class.}
@itemdef{wxUSE_TREECTRL, Use wxTreeCtrl class.}
@itemdef{wxUSE_TTM_WINDOWFROMPOINT, Obsolete, do not use.}
@itemdef{wxUSE_UNICODE, Compiled with Unicode support.}
@itemdef{wxUSE_UNICODE_UTF8, Compiled with UTF8 support.}
@itemdef{wxUSE_UNICODE_WCHAR, Compiled with Unicode support and using wchar_t type.}
@itemdef{wxUSE_URL, Use wxURL class.}
@itemdef{wxUSE_URL_NATIVE, Use native support for some operations with wxURL.}
@itemdef{wxUSE_UTF8_LOCALE_ONLY, Build wxWidgets to support running only under UTF-8 (and C) locale. This eliminates the code necessary for conversions from the other locales and reduces the library size; useful for embedded systems.}
@itemdef{wxUSE_VALIDATORS, Use wxValidator class.}
@itemdef{wxUSE_VARIANT, Use wxVariant class.}
@itemdef{wxUSE_WIZARDDLG, Use wxWizard class.}
@itemdef{wxUSE_WXHTML_HELP, Use wxHtmlHelpController and related classes.}
@itemdef{wxUSE_XML, Use XML parsing classes.}
@itemdef{wxUSE_XPM, Enable XPM reader for wxImage and wxBitmap classes.}
@itemdef{wxUSE_XRC, Use XRC XML-based resource system.}
@itemdef{wxUSE_ZIPSTREAM, Enable streams for Zip files.}
@itemdef{wxUSE_ZLIB, Use wxZlibInput and wxZlibOutputStream classes, required by wxUSE_LIBPNG.}
@endDefList
@beginDefList
@itemdef{wxUSE_ABOUTDLG, Use wxAboutDialogInfo class.}
@itemdef{wxUSE_ACCEL, Use wxAcceleratorTable/Entry classes and support for them in wxMenu, wxMenuBar.}
@itemdef{wxUSE_AFM_FOR_POSTSCRIPT, In wxPostScriptDC class use AFM (adobe font metrics) file for character widths.}
@itemdef{wxUSE_ANIMATIONCTRL, Use wxAnimationCtrl class.}
@itemdef{wxUSE_APPLE_IEEE, IEEE Extended to/from double routines; see src/common/extended.c file.}
@itemdef{wxUSE_ARCHIVE_STREAMS, Enable streams for archive formats.}
@itemdef{wxUSE_AUI, Use AUI (dockable windows) library.}
@itemdef{wxUSE_BASE64, Enables Base64 support.}
@itemdef{wxUSE_BITMAPCOMBOBOX, Use wxBitmapComboBox class.}
@itemdef{wxUSE_BMPBUTTON, Use wxBitmapButton class.}
@itemdef{wxUSE_BUSYINFO, Use wxBusyInfo class.}
@itemdef{wxUSE_BUTTON, Use wxButton class.}
@itemdef{wxUSE_CALENDARCTRL, Use wxCalendarCtrl class.}
@itemdef{wxUSE_CARET, Use wxCaret class.}
@itemdef{wxUSE_CHECKBOX, Use wxCheckBox class.}
@itemdef{wxUSE_CHECKLISTBOX, Use wxCheckListBox class.}
@itemdef{wxUSE_CHOICE, Use wxChoice class.}
@itemdef{wxUSE_CHOICEBOOK, Use wxChoicebook class.}
@itemdef{wxUSE_CHOICEDLG, Use wxSingleChoiceDialog, or wxMultiChoiceDialog classes.}
@itemdef{wxUSE_CLIPBOARD, Use wxClipboard class.}
@itemdef{wxUSE_CMDLINE_PARSER, Use wxCmdLineParser class.}
@itemdef{wxUSE_COLLPANE, Use wxCollapsiblePane class.}
@itemdef{wxUSE_COLOURDLG, Use wxColourDialog class.}
@itemdef{wxUSE_COLOURPICKERCTRL, Use wxColourPickerCtrl class.}
@itemdef{wxUSE_COMBOBOX, Use wxComboBox class.}
@itemdef{wxUSE_COMBOCTRL, Use wxComboCtrl class.}
@itemdef{wxUSE_CONFIG, Use wxConfig and related classes.}
@itemdef{wxUSE_CONFIG_NATIVE, When enabled use native OS configuration instead of the wxFileConfig class.}
@itemdef{wxUSE_CONSOLE_EVENTLOOP, Enable event loop in console programs.}
@itemdef{wxUSE_CONSTRAINTS, Use wxLayoutConstraints}
@itemdef{wxUSE_CONTROLS, If set to $0$, no classes deriving from wxControl can be used.}
@itemdef{wxUSE_DATAOBJ, Use wxDataObject and related classes.}
@itemdef{wxUSE_DATAVIEWCTRL, Use wxDataViewCtrl class.}
@itemdef{wxUSE_DATEPICKCTRL, Use wxDatePickerCtrl class.}
@itemdef{wxUSE_DATETIME, Use wxDateTime and related classes.}
@itemdef{wxUSE_DBGHELP, Use wxDbgHelpDLL class.}
@itemdef{wxUSE_DEBUG_CONTEXT, Use wxDebugContext class.}
@itemdef{wxUSE_DEBUG_NEW_ALWAYS, See @ref overview_debugging}
@itemdef{wxUSE_DEBUGREPORT, Use wxDebugReport class.}
@itemdef{wxUSE_DIALUP_MANAGER, Use wxDialUpManager and related classes.}
@itemdef{wxUSE_DIRDLG, Use wxDirDialog class.}
@itemdef{wxUSE_DIRPICKERCTRL, Use wxDirPickerCtrl class.}
@itemdef{wxUSE_DISPLAY, Use wxDisplay and related classes.}
@itemdef{wxUSE_DOC_VIEW_ARCHITECTURE, Use wxDocument and related classes.}
@itemdef{wxUSE_DRAG_AND_DROP, Use Drag and drop classes.}
@itemdef{wxUSE_DRAGIMAGE, Use wxDragImage class.}
@itemdef{wxUSE_DYNAMIC_LOADER, Use wxPluginManager and related classes. Requires wxDynamicLibrary}
@itemdef{wxUSE_DYNLIB_CLASS, Use wxDynamicLibrary}
@itemdef{wxUSE_EDITABLELISTBOX, Use wxEditableListBox class.}
@itemdef{wxUSE_EXCEPTIONS, Use exception handling.}
@itemdef{wxUSE_EXPAT, enable XML support using expat parser.}
@itemdef{wxUSE_EXTENDED_RTTI, Use extended RTTI, see also Runtime class information (RTTI)}
@itemdef{wxUSE_FFILE, Use wxFFile class.}
@itemdef{wxUSE_FILE, Use wxFile class.}
@itemdef{wxUSE_FILECONFIG, Use wxFileConfig class.}
@itemdef{wxUSE_FILECTRL, Use wxFileCtrl class.}
@itemdef{wxUSE_FILEDLG, Use wxFileDialog class.}
@itemdef{wxUSE_FILEPICKERCTRL, Use wxFilePickerCtrl class.}
@itemdef{wxUSE_FILESYSTEM, Use wxFileSystem and related classes.}
@itemdef{wxUSE_FINDREPLDLG, Use wxFindReplaceDialog class.}
@itemdef{wxUSE_FONTDLG, Use wxFontDialog class.}
@itemdef{wxUSE_FONTENUM, Use wxFontEnumerator class.}
@itemdef{wxUSE_FONTMAP, Use wxFontMapper class.}
@itemdef{wxUSE_FONTPICKERCTRL, Use wxFontPickerCtrl class.}
@itemdef{wxUSE_FS_ARCHIVE, Use virtual archive filesystems like wxArchiveFSHandler in wxFileSystem class.}
@itemdef{wxUSE_FS_INET, Use virtual HTTP/FTP filesystems like wxInternetFSHandler in wxFileSystem class.}
@itemdef{wxUSE_FS_ZIP, Please use wxUSE_FS_ARCHIVE instead.}
@itemdef{wxUSE_FSVOLUME, Use wxFSVolume class.}
@itemdef{wxUSE_GAUGE, Use wxGauge class.}
@itemdef{wxUSE_GENERIC_DRAGIMAGE, Used in wxDragImage sample.}
@itemdef{wxUSE_GENERIC_DRAWELLIPSE, See comment in wx/dc.h file.}
@itemdef{wxUSE_GEOMETRY, Use common geometry classes}
@itemdef{wxUSE_GIF, Use GIF wxImageHandler}
@itemdef{wxUSE_GLCANVAS, Enables OpenGL support.}
@itemdef{wxUSE_GLOBAL_MEMORY_OPERATORS, Override global operators @c new and @c delete to use wxWidgets memory leak detection}
@itemdef{wxUSE_GRAPHICS_CONTEXT, Use wxGraphicsContext and related classes.}
@itemdef{wxUSE_GRID, Use wxGrid and related classes.}
@itemdef{wxUSE_GUI, Use the GUI classes; if set to $0$ only non-GUI classes are available.}
@itemdef{wxUSE_HELP, Use wxHelpController and related classes.}
@itemdef{wxUSE_HTML, Use wxHtmlWindow and related classes.}
@itemdef{wxUSE_HYPERLINKCTRL, Use wxHyperlinkCtrl}
@itemdef{wxUSE_ICO_CUR, Support Windows ICO and CUR formats.}
@itemdef{wxUSE_IFF, Enables the wxImage handler for Amiga IFF images.}
@itemdef{wxUSE_IMAGE, Use wxImage and related classes.}
@itemdef{wxUSE_IMAGLIST, Use wxImageList class.}
@itemdef{wxUSE_INTL, Use wxLocale and related classes.}
@itemdef{wxUSE_IOSTREAMH, Use header "iostream.h" instead of "iostream".}
@itemdef{wxUSE_IPC, Use interprocess communication classes.}
@itemdef{wxUSE_IPV6, Use experimental wxIPV6address and related classes.}
@itemdef{wxUSE_JOYSTICK, Use wxJoystick class.}
@itemdef{wxUSE_LIBJPEG, Enables JPEG format support (requires libjpeg).}
@itemdef{wxUSE_LIBPNG, Enables PNG format support (requires libpng). Also requires wxUSE_ZLIB.}
@itemdef{wxUSE_LIBTIFF, Enables TIFF format support (requires libtiff).}
@itemdef{wxUSE_LISTBOOK, Use wxListbook class.}
@itemdef{wxUSE_LISTBOX, Use wxListBox class.}
@itemdef{wxUSE_LISTCTRL, Use wxListCtrl class.}
@itemdef{wxUSE_LOG, Use wxLog and related classes.}
@itemdef{wxUSE_LOG_DEBUG, Enabled when wxLog used with __WXDEBUG__ defined.}
@itemdef{wxUSE_LOG_DIALOG, Use wxLogDialog class.}
@itemdef{wxUSE_LOGGUI, Use wxLogGui class.}
@itemdef{wxUSE_LOGWINDOW, Use wxLogFrame class.}
@itemdef{wxUSE_LONGLONG, Use wxLongLong class.}
@itemdef{wxUSE_LONGLONG_NATIVE, Use native <tt>long long</tt> type in wxLongLong implementation.}
@itemdef{wxUSE_LONGLONG_WX, Use generic wxLongLong implementation.}
@itemdef{wxUSE_MDI, Use wxMDIParentFrame, and wxMDIChildFrame}
@itemdef{wxUSE_MDI_ARCHITECTURE, Use MDI-based document-view classes.}
@itemdef{wxUSE_MEDIACTRL, Use wxMediaCtrl.}
@itemdef{wxUSE_MEMORY_TRACING, Use wxWidgets memory leak detection, not recommended if using another memory debugging tool.}
@itemdef{wxUSE_MENUS, Use wxMenu and related classes.}
@itemdef{wxUSE_METAFILE, Use wxMetaFile and related classes.}
@itemdef{wxUSE_MIMETYPE, Use wxFileType class.}
@itemdef{wxUSE_MINIFRAME, Use wxMiniFrame class.}
@itemdef{wxUSE_MOUSEWHEEL, Support mouse wheel events.}
@itemdef{wxUSE_MSGDLG, Use wxMessageDialog class and wxMessageBox function.}
@itemdef{wxUSE_NATIVE_STATUSBAR, Use native wxStatusBar class.}
@itemdef{wxUSE_NOTEBOOK, Use wxNotebook and related classes.}
@itemdef{wxUSE_NUMBERDLG, Use wxNumberEntryDialog class.}
@itemdef{wxUSE_ODCOMBOBOX, Use wxOwnerDrawnComboBox class.}
@itemdef{wxUSE_ON_FATAL_EXCEPTION, Catch signals in wxApp::OnFatalException method.}
@itemdef{wxUSE_OPENGL, Please use wxUSE_GLCANVAS to test for enabled OpenGL support instead.}
@itemdef{wxUSE_OWNER_DRAWN, Use interface for owner-drawn GUI elements.}
@itemdef{wxUSE_PALETTE, Use wxPalette and related classes.}
@itemdef{wxUSE_PCX, Enables wxImage PCX handler.}
@itemdef{wxUSE_PNM, Enables wxImage PNM handler.}
@itemdef{wxUSE_POPUPWIN, Use wxPopupWindow class.}
@itemdef{wxUSE_POSTSCRIPT, Use wxPostScriptPrinter class.}
@itemdef{wxUSE_PRINTF_POS_PARAMS, Use wxVsnprintf which supports positional parameters.}
@itemdef{wxUSE_PRINTING_ARCHITECTURE, Enable printer classes.}
@itemdef{wxUSE_PROGRESSDLG, Enables progress dialog classes.}
@itemdef{wxUSE_PROTOCOL, Use wxProtocol and derived classes.}
@itemdef{wxUSE_PROTOCOL_FILE, Use wxFileProto class. (requires wxProtocol)}
@itemdef{wxUSE_PROTOCOL_FTP, Use wxFTP class. (requires wxProtocol)}
@itemdef{wxUSE_PROTOCOL_HTTP, Use wxHTTP class. (requireswxProtocol)}
@itemdef{wxUSE_RADIOBOX, Use wxRadioBox class.}
@itemdef{wxUSE_RADIOBTN, Use wxRadioButton class.}
@itemdef{wxUSE_REGEX, Use wxRegEx class.}
@itemdef{wxUSE_RICHTEXT, Use wxRichTextCtrl class.}
@itemdef{wxUSE_RICHTEXT_XML_HANDLER, See src/xrc/xh_richtext.cpp file.}
@itemdef{wxUSE_SASH, Use wxSashWindow class.}
@itemdef{wxUSE_SCROLLBAR, Use wxScrollBar class.}
@itemdef{wxUSE_SEARCHCTRL, Use wxSearchCtrl class.}
@itemdef{wxUSE_SELECT_DISPATCHER, Use wxSelectDispatcher class.}
@itemdef{wxUSE_SLIDER, Use wxSlider class.}
@itemdef{wxUSE_SNGLINST_CHECKER, Use wxSingleInstanceChecker class.}
@itemdef{wxUSE_SOCKETS, Enables Network address classes.}
@itemdef{wxUSE_SOUND, Use wxSound class.}
@itemdef{wxUSE_SPINBTN, Use wxSpinButton class.}
@itemdef{wxUSE_SPINCTRL, Use wxSpinCtrl class.}
@itemdef{wxUSE_SPLASH, Use wxSplashScreen class.}
@itemdef{wxUSE_SPLINES, Provide methods for spline drawing in wxDC.}
@itemdef{wxUSE_SPLITTER, Use wxSplitterWindow class.}
@itemdef{wxUSE_STACKWALKER, Enables wxStackWalker and related classes.}
@itemdef{wxUSE_STARTUP_TIPS, Use startup tips, wxTipProvider class.}
@itemdef{wxUSE_STATBMP, Use wxStaticBitmap class.}
@itemdef{wxUSE_STATBOX, Use wxStaticBox class.}
@itemdef{wxUSE_STATLINE, Use wxStaticLine class.}
@itemdef{wxUSE_STATTEXT, Use wxStaticText class.}
@itemdef{wxUSE_STATUSBAR, Use wxStatusBar class.}
@itemdef{wxUSE_STC, Use wxStyledTextCtrl.}
@itemdef{wxUSE_STD_IOSTREAM, Use standard C++ stream classes.}
@itemdef{wxUSE_STD_STRING, Use standard C++ string classes.}
@itemdef{wxUSE_STDPATHS, Use wxStandardPaths class.}
@itemdef{wxUSE_STL, Use Standard Template Library for the container classes and wxString implementation.}
@itemdef{wxUSE_STOPWATCH, Use wxStopWatch class.}
@itemdef{wxUSE_STREAMS, Enable stream classes.}
@itemdef{wxUSE_SVG, Use wxSVGFileDC class.}
@itemdef{wxUSE_SYSTEM_OPTIONS, Use wxSystemOptions class.}
@itemdef{wxUSE_TAB_DIALOG, Use the obsolete wxTabControl class.}
@itemdef{wxUSE_TARSTREAM, Enable Tar files support.}
@itemdef{wxUSE_TASKBARICON, Use wxTaskBarIcon class.}
@itemdef{wxUSE_TEXTBUFFER, Use wxTextBuffer class.}
@itemdef{wxUSE_TEXTCTRL, Use wxTextCtrl class.}
@itemdef{wxUSE_TEXTDLG, Use wxTextEntryDialog class.}
@itemdef{wxUSE_TEXTFILE, Use wxTextFile class.}
@itemdef{wxUSE_TGA, Enable wxImage TGA handler.}
@itemdef{wxUSE_THREADS, Use wxThread and related classes.}
@itemdef{wxUSE_TIMER, Use wxTimer class.}
@itemdef{wxUSE_TIPWINDOW, Use wxTipWindow class.}
@itemdef{wxUSE_TOGGLEBTN, Use wxToggleButton class.}
@itemdef{wxUSE_TOOLBAR, Use wxToolBar class.}
@itemdef{wxUSE_TOOLBAR_NATIVE, Use native wxToolBar class.}
@itemdef{wxUSE_TOOLBOOK, Use wxToolbook class.}
@itemdef{wxUSE_TOOLTIPS, Use wxToolTip class.}
@itemdef{wxUSE_TREEBOOK, Use wxTreebook class.}
@itemdef{wxUSE_TREECTRL, Use wxTreeCtrl class.}
@itemdef{wxUSE_TTM_WINDOWFROMPOINT, Obsolete, do not use.}
@itemdef{wxUSE_UNICODE, Compiled with Unicode support.}
@itemdef{wxUSE_UNICODE_UTF8, Compiled with UTF8 support.}
@itemdef{wxUSE_UNICODE_WCHAR, Compiled with Unicode support and using wchar_t type.}
@itemdef{wxUSE_URL, Use wxURL class.}
@itemdef{wxUSE_URL_NATIVE, Use native support for some operations with wxURL.}
@itemdef{wxUSE_UTF8_LOCALE_ONLY, Build wxWidgets to support running only under UTF-8 (and C) locale. This eliminates the code necessary for conversions from the other locales and reduces the library size; useful for embedded systems.}
@itemdef{wxUSE_VALIDATORS, Use wxValidator class.}
@itemdef{wxUSE_VARIANT, Use wxVariant class.}
@itemdef{wxUSE_WIZARDDLG, Use wxWizard class.}
@itemdef{wxUSE_WXHTML_HELP, Use wxHtmlHelpController and related classes.}
@itemdef{wxUSE_XML, Use XML parsing classes.}
@itemdef{wxUSE_XPM, Enable XPM reader for wxImage and wxBitmap classes.}
@itemdef{wxUSE_XRC, Use XRC XML-based resource system.}
@itemdef{wxUSE_ZIPSTREAM, Enable streams for Zip files.}
@itemdef{wxUSE_ZLIB, Use wxZlibInput and wxZlibOutputStream classes, required by wxUSE_LIBPNG.}
@endDefList
@section page_wxusedef_unix wxUSE preprocessor symbols used only under Unix platforms
@section page_wxusedef_unix wxUSE preprocessor symbols used only under Unix platforms
@beginDefList
@itemdef{wxUSE_EPOLL_DISPATCHER, Use wxEpollDispatcher class. See also wxUSE_SELECT_DISPATCHER.}
@itemdef{wxUSE_GSTREAMER, Use GStreamer library in wxMediaCtrl.}
@itemdef{wxUSE_LIBMSPACK, Use libmspack library.}
@itemdef{wxUSE_LIBSDL, Use SDL for wxSound implementation.}
@itemdef{wxUSE_PLUGINS, See also wxUSE_LIBSDL.}
@itemdef{wxUSE_UNIX, Enabled on Unix Platform.}
@endDefList
@beginDefList
@itemdef{wxUSE_EPOLL_DISPATCHER, Use wxEpollDispatcher class. See also wxUSE_SELECT_DISPATCHER.}
@itemdef{wxUSE_GSTREAMER, Use GStreamer library in wxMediaCtrl.}
@itemdef{wxUSE_LIBMSPACK, Use libmspack library.}
@itemdef{wxUSE_LIBSDL, Use SDL for wxSound implementation.}
@itemdef{wxUSE_PLUGINS, See also wxUSE_LIBSDL.}
@itemdef{wxUSE_UNIX, Enabled on Unix Platform.}
@endDefList
@section page_wxusedef_x11 wxUSE preprocessor symbols used only in wxX11 Platform
@section page_wxusedef_x11 wxUSE preprocessor symbols used only in wxX11 Platform
@beginDefList
@itemdef{wxUSE_NANOX, Use NanoX.}
@itemdef{wxUSE_UNIV_TEXTCTRL, Use wxUniv's implementation of wxTextCtrl class.}
@endDefList
@beginDefList
@itemdef{wxUSE_NANOX, Use NanoX.}
@itemdef{wxUSE_UNIV_TEXTCTRL, Use wxUniv's implementation of wxTextCtrl class.}
@endDefList
@section page_wxusedef_gtk wxUSE preprocessor symbols used only in wxGTK port
@section page_wxusedef_gtk wxUSE preprocessor symbols used only in wxGTK port
@beginDefList
@itemdef{wxUSE_DETECT_SM, Use code to detect X11 session manager.}
@itemdef{wxUSE_GTKPRINT, Use GTK+ printing support.}
@itemdef{wxUSE_LIBGNOMEPRINT, Use GNOME printing support.}
@itemdef{wxUSE_LIBGNOMEVFS, Use GNOME VFS support. Currently has no effect. }
@itemdef{wxUSE_LIBHILDON, Use Hildon framework for Nokia 770. Currently has no effect. }
@endDefList
@beginDefList
@itemdef{wxUSE_DETECT_SM, Use code to detect X11 session manager.}
@itemdef{wxUSE_GTKPRINT, Use GTK+ printing support.}
@itemdef{wxUSE_LIBGNOMEPRINT, Use GNOME printing support.}
@itemdef{wxUSE_LIBGNOMEVFS, Use GNOME VFS support. Currently has no effect. }
@itemdef{wxUSE_LIBHILDON, Use Hildon framework for Nokia 770. Currently has no effect. }
@endDefList
@section page_wxusedef_mac wxUSE preprocessor symbols used only in wxMac port
@section page_wxusedef_mac wxUSE preprocessor symbols used only in wxMac port
@beginDefList
@itemdef{wxUSE_MAC_CRITICAL_REGION_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_MAC_PTHREADS_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_MAC_SEMAPHORE_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_WEBKIT, Use wxWebKitCtrl class.}
@endDefList
@beginDefList
@itemdef{wxUSE_MAC_CRITICAL_REGION_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_MAC_PTHREADS_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_MAC_SEMAPHORE_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_WEBKIT, Use wxWebKitCtrl class.}
@endDefList
@section page_wxusedef_motif wxUSE preprocessor symbols used only in wxMotif port
@section page_wxusedef_motif wxUSE preprocessor symbols used only in wxMotif port
@beginDefList
@itemdef{wxUSE_GADGETS, Use xmCascadeButtonGadgetClass, xmLabelGadgetClass, xmPushButtonGadgetClass and xmToggleButtonGadgetClass classes.}
@itemdef{wxUSE_INVISIBLE_RESIZE, See src/motif/dialog.cpp file.}
@endDefList
@beginDefList
@itemdef{wxUSE_GADGETS, Use xmCascadeButtonGadgetClass, xmLabelGadgetClass, xmPushButtonGadgetClass and xmToggleButtonGadgetClass classes.}
@itemdef{wxUSE_INVISIBLE_RESIZE, See src/motif/dialog.cpp file.}
@endDefList
@section page_wxusedef_cocoa wxUSE preprocessor symbols used only in Cocoa port
@section page_wxusedef_cocoa wxUSE preprocessor symbols used only in Cocoa port
@beginDefList
@itemdef{wxUSE_OBJC_UNIQUIFYING, Enable Objective-C class name uniquifying.}
@endDefList
@beginDefList
@itemdef{wxUSE_OBJC_UNIQUIFYING, Enable Objective-C class name uniquifying.}
@endDefList
@section page_wxusedef_os2 wxUSE preprocessor symbols used only in OS2 port
@section page_wxusedef_os2 wxUSE preprocessor symbols used only in OS2 port
@beginDefList
@itemdef{wxUSE_CONSOLEDEBUG, See src/os2/app.cpp file.}
@itemdef{wxUSE_DDE, See src/os2/mimetype.cpp file.}
@itemdef{wxUSE_IMAGE_LOADING_IN_MSW, See src/os2/clipbrd.cpp file.}
@itemdef{wxUSE_IMAGE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
@itemdef{wxUSE_NET_API, Use NetBios32GetInfo API call.}
@itemdef{wxUSE_RESOURCE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
@endDefList
@beginDefList
@itemdef{wxUSE_CONSOLEDEBUG, See src/os2/app.cpp file.}
@itemdef{wxUSE_DDE, See src/os2/mimetype.cpp file.}
@itemdef{wxUSE_IMAGE_LOADING_IN_MSW, See src/os2/clipbrd.cpp file.}
@itemdef{wxUSE_IMAGE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
@itemdef{wxUSE_NET_API, Use NetBios32GetInfo API call.}
@itemdef{wxUSE_RESOURCE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
@endDefList
@section page_wxusedef_msw wxUSE preprocessor symbols used only in wxMSW port
@section page_wxusedef_msw wxUSE preprocessor symbols used only in wxMSW port
@beginDefList
@itemdef{wxUSE_ACCESSIBILITY, Enable accessibility support}
@itemdef{wxUSE_ACTIVEX, Use wxActiveXContainer and related classes.}
@itemdef{wxUSE_COMBOCTRL_POPUP_ANIMATION, See wx/msw/combo.h file.}
@itemdef{wxUSE_COMCTL32_SAFELY, See src/msw/treectrl.cpp file.}
@itemdef{wxUSE_COMMON_DIALOGS, Enable use of windows common dialogs from header commdlg.h; example PRINTDLG.}
@itemdef{wxUSE_CRASHREPORT, Use wxCrashReport class.}
@itemdef{wxUSE_DATEPICKCTRL_GENERIC, Use generic wxDatePickerCtrl implementation in addition to the native one.}
@itemdef{wxUSE_DC_CACHEING, cache temporary wxDC objects.}
@itemdef{wxUSE_DIRECTDRAW, Enable use of the system include file ddraw.h.}
@itemdef{wxUSE_DDE_FOR_IPC, See wx/ipc.h file.}
@itemdef{wxUSE_ENH_METAFILE, Use wxEnhMetaFile.}
@itemdef{wxUSE_HOTKEY, Use wxWindow::RegisterHotKey() and wxWindow::UnregisterHotKey}
@itemdef{wxUSE_INKEDIT, Use InkEdit library. Related to Tablet PCs.}
@itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.}
@itemdef{wxUSE_NO_MANIFEST, Use to prevent the auto generation, under MSVC, of manifest file needed by windows XP and above.}
@itemdef{wxUSE_NORLANDER_HEADERS, Using headers whose author is Anders Norlander.}
@itemdef{wxUSE_OLE, Enables OLE helper routines.}
@itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.}
@itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.}
@itemdef{wxUSE_PENWINDOWS, See src/msw/penwin.cpp file.}
@itemdef{wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW, Use PS printing in wxMSW.}
@itemdef{wxUSE_PS_PRINTING, See src/msw/dcprint.cpp file.}
@itemdef{wxUSE_REGKEY, Use wxRegKey class.}
@itemdef{wxUSE_RICHEDIT, Enable use of riched32.dll in wxTextCtrl}
@itemdef{wxUSE_RICHEDIT2, Enable use of riched20.dll in wxTextCtrl}
@itemdef{wxUSE_VC_CRTDBG, See wx/msw/msvcrt.h file.}
@itemdef{wxUSE_UNICODE_MSLU, Use MSLU for Unicode support under Windows 9x systems.}
@itemdef{wxUSE_UXTHEME, Enable support for XP themes.}
@itemdef{wxUSE_WIN_METAFILES_ALWAYS, Use wxMetaFile even when wxUSE_ENH_METAFILE=$1$.}
@itemdef{wxUSE_WXDIB, Use wxDIB class.}
@itemdef{wxUSE_XPM_IN_MSW, See also wxUSE_XPM}
@endDefList
@beginDefList
@itemdef{wxUSE_ACCESSIBILITY, Enable accessibility support}
@itemdef{wxUSE_ACTIVEX, Use wxActiveXContainer and related classes.}
@itemdef{wxUSE_COMBOCTRL_POPUP_ANIMATION, See wx/msw/combo.h file.}
@itemdef{wxUSE_COMCTL32_SAFELY, See src/msw/treectrl.cpp file.}
@itemdef{wxUSE_COMMON_DIALOGS, Enable use of windows common dialogs from header commdlg.h; example PRINTDLG.}
@itemdef{wxUSE_CRASHREPORT, Use wxCrashReport class.}
@itemdef{wxUSE_DATEPICKCTRL_GENERIC, Use generic wxDatePickerCtrl implementation in addition to the native one.}
@itemdef{wxUSE_DC_CACHEING, cache temporary wxDC objects.}
@itemdef{wxUSE_DIRECTDRAW, Enable use of the system include file ddraw.h.}
@itemdef{wxUSE_DDE_FOR_IPC, See wx/ipc.h file.}
@itemdef{wxUSE_ENH_METAFILE, Use wxEnhMetaFile.}
@itemdef{wxUSE_HOTKEY, Use wxWindow::RegisterHotKey() and wxWindow::UnregisterHotKey}
@itemdef{wxUSE_INKEDIT, Use InkEdit library. Related to Tablet PCs.}
@itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.}
@itemdef{wxUSE_NO_MANIFEST, Use to prevent the auto generation, under MSVC, of manifest file needed by windows XP and above.}
@itemdef{wxUSE_NORLANDER_HEADERS, Using headers whose author is Anders Norlander.}
@itemdef{wxUSE_OLE, Enables OLE helper routines.}
@itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.}
@itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.}
@itemdef{wxUSE_PENWINDOWS, See src/msw/penwin.cpp file.}
@itemdef{wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW, Use PS printing in wxMSW.}
@itemdef{wxUSE_PS_PRINTING, See src/msw/dcprint.cpp file.}
@itemdef{wxUSE_REGKEY, Use wxRegKey class.}
@itemdef{wxUSE_RICHEDIT, Enable use of riched32.dll in wxTextCtrl}
@itemdef{wxUSE_RICHEDIT2, Enable use of riched20.dll in wxTextCtrl}
@itemdef{wxUSE_VC_CRTDBG, See wx/msw/msvcrt.h file.}
@itemdef{wxUSE_UNICODE_MSLU, Use MSLU for Unicode support under Windows 9x systems.}
@itemdef{wxUSE_UXTHEME, Enable support for XP themes.}
@itemdef{wxUSE_WIN_METAFILES_ALWAYS, Use wxMetaFile even when wxUSE_ENH_METAFILE=$1$.}
@itemdef{wxUSE_WXDIB, Use wxDIB class.}
@itemdef{wxUSE_XPM_IN_MSW, See also wxUSE_XPM}
@endDefList
@section page_wxusedef_univ wxUSE preprocessor symbols used only in wxUniversal
@section page_wxusedef_univ wxUSE preprocessor symbols used only in wxUniversal
@beginDefList
@itemdef{wxUSE_ALL_THEMES, Use all themes in wxUniversal; See wx/univ/theme.h file.}
@itemdef{wxUSE_THEME_GTK, Use GTK+ 1-like theme in wxUniversal}
@itemdef{wxUSE_THEME_METAL, Use GTK+ 2-like theme in wxUniversal}
@itemdef{wxUSE_THEME_MONO, Use simple monochrome theme in wxUniversal}
@itemdef{wxUSE_THEME_WIN32, Use Win32-like theme in wxUniversal}
@endDefList
@beginDefList
@itemdef{wxUSE_ALL_THEMES, Use all themes in wxUniversal; See wx/univ/theme.h file.}
@itemdef{wxUSE_THEME_GTK, Use GTK+ 1-like theme in wxUniversal}
@itemdef{wxUSE_THEME_METAL, Use GTK+ 2-like theme in wxUniversal}
@itemdef{wxUSE_THEME_MONO, Use simple monochrome theme in wxUniversal}
@itemdef{wxUSE_THEME_WIN32, Use Win32-like theme in wxUniversal}
@endDefList
*/

View File

@@ -9,16 +9,16 @@
/**
@page page_constants Constants
@page page_constants Constants
This chapter describes the constants defined by wxWidgets.
This chapter describes the constants defined by wxWidgets.
@li @subpage page_keycodes
@li @subpage page_keymodifiers
@li @subpage page_languagecodes
@li @subpage page_stdevtid
@li @subpage page_stockitems
@li @subpage page_cppconst
@li @subpage page_wxusedef
@li @subpage page_keycodes
@li @subpage page_keymodifiers
@li @subpage page_languagecodes
@li @subpage page_stdevtid
@li @subpage page_stockitems
@li @subpage page_cppconst
@li @subpage page_wxusedef
*/

File diff suppressed because it is too large Load Diff

View File

@@ -9,303 +9,303 @@
/**
@page page_multiplatform Multi-platform development with wxWidgets
@page page_multiplatform Multi-platform development with wxWidgets
This chapter describes the practical details of using wxWidgets. Please
see the file install.txt for up-to-date installation instructions, and
changes.txt for differences between versions.
This chapter describes the practical details of using wxWidgets. Please
see the file install.txt for up-to-date installation instructions, and
changes.txt for differences between versions.
@li @ref page_multiplatform_includefiles
@li @ref page_multiplatform_libraries
@li @ref page_multiplatform_configuration
@li @ref page_multiplatform_makefiles
@li @ref page_multiplatform_windowsfiles
@li @ref page_multiplatform_allocatingobjects
@li @ref page_multiplatform_architecturedependency
@li @ref page_multiplatform_conditionalcompilation
@li @ref page_multiplatform_cpp
@li @ref page_multiplatform_filehandling
@li @ref page_multiplatform_includefiles
@li @ref page_multiplatform_libraries
@li @ref page_multiplatform_configuration
@li @ref page_multiplatform_makefiles
@li @ref page_multiplatform_windowsfiles
@li @ref page_multiplatform_allocatingobjects
@li @ref page_multiplatform_architecturedependency
@li @ref page_multiplatform_conditionalcompilation
@li @ref page_multiplatform_cpp
@li @ref page_multiplatform_filehandling
<hr>
<hr>
@section page_multiplatform_includefiles Include files
@section page_multiplatform_includefiles Include files
The main include file is @c "wx/wx.h"; this includes the most commonly
used modules of wxWidgets.
The main include file is @c "wx/wx.h"; this includes the most commonly
used modules of wxWidgets.
To save on compilation time, include only those header files relevant to the
source file. If you are using precompiled headers, you should include
the following section before any other includes:
To save on compilation time, include only those header files relevant to the
source file. If you are using precompiled headers, you should include
the following section before any other includes:
@verbatim
// For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h>
@verbatim
// For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h
#include <wx/wx.h>
#endif
#ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h
#include <wx/wx.h>
#endif
... now your other include files ...
@endverbatim
... now your other include files ...
@endverbatim
The file @c "wx/wxprec.h" includes @c "wx/wx.h". Although this incantation
may seem quirky, it is in fact the end result of a lot of experimentation,
and several Windows compilers to use precompilation which is largely automatic for
compilers with necessary support. Currently it is used for Visual C++ (including
embedded Visual C++), Borland C++, Open Watcom C++, Digital Mars C++
and newer versions of GCC.
Some compilers might need extra work from the application developer to set the
build environment up as necessary for the support.
The file @c "wx/wxprec.h" includes @c "wx/wx.h". Although this incantation
may seem quirky, it is in fact the end result of a lot of experimentation,
and several Windows compilers to use precompilation which is largely automatic for
compilers with necessary support. Currently it is used for Visual C++ (including
embedded Visual C++), Borland C++, Open Watcom C++, Digital Mars C++
and newer versions of GCC.
Some compilers might need extra work from the application developer to set the
build environment up as necessary for the support.
@section page_multiplatform_libraries Libraries
@section page_multiplatform_libraries Libraries
Most ports of wxWidgets can create either a static library or a shared
library. wxWidgets can also be built in multilib and monolithic variants.
See the @ref page_libs for more information on these.
Most ports of wxWidgets can create either a static library or a shared
library. wxWidgets can also be built in multilib and monolithic variants.
See the @ref page_libs for more information on these.
@section page_multiplatform_configuration Configuration
@section page_multiplatform_configuration Configuration
When using project files and makefiles directly to build wxWidgets,
options are configurable in the file
@c "wx/XXX/setup.h" where XXX is the required platform (such as msw, motif, gtk, mac). Some
settings are a matter of taste, some help with platform-specific problems, and
others can be set to minimize the size of the library. Please see the setup.h file
and @c install.txt files for details on configuration.
When using project files and makefiles directly to build wxWidgets,
options are configurable in the file
@c "wx/XXX/setup.h" where XXX is the required platform (such as msw, motif, gtk, mac). Some
settings are a matter of taste, some help with platform-specific problems, and
others can be set to minimize the size of the library. Please see the setup.h file
and @c install.txt files for details on configuration.
When using the 'configure' script to configure wxWidgets (on Unix and other platforms where
configure is available), the corresponding setup.h files are generated automatically
along with suitable makefiles. When using the RPM packages
for installing wxWidgets on Linux, a correct setup.h is shipped in the package and
this must not be changed.
When using the 'configure' script to configure wxWidgets (on Unix and other platforms where
configure is available), the corresponding setup.h files are generated automatically
along with suitable makefiles. When using the RPM packages
for installing wxWidgets on Linux, a correct setup.h is shipped in the package and
this must not be changed.
@section page_multiplatform_makefiles Makefiles
@section page_multiplatform_makefiles Makefiles
On Microsoft Windows, wxWidgets has a different set of makefiles for each
compiler, because each compiler's 'make' tool is slightly different.
Popular Windows compilers that we cater for, and the corresponding makefile
extensions, include: Microsoft Visual C++ (.vc), Borland C++ (.bcc),
OpenWatcom C++ (.wat) and MinGW/Cygwin (.gcc). Makefiles are provided
for the wxWidgets library itself, samples, demos, and utilities.
On Microsoft Windows, wxWidgets has a different set of makefiles for each
compiler, because each compiler's 'make' tool is slightly different.
Popular Windows compilers that we cater for, and the corresponding makefile
extensions, include: Microsoft Visual C++ (.vc), Borland C++ (.bcc),
OpenWatcom C++ (.wat) and MinGW/Cygwin (.gcc). Makefiles are provided
for the wxWidgets library itself, samples, demos, and utilities.
On Linux, Mac and OS/2, you use the 'configure' command to
generate the necessary makefiles. You should also use this method when
building with MinGW/Cygwin on Windows.
On Linux, Mac and OS/2, you use the 'configure' command to
generate the necessary makefiles. You should also use this method when
building with MinGW/Cygwin on Windows.
We also provide project files for some compilers, such as
Microsoft VC++. However, we recommend using makefiles
to build the wxWidgets library itself, because makefiles
can be more powerful and less manual intervention is required.
We also provide project files for some compilers, such as
Microsoft VC++. However, we recommend using makefiles
to build the wxWidgets library itself, because makefiles
can be more powerful and less manual intervention is required.
On Windows using a compiler other than MinGW/Cygwin, you would
build the wxWidgets library from the build/msw directory
which contains the relevant makefiles.
On Windows using a compiler other than MinGW/Cygwin, you would
build the wxWidgets library from the build/msw directory
which contains the relevant makefiles.
On Windows using MinGW/Cygwin, and on Unix, MacOS X and OS/2, you invoke
'configure' (found in the top-level of the wxWidgets source hierarchy),
from within a suitable empty directory for containing makefiles, object files and
libraries.
On Windows using MinGW/Cygwin, and on Unix, MacOS X and OS/2, you invoke
'configure' (found in the top-level of the wxWidgets source hierarchy),
from within a suitable empty directory for containing makefiles, object files and
libraries.
For details on using makefiles, configure, and project files,
please see docs/xxx/install.txt in your distribution, where
xxx is the platform of interest, such as msw, gtk, x11, mac.
For details on using makefiles, configure, and project files,
please see docs/xxx/install.txt in your distribution, where
xxx is the platform of interest, such as msw, gtk, x11, mac.
@section page_multiplatform_windowsfiles Windows-specific files
@section page_multiplatform_windowsfiles Windows-specific files
wxWidgets application compilation under MS Windows requires at least one
extra file: a resource file.
wxWidgets application compilation under MS Windows requires at least one
extra file: a resource file.
@subsection page_multiplatform_windowsfiles_resources Resource file
@subsection page_multiplatform_windowsfiles_resources Resource file
The least that must be defined in the Windows resource file (extension RC)
is the following statement:
The least that must be defined in the Windows resource file (extension RC)
is the following statement:
@verbatim
#include "wx/msw/wx.rc"
@endverbatim
@verbatim
#include "wx/msw/wx.rc"
@endverbatim
which includes essential internal wxWidgets definitions. The resource script
may also contain references to icons, cursors, etc., for example:
which includes essential internal wxWidgets definitions. The resource script
may also contain references to icons, cursors, etc., for example:
@verbatim
wxicon icon wx.ico
@endverbatim
@verbatim
wxicon icon wx.ico
@endverbatim
The icon can then be referenced by name when creating a frame icon. See
the MS Windows SDK documentation.
The icon can then be referenced by name when creating a frame icon. See
the MS Windows SDK documentation.
@note include wx.rc @e after any ICON statements
@note include wx.rc @e after any ICON statements
so programs that search your executable for icons (such
as the Program Manager) find your application icon first.
@section page_multiplatform_allocatingobjects Allocating and deleting wxWidgets objects
@section page_multiplatform_allocatingobjects Allocating and deleting wxWidgets objects
In general, classes derived from wxWindow must dynamically allocated
with @e new and deleted with @e delete. If you delete a window,
all of its children and descendants will be automatically deleted,
so you don't need to delete these descendants explicitly.
In general, classes derived from wxWindow must dynamically allocated
with @e new and deleted with @e delete. If you delete a window,
all of its children and descendants will be automatically deleted,
so you don't need to delete these descendants explicitly.
When deleting a frame or dialog, use @b Destroy rather than @b delete so
that the wxWidgets delayed deletion can take effect. This waits until idle time
(when all messages have been processed) to actually delete the window, to avoid
problems associated with the GUI sending events to deleted windows.
When deleting a frame or dialog, use @b Destroy rather than @b delete so
that the wxWidgets delayed deletion can take effect. This waits until idle time
(when all messages have been processed) to actually delete the window, to avoid
problems associated with the GUI sending events to deleted windows.
Don't create a window on the stack, because this will interfere
with delayed deletion.
Don't create a window on the stack, because this will interfere
with delayed deletion.
If you decide to allocate a C++ array of objects (such as wxBitmap) that may
be cleaned up by wxWidgets, make sure you delete the array explicitly
before wxWidgets has a chance to do so on exit, since calling @e delete on
array members will cause memory problems.
If you decide to allocate a C++ array of objects (such as wxBitmap) that may
be cleaned up by wxWidgets, make sure you delete the array explicitly
before wxWidgets has a chance to do so on exit, since calling @e delete on
array members will cause memory problems.
wxColour can be created statically: it is not automatically cleaned
up and is unlikely to be shared between other objects; it is lightweight
enough for copies to be made.
wxColour can be created statically: it is not automatically cleaned
up and is unlikely to be shared between other objects; it is lightweight
enough for copies to be made.
Beware of deleting objects such as a wxPen or wxBitmap if they are still in use.
Windows is particularly sensitive to this: so make sure you
make calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) before deleting
a drawing object that may be in use. Code that doesn't do this will probably work
fine on some platforms, and then fail under Windows.
Beware of deleting objects such as a wxPen or wxBitmap if they are still in use.
Windows is particularly sensitive to this: so make sure you
make calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) before deleting
a drawing object that may be in use. Code that doesn't do this will probably work
fine on some platforms, and then fail under Windows.
@section page_multiplatform_architecturedependency Architecture dependency
@section page_multiplatform_architecturedependency Architecture dependency
A problem which sometimes arises from writing multi-platform programs is that
the basic C types are not defined the same on all platforms. This holds true
for both the length in bits of the standard types (such as int and long) as
well as their byte order, which might be little endian (typically
on Intel computers) or big endian (typically on some Unix workstations). wxWidgets
defines types and macros that make it easy to write architecture independent
code. The types are:
A problem which sometimes arises from writing multi-platform programs is that
the basic C types are not defined the same on all platforms. This holds true
for both the length in bits of the standard types (such as int and long) as
well as their byte order, which might be little endian (typically
on Intel computers) or big endian (typically on some Unix workstations). wxWidgets
defines types and macros that make it easy to write architecture independent
code. The types are:
wxInt32, wxInt16, wxInt8, wxUint32, wxUint16 = wxWord, wxUint8 = wxByte
wxInt32, wxInt16, wxInt8, wxUint32, wxUint16 = wxWord, wxUint8 = wxByte
where wxInt32 stands for a 32-bit signed integer type etc. You can also check
which architecture the program is compiled on using the wxBYTE_ORDER define
which is either wxBIG_ENDIAN or wxLITTLE_ENDIAN (in the future maybe wxPDP_ENDIAN
as well).
where wxInt32 stands for a 32-bit signed integer type etc. You can also check
which architecture the program is compiled on using the wxBYTE_ORDER define
which is either wxBIG_ENDIAN or wxLITTLE_ENDIAN (in the future maybe wxPDP_ENDIAN
as well).
The macros handling bit-swapping with respect to the applications endianness
are described in the @ref page_macro_cat_byteorder section.
The macros handling bit-swapping with respect to the applications endianness
are described in the @ref page_macro_cat_byteorder section.
@section page_multiplatform_conditionalcompilation Conditional compilation
@section page_multiplatform_conditionalcompilation Conditional compilation
One of the purposes of wxWidgets is to reduce the need for conditional
compilation in source code, which can be messy and confusing to follow.
However, sometimes it is necessary to incorporate platform-specific
features (such as metafile use under MS Windows). The @ref page_wxusedef
symbols listed in the file @c setup.h may be used for this purpose,
along with any user-supplied ones.
One of the purposes of wxWidgets is to reduce the need for conditional
compilation in source code, which can be messy and confusing to follow.
However, sometimes it is necessary to incorporate platform-specific
features (such as metafile use under MS Windows). The @ref page_wxusedef
symbols listed in the file @c setup.h may be used for this purpose,
along with any user-supplied ones.
@section page_multiplatform_cpp C++ issues
@section page_multiplatform_cpp C++ issues
The following documents some miscellaneous C++ issues.
The following documents some miscellaneous C++ issues.
@subsection page_multiplatform_cpp_templates Templates
@subsection page_multiplatform_cpp_templates Templates
wxWidgets does not use templates (except for some advanced features that
are switched off by default) since it is a notoriously unportable feature.
wxWidgets does not use templates (except for some advanced features that
are switched off by default) since it is a notoriously unportable feature.
@subsection page_multiplatform_cpp_rtti RTTI
@subsection page_multiplatform_cpp_rtti RTTI
wxWidgets does not use C++ run-time type information since wxWidgets provides
its own run-time type information system, implemented using macros.
wxWidgets does not use C++ run-time type information since wxWidgets provides
its own run-time type information system, implemented using macros.
@subsection page_multiplatform_cpp_null Type of NULL
@subsection page_multiplatform_cpp_null Type of NULL
Some compilers (e.g. the native IRIX cc) define NULL to be 0L so that
no conversion to pointers is allowed. Because of that, all these
occurrences of NULL in the GTK+ port use an explicit conversion such
as
Some compilers (e.g. the native IRIX cc) define NULL to be 0L so that
no conversion to pointers is allowed. Because of that, all these
occurrences of NULL in the GTK+ port use an explicit conversion such
as
@code
wxWindow *my_window = (wxWindow*) NULL;
@endcode
@code
wxWindow *my_window = (wxWindow*) NULL;
@endcode
It is recommended to adhere to this in all code using wxWidgets as
this make the code (a bit) more portable.
It is recommended to adhere to this in all code using wxWidgets as
this make the code (a bit) more portable.
@subsection page_multiplatform_cpp_precompiledheaders Precompiled headers
@subsection page_multiplatform_cpp_precompiledheaders Precompiled headers
Some compilers, such as Borland C++ and Microsoft C++, support
precompiled headers. This can save a great deal of compiling time. The
recommended approach is to precompile @c "wx.h", using this
precompiled header for compiling both wxWidgets itself and any
wxWidgets applications. For Windows compilers, two dummy source files
are provided (one for normal applications and one for creating DLLs)
to allow initial creation of the precompiled header.
Some compilers, such as Borland C++ and Microsoft C++, support
precompiled headers. This can save a great deal of compiling time. The
recommended approach is to precompile @c "wx.h", using this
precompiled header for compiling both wxWidgets itself and any
wxWidgets applications. For Windows compilers, two dummy source files
are provided (one for normal applications and one for creating DLLs)
to allow initial creation of the precompiled header.
However, there are several downsides to using precompiled headers. One
is that to take advantage of the facility, you often need to include
more header files than would normally be the case. This means that
changing a header file will cause more recompilations (in the case of
wxWidgets, everything needs to be recompiled since everything includes @c "wx.h" !)
However, there are several downsides to using precompiled headers. One
is that to take advantage of the facility, you often need to include
more header files than would normally be the case. This means that
changing a header file will cause more recompilations (in the case of
wxWidgets, everything needs to be recompiled since everything includes @c "wx.h" !)
A related problem is that for compilers that don't have precompiled
headers, including a lot of header files slows down compilation
considerably. For this reason, you will find (in the common
X and Windows parts of the library) conditional
compilation that under Unix, includes a minimal set of headers;
and when using Visual C++, includes @c wx.h. This should help provide
the optimal compilation for each compiler, although it is
biased towards the precompiled headers facility available
in Microsoft C++.
A related problem is that for compilers that don't have precompiled
headers, including a lot of header files slows down compilation
considerably. For this reason, you will find (in the common
X and Windows parts of the library) conditional
compilation that under Unix, includes a minimal set of headers;
and when using Visual C++, includes @c wx.h. This should help provide
the optimal compilation for each compiler, although it is
biased towards the precompiled headers facility available
in Microsoft C++.
@section page_multiplatform_filehandling File handling
@section page_multiplatform_filehandling File handling
When building an application which may be used under different
environments, one difficulty is coping with documents which may be
moved to different directories on other machines. Saving a file which
has pointers to full pathnames is going to be inherently unportable.
When building an application which may be used under different
environments, one difficulty is coping with documents which may be
moved to different directories on other machines. Saving a file which
has pointers to full pathnames is going to be inherently unportable.
One approach is to store filenames on their own, with no directory
information. The application then searches into a list of standard
paths (platform-specific) through the use of wxStandardPaths.
One approach is to store filenames on their own, with no directory
information. The application then searches into a list of standard
paths (platform-specific) through the use of wxStandardPaths.
Eventually you may want to use also the wxPathList class.
Eventually you may want to use also the wxPathList class.
Nowadays the limitations of DOS 8+3 filenames doesn't apply anymore.
Most modern operating systems allow at least 255 characters in the filename;
the exact maximum length, as well as the characters allowed in the filenames,
are OS-specific so you should try to avoid extremely long (> 255 chars) filenames
and/or filenames with non-ANSI characters.
Nowadays the limitations of DOS 8+3 filenames doesn't apply anymore.
Most modern operating systems allow at least 255 characters in the filename;
the exact maximum length, as well as the characters allowed in the filenames,
are OS-specific so you should try to avoid extremely long (> 255 chars) filenames
and/or filenames with non-ANSI characters.
Another thing you need to keep in mind is that all Windows operating systems
are case-insensitive, while Unix operating systems (Linux, Mac, etc) are
case-sensitive.
Another thing you need to keep in mind is that all Windows operating systems
are case-insensitive, while Unix operating systems (Linux, Mac, etc) are
case-sensitive.
Also, for text files, different OSes use different End Of Lines (EOL).
Windows uses CR+LF convention, Linux uses LF only, Mac CR only.
Also, for text files, different OSes use different End Of Lines (EOL).
Windows uses CR+LF convention, Linux uses LF only, Mac CR only.
The wxTextFile, wxTextInputStream, wxTextOutputStream classes help to abstract
from these differences.
Of course, there are also 3rd party utilities such as @c dos2unix and @c unix2dos
which do the EOL conversions.
The wxTextFile, wxTextInputStream, wxTextOutputStream classes help to abstract
from these differences.
Of course, there are also 3rd party utilities such as @c dos2unix and @c unix2dos
which do the EOL conversions.
See also the @ref page_func_cat_file section of the reference
manual for the description of miscellaneous file handling functions.
See also the @ref page_func_cat_file section of the reference
manual for the description of miscellaneous file handling functions.
*/

View File

@@ -9,226 +9,226 @@
/**
@page page_introduction Introduction
@page page_introduction Introduction
@li @ref page_introduction_whatis
@li @ref page_introduction_why
@li @ref page_introduction_requirements
@li @ref page_introduction_where
@li @ref page_introduction_acknowledgements
@li @ref page_introduction_whatis
@li @ref page_introduction_why
@li @ref page_introduction_requirements
@li @ref page_introduction_where
@li @ref page_introduction_acknowledgements
<hr>
<hr>
@section page_introduction_whatis What is wxWidgets?
@section page_introduction_whatis What is wxWidgets?
wxWidgets is a C++ framework providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version 2 and higher
currently support all desktop versions of MS Windows, Unix with GTK+ 1.x or 2.x,
Unix with Motif, Unix with just X11, Unix with DirectFB, Mac OS X, OS/2.
wxWidgets is a C++ framework providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version 2 and higher
currently support all desktop versions of MS Windows, Unix with GTK+ 1.x or 2.x,
Unix with Motif, Unix with just X11, Unix with DirectFB, Mac OS X, OS/2.
wxWidgets was originally developed at the Artificial Intelligence
Applications Institute, University of Edinburgh, for internal use,
and was first made publicly available in 1992.
Version 2 is a vastly improved version written and maintained by
Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others.
wxWidgets was originally developed at the Artificial Intelligence
Applications Institute, University of Edinburgh, for internal use,
and was first made publicly available in 1992.
Version 2 is a vastly improved version written and maintained by
Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others.
This manual contains a class reference and topic overviews.
For a selection of wxWidgets tutorials, please see the documentation page
on the wxWidgets web site: http://www.wxwidgets.org.
This manual contains a class reference and topic overviews.
For a selection of wxWidgets tutorials, please see the documentation page
on the wxWidgets web site: http://www.wxwidgets.org.
Please note that in the following, ``MS Windows" often refers to all
platforms related to Microsoft Windows, including 32-bit and 64-bit
variants, unless otherwise stated. All trademarks are acknowledged.
Please note that in the following, ``MS Windows" often refers to all
platforms related to Microsoft Windows, including 32-bit and 64-bit
variants, unless otherwise stated. All trademarks are acknowledged.
@section page_introduction_why Why another cross-platform development tool?
@section page_introduction_why Why another cross-platform development tool?
wxWidgets was developed to provide a cheap and flexible way to maximize
investment in GUI application development. While a number of commercial
class libraries already existed for cross-platform development,
none met all of the following criteria:
wxWidgets was developed to provide a cheap and flexible way to maximize
investment in GUI application development. While a number of commercial
class libraries already existed for cross-platform development,
none met all of the following criteria:
@li low price;
@li source availability;
@li simplicity of programming;
@li support for a wide range of compilers.
@li low price;
@li source availability;
@li simplicity of programming;
@li support for a wide range of compilers.
Since wxWidgets was started, several other free or almost-free
GUI frameworks have emerged. However, none has the range of
features, flexibility, documentation and the well-established
development team that wxWidgets has.
Since wxWidgets was started, several other free or almost-free
GUI frameworks have emerged. However, none has the range of
features, flexibility, documentation and the well-established
development team that wxWidgets has.
As open source software, wxWidgets has benefited from comments,
ideas, bug fixes, enhancements and the sheer enthusiasm of
users. This gives wxWidgets a certain advantage over its
commercial competitors (and over free libraries without an
independent development team), plus a robustness against the
transience of one individual or company. This openness and
availability of source code is especially important when the
future of thousands of lines of application code may depend upon
the longevity of the underlying class library.
As open source software, wxWidgets has benefited from comments,
ideas, bug fixes, enhancements and the sheer enthusiasm of
users. This gives wxWidgets a certain advantage over its
commercial competitors (and over free libraries without an
independent development team), plus a robustness against the
transience of one individual or company. This openness and
availability of source code is especially important when the
future of thousands of lines of application code may depend upon
the longevity of the underlying class library.
Version 2 goes much further than previous versions in terms of
generality and features, allowing applications to be produced
that are often indistinguishable from those produced using
single-platform toolkits such as Motif, GTK+ and MFC.
Version 2 goes much further than previous versions in terms of
generality and features, allowing applications to be produced
that are often indistinguishable from those produced using
single-platform toolkits such as Motif, GTK+ and MFC.
The importance of using a platform-independent class library
cannot be overstated, since GUI application development is very
time-consuming, and sustained popularity of particular GUIs
cannot be guaranteed. Code can very quickly become obsolete if
it addresses the wrong platform or audience. wxWidgets helps to
insulate the programmer from these winds of change. Although
wxWidgets may not be suitable for every application (such as an
OLE-intensive program), it provides access to most of the
functionality a GUI program normally requires, plus many extras
such as network programming, PostScript output, and HTML
rendering; and it can of course be extended as needs dictate.
As a bonus, it provides a far cleaner and easier programming
interface than the native APIs. Programmers may find it
worthwhile to use wxWidgets even if they are developing on only
one platform.
The importance of using a platform-independent class library
cannot be overstated, since GUI application development is very
time-consuming, and sustained popularity of particular GUIs
cannot be guaranteed. Code can very quickly become obsolete if
it addresses the wrong platform or audience. wxWidgets helps to
insulate the programmer from these winds of change. Although
wxWidgets may not be suitable for every application (such as an
OLE-intensive program), it provides access to most of the
functionality a GUI program normally requires, plus many extras
such as network programming, PostScript output, and HTML
rendering; and it can of course be extended as needs dictate.
As a bonus, it provides a far cleaner and easier programming
interface than the native APIs. Programmers may find it
worthwhile to use wxWidgets even if they are developing on only
one platform.
It is impossible to sum up the functionality of wxWidgets in a few paragraphs, but
here are some of the benefits:
It is impossible to sum up the functionality of wxWidgets in a few paragraphs, but
here are some of the benefits:
@li Low cost (free, in fact!)
@li You get the source.
@li Available on a variety of popular platforms.
@li Works with almost all popular C++ compilers and Python.
@li Over 70 example programs.
@li Over 1000 pages of printable and on-line documentation.
@li Simple-to-use, object-oriented API.
@li Flexible event system.
@li Graphics calls include lines, rounded rectangles, splines, polylines, etc.
@li Constraint-based and sizer-based layouts.
@li Print/preview and document/view architectures.
@li Toolbar, notebook, tree control, advanced list control classes.
@li PostScript generation under Unix, normal MS Windows printing on the PC.
@li MDI (Multiple Document Interface) support.
@li Can be used to create DLLs under Windows, dynamic libraries on Unix.
@li Common dialogs for file browsing, printing, colour selection, etc.
@li Under MS Windows, support for creating metafiles and copying them to the clipboard.
@li An API for invoking help from applications.
@li Ready-to-use HTML window (supporting a subset of HTML).
@li Network support via a family of socket and protocol classes.
@li Support for platform independent image processing.
@li Built-in support for many file formats (BMP, PNG, JPEG, GIF, XPM, PNM, PCX).
@li Includes Tex2RTF, to allow you to produce your own documentation
@li Low cost (free, in fact!)
@li You get the source.
@li Available on a variety of popular platforms.
@li Works with almost all popular C++ compilers and Python.
@li Over 70 example programs.
@li Over 1000 pages of printable and on-line documentation.
@li Simple-to-use, object-oriented API.
@li Flexible event system.
@li Graphics calls include lines, rounded rectangles, splines, polylines, etc.
@li Constraint-based and sizer-based layouts.
@li Print/preview and document/view architectures.
@li Toolbar, notebook, tree control, advanced list control classes.
@li PostScript generation under Unix, normal MS Windows printing on the PC.
@li MDI (Multiple Document Interface) support.
@li Can be used to create DLLs under Windows, dynamic libraries on Unix.
@li Common dialogs for file browsing, printing, colour selection, etc.
@li Under MS Windows, support for creating metafiles and copying them to the clipboard.
@li An API for invoking help from applications.
@li Ready-to-use HTML window (supporting a subset of HTML).
@li Network support via a family of socket and protocol classes.
@li Support for platform independent image processing.
@li Built-in support for many file formats (BMP, PNG, JPEG, GIF, XPM, PNM, PCX).
@li Includes Tex2RTF, to allow you to produce your own documentation
in Windows Help, HTML and Word RTF formats.
@section page_introduction_requirements wxWidgets requirements
@section page_introduction_requirements wxWidgets requirements
To make use of wxWidgets, you currently need one of the following setups.
To make use of wxWidgets, you currently need one of the following setups.
(a) MS-Windows:
(a) MS-Windows:
@li A 32-bit or 64-bit PC running MS Windows.
@li A Windows compiler: MS Visual C++ (embedded Visual C++ for wxWinCE
@li A 32-bit or 64-bit PC running MS Windows.
@li A Windows compiler: MS Visual C++ (embedded Visual C++ for wxWinCE
port), Borland C++, Watcom C++, Cygwin, MinGW, Metrowerks CodeWarrior,
Digital Mars C++. See @c install.txt for details about compiler
version supported.
(b) Unix:
(b) Unix:
@li Almost any C++ compiler, including GNU C++ and many Unix vendors
@li Almost any C++ compiler, including GNU C++ and many Unix vendors
compilers such as Sun CC, HP-UX aCC or SGI mipsPro.
@li Almost any Unix workstation, and one of: GTK+ 2.4 or higher (GTK+ 1.2.10
@li Almost any Unix workstation, and one of: GTK+ 2.4 or higher (GTK+ 1.2.10
may still be supported but wxGTK1 port is not maintained any longer and lacks
many features of wxGTK2), Motif 1.2 or higher or Lesstif. If using the wxX11
port, no such widget set is required.
(c) Mac OS/Mac OS X:
(c) Mac OS/Mac OS X:
@li A PowerPC or Intel Mac running Mac OS X 10.3 or higher
@li The Apple Developer Tools (eg. GNU C++) or MetroWerks CodeWarrior (not
@li A PowerPC or Intel Mac running Mac OS X 10.3 or higher
@li The Apple Developer Tools (eg. GNU C++) or MetroWerks CodeWarrior (not
actively supported)
Under all platforms it's recommended to have large amounts of free hard disk
space. The exact amount needed depends on the port, compiler and build
configurations but to give an example, a debug build of the library may take up
to 500MB.
Under all platforms it's recommended to have large amounts of free hard disk
space. The exact amount needed depends on the port, compiler and build
configurations but to give an example, a debug build of the library may take up
to 500MB.
@section page_introduction_where Availability and location of wxWidgets
@section page_introduction_where Availability and location of wxWidgets
wxWidgets is available by anonymous FTP and World Wide Web
from ftp://biolpc22.york.ac.uk/pub and/or http://www.wxwidgets.org.
wxWidgets is available by anonymous FTP and World Wide Web
from ftp://biolpc22.york.ac.uk/pub and/or http://www.wxwidgets.org.
You can also buy a CD-ROM using the form on the Web site.
You can also buy a CD-ROM using the form on the Web site.
@section page_introduction_acknowledgements Acknowledgements
@section page_introduction_acknowledgements Acknowledgements
The following is the list of the core, active developers of wxWidgets which keep
it running and have provided an invaluable, extensive and high-quality amount of
changes over the many of years of wxWidgets' life:
The following is the list of the core, active developers of wxWidgets which keep
it running and have provided an invaluable, extensive and high-quality amount of
changes over the many of years of wxWidgets' life:
@li Julian Smart
@li Vadim Zeitlin
@li Robert Roebling
@li Robin Dunn
@li Stefan Csomor
@li Vaclav Slavik
@li Paul Cornett
@li Wlodzimierz `ABX' Skiba
@li Chris Elliott
@li David Elliott
@li Kevin Hock
@li Stefan Neis
@li Michael Wetherell
@li Julian Smart
@li Vadim Zeitlin
@li Robert Roebling
@li Robin Dunn
@li Stefan Csomor
@li Vaclav Slavik
@li Paul Cornett
@li Wlodzimierz `ABX' Skiba
@li Chris Elliott
@li David Elliott
@li Kevin Hock
@li Stefan Neis
@li Michael Wetherell
We would particularly like to thank the following peoples for their contributions
to wxWidgets, and the many others who have been involved in the project over the years.
Apologies for any unintentional omissions from this alphabetic list:
We would particularly like to thank the following peoples for their contributions
to wxWidgets, and the many others who have been involved in the project over the years.
Apologies for any unintentional omissions from this alphabetic list:
Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI,
Patrick Albert, Karsten Ballueder, Mattia Barbon, Michael Bedward,
Kai Bendorf, Yura Bidus, Keith Gary Boyce, Chris Breeze, Pete Britton,
Ian Brown, C. Buckley, Marco Cavallini, Dmitri Chubraev, Robin Corbet, Cecil Coupe,
Andrew Davison, Gilles Depeyrot, Neil Dudman, Hermann Dunkel, Jos van Eijndhoven,
Tom Felici, Thomas Fettig, Matthew Flatt, Pasquale Foggia, Josep Fortiana, Todd Fries,
Dominic Gallagher, Guillermo Rodriguez Garcia, Wolfram Gloger, Norbert Grotz,
Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle,
Harco de Hilster, Cord Hockemeyer, Markus Holzem, Olaf Klein, Leif Jensen,
Bart Jourquin, Guilhem Lavaux, Ron Lee, Jan Lessner, Nicholas Liebmann,
Torsten Liermann, Per Lindqvist, Francesco Montorsi, Thomas Runge, Tatu M&auml;nnist&ouml;,
Scott Maxwell, Thomas Myers, Oliver Niedung, Ryan Norton, Hernan Otero,
Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti,
Garrett Potts, Marcel Rasche, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton,
Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, Kari Syst&auml;, George Tasker,
Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli,
David Webster, Otto Wyss, Xiaokun Zhu, Edward Zimmermann.
Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI,
Patrick Albert, Karsten Ballueder, Mattia Barbon, Michael Bedward,
Kai Bendorf, Yura Bidus, Keith Gary Boyce, Chris Breeze, Pete Britton,
Ian Brown, C. Buckley, Marco Cavallini, Dmitri Chubraev, Robin Corbet, Cecil Coupe,
Andrew Davison, Gilles Depeyrot, Neil Dudman, Hermann Dunkel, Jos van Eijndhoven,
Tom Felici, Thomas Fettig, Matthew Flatt, Pasquale Foggia, Josep Fortiana, Todd Fries,
Dominic Gallagher, Guillermo Rodriguez Garcia, Wolfram Gloger, Norbert Grotz,
Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle,
Harco de Hilster, Cord Hockemeyer, Markus Holzem, Olaf Klein, Leif Jensen,
Bart Jourquin, Guilhem Lavaux, Ron Lee, Jan Lessner, Nicholas Liebmann,
Torsten Liermann, Per Lindqvist, Francesco Montorsi, Thomas Runge, Tatu M&auml;nnist&ouml;,
Scott Maxwell, Thomas Myers, Oliver Niedung, Ryan Norton, Hernan Otero,
Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti,
Garrett Potts, Marcel Rasche, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton,
Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, Kari Syst&auml;, George Tasker,
Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli,
David Webster, Otto Wyss, Xiaokun Zhu, Edward Zimmermann.
Many thanks also to AIAI for being willing to release the original version of
wxWidgets into the public domain, and to our patient partners.
Many thanks also to AIAI for being willing to release the original version of
wxWidgets into the public domain, and to our patient partners.
`Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos
T.J. van Eijndhoven of Eindhoven University of Technology. The code has
been used in wxGraphLayout (not in wxWidgets anymore) with his permission.
`Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos
T.J. van Eijndhoven of Eindhoven University of Technology. The code has
been used in wxGraphLayout (not in wxWidgets anymore) with his permission.
We also acknowledge the author of XFIG, the excellent Unix drawing tool,
from the source of which we have borrowed some spline drawing code.
His copyright is included below.
We also acknowledge the author of XFIG, the excellent Unix drawing tool,
from the source of which we have borrowed some spline drawing code.
His copyright is included below.
<em>
XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. Permission to
use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. M.I.T. makes no representations about the
suitability of this software for any purpose. It is provided ``as is''
without express or implied warranty.
</em>
<em>
XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. Permission to
use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. M.I.T. makes no representations about the
suitability of this software for any purpose. It is provided ``as is''
without express or implied warranty.
</em>
*/

View File

@@ -9,25 +9,25 @@
/**
@mainpage wxWidgets 2.9.0: A portable C++ GUI toolkit
@author Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al
@date February, 2008
@mainpage wxWidgets 2.9.0: A portable C++ GUI toolkit
@author Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al
@date February, 2008
@image html main_wxlogo.png
@image html main_wxlogo.png
@section manual_contents Contents
@li @subpage page_copyright
@li @subpage page_introduction
@li @subpage page_multiplatform
@li @subpage page_utils
@li @subpage page_samples
@li @subpage page_strategies
@li @subpage page_libs
@li @subpage page_constants
@li @subpage page_class_cat
@li @subpage page_func_cat
@li @subpage page_macro_cat
@li @subpage page_topics
@li @subpage page_port
@section manual_contents Contents
@li @subpage page_copyright
@li @subpage page_introduction
@li @subpage page_multiplatform
@li @subpage page_utils
@li @subpage page_samples
@li @subpage page_strategies
@li @subpage page_libs
@li @subpage page_constants
@li @subpage page_class_cat
@li @subpage page_func_cat
@li @subpage page_macro_cat
@li @subpage page_topics
@li @subpage page_port
*/

File diff suppressed because it is too large Load Diff

View File

@@ -9,117 +9,117 @@
/**
@page page_strategies Programming strategies
@page page_strategies Programming strategies
This chapter is intended to list strategies that may be useful when
writing and debugging wxWidgets programs. If you have any good tips,
please submit them for inclusion here.
This chapter is intended to list strategies that may be useful when
writing and debugging wxWidgets programs. If you have any good tips,
please submit them for inclusion here.
@li @ref page_strategies_reducingerr
@li @ref page_strategies_portability
@li @ref page_strategies_debug
@li @ref page_strategies_reducingerr
@li @ref page_strategies_portability
@li @ref page_strategies_debug
<hr>
<hr>
@section page_strategies_reducingerr Strategies for reducing programming errors
@section page_strategies_reducingerr Strategies for reducing programming errors
@subsection page_strategies_reducingerr_useassert Use ASSERT
@subsection page_strategies_reducingerr_useassert Use ASSERT
It is good practice to use ASSERT statements liberally, that check for conditions
that should or should not hold, and print out appropriate error messages.
It is good practice to use ASSERT statements liberally, that check for conditions
that should or should not hold, and print out appropriate error messages.
These can be compiled out of a non-debugging version of wxWidgets
and your application. Using ASSERT is an example of `defensive programming':
it can alert you to problems later on.
These can be compiled out of a non-debugging version of wxWidgets
and your application. Using ASSERT is an example of `defensive programming':
it can alert you to problems later on.
See wxASSERT for more info.
See wxASSERT for more info.
@subsection page_strategies_reducingerr_usewxstring Use wxString in preference to character arrays
@subsection page_strategies_reducingerr_usewxstring Use wxString in preference to character arrays
Using wxString can be much safer and more convenient than using wxChar *.
Using wxString can be much safer and more convenient than using wxChar *.
You can reduce the possibility of memory leaks substantially, and it is much more
convenient to use the overloaded operators than functions such as @c strcmp.
wxString won't add a significant overhead to your program; the overhead is compensated
for by easier manipulation (which means less code).
You can reduce the possibility of memory leaks substantially, and it is much more
convenient to use the overloaded operators than functions such as @c strcmp.
wxString won't add a significant overhead to your program; the overhead is compensated
for by easier manipulation (which means less code).
The same goes for other data types: use classes wherever possible.
The same goes for other data types: use classes wherever possible.
@section page_strategies_portability Strategies for portability
@section page_strategies_portability Strategies for portability
@subsection page_strategies_portability_usesizers Use sizers
@subsection page_strategies_portability_usesizers Use sizers
Don't use absolute panel item positioning if you can avoid it. Different GUIs have
very differently sized panel items. Consider using the @ref overview_sizer instead.
Don't use absolute panel item positioning if you can avoid it. Different GUIs have
very differently sized panel items. Consider using the @ref overview_sizer instead.
@subsection page_strategies_portability_useresources Use wxWidgets resource files
@subsection page_strategies_portability_useresources Use wxWidgets resource files
Use .xrc (wxWidgets resource files) where possible, because they can be easily changed
independently of source code. See the @ref overview_xrc for more info.
Use .xrc (wxWidgets resource files) where possible, because they can be easily changed
independently of source code. See the @ref overview_xrc for more info.
@section page_strategies_debug Strategies for debugging
@section page_strategies_debug Strategies for debugging
@subsection page_strategies_debug_positivethinking Positive thinking
@subsection page_strategies_debug_positivethinking Positive thinking
It is common to blow up the problem in one's imagination, so that it seems to threaten
weeks, months or even years of work. The problem you face may seem insurmountable:
but almost never is. Once you have been programming for some time, you will be able
to remember similar incidents that threw you into the depths of despair. But
remember, you always solved the problem, somehow!
It is common to blow up the problem in one's imagination, so that it seems to threaten
weeks, months or even years of work. The problem you face may seem insurmountable:
but almost never is. Once you have been programming for some time, you will be able
to remember similar incidents that threw you into the depths of despair. But
remember, you always solved the problem, somehow!
Perseverance is often the key, even though a seemingly trivial problem
can take an apparently inordinate amount of time to solve. In the end,
you will probably wonder why you worried so much. That's not to say it
isn't painful at the time. Try not to worry -- there are many more important
things in life.
Perseverance is often the key, even though a seemingly trivial problem
can take an apparently inordinate amount of time to solve. In the end,
you will probably wonder why you worried so much. That's not to say it
isn't painful at the time. Try not to worry -- there are many more important
things in life.
@subsection page_strategies_debug_simplifyproblem Simplify the problem
@subsection page_strategies_debug_simplifyproblem Simplify the problem
Reduce the code exhibiting the problem to the smallest program possible
that exhibits the problem. If it is not possible to reduce a large and
complex program to a very small program, then try to ensure your code
doesn't hide the problem (you may have attempted to minimize the problem
in some way: but now you want to expose it).
Reduce the code exhibiting the problem to the smallest program possible
that exhibits the problem. If it is not possible to reduce a large and
complex program to a very small program, then try to ensure your code
doesn't hide the problem (you may have attempted to minimize the problem
in some way: but now you want to expose it).
With luck, you can add a small amount of code that causes the program
to go from functioning to non-functioning state. This should give a clue
to the problem. In some cases though, such as memory leaks or wrong
deallocation, this can still give totally spurious results!
With luck, you can add a small amount of code that causes the program
to go from functioning to non-functioning state. This should give a clue
to the problem. In some cases though, such as memory leaks or wrong
deallocation, this can still give totally spurious results!
@subsection page_strategies_debug_usedebugger Use a debugger
@subsection page_strategies_debug_usedebugger Use a debugger
This sounds like facetious advice, but it is surprising how often people
don't use a debugger. Often it is an overhead to install or learn how to
use a debugger, but it really is essential for anything but the most
trivial programs.
This sounds like facetious advice, but it is surprising how often people
don't use a debugger. Often it is an overhead to install or learn how to
use a debugger, but it really is essential for anything but the most
trivial programs.
@subsection page_strategies_debug_uselogging Use logging functions
@subsection page_strategies_debug_uselogging Use logging functions
There is a variety of logging functions that you can use in your program:
see @ref page_func_cat_log.
There is a variety of logging functions that you can use in your program:
see @ref page_func_cat_log.
Using tracing statements may be more convenient than using the debugger
in some circumstances (such as when your debugger doesn't support a lot
of debugging code, or you wish to print a bunch of variables).
Using tracing statements may be more convenient than using the debugger
in some circumstances (such as when your debugger doesn't support a lot
of debugging code, or you wish to print a bunch of variables).
@subsection page_strategies_debug_usedebuggingfacilities Use the wxWidgets debugging facilities
@subsection page_strategies_debug_usedebuggingfacilities Use the wxWidgets debugging facilities
You can use wxDebugContext to check for
memory leaks and corrupt memory: in fact in debugging mode, wxWidgets will
automatically check for memory leaks at the end of the program if wxWidgets is suitably
configured. Depending on the operating system and compiler, more or less
specific information about the problem will be logged.
You can use wxDebugContext to check for
memory leaks and corrupt memory: in fact in debugging mode, wxWidgets will
automatically check for memory leaks at the end of the program if wxWidgets is suitably
configured. Depending on the operating system and compiler, more or less
specific information about the problem will be logged.
You should also use @ref page_macro_cat_debugging as part of a `defensive programming' strategy,
scattering wxASSERTs liberally to test for problems in your code as early as possible.
Forward thinking will save a surprising amount of time in the long run.
You should also use @ref page_macro_cat_debugging as part of a `defensive programming' strategy,
scattering wxASSERTs liberally to test for problems in your code as early as possible.
Forward thinking will save a surprising amount of time in the long run.
See the @ref overview_debugging for further information.
See the @ref overview_debugging for further information.
*/

View File

@@ -8,237 +8,237 @@
/**
@page overview_datetime Date and Time
@page overview_datetime Date and Time
Classes: wxDateTime, wxDateSpan, wxTimeSpan, wxCalendarCtrl
Classes: wxDateTime, wxDateSpan, wxTimeSpan, wxCalendarCtrl
@li @ref overview_datetime_introduction
@li @ref overview_datetime_classes
@li @ref overview_datetime_characteristics
@li @ref overview_datetime_timespandiff
@li @ref overview_datetime_arithmetics
@li @ref overview_datetime_timezones
@li @ref overview_datetime_dst
@li @ref overview_datetime_holidays
@li @ref overview_datetime_compat
@li @ref overview_datetime_introduction
@li @ref overview_datetime_classes
@li @ref overview_datetime_characteristics
@li @ref overview_datetime_timespandiff
@li @ref overview_datetime_arithmetics
@li @ref overview_datetime_timezones
@li @ref overview_datetime_dst
@li @ref overview_datetime_holidays
@li @ref overview_datetime_compat
<hr>
<hr>
@section overview_datetime_introduction Introduction
@section overview_datetime_introduction Introduction
wxWidgets provides a set of powerful classes to work with dates and times. Some
of the supported features of wxDateTime class are:
wxWidgets provides a set of powerful classes to work with dates and times. Some
of the supported features of wxDateTime class are:
@li Wide range: the range of supported dates goes from about 4714 B.C. to
@li Wide range: the range of supported dates goes from about 4714 B.C. to
some 480 million years in the future.
@li Precision: not using floating point calculations anywhere ensures that
@li Precision: not using floating point calculations anywhere ensures that
the date calculations don't suffer from rounding errors.
@li Many features: not only all usual calculations with dates are supported,
@li Many features: not only all usual calculations with dates are supported,
but also more exotic week and year day calculations, work day testing, standard
astronomical functions, conversion to and from strings in either strict or free
format.
@li Efficiency: objects of wxDateTime are small (8 bytes) and working with
@li Efficiency: objects of wxDateTime are small (8 bytes) and working with
them is fast
@section overview_datetime_classes All date/time classes at a glance
@section overview_datetime_classes All date/time classes at a glance
There are 3 main classes declared in @c wx/datetime.h: except wxDateTime itself
which represents an absolute moment in time, there are also two classes -
wxTimeSpan and wxDateSpan - which represent the intervals of time.
There are 3 main classes declared in @c wx/datetime.h: except wxDateTime itself
which represents an absolute moment in time, there are also two classes -
wxTimeSpan and wxDateSpan - which represent the intervals of time.
There are also helper classes which are used together with wxDateTime:
wxDateTimeHolidayAuthority which is used to determine whether a given date
is a holiday or not and wxDateTimeWorkDays which is a derivation of this
class for which (only) Saturdays and Sundays are the holidays. See more about
these classes in the discussion of the holidays (see @ref overview_datetime_holidays).
There are also helper classes which are used together with wxDateTime:
wxDateTimeHolidayAuthority which is used to determine whether a given date
is a holiday or not and wxDateTimeWorkDays which is a derivation of this
class for which (only) Saturdays and Sundays are the holidays. See more about
these classes in the discussion of the holidays (see @ref overview_datetime_holidays).
Finally, in other parts of this manual you may find mentions of wxDate and
wxTime classes. @ref overview_datetime_compat are obsolete and
superseded by wxDateTime.
Finally, in other parts of this manual you may find mentions of wxDate and
wxTime classes. @ref overview_datetime_compat are obsolete and
superseded by wxDateTime.
@section overview_datetime_characteristics wxDateTime characteristics
@section overview_datetime_characteristics wxDateTime characteristics
wxDateTime stores the time as a signed number of
milliseconds since the Epoch which is fixed, by convention, to Jan 1, 1970 -
however this is not visible to the class users (in particular, dates prior to
the Epoch are handled just as well (or as bad) as the dates after it). But it
does mean that the best resolution which can be achieved with this class is 1
millisecond.
wxDateTime stores the time as a signed number of
milliseconds since the Epoch which is fixed, by convention, to Jan 1, 1970 -
however this is not visible to the class users (in particular, dates prior to
the Epoch are handled just as well (or as bad) as the dates after it). But it
does mean that the best resolution which can be achieved with this class is 1
millisecond.
The size of wxDateTime object is 8 bytes because it is represented as a 64 bit
integer. The resulting range of supported dates is thus approximatively 580
million years, but due to the current limitations in the Gregorian calendar
support, only dates from Nov 24, 4714BC are supported (this is subject to
change if there is sufficient interest in doing it).
The size of wxDateTime object is 8 bytes because it is represented as a 64 bit
integer. The resulting range of supported dates is thus approximatively 580
million years, but due to the current limitations in the Gregorian calendar
support, only dates from Nov 24, 4714BC are supported (this is subject to
change if there is sufficient interest in doing it).
Finally, the internal representation is time zone independent (always in GMT)
and the time zones only come into play when a date is broken into
year/month/day components. See more about timezones below
(see @ref overview_datetime_timezones).
Finally, the internal representation is time zone independent (always in GMT)
and the time zones only come into play when a date is broken into
year/month/day components. See more about timezones below
(see @ref overview_datetime_timezones).
Currently, the only supported calendar is Gregorian one (which is used even
for the dates prior to the historic introduction of this calendar which was
first done on Oct 15, 1582 but is, generally speaking, country, and even
region, dependent). Future versions will probably have Julian calendar support
as well and support for other calendars (Maya, Hebrew, Chinese...) is not
ruled out.
Currently, the only supported calendar is Gregorian one (which is used even
for the dates prior to the historic introduction of this calendar which was
first done on Oct 15, 1582 but is, generally speaking, country, and even
region, dependent). Future versions will probably have Julian calendar support
as well and support for other calendars (Maya, Hebrew, Chinese...) is not
ruled out.
@section overview_datetime_timespandiff Difference between wxDateSpan and wxTimeSpan
@section overview_datetime_timespandiff Difference between wxDateSpan and wxTimeSpan
While there is only one logical way to represent an absolute moment in the
time (and hence only one wxDateTime class), there are at least two methods to
describe a time interval.
While there is only one logical way to represent an absolute moment in the
time (and hence only one wxDateTime class), there are at least two methods to
describe a time interval.
First, there is the direct and self-explaining way implemented by
wxTimeSpan: it is just a difference in milliseconds
between two moments in time. Adding or subtracting such an interval to
wxDateTime is always well-defined and is a fast operation.
First, there is the direct and self-explaining way implemented by
wxTimeSpan: it is just a difference in milliseconds
between two moments in time. Adding or subtracting such an interval to
wxDateTime is always well-defined and is a fast operation.
But in the daily life other, calendar-dependent time interval specifications are
used. For example, 'one month later' is commonly used. However, it is clear
that this is not the same as wxTimeSpan of 60*60*24*31 seconds because 'one
month later' Feb 15 is Mar 15 and not Mar 17 or Mar 16 (depending on whether
the year is leap or not).
But in the daily life other, calendar-dependent time interval specifications are
used. For example, 'one month later' is commonly used. However, it is clear
that this is not the same as wxTimeSpan of 60*60*24*31 seconds because 'one
month later' Feb 15 is Mar 15 and not Mar 17 or Mar 16 (depending on whether
the year is leap or not).
This is why there is another class for representing such intervals called
wxDateSpan. It handles these sort of operations in the
most natural way possible, but note that manipulating with intervals of
this kind is not always well-defined. Consider, for example, Jan 31 + '1
month': this will give Feb 28 (or 29), i.e. the last day of February and not
the non-existent Feb 31. Of course, this is what is usually wanted, but you
still might be surprised to notice that now subtracting back the same
interval from Feb 28 will result in Jan 28 and @b not Jan 31 we started
with!
This is why there is another class for representing such intervals called
wxDateSpan. It handles these sort of operations in the
most natural way possible, but note that manipulating with intervals of
this kind is not always well-defined. Consider, for example, Jan 31 + '1
month': this will give Feb 28 (or 29), i.e. the last day of February and not
the non-existent Feb 31. Of course, this is what is usually wanted, but you
still might be surprised to notice that now subtracting back the same
interval from Feb 28 will result in Jan 28 and @b not Jan 31 we started
with!
So, unless you plan to implement some kind of natural language parsing in the
program, you should probably use wxTimeSpan instead of wxDateSpan (which is
also more efficient). However, wxDateSpan may be very useful in situations
when you do need to understand what 'in a month' means (of course, it is
just @c wxDateTime::Now() + wxDateSpan::Month()).
So, unless you plan to implement some kind of natural language parsing in the
program, you should probably use wxTimeSpan instead of wxDateSpan (which is
also more efficient). However, wxDateSpan may be very useful in situations
when you do need to understand what 'in a month' means (of course, it is
just @c wxDateTime::Now() + wxDateSpan::Month()).
@section overview_datetime_arithmetics Date arithmetics
@section overview_datetime_arithmetics Date arithmetics
Many different operations may be performed with the dates, however not all of
them make sense. For example, multiplying a date by a number is an invalid
operation, even though multiplying either of the time span classes by a number
is perfectly valid.
Many different operations may be performed with the dates, however not all of
them make sense. For example, multiplying a date by a number is an invalid
operation, even though multiplying either of the time span classes by a number
is perfectly valid.
Here is what can be done:
Here is what can be done:
@li @b Addition: a wxTimeSpan or wxDateSpan can be added to wxDateTime
@li @b Addition: a wxTimeSpan or wxDateSpan can be added to wxDateTime
resulting in a new wxDateTime object and also 2 objects of the same span class
can be added together giving another object of the same class.
@li @b Subtraction: the same types of operations as above are
@li @b Subtraction: the same types of operations as above are
allowed and, additionally, a difference between two wxDateTime objects can be
taken and this will yield wxTimeSpan.
@li @b Multiplication: a wxTimeSpan or wxDateSpan object can be
@li @b Multiplication: a wxTimeSpan or wxDateSpan object can be
multiplied by an integer number resulting in an object of the same type.
@li <b>Unary minus</b>: a wxTimeSpan or wxDateSpan object may finally be
@li <b>Unary minus</b>: a wxTimeSpan or wxDateSpan object may finally be
negated giving an interval of the same magnitude but of opposite time
direction.
For all these operations there are corresponding global (overloaded) operators
and also member functions which are synonyms for them: Add(), Subtract() and
Multiply(). Unary minus as well as composite assignment operations (like +=)
are only implemented as members and Neg() is the synonym for unary minus.
For all these operations there are corresponding global (overloaded) operators
and also member functions which are synonyms for them: Add(), Subtract() and
Multiply(). Unary minus as well as composite assignment operations (like +=)
are only implemented as members and Neg() is the synonym for unary minus.
@section overview_datetime_timezones Time zone considerations
@section overview_datetime_timezones Time zone considerations
Although the time is always stored internally in GMT, you will usually work in
the local time zone. Because of this, all wxDateTime constructors and setters
which take the broken down date assume that these values are for the local
time zone. Thus, @c wxDateTime(1, wxDateTime::Jan, 1970) will not
correspond to the wxDateTime Epoch unless you happen to live in the UK.
All methods returning the date components (year, month, day, hour, minute,
second...) will also return the correct values for the local time zone by
default, so, generally, doing the natural things will lead to natural and
correct results.
Although the time is always stored internally in GMT, you will usually work in
the local time zone. Because of this, all wxDateTime constructors and setters
which take the broken down date assume that these values are for the local
time zone. Thus, @c wxDateTime(1, wxDateTime::Jan, 1970) will not
correspond to the wxDateTime Epoch unless you happen to live in the UK.
All methods returning the date components (year, month, day, hour, minute,
second...) will also return the correct values for the local time zone by
default, so, generally, doing the natural things will lead to natural and
correct results.
If you only want to do this, you may safely skip the rest of this section.
However, if you want to work with different time zones, you should read it to
the end.
If you only want to do this, you may safely skip the rest of this section.
However, if you want to work with different time zones, you should read it to
the end.
In this (rare) case, you are still limited to the local time zone when
constructing wxDateTime objects, i.e. there is no way to construct a
wxDateTime corresponding to the given date in, say, Pacific Standard Time.
To do it, you will need to call wxDateTime::ToTimezone or wxDateTime::MakeTimezone
methods to adjust the date for the target time zone. There are also special
versions of these functions wxDateTime::ToUTC and wxDateTime::MakeUTC for
the most common case - when the date should be constructed in UTC.
In this (rare) case, you are still limited to the local time zone when
constructing wxDateTime objects, i.e. there is no way to construct a
wxDateTime corresponding to the given date in, say, Pacific Standard Time.
To do it, you will need to call wxDateTime::ToTimezone or wxDateTime::MakeTimezone
methods to adjust the date for the target time zone. There are also special
versions of these functions wxDateTime::ToUTC and wxDateTime::MakeUTC for
the most common case - when the date should be constructed in UTC.
You also can just retrieve the value for some time zone without converting the
object to it first. For this you may pass TimeZone argument to any of the
methods which are affected by the time zone (all methods getting date
components and the date formatting ones, for example). In particular, the
Format() family of methods accepts a TimeZone parameter and this allows to
simply print time in any time zone.
You also can just retrieve the value for some time zone without converting the
object to it first. For this you may pass TimeZone argument to any of the
methods which are affected by the time zone (all methods getting date
components and the date formatting ones, for example). In particular, the
Format() family of methods accepts a TimeZone parameter and this allows to
simply print time in any time zone.
To see how to do it, the last issue to address is how to construct a TimeZone
object which must be passed to all these methods. First of all, you may construct
it manually by specifying the time zone offset in seconds from GMT, but
usually you will just use one of the @ref overview_datetime and
let the conversion constructor do the job.
To see how to do it, the last issue to address is how to construct a TimeZone
object which must be passed to all these methods. First of all, you may construct
it manually by specifying the time zone offset in seconds from GMT, but
usually you will just use one of the @ref overview_datetime and
let the conversion constructor do the job.
I.e. you would just write
I.e. you would just write
@code
wxDateTime dt(...whatever...);
printf("The time is %s in local time zone", dt.FormatTime().c_str());
printf("The time is %s in GMT", dt.FormatTime(wxDateTime::GMT).c_str());
@endcode
@code
wxDateTime dt(...whatever...);
printf("The time is %s in local time zone", dt.FormatTime().c_str());
printf("The time is %s in GMT", dt.FormatTime(wxDateTime::GMT).c_str());
@endcode
@section overview_datetime_dst Daylight saving time (DST)
@section overview_datetime_dst Daylight saving time (DST)
DST (a.k.a. 'summer time') handling is always a delicate task which is better
left to the operating system which is supposed to be configured by the
administrator to behave correctly. Unfortunately, when doing calculations with
date outside of the range supported by the standard library, we are forced to
deal with these issues ourselves.
DST (a.k.a. 'summer time') handling is always a delicate task which is better
left to the operating system which is supposed to be configured by the
administrator to behave correctly. Unfortunately, when doing calculations with
date outside of the range supported by the standard library, we are forced to
deal with these issues ourselves.
Several functions are provided to calculate the beginning and end of DST in
the given year and to determine whether it is in effect at the given moment or
not, but they should not be considered as absolutely correct because, first of
all, they only work more or less correctly for only a handful of countries
(any information about other ones appreciated!) and even for them the rules
may perfectly well change in the future.
Several functions are provided to calculate the beginning and end of DST in
the given year and to determine whether it is in effect at the given moment or
not, but they should not be considered as absolutely correct because, first of
all, they only work more or less correctly for only a handful of countries
(any information about other ones appreciated!) and even for them the rules
may perfectly well change in the future.
The time zone handling methods (see @ref overview_datetime_timezones) use
these functions too, so they are subject to the same limitations.
The time zone handling methods (see @ref overview_datetime_timezones) use
these functions too, so they are subject to the same limitations.
@section overview_datetime_holidays wxDateTime and Holidays
@section overview_datetime_holidays wxDateTime and Holidays
TODO.
@todo WRITE THIS DOC PARAGRAPH.
@section overview_datetime_compat Compatibility
@section overview_datetime_compat Compatibility
The old classes for date/time manipulations ported from wxWidgets version 1.xx
are still included but are reimplemented in terms of wxDateTime. However, using
them is strongly discouraged because they have a few quirks/bugs and were not
'Y2K' compatible.
The old classes for date/time manipulations ported from wxWidgets version 1.xx
are still included but are reimplemented in terms of wxDateTime. However, using
them is strongly discouraged because they have a few quirks/bugs and were not
'Y2K' compatible.
*/

View File

@@ -8,44 +8,44 @@
/**
@page overview_dc Device Contexts
@page overview_dc Device Contexts
Classes: wxBufferedDC, wxBufferedPaintDC, wxDC, wxPostScriptDC,
Classes: wxBufferedDC, wxBufferedPaintDC, wxDC, wxPostScriptDC,
wxMetafileDC, wxMemoryDC, wxPrinterDC, wxScreenDC, wxClientDC,
wxPaintDC, wxWindowDC.
A wxDC is a @e device context onto which graphics and text can be drawn.
The device context is intended to represent a number of output devices in a
generic way, with the same API being used throughout.
A wxDC is a @e device context onto which graphics and text can be drawn.
The device context is intended to represent a number of output devices in a
generic way, with the same API being used throughout.
Some device contexts are created temporarily in order to draw on a window.
This is @true of wxScreenDC, wxClientDC, wxPaintDC, and wxWindowDC.
The following describes the differences between these device contexts and
when you should use them.
Some device contexts are created temporarily in order to draw on a window.
This is @true of wxScreenDC, wxClientDC, wxPaintDC, and wxWindowDC.
The following describes the differences between these device contexts and
when you should use them.
@li @b wxScreenDC. Use this to paint on the screen, as opposed to an individual window.
@li @b wxClientDC. Use this to paint on the client area of window (the part without
@li @b wxScreenDC. Use this to paint on the screen, as opposed to an individual window.
@li @b wxClientDC. Use this to paint on the client area of window (the part without
borders and other decorations), but do not use it from within an wxPaintEvent.
@li @b wxPaintDC. Use this to paint on the client area of a window, but @e only from
@li @b wxPaintDC. Use this to paint on the client area of a window, but @e only from
within a wxPaintEvent.
@li @b wxWindowDC. Use this to paint on the whole area of a window, including decorations.
@li @b wxWindowDC. Use this to paint on the whole area of a window, including decorations.
This may not be available on non-Windows platforms.
To use a client, paint or window device context, create an object on the stack with
the window as argument, for example:
To use a client, paint or window device context, create an object on the stack with
the window as argument, for example:
@code
void MyWindow::OnMyCmd(wxCommandEvent& event)
{
@code
void MyWindow::OnMyCmd(wxCommandEvent& event)
{
wxClientDC dc(window);
DrawMyPicture(dc);
}
@endcode
}
@endcode
Try to write code so it is parameterised by wxDC - if you do this, the same piece of code may
write to a number of different devices, by passing a different device context. This doesn't
work for everything (for example not all device contexts support bitmap drawing) but
will work most of the time.
Try to write code so it is parameterised by wxDC - if you do this, the same piece of code may
write to a number of different devices, by passing a different device context. This doesn't
work for everything (for example not all device contexts support bitmap drawing) but
will work most of the time.
*/

View File

@@ -8,136 +8,136 @@
/**
@page overview_debugging Debugging
@page overview_debugging Debugging
Classes, functions and macros: wxDebugContext, wxObject, wxLog,
Classes, functions and macros: wxDebugContext, wxObject, wxLog,
@ref page_func_cat_log, @ref page_macro_cat_debugging
Various classes, functions and macros are provided in wxWidgets to help you debug
your application. Most of these are only available if you compile both wxWidgets,
your application and @e all libraries that use wxWidgets with the __WXDEBUG__ symbol
defined. You can also test the __WXDEBUG__ symbol in your own applications to execute
code that should be active only in debug mode.
Various classes, functions and macros are provided in wxWidgets to help you debug
your application. Most of these are only available if you compile both wxWidgets,
your application and @e all libraries that use wxWidgets with the __WXDEBUG__ symbol
defined. You can also test the __WXDEBUG__ symbol in your own applications to execute
code that should be active only in debug mode.
@li @ref overview_debugging_dbgctx
@li @ref overview_debugging_dbgmacros
@li @ref overview_debugging_logging
@li @ref overview_debugging_dbgctx2
@li @ref overview_debugging_dbgctx
@li @ref overview_debugging_dbgmacros
@li @ref overview_debugging_logging
@li @ref overview_debugging_dbgctx2
<hr>
<hr>
@section overview_debugging_dbgctx wxDebugContext
@section overview_debugging_dbgctx wxDebugContext
wxDebugContext is a class that never gets instantiated, but ties together
various static functions and variables. It allows you to dump all objects to that stream,
write statistics about object allocation, and check memory for errors.
wxDebugContext is a class that never gets instantiated, but ties together
various static functions and variables. It allows you to dump all objects to that stream,
write statistics about object allocation, and check memory for errors.
It is good practice to define a wxObject::Dump member function for each class you derive
from a wxWidgets class, so that wxDebugContext::Dump can call it and
give valuable information about the state of the application.
It is good practice to define a wxObject::Dump member function for each class you derive
from a wxWidgets class, so that wxDebugContext::Dump can call it and
give valuable information about the state of the application.
If you have difficulty tracking down a memory leak, recompile
in debugging mode and call wxDebugContext::Dump and wxDebugContext::PrintStatistics at
appropriate places. They will tell you what objects have not yet been
deleted, and what kinds of object they are. In fact, in debug mode wxWidgets will automatically
detect memory leaks when your application is about to exit, and if there are any leaks,
will give you information about the problem. (How much information depends on the operating system
and compiler -- some systems don't allow all memory logging to be enabled). See the
memcheck sample for example of usage.
If you have difficulty tracking down a memory leak, recompile
in debugging mode and call wxDebugContext::Dump and wxDebugContext::PrintStatistics at
appropriate places. They will tell you what objects have not yet been
deleted, and what kinds of object they are. In fact, in debug mode wxWidgets will automatically
detect memory leaks when your application is about to exit, and if there are any leaks,
will give you information about the problem. (How much information depends on the operating system
and compiler -- some systems don't allow all memory logging to be enabled). See the
memcheck sample for example of usage.
For wxDebugContext to do its work, the @e new and @e delete operators for wxObject
have been redefined to store extra information about dynamically allocated objects
(but not statically declared objects).
For wxDebugContext to do its work, the @e new and @e delete operators for wxObject
have been redefined to store extra information about dynamically allocated objects
(but not statically declared objects).
This slows down a debugging version of an application, but can
find difficult-to-detect memory leaks (objects are not
deallocated), overwrites (writing past the end of your object) and
underwrites (writing to memory in front of the object).
This slows down a debugging version of an application, but can
find difficult-to-detect memory leaks (objects are not
deallocated), overwrites (writing past the end of your object) and
underwrites (writing to memory in front of the object).
If debugging mode is on and the symbols wxUSE_GLOBAL_MEMORY_OPERATORS and
wxUSE_DEBUG_NEW_ALWAYS are set to 1 in setup.h, 'new' is defined to be:
If debugging mode is on and the symbols wxUSE_GLOBAL_MEMORY_OPERATORS and
wxUSE_DEBUG_NEW_ALWAYS are set to 1 in setup.h, 'new' is defined to be:
@code
#define new new(__FILE__,__LINE__)
@endcode
@code
#define new new(__FILE__,__LINE__)
@endcode
All occurrences of 'new' in wxWidgets and your own application will use
the overridden form of the operator with two extra arguments. This means that
the debugging output (and error messages reporting memory problems) will tell you what
file and on what line you allocated the object. Unfortunately not all
compilers allow this definition to work properly, but most do.
All occurrences of 'new' in wxWidgets and your own application will use
the overridden form of the operator with two extra arguments. This means that
the debugging output (and error messages reporting memory problems) will tell you what
file and on what line you allocated the object. Unfortunately not all
compilers allow this definition to work properly, but most do.
@section overview_debugging_dbgmacros Debug macros
@section overview_debugging_dbgmacros Debug macros
You should also use @ref page_macro_cat_debugging as part of a 'defensive programming'
strategy, scattering wxASSERTs liberally to test for problems in your code as early as
possible.
Forward thinking will save a surprising amount of time in the long run.
You should also use @ref page_macro_cat_debugging as part of a 'defensive programming'
strategy, scattering wxASSERTs liberally to test for problems in your code as early as
possible.
Forward thinking will save a surprising amount of time in the long run.
#wxASSERT is used to pop up an error message box when a condition
is not @true. You can also use #wxASSERT_MSG to supply your
own helpful error message. For example:
#wxASSERT is used to pop up an error message box when a condition
is not @true. You can also use #wxASSERT_MSG to supply your
own helpful error message. For example:
@code
void MyClass::MyFunction(wxObject* object)
{
@code
void MyClass::MyFunction(wxObject* object)
{
wxASSERT_MSG( (object != NULL), "object should not be NULL in MyFunction!" );
...
};
@endcode
};
@endcode
The message box allows you to continue execution or abort the program. If you are running
the application inside a debugger, you will be able to see exactly where the problem was.
The message box allows you to continue execution or abort the program. If you are running
the application inside a debugger, you will be able to see exactly where the problem was.
@section overview_debugging_logging Logging functions
@section overview_debugging_logging Logging functions
You can use the wxLogDebug and wxLogTrace functions to output debugging information in
debug mode; it will do nothing for non-debugging code.
You can use the wxLogDebug and wxLogTrace functions to output debugging information in
debug mode; it will do nothing for non-debugging code.
@section overview_debugging_dbgctx2 wxDebugContext overview
@section overview_debugging_dbgctx2 wxDebugContext overview
Class: wxDebugContext
Class: wxDebugContext
wxDebugContext is a class for performing various debugging and memory tracing operations.
wxDebugContext is a class for performing various debugging and memory tracing operations.
This class has only static data and function members, and there should be
no instances. Probably the most useful members are SetFile (for directing output
to a file, instead of the default standard error or debugger output);
Dump (for dumping the dynamically allocated objects) and PrintStatistics
(for dumping information about allocation of objects). You can also call
Check to check memory blocks for integrity.
This class has only static data and function members, and there should be
no instances. Probably the most useful members are SetFile (for directing output
to a file, instead of the default standard error or debugger output);
Dump (for dumping the dynamically allocated objects) and PrintStatistics
(for dumping information about allocation of objects). You can also call
Check to check memory blocks for integrity.
Here's an example of use. The SetCheckpoint ensures that only the
allocations done after the checkpoint will be dumped.
Here's an example of use. The SetCheckpoint ensures that only the
allocations done after the checkpoint will be dumped.
@code
wxDebugContext::SetCheckpoint();
@code
wxDebugContext::SetCheckpoint();
wxDebugContext::SetFile("c:\\temp\\debug.log");
wxDebugContext::SetFile("c:\\temp\\debug.log");
wxString *thing = new wxString;
wxString *thing = new wxString;
char *ordinaryNonObject = new char[1000];
char *ordinaryNonObject = new char[1000];
wxDebugContext::Dump();
wxDebugContext::PrintStatistics();
@endcode
wxDebugContext::Dump();
wxDebugContext::PrintStatistics();
@endcode
You can use wxDebugContext if __WXDEBUG__ is defined, or you can use it
at any other time (if wxUSE_DEBUG_CONTEXT is set to 1 in setup.h). It is not disabled
in non-debug mode because you may not wish to recompile wxWidgets and your entire application
just to make use of the error logging facility.
You can use wxDebugContext if __WXDEBUG__ is defined, or you can use it
at any other time (if wxUSE_DEBUG_CONTEXT is set to 1 in setup.h). It is not disabled
in non-debug mode because you may not wish to recompile wxWidgets and your entire application
just to make use of the error logging facility.
@note wxDebugContext::SetFile has a problem at present, so use the default stream instead.
@note wxDebugContext::SetFile has a problem at present, so use the default stream instead.
Eventually the logging will be done through the wxLog facilities instead.
*/

View File

@@ -8,127 +8,127 @@
/**
@page overview_dialog wxDialog Overview
@page overview_dialog wxDialog Overview
Classes: wxDialog, wxDialogLayoutAdapter
Classes: wxDialog, wxDialogLayoutAdapter
A dialog box is similar to a panel, in that it is a window which can
be used for placing controls, with the following exceptions:
A dialog box is similar to a panel, in that it is a window which can
be used for placing controls, with the following exceptions:
@li A surrounding frame is implicitly created.
@li Extra functionality is automatically given to the dialog box,
@li A surrounding frame is implicitly created.
@li Extra functionality is automatically given to the dialog box,
such as tabbing between items (currently Windows only).
@li If the dialog box is @e modal, the calling program is blocked
@li If the dialog box is @e modal, the calling program is blocked
until the dialog box is dismissed.
For a set of dialog convenience functions, including file selection, see
@ref page_func_cat_dialog.
For a set of dialog convenience functions, including file selection, see
@ref page_func_cat_dialog.
See also wxTopLevelWindow and wxWindow for inherited
member functions. Validation of data in controls is covered in @ref overview_validator.
See also wxTopLevelWindow and wxWindow for inherited
member functions. Validation of data in controls is covered in @ref overview_validator.
@li @ref overview_dialog_autoscrolling
@li @ref overview_dialog_autoscrolling
<hr>
<hr>
@section overview_dialog_autoscrolling Automatic scrolling dialogs
@section overview_dialog_autoscrolling Automatic scrolling dialogs
As an ever greater variety of mobile hardware comes to market, it becomes more
imperative for wxWidgets applications to adapt to these platforms without putting
too much burden on the programmer. One area where wxWidgets can help is in adapting
dialogs for the lower resolution screens that inevitably accompany a smaller form factor.
wxDialog therefore supplies a global wxDialogLayoutAdapter class that implements
automatic scrolling adaptation for most sizer-based custom dialogs.
As an ever greater variety of mobile hardware comes to market, it becomes more
imperative for wxWidgets applications to adapt to these platforms without putting
too much burden on the programmer. One area where wxWidgets can help is in adapting
dialogs for the lower resolution screens that inevitably accompany a smaller form factor.
wxDialog therefore supplies a global wxDialogLayoutAdapter class that implements
automatic scrolling adaptation for most sizer-based custom dialogs.
Many applications should therefore be able to adapt to small displays with little
or no work, as far as dialogs are concerned.
By default this adaptation is off. To switch scrolling adaptation on globally in
your application, call the static function wxDialog::EnableLayoutAdaptation passing @true.
You can also adjust adaptation on a per-dialog basis by calling
wxDialog::SetLayoutAdaptationMode with one of @c wxDIALOG_ADAPTATION_MODE_DEFAULT
(use the global setting), @c wxDIALOG_ADAPTATION_MODE_ENABLED or @c wxDIALOG_ADAPTATION_MODE_DISABLED.
Many applications should therefore be able to adapt to small displays with little
or no work, as far as dialogs are concerned.
By default this adaptation is off. To switch scrolling adaptation on globally in
your application, call the static function wxDialog::EnableLayoutAdaptation passing @true.
You can also adjust adaptation on a per-dialog basis by calling
wxDialog::SetLayoutAdaptationMode with one of @c wxDIALOG_ADAPTATION_MODE_DEFAULT
(use the global setting), @c wxDIALOG_ADAPTATION_MODE_ENABLED or @c wxDIALOG_ADAPTATION_MODE_DISABLED.
The last two modes override the global adaptation setting.
With adaptation enabled, if the display size is too small for the dialog, wxWidgets (or rather the
standard adapter class wxStandardDialogLayoutAdapter) will make part of the dialog scrolling,
leaving standard buttons in a non-scrolling part at the bottom of the dialog.
This is done as follows, in wxDialogLayoutAdapter::DoLayoutAdaptation called from
within wxDialog::Show or wxDialog::ShowModal:
The last two modes override the global adaptation setting.
With adaptation enabled, if the display size is too small for the dialog, wxWidgets (or rather the
standard adapter class wxStandardDialogLayoutAdapter) will make part of the dialog scrolling,
leaving standard buttons in a non-scrolling part at the bottom of the dialog.
This is done as follows, in wxDialogLayoutAdapter::DoLayoutAdaptation called from
within wxDialog::Show or wxDialog::ShowModal:
@li If wxDialog::GetContentWindow returns a window derived from wxBookCtrlBase,
@li If wxDialog::GetContentWindow returns a window derived from wxBookCtrlBase,
the pages are made scrollable and no other adaptation is done.
@li wxWidgets looks for a wxStdDialogButtonSizer and uses it for the non-scrolling part.
@li If that search failed, wxWidgets looks for a horizontal wxBoxSizer with one or more
@li wxWidgets looks for a wxStdDialogButtonSizer and uses it for the non-scrolling part.
@li If that search failed, wxWidgets looks for a horizontal wxBoxSizer with one or more
standard buttons, with identifiers such as @c wxID_OK and @c wxID_CANCEL.
@li If that search failed too, wxWidgets finds 'loose' standard buttons (in any kind of sizer)
@li If that search failed too, wxWidgets finds 'loose' standard buttons (in any kind of sizer)
and adds them to a wxStdDialogButtonSizer.
If no standard buttons were found, the whole dialog content will scroll.
@li All the children apart from standard buttons are reparented onto a new wxScrolledWindow
@li All the children apart from standard buttons are reparented onto a new wxScrolledWindow
object, using the old top-level sizer for the scrolled window and creating a new top-level
sizer to lay out the scrolled window and standard button sizer.
@subsection overview_dialog_autoscrolling_custom Customising scrolling adaptation
@subsection overview_dialog_autoscrolling_custom Customising scrolling adaptation
In addition to switching adaptation on and off globally and per dialog,
you can choose how aggressively wxWidgets will search for standard buttons by setting
wxDialog::SetLayoutAdaptationLevel. By default, all the steps described above will be
performed but by setting the level to 1, for example, you can choose to only look for
wxStdDialogButtonSizer.
In addition to switching adaptation on and off globally and per dialog,
you can choose how aggressively wxWidgets will search for standard buttons by setting
wxDialog::SetLayoutAdaptationLevel. By default, all the steps described above will be
performed but by setting the level to 1, for example, you can choose to only look for
wxStdDialogButtonSizer.
You can use wxDialog::AddMainButtonId to add identifiers for buttons that should also be
treated as standard buttons for the non-scrolling area.
You can use wxDialog::AddMainButtonId to add identifiers for buttons that should also be
treated as standard buttons for the non-scrolling area.
You can derive your own class from wxDialogLayoutAdapter or wxStandardDialogLayoutAdapter and call
wxDialog::SetLayoutAdapter, deleting the old object that this function returns. Override
the functions CanDoLayoutAdaptation and DoLayoutAdaptation to test for adaptation applicability
and perform the adaptation.
You can derive your own class from wxDialogLayoutAdapter or wxStandardDialogLayoutAdapter and call
wxDialog::SetLayoutAdapter, deleting the old object that this function returns. Override
the functions CanDoLayoutAdaptation and DoLayoutAdaptation to test for adaptation applicability
and perform the adaptation.
You can also override wxDialog::CanDoLayoutAdaptation and wxDialog::DoLayoutAdaptation
in a class derived from wxDialog.
You can also override wxDialog::CanDoLayoutAdaptation and wxDialog::DoLayoutAdaptation
in a class derived from wxDialog.
@subsection overview_dialog_autoscrolling_fail Situations where automatic scrolling adaptation may fail
@subsection overview_dialog_autoscrolling_fail Situations where automatic scrolling adaptation may fail
Because adaptation rearranges your sizer and window hierarchy, it is not fool-proof,
and may fail in the following situations:
Because adaptation rearranges your sizer and window hierarchy, it is not fool-proof,
and may fail in the following situations:
@li The dialog doesn't use sizers.
@li The dialog implementation makes assumptions about the window hierarchy,
@li The dialog doesn't use sizers.
@li The dialog implementation makes assumptions about the window hierarchy,
for example getting the parent of a control and casting to the dialog class.
@li The dialog does custom painting and/or event handling not handled by the scrolled window.
@li The dialog does custom painting and/or event handling not handled by the scrolled window.
If this problem can be solved globally, you can derive a new adapter class from
wxStandardDialogLayoutAdapter and override its CreateScrolledWindow function to return
an instance of your own class.
@li The dialog has unusual layout, for example a vertical sizer containing a mixture of
@li The dialog has unusual layout, for example a vertical sizer containing a mixture of
standard buttons and other controls.
@li The dialog makes assumptions about the sizer hierarchy, for example to show or hide
@li The dialog makes assumptions about the sizer hierarchy, for example to show or hide
children of the top-level sizer. However, the original sizer hierarchy will still hold
until Show or ShowModal is called.
You can help make sure that your dialogs will continue to function after adaptation by:
You can help make sure that your dialogs will continue to function after adaptation by:
@li avoiding the above situations and assumptions;
@li using wxStdDialogButtonSizer;
@li only making assumptions about hierarchy immediately after the dialog is created;
@li using an intermediate sizer under the main sizer, a @false top-level sizer that
@li avoiding the above situations and assumptions;
@li using wxStdDialogButtonSizer;
@li only making assumptions about hierarchy immediately after the dialog is created;
@li using an intermediate sizer under the main sizer, a @false top-level sizer that
can be relied on to exist for the purposes of manipulating child sizers and windows;
@li overriding wxDialog::GetContentWindow to return a book control if your dialog implements
@li overriding wxDialog::GetContentWindow to return a book control if your dialog implements
pages: wxWidgets will then only make the pages scrollable.
@subsection overview_dialog_propertysheet wxPropertySheetDialog and wxWizard
@subsection overview_dialog_propertysheet wxPropertySheetDialog and wxWizard
Adaptation for wxPropertySheetDialog is always done by simply making the pages
scrollable, since wxDialog::GetContentWindow returns the dialog's book control and
this is handled by the standard layout adapter.
Adaptation for wxPropertySheetDialog is always done by simply making the pages
scrollable, since wxDialog::GetContentWindow returns the dialog's book control and
this is handled by the standard layout adapter.
wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather
than the global adapter: again, only the wizard pages are made scrollable.
wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather
than the global adapter: again, only the wizard pages are made scrollable.
*/

View File

@@ -8,325 +8,325 @@
/**
@page overview_docview Document/View Framework
@page overview_docview Document/View Framework
Classes: wxDocument, wxView, wxDocTemplate, wxDocManager, wxDocParentFrame,
Classes: wxDocument, wxView, wxDocTemplate, wxDocManager, wxDocParentFrame,
wxDocChildFrame, wxDocMDIParentFrame, wxDocMDIChildFrame,
wxCommand, wxCommandProcessor
The document/view framework is found in most application frameworks, because it
can dramatically simplify the code required to build many kinds of application.
The document/view framework is found in most application frameworks, because it
can dramatically simplify the code required to build many kinds of application.
The idea is that you can model your application primarily in terms of @e documents to store data
and provide interface-independent operations upon it, and @e views to visualise and manipulate
the data. Documents know how to do input and output given stream objects, and views are responsible
for taking input from physical windows and performing the manipulation on the document data.
The idea is that you can model your application primarily in terms of @e documents to store data
and provide interface-independent operations upon it, and @e views to visualise and manipulate
the data. Documents know how to do input and output given stream objects, and views are responsible
for taking input from physical windows and performing the manipulation on the document data.
If a document's data changes, all views should be updated to reflect the change.
The framework can provide many user-interface elements based on this model.
If a document's data changes, all views should be updated to reflect the change.
The framework can provide many user-interface elements based on this model.
Once you have defined your own classes and the relationships between them, the framework
takes care of popping up file selectors, opening and closing files, asking the user to save
modifications, routing menu commands to appropriate (possibly default) code, even
some default print/preview functionality and support for command undo/redo.
Once you have defined your own classes and the relationships between them, the framework
takes care of popping up file selectors, opening and closing files, asking the user to save
modifications, routing menu commands to appropriate (possibly default) code, even
some default print/preview functionality and support for command undo/redo.
The framework is highly modular, allowing overriding and replacement of functionality
and objects to achieve more than the default behaviour.
The framework is highly modular, allowing overriding and replacement of functionality
and objects to achieve more than the default behaviour.
These are the overall steps involved in creating an application based on the
document/view framework:
These are the overall steps involved in creating an application based on the
document/view framework:
@li Define your own document and view classes, overriding a minimal set of
@li Define your own document and view classes, overriding a minimal set of
member functions e.g. for input/output, drawing and initialization.
@li Define any subwindows (such as a scrolled window) that are needed for the view(s).
@li Define any subwindows (such as a scrolled window) that are needed for the view(s).
You may need to route some events to views or documents, for example OnPaint needs
to be routed to wxView::OnDraw.
@li Decide what style of interface you will use: Microsoft's MDI (multiple
@li Decide what style of interface you will use: Microsoft's MDI (multiple
document child frames surrounded by an overall frame), SDI (a separate, unconstrained frame
for each document), or single-window (one document open at a time, as in Windows Write).
@li Use the appropriate wxDocParentFrame and wxDocChildFrame classes. Construct an instance
@li Use the appropriate wxDocParentFrame and wxDocChildFrame classes. Construct an instance
of wxDocParentFrame in your wxApp::OnInit, and a wxDocChildFrame (if not single-window) when
you initialize a view. Create menus using standard menu ids (such as wxID_OPEN, wxID_PRINT).
@li Construct a single wxDocManager instance at the beginning of your wxApp::OnInit, and then
@li Construct a single wxDocManager instance at the beginning of your wxApp::OnInit, and then
as many wxDocTemplate instances as necessary to define relationships between documents and
views. For a simple application, there will be just one wxDocTemplate.
If you wish to implement Undo/Redo, you need to derive your own class(es) from wxCommand
and use wxCommandProcessor::Submit instead of directly executing code. The framework will
take care of calling Undo and Do functions as appropriate, so long as the wxID_UNDO and
wxID_REDO menu items are defined in the view menu.
If you wish to implement Undo/Redo, you need to derive your own class(es) from wxCommand
and use wxCommandProcessor::Submit instead of directly executing code. The framework will
take care of calling Undo and Do functions as appropriate, so long as the wxID_UNDO and
wxID_REDO menu items are defined in the view menu.
Here are a few examples of the tailoring you can do to go beyond the default framework
behaviour:
Here are a few examples of the tailoring you can do to go beyond the default framework
behaviour:
@li Override wxDocument::OnCreateCommandProcessor to define a different Do/Undo strategy,
@li Override wxDocument::OnCreateCommandProcessor to define a different Do/Undo strategy,
or a command history editor.
@li Override wxView::OnCreatePrintout to create an instance of a derived wxPrintout
@li Override wxView::OnCreatePrintout to create an instance of a derived wxPrintout
class, to provide multi-page document facilities.
@li Override wxDocManager::SelectDocumentPath to provide a different file selector.
@li Limit the maximum number of open documents and the maximum number of undo commands.
@li Override wxDocManager::SelectDocumentPath to provide a different file selector.
@li Limit the maximum number of open documents and the maximum number of undo commands.
Note that to activate framework functionality, you need to use some or all of
the wxWidgets @ref overview_docview_predefid in your menus.
Note that to activate framework functionality, you need to use some or all of
the wxWidgets @ref overview_docview_predefid in your menus.
@beginWxPerlOnly
The document/view framework is available in wxPerl. To use it,
you will need the following statements in your application code:
@beginWxPerlOnly
The document/view framework is available in wxPerl. To use it,
you will need the following statements in your application code:
@code
use Wx::DocView;
use Wx ':docview'; # import constants (optional)
@endcode
@endWxPerlOnly
@code
use Wx::DocView;
use Wx ':docview'; # import constants (optional)
@endcode
@endWxPerlOnly
@li @ref overview_docview_wxdoc
@li @ref overview_docview_wxview
@li @ref overview_docview_wxdoctemplate
@li @ref overview_docview_wxdocmanager
@li @ref overview_docview_wxcommand
@li @ref overview_docview_wxcommandproc
@li @ref overview_docview_filehistory
@li @ref overview_docview_predefid
@li @ref overview_docview_wxdoc
@li @ref overview_docview_wxview
@li @ref overview_docview_wxdoctemplate
@li @ref overview_docview_wxdocmanager
@li @ref overview_docview_wxcommand
@li @ref overview_docview_wxcommandproc
@li @ref overview_docview_filehistory
@li @ref overview_docview_predefid
<hr>
<hr>
@section overview_docview_wxdoc wxDocument overview
@section overview_docview_wxdoc wxDocument overview
Class: wxDocument
Class: wxDocument
The wxDocument class can be used to model an application's file-based
data. It is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocTemplate and wxDocManager classes.
Using this framework can save a lot of routine user-interface programming,
since a range of menu commands -- such as open, save, save as -- are supported
automatically.
The wxDocument class can be used to model an application's file-based
data. It is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocTemplate and wxDocManager classes.
Using this framework can save a lot of routine user-interface programming,
since a range of menu commands -- such as open, save, save as -- are supported
automatically.
The programmer just needs to define a minimal set of classes and member functions
for the framework to call when necessary. Data, and the means to view and edit
the data, are explicitly separated out in this model, and the concept of multiple
@e views onto the same data is supported.
The programmer just needs to define a minimal set of classes and member functions
for the framework to call when necessary. Data, and the means to view and edit
the data, are explicitly separated out in this model, and the concept of multiple
@e views onto the same data is supported.
Note that the document/view model will suit many but not all styles of application.
For example, it would be overkill for a simple file conversion utility, where there
may be no call for @e views on @e documents or the ability to open, edit and save
files. But probably the majority of applications are document-based.
Note that the document/view model will suit many but not all styles of application.
For example, it would be overkill for a simple file conversion utility, where there
may be no call for @e views on @e documents or the ability to open, edit and save
files. But probably the majority of applications are document-based.
See the example application in @c samples/docview.
To use the abstract wxDocument class, you need to derive a new class and override
at least the member functions SaveObject and LoadObject. SaveObject and
LoadObject will be called by the framework when the document needs to be saved
or loaded.
See the example application in @c samples/docview.
To use the abstract wxDocument class, you need to derive a new class and override
at least the member functions SaveObject and LoadObject. SaveObject and
LoadObject will be called by the framework when the document needs to be saved
or loaded.
Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order
to allow the framework to create document objects on demand. When you create
a wxDocTemplate object on application initialization, you
should pass CLASSINFO(YourDocumentClass) to the wxDocTemplate constructor
so that it knows how to create an instance of this class.
Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order
to allow the framework to create document objects on demand. When you create
a wxDocTemplate object on application initialization, you
should pass CLASSINFO(YourDocumentClass) to the wxDocTemplate constructor
so that it knows how to create an instance of this class.
If you do not wish to use the wxWidgets method of creating document
objects dynamically, you must override wxDocTemplate::CreateDocument
to return an instance of the appropriate class.
If you do not wish to use the wxWidgets method of creating document
objects dynamically, you must override wxDocTemplate::CreateDocument
to return an instance of the appropriate class.
@section overview_docview_wxview wxView overview
@section overview_docview_wxview wxView overview
Class: wxView
Class: wxView
The wxView class can be used to model the viewing and editing component of
an application's file-based data. It is part of the document/view framework
supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate
and wxDocManager classes.
The wxView class can be used to model the viewing and editing component of
an application's file-based data. It is part of the document/view framework
supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate
and wxDocManager classes.
See the example application in @c samples/docview.
See the example application in @c samples/docview.
To use the abstract wxView class, you need to derive a new class and override
at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You will probably
want to respond to menu commands from the frame containing the view.
To use the abstract wxView class, you need to derive a new class and override
at least the member functions OnCreate, OnDraw, OnUpdate and OnClose. You will probably
want to respond to menu commands from the frame containing the view.
Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order
to allow the framework to create view objects on demand. When you create
a wxDocTemplate object on application initialization, you
should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor
so that it knows how to create an instance of this class.
Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order
to allow the framework to create view objects on demand. When you create
a wxDocTemplate object on application initialization, you
should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor
so that it knows how to create an instance of this class.
If you do not wish to use the wxWidgets method of creating view
objects dynamically, you must override wxDocTemplate::CreateView
to return an instance of the appropriate class.
If you do not wish to use the wxWidgets method of creating view
objects dynamically, you must override wxDocTemplate::CreateView
to return an instance of the appropriate class.
@section overview_docview_wxdoctemplate wxDocTemplate overview
@section overview_docview_wxdoctemplate wxDocTemplate overview
Class: wxDocTemplate
Class: wxDocTemplate
The wxDocTemplate class is used to model the relationship between a
document class and a view class. The application creates a document
template object for each document/view pair. The list of document
templates managed by the wxDocManager instance is used to create
documents and views. Each document template knows what file filters
and default extension are appropriate for a document/view combination,
and how to create a document or view.
The wxDocTemplate class is used to model the relationship between a
document class and a view class. The application creates a document
template object for each document/view pair. The list of document
templates managed by the wxDocManager instance is used to create
documents and views. Each document template knows what file filters
and default extension are appropriate for a document/view combination,
and how to create a document or view.
For example, you might write a small doodling application that can load
and save lists of line segments. If you had two views of the data -- graphical,
and a list of the segments -- then you would create one document class DoodleDocument,
and two view classes (DoodleGraphicView and DoodleListView). You would also
need two document templates, one for the graphical view and another for the
list view. You would pass the same document class and default file extension to both
document templates, but each would be passed a different view class. When
the user clicks on the Open menu item, the file selector is displayed
with a list of possible file filters -- one for each wxDocTemplate. Selecting
the filter selects the wxDocTemplate, and when a file is selected, that template
will be used for creating a document and view.
For example, you might write a small doodling application that can load
and save lists of line segments. If you had two views of the data -- graphical,
and a list of the segments -- then you would create one document class DoodleDocument,
and two view classes (DoodleGraphicView and DoodleListView). You would also
need two document templates, one for the graphical view and another for the
list view. You would pass the same document class and default file extension to both
document templates, but each would be passed a different view class. When
the user clicks on the Open menu item, the file selector is displayed
with a list of possible file filters -- one for each wxDocTemplate. Selecting
the filter selects the wxDocTemplate, and when a file is selected, that template
will be used for creating a document and view.
For the case where an application has one document type and one view type,
a single document template is constructed, and dialogs will be appropriately
simplified.
For the case where an application has one document type and one view type,
a single document template is constructed, and dialogs will be appropriately
simplified.
wxDocTemplate is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument and wxDocManager classes.
wxDocTemplate is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument and wxDocManager classes.
See the example application in @c samples/docview.
See the example application in @c samples/docview.
To use the wxDocTemplate class, you do not need to derive a new class.
Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass)
and CLASSINFO(YourViewClass) to allow dynamic instance creation.
To use the wxDocTemplate class, you do not need to derive a new class.
Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass)
and CLASSINFO(YourViewClass) to allow dynamic instance creation.
If you do not wish to use the wxWidgets method of creating document
objects dynamically, you must override wxDocTemplate::CreateDocument
and wxDocTemplate::CreateView to return instances of the appropriate class.
If you do not wish to use the wxWidgets method of creating document
objects dynamically, you must override wxDocTemplate::CreateDocument
and wxDocTemplate::CreateView to return instances of the appropriate class.
@note The document template has nothing to do with the C++ template construct.
@note The document template has nothing to do with the C++ template construct.
@section overview_docview_wxdocmanager wxDocManager overview
@section overview_docview_wxdocmanager wxDocManager overview
Class: wxDocManager
Class: wxDocManager
The wxDocManager class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument and wxDocTemplate classes.
The wxDocManager class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument and wxDocTemplate classes.
A wxDocManager instance coordinates documents, views and document templates.
It keeps a list of document and template instances, and much functionality is routed
through this object, such as providing selection and file dialogs.
The application can use this class 'as is' or derive a class and override some members
to extend or change the functionality.
A wxDocManager instance coordinates documents, views and document templates.
It keeps a list of document and template instances, and much functionality is routed
through this object, such as providing selection and file dialogs.
The application can use this class 'as is' or derive a class and override some members
to extend or change the functionality.
Create an instance of this class near the beginning of your application initialization,
before any documents, views or templates are manipulated.
Create an instance of this class near the beginning of your application initialization,
before any documents, views or templates are manipulated.
There may be multiple wxDocManager instances in an application.
See the example application in @c samples/docview.
There may be multiple wxDocManager instances in an application.
See the example application in @c samples/docview.
@section overview_docview_wxcommand wxCommand overview
@section overview_docview_wxcommand wxCommand overview
Classes: wxCommand, wxCommandProcessor
Classes: wxCommand, wxCommandProcessor
wxCommand is a base class for modelling an application command,
which is an action usually performed by selecting a menu item, pressing
a toolbar button or any other means provided by the application to
change the data or view.
wxCommand is a base class for modelling an application command,
which is an action usually performed by selecting a menu item, pressing
a toolbar button or any other means provided by the application to
change the data or view.
Instead of the application functionality being scattered around
switch statements and functions in a way that may be hard to
read and maintain, the functionality for a command is explicitly represented
as an object which can be manipulated by a framework or application.
Instead of the application functionality being scattered around
switch statements and functions in a way that may be hard to
read and maintain, the functionality for a command is explicitly represented
as an object which can be manipulated by a framework or application.
When a user interface event occurs, the application @e submits a command
to a wxCommandProcessor object to execute and store.
When a user interface event occurs, the application @e submits a command
to a wxCommandProcessor object to execute and store.
The wxWidgets document/view framework handles Undo and Redo by use of
wxCommand and wxCommandProcessor objects. You might find further uses
for wxCommand, such as implementing a macro facility that stores, loads
and replays commands.
The wxWidgets document/view framework handles Undo and Redo by use of
wxCommand and wxCommandProcessor objects. You might find further uses
for wxCommand, such as implementing a macro facility that stores, loads
and replays commands.
An application can derive a new class for every command, or, more likely, use
one class parameterized with an integer or string command identifier.
An application can derive a new class for every command, or, more likely, use
one class parameterized with an integer or string command identifier.
@section overview_docview_wxcommandproc wxCommandProcessor overview
@section overview_docview_wxcommandproc wxCommandProcessor overview
Classes: wxCommandProcessor, wxCommand
Classes: wxCommandProcessor, wxCommand
wxCommandProcessor is a class that maintains a history of wxCommand
instances, with undo/redo functionality built-in. Derive a new class from this
if you want different behaviour.
wxCommandProcessor is a class that maintains a history of wxCommand
instances, with undo/redo functionality built-in. Derive a new class from this
if you want different behaviour.
@section overview_docview_filehistory wxFileHistory overview
@section overview_docview_filehistory wxFileHistory overview
Classes: wxFileHistory, wxDocManager
Classes: wxFileHistory, wxDocManager
wxFileHistory encapsulates functionality to record the last few files visited, and
to allow the user to quickly load these files using the list appended to the File menu.
Although wxFileHistory is used by wxDocManager, it can be used independently. You may wish
to derive from it to allow different behaviour, such as popping up a scrolling
list of files.
wxFileHistory encapsulates functionality to record the last few files visited, and
to allow the user to quickly load these files using the list appended to the File menu.
Although wxFileHistory is used by wxDocManager, it can be used independently. You may wish
to derive from it to allow different behaviour, such as popping up a scrolling
list of files.
By calling wxFileHistory::UseMenu() you can associate a file menu with the file history.
The menu will then be used for appending filenames that are added to the history.
By calling wxFileHistory::UseMenu() you can associate a file menu with the file history.
The menu will then be used for appending filenames that are added to the history.
Please notice that currently if the history already contained filenames when UseMenu()
is called (e.g. when initializing a second MDI child frame), the menu is not automatically
initialized with the existing filenames in the history and so you need to call
wxFileHistory::AddFilesToMenu() after UseMenu() explicitly in order to initialize the menu with
the existing list of MRU files (otherwise an assertion failure is raised in debug builds).
Please notice that currently if the history already contained filenames when UseMenu()
is called (e.g. when initializing a second MDI child frame), the menu is not automatically
initialized with the existing filenames in the history and so you need to call
wxFileHistory::AddFilesToMenu() after UseMenu() explicitly in order to initialize the menu with
the existing list of MRU files (otherwise an assertion failure is raised in debug builds).
The filenames are appended using menu identifiers in the range @c wxID_FILE1 to @c wxID_FILE9.
The filenames are appended using menu identifiers in the range @c wxID_FILE1 to @c wxID_FILE9.
In order to respond to a file load command from one of these identifiers,
you need to handle them using an event handler, for example:
In order to respond to a file load command from one of these identifiers,
you need to handle them using an event handler, for example:
@code
BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame)
@code
BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame)
EVT_MENU(wxID_EXIT, wxDocParentFrame::OnExit)
EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, wxDocParentFrame::OnMRUFile)
END_EVENT_TABLE()
END_EVENT_TABLE()
void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event))
{
void wxDocParentFrame::OnExit(wxCommandEvent& WXUNUSED(event))
{
Close();
}
}
void wxDocParentFrame::OnMRUFile(wxCommandEvent& event)
{
void wxDocParentFrame::OnMRUFile(wxCommandEvent& event)
{
wxString f(m_docManager->GetHistoryFile(event.GetId() - wxID_FILE1));
if (!f.empty())
(void)m_docManager-CreateDocument(f, wxDOC_SILENT);
}
@endcode
}
@endcode
@section overview_docview_predefid wxWidgets predefined command identifiers
@section overview_docview_predefid wxWidgets predefined command identifiers
To allow communication between the application's menus and the
document/view framework, several command identifiers are predefined for you
to use in menus.
To allow communication between the application's menus and the
document/view framework, several command identifiers are predefined for you
to use in menus.
@verbatim
wxID_OPEN (5000)
wxID_CLOSE (5001)
wxID_NEW (5002)
wxID_SAVE (5003)
wxID_SAVEAS (5004)
wxID_REVERT (5005)
wxID_EXIT (5006)
wxID_UNDO (5007)
wxID_REDO (5008)
wxID_HELP (5009)
wxID_PRINT (5010)
wxID_PRINT_SETUP (5011)
wxID_PREVIEW (5012)
@endverbatim
@verbatim
wxID_OPEN (5000)
wxID_CLOSE (5001)
wxID_NEW (5002)
wxID_SAVE (5003)
wxID_SAVEAS (5004)
wxID_REVERT (5005)
wxID_EXIT (5006)
wxID_UNDO (5007)
wxID_REDO (5008)
wxID_HELP (5009)
wxID_PRINT (5010)
wxID_PRINT_SETUP (5011)
wxID_PREVIEW (5012)
@endverbatim
*/

View File

@@ -8,18 +8,18 @@
/**
@page overview_envvars Environment Variables
@page overview_envvars Environment Variables
This section describes all environment variables that affect execution of
wxWidgets programs.
This section describes all environment variables that affect execution of
wxWidgets programs.
@beginDefList
@itemdef{WXTRACE,
@beginDefList
@itemdef{WXTRACE,
(Debug build only.)
This variable can be set to a comma-separated list of trace masks used in
wxLogTrace calls; wxLog::AddTraceMask is called for every mask
in the list during wxWidgets initialization.}
@itemdef{WXPREFIX,
@itemdef{WXPREFIX,
(Unix only.)
Overrides installation prefix. Normally, the prefix
is hard-coded and is the same as the value passed to @c configure via
@@ -27,11 +27,11 @@
@c /usr/local or @c /usr). You can set WXPREFIX if you are for example
distributing a binary version of an application and you don't know in advance
where it will be installed.}
@itemdef{WXMODE,
@itemdef{WXMODE,
(wxMGL only.)
Sets MGL video mode. The value must be in form
@e widthx@e height-@e depth. The default is @c 640x480-16.}
@itemdef{WXSTDERR,
@itemdef{WXSTDERR,
(wxMGL only.)
Redirects stderr output to a file.}

View File

@@ -8,75 +8,75 @@
/**
@page overview_exceptions C++ Exceptions
@page overview_exceptions C++ Exceptions
@li @ref overview_exceptions_introduction
@li @ref overview_exceptions_strategies
@li @ref overview_exceptions_tech
@li @ref overview_exceptions_introduction
@li @ref overview_exceptions_strategies
@li @ref overview_exceptions_tech
<hr>
<hr>
@section overview_exceptions_introduction Introduction
@section overview_exceptions_introduction Introduction
wxWidgets had been started long before the exceptions were introduced in C++ so
it is not very surprising that it is not built around using them as some more
modern C++ libraries are. For instance, the library doesn't throw exceptions to
signal about the errors. Moreover, up to (and including) the version 2.4 of
wxWidgets, even using the exceptions in the user code was dangerous because the
library code wasn't exception-safe and so an exception propagating through it
could result in memory and/or resource leaks, and also not very convenient.
wxWidgets had been started long before the exceptions were introduced in C++ so
it is not very surprising that it is not built around using them as some more
modern C++ libraries are. For instance, the library doesn't throw exceptions to
signal about the errors. Moreover, up to (and including) the version 2.4 of
wxWidgets, even using the exceptions in the user code was dangerous because the
library code wasn't exception-safe and so an exception propagating through it
could result in memory and/or resource leaks, and also not very convenient.
wxWidgets is exception-friendly.
It still doesn't use the exceptions by itself but it should be now safe to use the
exceptions in the user code and the library tries to help you with this. Please
note that making the library exception-safe is still work in progress.
wxWidgets is exception-friendly.
It still doesn't use the exceptions by itself but it should be now safe to use the
exceptions in the user code and the library tries to help you with this. Please
note that making the library exception-safe is still work in progress.
@section overview_exceptions_strategies Strategies for exceptions handling
@section overview_exceptions_strategies Strategies for exceptions handling
There are several choice for using the exceptions in wxWidgets programs. First
of all, you may not use them at all. As stated above, the library doesn't throw
any exceptions by itself and so you don't have to worry about exceptions at all
unless your own code throws them. This is, of course, the simplest solution but
may be not the best one to deal with all possible errors.
There are several choice for using the exceptions in wxWidgets programs. First
of all, you may not use them at all. As stated above, the library doesn't throw
any exceptions by itself and so you don't have to worry about exceptions at all
unless your own code throws them. This is, of course, the simplest solution but
may be not the best one to deal with all possible errors.
Another strategy is to use exceptions only to signal truly fatal errors. In
this case you probably don't expect to recover from them and the default
behaviour -- to simply terminate the program -- may be appropriate. If it is
not, you may override wxApp::OnUnhandledException()
in your wxApp-derived class to perform any clean up tasks. Note, however, that
any information about the exact exception type is lost when this function is
called, so if you need you should override wxApp::OnRun() and
add a try/catch clause around the call of the base class version. This would
allow you to catch any exceptions generated during the execution of the main
event loop. To deal with the exceptions which may arise during the program
startup and/or shutdown you should insert try/catch clauses in
wxApp::OnInit() and/or wxApp::OnExit() as well.
Another strategy is to use exceptions only to signal truly fatal errors. In
this case you probably don't expect to recover from them and the default
behaviour -- to simply terminate the program -- may be appropriate. If it is
not, you may override wxApp::OnUnhandledException()
in your wxApp-derived class to perform any clean up tasks. Note, however, that
any information about the exact exception type is lost when this function is
called, so if you need you should override wxApp::OnRun() and
add a try/catch clause around the call of the base class version. This would
allow you to catch any exceptions generated during the execution of the main
event loop. To deal with the exceptions which may arise during the program
startup and/or shutdown you should insert try/catch clauses in
wxApp::OnInit() and/or wxApp::OnExit() as well.
Finally, you may also want to continue running even when certain exceptions
occur. If all of your exceptions may happen only in the event handlers of a
single class (or only in the classes derived from it), you may centralize your
exception handling code in wxApp::ProcessEvent
method of this class. If this is impractical, you may also consider overriding
the wxApp::HandleEvent() which allows you to handle
all the exceptions thrown by any event handler.
Finally, you may also want to continue running even when certain exceptions
occur. If all of your exceptions may happen only in the event handlers of a
single class (or only in the classes derived from it), you may centralize your
exception handling code in wxApp::ProcessEvent
method of this class. If this is impractical, you may also consider overriding
the wxApp::HandleEvent() which allows you to handle
all the exceptions thrown by any event handler.
@section overview_exceptions_tech Technicalities
@section overview_exceptions_tech Technicalities
To use any kind of exception support in the library you need to build it
with @c wxUSE_EXCEPTIONS set to 1. This should be the case by default but
if it isn't, you should edit the @c include/wx/msw/setup.h file under
Windows or run @c configure with @c --enable-exceptions argument
under Unix.
To use any kind of exception support in the library you need to build it
with @c wxUSE_EXCEPTIONS set to 1. This should be the case by default but
if it isn't, you should edit the @c include/wx/msw/setup.h file under
Windows or run @c configure with @c --enable-exceptions argument
under Unix.
On the other hand, if you do not plan to use exceptions, setting this
flag to 0 or using @c --disable-exceptions could result in a leaner and
slightly faster library.
On the other hand, if you do not plan to use exceptions, setting this
flag to 0 or using @c --disable-exceptions could result in a leaner and
slightly faster library.
As for any other library feature, there is a sample (@c except)
showing how to use it. Please look at its sources for further information.
As for any other library feature, there is a sample (@c except)
showing how to use it. Please look at its sources for further information.
*/

View File

@@ -8,35 +8,35 @@
/**
@page overview_file File Classes and Functions
@page overview_file File Classes and Functions
Classes: wxFile, wxDir, wxTempFile, wxTextFile
Classes: wxFile, wxDir, wxTempFile, wxTextFile
Functions: see @ref page_func_cat_file.
Functions: see @ref page_func_cat_file.
wxWidgets provides some functions and classes to facilitate working with files.
As usual, the accent is put on cross-platform features which explains, for
example, the wxTextFile class which may be used to convert
between different types of text files (DOS/Unix/Mac).
wxWidgets provides some functions and classes to facilitate working with files.
As usual, the accent is put on cross-platform features which explains, for
example, the wxTextFile class which may be used to convert
between different types of text files (DOS/Unix/Mac).
wxFile may be used for low-level IO. It contains all the usual functions to work
with files (opening/closing, reading/writing, seeking, and so on) but compared with
using standard C functions, has error checking (in case of an error a message
is logged using wxLog facilities) and closes the file
automatically in the destructor which may be quite convenient.
wxFile may be used for low-level IO. It contains all the usual functions to work
with files (opening/closing, reading/writing, seeking, and so on) but compared with
using standard C functions, has error checking (in case of an error a message
is logged using wxLog facilities) and closes the file
automatically in the destructor which may be quite convenient.
wxTempFile is a very small file designed to make replacing the files contents
safer - see its documentation for more details.
wxTempFile is a very small file designed to make replacing the files contents
safer - see its documentation for more details.
wxTextFile is a general purpose class for working with small text files on line
by line basis. It is especially well suited for working with configuration files
and program source files. It can be also used to work with files with "non
native" line termination characters and write them as "native" files if needed
(in fact, the files may be written in any format).
wxTextFile is a general purpose class for working with small text files on line
by line basis. It is especially well suited for working with configuration files
and program source files. It can be also used to work with files with "non
native" line termination characters and write them as "native" files if needed
(in fact, the files may be written in any format).
wxDir is a helper class for enumerating the files or subdirectories of a
directory. It may be used to enumerate all files, only files satisfying the
given template mask or only non-hidden files.
wxDir is a helper class for enumerating the files or subdirectories of a
directory. It may be used to enumerate all files, only files satisfying the
given template mask or only non-hidden files.
*/

View File

@@ -8,109 +8,109 @@
/**
@page overview_fs wxFileSystem Overview
@page overview_fs wxFileSystem Overview
The wxHTML library uses a @b virtual file systems mechanism
similar to the one used in Midnight Commander, Dos Navigator,
FAR or almost any modern file manager. It allows the user to access
data stored in archives as if they were ordinary files. On-the-fly
generated files that exist only in memory are also supported.
The wxHTML library uses a @b virtual file systems mechanism
similar to the one used in Midnight Commander, Dos Navigator,
FAR or almost any modern file manager. It allows the user to access
data stored in archives as if they were ordinary files. On-the-fly
generated files that exist only in memory are also supported.
@li @ref overview_fs_classes
@li @ref overview_fs_locations
@li @ref overview_fs_combined
@li @ref overview_fs_wxhtmlfs
@li @ref overview_fs_init
@li @ref overview_fs_classes
@li @ref overview_fs_locations
@li @ref overview_fs_combined
@li @ref overview_fs_wxhtmlfs
@li @ref overview_fs_init
<hr>
<hr>
@section overview_fs_classes Classes
@section overview_fs_classes Classes
Three classes are used in order to provide virtual file systems mechanism:
Three classes are used in order to provide virtual file systems mechanism:
@li The wxFSFile class provides information
@li The wxFSFile class provides information
about opened file (name, input stream, mime type and anchor).
@li The wxFileSystem class is the interface.
@li The wxFileSystem class is the interface.
Its main methods are ChangePathTo() and OpenFile(). This class
is most often used by the end user.
@li The wxFileSystemHandler is the core
@li The wxFileSystemHandler is the core
of virtual file systems mechanism. You can derive your own handler and pass
it to the VFS mechanism. You can derive your own handler and pass it to
wxFileSystem's AddHandler() method. In the new handler you only need to
override the OpenFile() and CanOpen() methods.
@section overview_fs_locations Locations
@section overview_fs_locations Locations
Locations (aka filenames aka addresses) are constructed from four parts:
Locations (aka filenames aka addresses) are constructed from four parts:
@li @b protocol - handler can recognize if it is able to open a
@li @b protocol - handler can recognize if it is able to open a
file by checking its protocol. Examples are "http", "file" or "ftp".
@li <b>right location</b> - is the name of file within the protocol.
@li <b>right location</b> - is the name of file within the protocol.
In "http://www.wxwidgets.org/index.html" the right location is "//www.wxwidgets.org/index.html".
@li @b anchor - an anchor is optional and is usually not present.
@li @b anchor - an anchor is optional and is usually not present.
In "index.htm#chapter2" the anchor is "chapter2".
@li <b>left location</b> - this is usually an empty string.
@li <b>left location</b> - this is usually an empty string.
It is used by 'local' protocols such as ZIP.
See Combined Protocols paragraph for details.
@section overview_fs_combined Combined Protocols
@section overview_fs_combined Combined Protocols
The left location precedes the protocol in the URL string.
The left location precedes the protocol in the URL string.
It is not used by global protocols like HTTP but it becomes handy when nesting
protocols - for example you may want to access files in a ZIP archive:
file:archives/cpp_doc.zip#zip:reference/fopen.htm#syntax
In this example, the protocol is "zip", right location is
"reference/fopen.htm", anchor is "syntax" and left location
is "file:archives/cpp_doc.zip".
It is not used by global protocols like HTTP but it becomes handy when nesting
protocols - for example you may want to access files in a ZIP archive:
file:archives/cpp_doc.zip#zip:reference/fopen.htm#syntax
In this example, the protocol is "zip", right location is
"reference/fopen.htm", anchor is "syntax" and left location
is "file:archives/cpp_doc.zip".
There are @b two protocols used in this example: "zip" and "file".
There are @b two protocols used in this example: "zip" and "file".
@section overview_fs_wxhtmlfs File Systems Included in wxHTML
@section overview_fs_wxhtmlfs File Systems Included in wxHTML
The following virtual file system handlers are part of wxWidgets so far:
The following virtual file system handlers are part of wxWidgets so far:
@li @b wxArchiveFSHandler:
@li @b wxArchiveFSHandler:
A handler for archives such as zip
and tar. Include file is wx/fs_arc.h. URLs examples:
"archive.zip#zip:filename", "archive.tar.gz#gzip:#tar:filename".
@li @b wxFilterFSHandler:
@li @b wxFilterFSHandler:
A handler for compression schemes such
as gzip. Header is wx/fs_filter.h. URLs are in the form, e.g.:
"document.ps.gz#gzip:".
@li @b wxInternetFSHandler:
@li @b wxInternetFSHandler:
A handler for accessing documents
via HTTP or FTP protocols. Include file is wx/fs_inet.h.
@li @b wxMemoryFSHandler:
@li @b wxMemoryFSHandler:
This handler allows you to access
data stored in memory (such as bitmaps) as if they were regular files.
See wxMemoryFSHandler for details.
Include file is wx/fs_mem.h. URL is prefixed with memory:, e.g.
"memory:myfile.htm"
In addition, wxFileSystem itself can access local files.
In addition, wxFileSystem itself can access local files.
@section overview_fs_init Initializing file system handlers
@section overview_fs_init Initializing file system handlers
Use wxFileSystem::AddHandler to initialize a handler, for example:
Use wxFileSystem::AddHandler to initialize a handler, for example:
@code
#include <wx/fs_mem.h>
@code
#include <wx/fs_mem.h>
...
...
bool MyApp::OnInit()
{
bool MyApp::OnInit()
{
wxFileSystem::AddHandler(new wxMemoryFSHandler);
...
}
@endcode
...
}
@endcode
*/

View File

@@ -8,53 +8,53 @@
/**
@page overview_font wxFont Overview
@page overview_font wxFont Overview
Class: wxFont, wxFontDialog
Class: wxFont, wxFontDialog
@li @ref overview_font_intro
@li @ref overview_font_nativeinfo
@li @ref overview_font_intro
@li @ref overview_font_nativeinfo
<hr>
<hr>
@section overview_font_intro Introduction
@section overview_font_intro Introduction
A font is an object which determines the appearance of text, primarily
when drawing text to a window or device context. A font is determined by
the following parameters (not all of them have to be specified, of course):
A font is an object which determines the appearance of text, primarily
when drawing text to a window or device context. A font is determined by
the following parameters (not all of them have to be specified, of course):
@beginDefList
@itemdef{Point size, This is the standard way of referring to text size.}
@itemdef{Family,
@beginDefList
@itemdef{Point size, This is the standard way of referring to text size.}
@itemdef{Family,
Supported families are:
@b wxDEFAULT, @b wxDECORATIVE, @b wxROMAN, @b wxSCRIPT, @b wxSWISS, @b wxMODERN.
@b wxMODERN is a fixed pitch font; the others are either fixed or variable pitch.}
@itemdef{Style, The value can be @b wxNORMAL, @b wxSLANT or @b wxITALIC.}
@itemdef{Weight, The value can be @b wxNORMAL, @b wxLIGHT or @b wxBOLD.}
@itemdef{Underlining, The value can be @true or @false.}
@itemdef{Face name,
@itemdef{Style, The value can be @b wxNORMAL, @b wxSLANT or @b wxITALIC.}
@itemdef{Weight, The value can be @b wxNORMAL, @b wxLIGHT or @b wxBOLD.}
@itemdef{Underlining, The value can be @true or @false.}
@itemdef{Face name,
An optional string specifying the actual typeface to be used. If @NULL,
a default typeface will chosen based on the family.}
@itemdef{Encoding,
@itemdef{Encoding,
The font encoding (see @b wxFONTENCODING_XXX
constants and the @ref overview_fontencoding for more details)}
@endDefList
@endDefList
Specifying a family, rather than a specific typeface name, ensures a degree of
portability across platforms because a suitable font will be chosen for the
given font family, however it doesn't allow to choose a font precisely as the
parameters above don't suffice, in general, to identify all the available fonts
and this is where using the native font descriptions may be helpful - see
below.
Specifying a family, rather than a specific typeface name, ensures a degree of
portability across platforms because a suitable font will be chosen for the
given font family, however it doesn't allow to choose a font precisely as the
parameters above don't suffice, in general, to identify all the available fonts
and this is where using the native font descriptions may be helpful - see
below.
Under Windows, the face name can be one of the installed fonts on the user's
system. Since the choice of fonts differs from system to system, either choose
standard Windows fonts, or if allowing the user to specify a face name, store
the family name with any file that might be transported to a different Windows
machine or other platform.
Under Windows, the face name can be one of the installed fonts on the user's
system. Since the choice of fonts differs from system to system, either choose
standard Windows fonts, or if allowing the user to specify a face name, store
the family name with any file that might be transported to a different Windows
machine or other platform.
@note There is currently a difference between the appearance
@note There is currently a difference between the appearance
of fonts on the two platforms, if the mapping mode is anything other than
wxMM_TEXT. Under X, font size is always specified in points. Under MS
Windows, the unit for text is points but the text is scaled according to the
@@ -63,24 +63,24 @@
@section overview_font_nativeinfo Native font information
@section overview_font_nativeinfo Native font information
An alternative way of choosing fonts is to use the native font description.
This is the only acceptable solution if the user is allowed to choose the font
using the wxFontDialog because the selected font cannot
be described using only the family name and so, if only family name is stored
permanently, the user would almost surely see a different font in the program
later.
An alternative way of choosing fonts is to use the native font description.
This is the only acceptable solution if the user is allowed to choose the font
using the wxFontDialog because the selected font cannot
be described using only the family name and so, if only family name is stored
permanently, the user would almost surely see a different font in the program
later.
Instead, you should store the value returned by wxFont::GetNativeFontInfoDesc and pass
it to wxFont::SetNativeFontInfo later to recreate exactly the same font.
Instead, you should store the value returned by wxFont::GetNativeFontInfoDesc and pass
it to wxFont::SetNativeFontInfo later to recreate exactly the same font.
Note that the contents of this string depends on the platform and shouldn't be
used for any other purpose (in particular, it is not meant to be shown to the
user). Also please note that although the native font information is currently
implemented for Windows and Unix (GTK+ and Motif) ports only, all the methods
are available for all the ports and should be used to make your program work
correctly when they are implemented later.
Note that the contents of this string depends on the platform and shouldn't be
used for any other purpose (in particular, it is not meant to be shown to the
user). Also please note that although the native font information is currently
implemented for Windows and Unix (GTK+ and Motif) ports only, all the methods
are available for all the ports and should be used to make your program work
correctly when they are implemented later.
*/

View File

@@ -8,32 +8,32 @@
/**
@page overview_grid wxGrid Overview
@page overview_grid wxGrid Overview
Classes: wxGrid
Classes: wxGrid
@li @ref overview_grid_intro
@li @ref overview_grid_simpleexample
@li @ref overview_grid_complexexample
@li @ref overview_grid_classrelations
@li @ref overview_grid_keyboardmouse
@li @ref overview_grid_intro
@li @ref overview_grid_simpleexample
@li @ref overview_grid_complexexample
@li @ref overview_grid_classrelations
@li @ref overview_grid_keyboardmouse
<hr>
<hr>
@section overview_grid_intro Introduction
@section overview_grid_intro Introduction
wxGrid and its related classes are used for displaying and editing tabular data.
wxGrid and its related classes are used for displaying and editing tabular data.
@section overview_grid_simpleexample Getting started: a simple example
@section overview_grid_simpleexample Getting started: a simple example
For simple applications you need only refer to the wxGrid class in your
code. This example shows how you might create a grid in a frame or
dialog constructor and illustrates some of the formatting functions.
For simple applications you need only refer to the wxGrid class in your
code. This example shows how you might create a grid in a frame or
dialog constructor and illustrates some of the formatting functions.
@code
@code
// Create a wxGrid object
grid = new wxGrid( this,
@@ -68,22 +68,22 @@
// and precision of 2
grid->SetColFormatFloat(5, 6, 2);
grid->SetCellValue(0, 6, "3.1415");
@endcode
@endcode
@section overview_grid_complexexample A more complex example
@section overview_grid_complexexample A more complex example
Yet to be written
@todo Yet to be written
@section overview_grid_classrelations How the wxGrid classes relate to each other
@section overview_grid_classrelations How the wxGrid classes relate to each other
Yet to be written
@todo Yet to be written
@section overview_grid_keyboardmouse Keyboard and mouse actions
@section overview_grid_keyboardmouse Keyboard and mouse actions
Yet to be written
@todo Yet to be written
*/

View File

@@ -8,135 +8,135 @@
/**
@page overview_helloworld Hello World Example
@page overview_helloworld Hello World Example
Many people have requested a mini-sample to be published here
so that some quick judgment concerning syntax
and basic principles can be made, so here we go.
Many people have requested a mini-sample to be published here
so that some quick judgment concerning syntax
and basic principles can be made, so here we go.
First, you have to include wxWidgets' header files, of course. This can
be done on a file by file basis (such as <tt>@#include "wx/window.h"</tt>)
or using one global include (<tt>@#include "wx/wx.h"</tt>). This is
also useful on platforms which support precompiled headers such
as all major compilers on the Windows platform and GCC on Unix platforms.
First, you have to include wxWidgets' header files, of course. This can
be done on a file by file basis (such as <tt>@#include "wx/window.h"</tt>)
or using one global include (<tt>@#include "wx/wx.h"</tt>). This is
also useful on platforms which support precompiled headers such
as all major compilers on the Windows platform and GCC on Unix platforms.
@code
//
// file name: hworld.cpp
//
// purpose: wxWidgets "Hello world"
//
@code
//
// file name: hworld.cpp
//
// purpose: wxWidgets "Hello world"
//
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#endif
#ifndef WX_PRECOMP
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
@endcode
#endif
@endcode
Practically every app should define a new class derived from wxApp.
By overriding wxApp's OnInit() the program can be initialized,
e.g. by creating a new main window.
Practically every app should define a new class derived from wxApp.
By overriding wxApp's OnInit() the program can be initialized,
e.g. by creating a new main window.
@code
class MyApp: public wxApp
{
@code
class MyApp: public wxApp
{
virtual bool OnInit();
};
@endcode
};
@endcode
The main window is created by deriving a class from wxFrame and
giving it a menu and a status bar in its constructor. Also, any class
that wishes to respond to any "event" (such as mouse clicks or
messages from the menu or a button) must declare an event table
using the macro below.
The main window is created by deriving a class from wxFrame and
giving it a menu and a status bar in its constructor. Also, any class
that wishes to respond to any "event" (such as mouse clicks or
messages from the menu or a button) must declare an event table
using the macro below.
Finally, the way to react to such events must be done in "handlers".
In our sample, we react to two menu items, one for "Quit" and one for
displaying an "About" window. These handlers should not be virtual.
Finally, the way to react to such events must be done in "handlers".
In our sample, we react to two menu items, one for "Quit" and one for
displaying an "About" window. These handlers should not be virtual.
@code
class MyFrame: public wxFrame
{
public:
@code
class MyFrame: public wxFrame
{
public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
private:
private:
DECLARE_EVENT_TABLE()
};
@endcode
};
@endcode
In order to be able to react to a menu command, it must be given a unique
identifier such as a const or an enum.
In order to be able to react to a menu command, it must be given a unique
identifier such as a const or an enum.
@code
enum
{
@code
enum
{
ID_Quit = 1,
ID_About,
};
@endcode
};
@endcode
We then proceed to actually implement an event table in which the events
are routed to their respective handler functions in the class MyFrame.
We then proceed to actually implement an event table in which the events
are routed to their respective handler functions in the class MyFrame.
There are predefined macros for routing all common events, ranging from
the selection of a list box entry to a resize event when a user resizes
a window on the screen. If -1 is given as the ID, the given handler will be
invoked for any event of the specified type, so that you could add just
one entry in the event table for all menu commands or all button commands etc.
There are predefined macros for routing all common events, ranging from
the selection of a list box entry to a resize event when a user resizes
a window on the screen. If -1 is given as the ID, the given handler will be
invoked for any event of the specified type, so that you could add just
one entry in the event table for all menu commands or all button commands etc.
The origin of the event can still be distinguished in the event handler as
the (only) parameter in an event handler is a reference to a wxEvent object,
which holds various information about the event (such as the ID of and a
pointer to the class, which emitted the event).
The origin of the event can still be distinguished in the event handler as
the (only) parameter in an event handler is a reference to a wxEvent object,
which holds various information about the event (such as the ID of and a
pointer to the class, which emitted the event).
@code
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
@code
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(ID_Quit, MyFrame::OnQuit)
EVT_MENU(ID_About, MyFrame::OnAbout)
END_EVENT_TABLE()
@endcode
END_EVENT_TABLE()
@endcode
As in all programs there must be a "main" function. Under wxWidgets main is implemented
using this macro, which creates an application instance and starts the program.
As in all programs there must be a "main" function. Under wxWidgets main is implemented
using this macro, which creates an application instance and starts the program.
@code
IMPLEMENT_APP(MyApp)
@endcode
@code
IMPLEMENT_APP(MyApp)
@endcode
As mentioned above, wxApp::OnInit() is called upon startup and should be
used to initialize the program, maybe showing a "splash screen" and creating
the main window (or several). The frame should get a title bar text ("Hello World")
and a position and start-up size. One frame can also be declared to be the
top window. Returning @true indicates a successful initialization.
As mentioned above, wxApp::OnInit() is called upon startup and should be
used to initialize the program, maybe showing a "splash screen" and creating
the main window (or several). The frame should get a title bar text ("Hello World")
and a position and start-up size. One frame can also be declared to be the
top window. Returning @true indicates a successful initialization.
@code
bool MyApp::OnInit()
{
@code
bool MyApp::OnInit()
{
MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) );
frame->Show( true );
SetTopWindow( frame );
return true;
}
@endcode
}
@endcode
In the constructor of the main window (or later on) we create a menu with two menu
items as well as a status bar to be shown at the bottom of the main window. Both have
to be "announced" to the frame with respective calls.
In the constructor of the main window (or later on) we create a menu with two menu
items as well as a status bar to be shown at the bottom of the main window. Both have
to be "announced" to the frame with respective calls.
@code
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
@code
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
{
wxMenu *menuFile = new wxMenu;
menuFile->Append( ID_About, "" );
@@ -150,31 +150,31 @@
CreateStatusBar();
SetStatusText( "Welcome to wxWidgets!" );
}
@endcode
}
@endcode
Here are the actual event handlers. MyFrame::OnQuit() closes the main window
by calling Close(). The parameter @true indicates that other windows have no veto
power such as after asking "Do you really want to close?". If there is no other
main window left, the application will quit.
Here are the actual event handlers. MyFrame::OnQuit() closes the main window
by calling Close(). The parameter @true indicates that other windows have no veto
power such as after asking "Do you really want to close?". If there is no other
main window left, the application will quit.
@code
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
@code
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close( true );
}
@endcode
}
@endcode
MyFrame::OnAbout() will display a small window with some text in it. In this
case a typical "About" window with information about the program.
MyFrame::OnAbout() will display a small window with some text in it. In this
case a typical "About" window with information about the program.
@code
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
@code
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox( "This is a wxWidgets' Hello world sample",
"About Hello World", wxOK | wxICON_INFORMATION );
}
@endcode
}
@endcode
*/

View File

@@ -8,148 +8,148 @@
/**
@page overview_html wxHTML Overview
@page overview_html wxHTML Overview
The wxHTML library provides classes for parsing and displaying HTML.
It is not intended to be a high-end HTML browser. If you are looking for
something like that try <http://www.mozilla.org/>.
The wxHTML library provides classes for parsing and displaying HTML.
It is not intended to be a high-end HTML browser. If you are looking for
something like that try <http://www.mozilla.org/>.
wxHTML can be used as a generic rich text viewer - for example to display
a nice About Box (like those of GNOME apps) or to display the result of
database searching. There is a wxFileSystem class which allows you to use
your own virtual file systems.
wxHTML can be used as a generic rich text viewer - for example to display
a nice About Box (like those of GNOME apps) or to display the result of
database searching. There is a wxFileSystem class which allows you to use
your own virtual file systems.
wxHtmlWindow supports tag handlers. This means that you can easily
extend wxHtml library with new, unsupported tags. Not only that,
you can even use your own application-specific tags!
wxHtmlWindow supports tag handlers. This means that you can easily
extend wxHtml library with new, unsupported tags. Not only that,
you can even use your own application-specific tags!
See @c src/html/m_*.cpp files for details.
See @c src/html/m_*.cpp files for details.
There is a generic wxHtmlParser class, independent of wxHtmlWindow.
There is a generic wxHtmlParser class, independent of wxHtmlWindow.
@li @ref overview_html_quickstart
@li @ref overview_html_printing
@li @ref overview_html_helpformats
@li @ref overview_html_filters
@li @ref overview_html_cells
@li @ref overview_html_handlers
@li @ref overview_html_supptags
@li @ref overview_html_quickstart
@li @ref overview_html_printing
@li @ref overview_html_helpformats
@li @ref overview_html_filters
@li @ref overview_html_cells
@li @ref overview_html_handlers
@li @ref overview_html_supptags
<hr>
<hr>
@section overview_html_quickstart wxHTML quick start
@section overview_html_quickstart wxHTML quick start
@subsection overview_html_quickstart_disphtml Displaying HTML
@subsection overview_html_quickstart_disphtml Displaying HTML
First of all, you must include @c wx/wxhtml.h.
First of all, you must include @c wx/wxhtml.h.
Class wxHtmlWindow (derived from wxScrolledWindow) is used to display HTML documents.
Class wxHtmlWindow (derived from wxScrolledWindow) is used to display HTML documents.
It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage.
LoadPage loads and displays HTML file while SetPage displays directly the
passed @b string. See the example:
It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage.
LoadPage loads and displays HTML file while SetPage displays directly the
passed @b string. See the example:
@code
@code
mywin -> LoadPage("test.htm");
mywin -> SetPage("htmlbody"
"h1Error/h1"
"Some error occurred :-H)"
"/body/hmtl");
@endcode
@endcode
@subsection overview_html_quickstart_disphelp Displaying Help
@subsection overview_html_quickstart_disphelp Displaying Help
See wxHtmlHelpController.
See wxHtmlHelpController.
@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow
@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow
Because wxHtmlWindow is derived from wxScrolledWindow and not from
wxFrame, it doesn't have visible frame. But the user usually wants to see
the title of HTML page displayed somewhere and the frame's titlebar is
the ideal place for it.
Because wxHtmlWindow is derived from wxScrolledWindow and not from
wxFrame, it doesn't have visible frame. But the user usually wants to see
the title of HTML page displayed somewhere and the frame's titlebar is
the ideal place for it.
wxHtmlWindow provides 2 methods in order to handle this:
wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar.
See the example:
wxHtmlWindow provides 2 methods in order to handle this:
wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar.
See the example:
@code
@code
html = new wxHtmlWindow(this);
html -> SetRelatedFrame(this, "HTML : %%s");
html -> SetRelatedStatusBar(0);
@endcode
@endcode
The first command associates the HTML object with its parent frame
(this points to wxFrame object there) and sets the format of the title.
Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
in this example.
The first command associates the HTML object with its parent frame
(this points to wxFrame object there) and sets the format of the title.
Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
in this example.
The second command sets which frame's status bar should be used to display
browser's messages (such as "Loading..." or "Done" or hypertext links).
The second command sets which frame's status bar should be used to display
browser's messages (such as "Loading..." or "Done" or hypertext links).
@subsection overview_html_quickstart_custom Customizing wxHtmlWindow
@subsection overview_html_quickstart_custom Customizing wxHtmlWindow
You can customize wxHtmlWindow by setting font size, font face and
borders (space between border of window and displayed HTML). Related functions:
You can customize wxHtmlWindow by setting font size, font face and
borders (space between border of window and displayed HTML). Related functions:
@li wxHtmlWindow::SetFonts
@li wxHtmlWindow::SetBorders
@li wxHtmlWindow::ReadCustomization
@li wxHtmlWindow::WriteCustomization
@li wxHtmlWindow::SetFonts
@li wxHtmlWindow::SetBorders
@li wxHtmlWindow::ReadCustomization
@li wxHtmlWindow::WriteCustomization
The last two functions are used to store user customization info wxConfig stuff
(for example in the registry under Windows, or in a dotfile under Unix).
The last two functions are used to store user customization info wxConfig stuff
(for example in the registry under Windows, or in a dotfile under Unix).
@section overview_html_printing HTML Printing
@section overview_html_printing HTML Printing
The wxHTML library provides printing facilities with several levels of complexity.
The easiest way to print an HTML document is to use the wxHtmlEasyPrinting class.
The wxHTML library provides printing facilities with several levels of complexity.
The easiest way to print an HTML document is to use the wxHtmlEasyPrinting class.
It lets you print HTML documents with only one command and you don't have to worry
about deriving from the wxPrintout class at all. It is only a simple wrapper around the
wxHtmlPrintout, normal wxWidgets printout class.
It lets you print HTML documents with only one command and you don't have to worry
about deriving from the wxPrintout class at all. It is only a simple wrapper around the
wxHtmlPrintout, normal wxWidgets printout class.
And finally there is the low level class wxHtmlDCRenderer which you can use to
render HTML into a rectangular area on any DC.
And finally there is the low level class wxHtmlDCRenderer which you can use to
render HTML into a rectangular area on any DC.
It supports rendering into multiple rectangles with the same
width. (The most common use of this is placing one rectangle on each page or
printing into two columns.)
It supports rendering into multiple rectangles with the same
width. (The most common use of this is placing one rectangle on each page or
printing into two columns.)
@section overview_html_helpformats Help Files Format
@section overview_html_helpformats Help Files Format
wxHTML library uses a reduced version of MS HTML Workshop format.
Tex2RTF can produce these files when generating HTML, if you set
@b htmlWorkshopFiles to @true in your tex2rtf.ini file.
(See wxHtmlHelpController for help controller description.)
wxHTML library uses a reduced version of MS HTML Workshop format.
Tex2RTF can produce these files when generating HTML, if you set
@b htmlWorkshopFiles to @true in your tex2rtf.ini file.
(See wxHtmlHelpController for help controller description.)
A @b book consists of three files: the header file, the contents file
and the index file.
A @b book consists of three files: the header file, the contents file
and the index file.
You can make a regular zip archive of these files, plus the HTML and any
image files, for wxHTML (or helpview) to read; and the @c .zip file can
optionally be renamed to @c .htb.
You can make a regular zip archive of these files, plus the HTML and any
image files, for wxHTML (or helpview) to read; and the @c .zip file can
optionally be renamed to @c .htb.
@subsection overview_html_helpformats_hhp Header file (.hhp)
@subsection overview_html_helpformats_hhp Header file (.hhp)
The header file must contain these lines (and may contain additional lines
which are ignored):
The header file must contain these lines (and may contain additional lines
which are ignored):
@code
Contents file=filename.hhc
Index file=filename.hhk
Title=title of your book
Default topic=default page to be displayed.htm
@endcode
@code
Contents file=filename.hhc
Index file=filename.hhk
Title=title of your book
Default topic=default page to be displayed.htm
@endcode
All filenames (including the Default topic) are relative to the
location of the @c .hhp file.
All filenames (including the Default topic) are relative to the
location of the @c .hhp file.
@note For localization, in addition the @c .hhp file may contain the line
@note For localization, in addition the @c .hhp file may contain the line
@code
Charset=rfc_charset
@endcode
@@ -158,39 +158,39 @@
MS HTML Help Workshop and it would either silently remove it or complain
with some error. See also @ref overview_nonenglish.
@subsection overview_html_helpformats_hhc Contents file (.hhc)
@subsection overview_html_helpformats_hhc Contents file (.hhc)
Contents file has HTML syntax and it can be parsed by regular HTML parser.
It contains exactly one list (@c &lt;ul&gt;....@c &lt;/ul&gt; statement):
Contents file has HTML syntax and it can be parsed by regular HTML parser.
It contains exactly one list (@c &lt;ul&gt;....@c &lt;/ul&gt; statement):
@code
<ul>
@code
<ul>
<li><object type="text/sitemap">
<li><object type="text/sitemap">
<param name="Name" value="@topic name@">
<param name="ID" value=@numeric_id@>
<param name="Local" value="@filename.htm@">
</object>
<li><object type="text/sitemap">
<li><object type="text/sitemap">
<param name="Name" value="@topic name@">
<param name="ID" value=@numeric_id@>
<param name="Local" value="@filename.htm@">
</object>
...
</ul>
@endcode
...
</ul>
@endcode
You can modify value attributes of param tags.
The <em>topic name</em> is name of chapter/topic as is displayed in
contents, <em>filename.htm</em> is the HTML page name (relative to the @c .hhp file)
and <em>numeric_id</em> is optional - it is used only when you use wxHtmlHelpController::Display(int).
You can modify value attributes of param tags.
The <em>topic name</em> is name of chapter/topic as is displayed in
contents, <em>filename.htm</em> is the HTML page name (relative to the @c .hhp file)
and <em>numeric_id</em> is optional - it is used only when you use wxHtmlHelpController::Display(int).
Items in the list may be nested - one @c &lt;li&gt; statement may contain a @c &lt;ul&gt; sub-statement:
Items in the list may be nested - one @c &lt;li&gt; statement may contain a @c &lt;ul&gt; sub-statement:
@code
<ul>
@code
<ul>
<li><object type="text/sitemap">
<li><object type="text/sitemap">
<param name="Name" value="Top node">
<param name="Local" value="top.htm">
</object>
@@ -202,162 +202,162 @@
...
</ul>
<li><object type="text/sitemap">
<li><object type="text/sitemap">
<param name="Name" value="Another Top">
<param name="Local" value="top2.htm">
</object>
...
...
</ul>
@endcode
</ul>
@endcode
@subsection overview_html_helpformats_hhk Index file (.hhk)
@subsection overview_html_helpformats_hhk Index file (.hhk)
Index files have same format as contents file except that ID params are ignored
and sublists are @b not allowed.
Index files have same format as contents file except that ID params are ignored
and sublists are @b not allowed.
@section overview_html_filters Input Filters
@section overview_html_filters Input Filters
The wxHTML library provides a mechanism for reading and displaying
files of many different file formats.
The wxHTML library provides a mechanism for reading and displaying
files of many different file formats.
wxHtmlWindow::LoadPage can load not only HTML files but any known file.
To make a file type known to wxHtmlWindow you must create a wxHtmlFilter filter and
register it using wxHtmlWindow::AddFilter.
wxHtmlWindow::LoadPage can load not only HTML files but any known file.
To make a file type known to wxHtmlWindow you must create a wxHtmlFilter filter and
register it using wxHtmlWindow::AddFilter.
@section overview_html_cells Cells and Containers
@section overview_html_cells Cells and Containers
This article describes mechanism used by wxHtmlWinParser and
wxHtmlWindow to parse and display HTML documents.
This article describes mechanism used by wxHtmlWinParser and
wxHtmlWindow to parse and display HTML documents.
@subsection overview_html_cells_cells Cells
@subsection overview_html_cells_cells Cells
You can divide any text (or HTML) into small fragments. Let's call these
fragments @b cells. Cell is for example one word, horizontal line, image
or any other part of document. Each cell has width and height (except special
"magic" cells with zero dimensions - e.g. colour changers or font changers).
See wxHtmlCell.
You can divide any text (or HTML) into small fragments. Let's call these
fragments @b cells. Cell is for example one word, horizontal line, image
or any other part of document. Each cell has width and height (except special
"magic" cells with zero dimensions - e.g. colour changers or font changers).
See wxHtmlCell.
@subsection overview_html_cells_containers Containers
@subsection overview_html_cells_containers Containers
Container is kind of cell that may contain sub-cells. Its size depends
on number and sizes of its sub-cells (and also depends on width of window).
See wxHtmlContainerCell, wxHtmlCell::Layout. This image shows the cells and
containers:
Container is kind of cell that may contain sub-cells. Its size depends
on number and sizes of its sub-cells (and also depends on width of window).
See wxHtmlContainerCell, wxHtmlCell::Layout. This image shows the cells and
containers:
@image html overview_html_contbox.png
@image html overview_html_contbox.png
@subsection overview_html_cells_conttaghandler Using Containers in Tag Handler
@subsection overview_html_cells_conttaghandler Using Containers in Tag Handler
wxHtmlWinParser provides a user-friendly way of managing containers.
It is based on the idea of opening and closing containers.
wxHtmlWinParser provides a user-friendly way of managing containers.
It is based on the idea of opening and closing containers.
Use wxHtmlWinParser::OpenContainer to open new a container @e within an already
opened container.
This new container is a @e sub-container of the old one. (If you want to create a
new container with the same depth level you can call @c CloseContainer(); OpenContainer();.)
Use wxHtmlWinParser::OpenContainer to open new a container @e within an already
opened container.
This new container is a @e sub-container of the old one. (If you want to create a
new container with the same depth level you can call @c CloseContainer(); OpenContainer();.)
Use wxHtmlWinParser::CloseContainer to close the container.
This doesn't create a new container with same depth level but it returns "control"
to the parent container. See explanation:
Use wxHtmlWinParser::CloseContainer to close the container.
This doesn't create a new container with same depth level but it returns "control"
to the parent container. See explanation:
@image html overview_html_cont.png
@image html overview_html_cont.png
There clearly must be same number of calls to OpenContainer as to
CloseContainer.
There clearly must be same number of calls to OpenContainer as to
CloseContainer.
@subsubsection overview_html_cells_conttaghandler_example Example
@subsubsection overview_html_cells_conttaghandler_example Example
This code creates a new paragraph (container at same depth level)
with "Hello, world!":
This code creates a new paragraph (container at same depth level)
with "Hello, world!":
@code
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
@code
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
m_WParser -> AddText("Hello, ");
m_WParser -> AddText("world!");
m_WParser -> AddText("Hello, ");
m_WParser -> AddText("world!");
m_WParser -> CloseContainer();
m_WParser -> OpenContainer();
@endcode
m_WParser -> CloseContainer();
m_WParser -> OpenContainer();
@endcode
and here is image of the situation:
and here is image of the situation:
@image html overview_html_hello.png
@image html overview_html_hello.png
You can see that there was an opened container before the code was executed.
We closed it, created our own container, then closed our container and opened
new container.
You can see that there was an opened container before the code was executed.
We closed it, created our own container, then closed our container and opened
new container.
The result was that we had @e same depth level after executing.
This is general rule that should be followed by tag handlers:
leave depth level of containers unmodified (in other words, number of
OpenContainer and CloseContainer calls should be same within
wxHtmlTagHandler::HandleTag's body).
The result was that we had @e same depth level after executing.
This is general rule that should be followed by tag handlers:
leave depth level of containers unmodified (in other words, number of
OpenContainer and CloseContainer calls should be same within
wxHtmlTagHandler::HandleTag's body).
Notice that it would be usually better to use wxHtmlContainerCell::InsertCell instead
of adding text to the parser directly.
Notice that it would be usually better to use wxHtmlContainerCell::InsertCell instead
of adding text to the parser directly.
@section overview_html_handlers Tag Handlers
@section overview_html_handlers Tag Handlers
The wxHTML library provides architecture of pluggable @e tag handlers.
Tag handler is class that understands particular HTML tag (or tags) and is
able to interpret it.
The wxHTML library provides architecture of pluggable @e tag handlers.
Tag handler is class that understands particular HTML tag (or tags) and is
able to interpret it.
wxHtmlWinParser has a static table of @b modules.
Each module contains one or more tag handlers. Each time a new wxHtmlWinParser
object is constructed all modules are scanned and handlers are added
to wxHtmlParser's list of available handlers (note: wxHtmlParser's list
is non-static).
wxHtmlWinParser has a static table of @b modules.
Each module contains one or more tag handlers. Each time a new wxHtmlWinParser
object is constructed all modules are scanned and handlers are added
to wxHtmlParser's list of available handlers (note: wxHtmlParser's list
is non-static).
@subsection overview_html_handlers_howworks How it works
@subsection overview_html_handlers_howworks How it works
Common tag handler's wxHtmlTagHandler::HandleTag method works in four steps:
Common tag handler's wxHtmlTagHandler::HandleTag method works in four steps:
@li Save state of parent parser into local variables
@li Change parser state according to tag's params
@li Parse text between the tag and paired ending tag (if present)
@li Restore original parser state
@li Save state of parent parser into local variables
@li Change parser state according to tag's params
@li Parse text between the tag and paired ending tag (if present)
@li Restore original parser state
See wxHtmlWinParser for methods for modifying parser's state.
In general you can do things like opening/closing containers, changing colors, fonts etc.
See wxHtmlWinParser for methods for modifying parser's state.
In general you can do things like opening/closing containers, changing colors, fonts etc.
@subsection overview_html_handlers_custom Providing own tag handlers
@subsection overview_html_handlers_custom Providing own tag handlers
You should create a new .cpp file and place the following lines into it:
You should create a new .cpp file and place the following lines into it:
@code
#include <mod_templ.h>
#include <forcelink.h>
FORCE_LINK_ME(yourmodulefilenamewithoutcpp)
@endcode
@code
#include <mod_templ.h>
#include <forcelink.h>
FORCE_LINK_ME(yourmodulefilenamewithoutcpp)
@endcode
Then you must define handlers and one module.
Then you must define handlers and one module.
@subsection overview_html_handlers_tag Tag handlers
@subsection overview_html_handlers_tag Tag handlers
The handler is derived from wxHtmlWinTagHandler (or directly from wxHtmlTagHandler).
The handler is derived from wxHtmlWinTagHandler (or directly from wxHtmlTagHandler).
You can use set of macros to define the handler (see src/html/m_*.cpp files
for details). Handler definition must start with @b TAG_HANDLER_BEGIN macro
and end with @b TAG_HANDLER_END macro.
You can use set of macros to define the handler (see src/html/m_*.cpp files
for details). Handler definition must start with @b TAG_HANDLER_BEGIN macro
and end with @b TAG_HANDLER_END macro.
I strongly recommend to have a look at @e include/wxhtml/mod_templ.h file.
Otherwise you won't understand the structure of macros.
I strongly recommend to have a look at @e include/wxhtml/mod_templ.h file.
Otherwise you won't understand the structure of macros.
See macros reference:
@li @b TAG_HANDLER_BEGIN(@e name, @e tags):
See macros reference:
@li @b TAG_HANDLER_BEGIN(@e name, @e tags):
Starts handler definition. @e name is handler identifier (in fact
part of class name), @e tags is string containing list of tags
supported by this handler (in uppercase). This macro derives new class from
wxHtmlWinTagHandler and implements it is wxHtmlTagHandler::GetSupportedTags method.
Example: TAG_HANDLER_BEGIN(FONTS, "B,I,U,T")
@li @b TAG_HANDLER_VARS:
@li @b TAG_HANDLER_VARS:
This macro starts block of variables definitions. (Variables are identical
to class attributes.) Example:
@@ -371,7 +371,7 @@
This macro is used only in rare cases.
@li @b TAG_HANDLER_CONSTR(@e name):
@li @b TAG_HANDLER_CONSTR(@e name):
This macro supplies object constructor. @e name is same name as the one
from TAG_HANDLER_BEGIN macro. Body of constructor follow after
this macro (you must use { and } ). Example:
@@ -389,7 +389,7 @@
Never used in wxHTML :-)
@li @b TAG_HANDLER_PROC(@e varib):
@li @b TAG_HANDLER_PROC(@e varib):
This is very important macro. It defines wxHtmlTagHandler::HandleTag
method. @e varib is name of parameter passed to the method, usually
@e tag. Body of method follows after this macro.
@@ -405,22 +405,22 @@
TAG_HANDLER_END(TITLE)
@endcode
@li @b TAG_HANDLER_END(@e name):
@li @b TAG_HANDLER_END(@e name):
Ends definition of tag handler @e name.
@subsection overview_html_handlers_modules Tags Modules
@subsection overview_html_handlers_modules Tags Modules
You can use set of 3 macros TAGS_MODULE_BEGIN, TAGS_MODULE_ADD and
TAGS_MODULE_END to inherit new module from
wxHtmlTagsModule and to create instance of it.
You can use set of 3 macros TAGS_MODULE_BEGIN, TAGS_MODULE_ADD and
TAGS_MODULE_END to inherit new module from
wxHtmlTagsModule and to create instance of it.
See macros reference:
See macros reference:
@li @b TAGS_MODULE_BEGIN(@e modname):
@li @b TAGS_MODULE_BEGIN(@e modname):
Begins module definition. @e modname is part of class name and must be unique.
@li @b TAGS_MODULE_ADD(@e name):
@li @b TAGS_MODULE_ADD(@e name):
Adds the handler to this module. @e name is the identifier from TAG_HANDLER_BEGIN.
@li @b TAGS_MODULE_END(@e modname):
@li @b TAGS_MODULE_END(@e modname):
Ends the definition of module.
Example:
@@ -433,35 +433,35 @@
@endcode
@section overview_html_supptags Tags supported by wxHTML
@section overview_html_supptags Tags supported by wxHTML
wxHTML is not full implementation of HTML standard. Instead, it supports most
common tags so that it is possible to display @e simple HTML documents with it.
(For example it works fine with pages created in Netscape Composer or generated by tex2rtf).
wxHTML is not full implementation of HTML standard. Instead, it supports most
common tags so that it is possible to display @e simple HTML documents with it.
(For example it works fine with pages created in Netscape Composer or generated by tex2rtf).
Following tables list all tags known to wxHTML, together with supported parameters.
Following tables list all tags known to wxHTML, together with supported parameters.
A tag has general form of @c tagname param_1 param_2 ... param_n where param_i is
either @c paramname="paramvalue" or @c paramname=paramvalue - these two are equivalent.
Unless stated otherwise, wxHTML is case-insensitive.
A tag has general form of @c tagname param_1 param_2 ... param_n where param_i is
either @c paramname="paramvalue" or @c paramname=paramvalue - these two are equivalent.
Unless stated otherwise, wxHTML is case-insensitive.
@subsection overview_html_supptags_commonvalues Table of common parameter values
@subsection overview_html_supptags_commonvalues Table of common parameter values
We will use these substitutions in tags descriptions:
We will use these substitutions in tags descriptions:
@code
[alignment] CENTER
@code
[alignment] CENTER
LEFT
RIGHT
JUSTIFY
[v_alignment] TOP
[v_alignment] TOP
BOTTOM
CENTER
[color] HTML 4.0-compliant colour specification
[color] HTML 4.0-compliant colour specification
[fontsize] -2
[fontsize] -2
-1
+0
+1
@@ -476,62 +476,62 @@
6
7
[pixels] integer value that represents dimension in pixels
[pixels] integer value that represents dimension in pixels
[percent] i%
[percent] i%
where i is integer
[url] an URL
[url] an URL
[string] text string
[string] text string
[coords] c(1),c(2),c(3),...,c(n)
[coords] c(1),c(2),c(3),...,c(n)
where c(i) is integer
@endcode
@endcode
@subsection overview_html_supptags_list List of supported tags
@subsection overview_html_supptags_list List of supported tags
@code
A NAME=[string]
@code
A NAME=[string]
HREF=[url]
TARGET=[target window spec]
ADDRESS
AREA SHAPE=POLY
ADDRESS
AREA SHAPE=POLY
SHAPE=CIRCLE
SHAPE=RECT
COORDS=[coords]
HREF=[url]
B
BIG
BLOCKQUOTE
BODY TEXT=[color]
B
BIG
BLOCKQUOTE
BODY TEXT=[color]
LINK=[color]
BGCOLOR=[color]
BR ALIGN=[alignment]
CENTER
CITE
CODE
DD
DIV ALIGN=[alignment]
DL
DT
EM
FONT COLOR=[color]
BR ALIGN=[alignment]
CENTER
CITE
CODE
DD
DIV ALIGN=[alignment]
DL
DT
EM
FONT COLOR=[color]
SIZE=[fontsize]
FACE=[comma-separated list of facenames]
HR ALIGN=[alignment]
HR ALIGN=[alignment]
SIZE=[pixels]
WIDTH=[percent|pixels]
NOSHADE
H1
H2
H3
H4
H5
H6
I
IMG SRC=[url]
H1
H2
H3
H4
H5
H6
I
IMG SRC=[url]
WIDTH=[pixels]
HEIGHT=[pixels]
ALIGN=TEXTTOP
@@ -539,48 +539,48 @@
ALIGN=ABSCENTER
ALIGN=BOTTOM
USEMAP=[url]
KBD
LI
MAP NAME=[string]
META HTTP-EQUIV="Content-Type"
KBD
LI
MAP NAME=[string]
META HTTP-EQUIV="Content-Type"
CONTENT=[string]
OL
P ALIGN=[alignment]
PRE
SAMP
SMALL
STRIKE
STRONG
SUB
SUP
TABLE ALIGN=[alignment]
OL
P ALIGN=[alignment]
PRE
SAMP
SMALL
STRIKE
STRONG
SUB
SUP
TABLE ALIGN=[alignment]
WIDTH=[percent|pixels]
BORDER=[pixels]
VALIGN=[v_alignment]
BGCOLOR=[color]
CELLSPACING=[pixels]
CELLPADDING=[pixels]
TD ALIGN=[alignment]
TD ALIGN=[alignment]
VALIGN=[v_alignment]
BGCOLOR=[color]
WIDTH=[percent|pixels]
COLSPAN=[pixels]
ROWSPAN=[pixels]
NOWRAP
TH ALIGN=[alignment]
TH ALIGN=[alignment]
VALIGN=[v_alignment]
BGCOLOR=[color]
WIDTH=[percent|pixels]
COLSPAN=[pixels]
ROWSPAN=[pixels]
TITLE
TR ALIGN=[alignment]
TITLE
TR ALIGN=[alignment]
VALIGN=[v_alignment]
BGCOLOR=[color]
TT
U
UL
@endcode
TT
U
UL
@endcode
*/

View File

@@ -12,7 +12,7 @@
Classes: wxListCtrl, wxImageList
Sorry, this topic hasn't been written yet.
@todo Sorry, this topic hasn't been written yet.
*/