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

View File

@@ -9,146 +9,146 @@
/** /**
@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 Keypresses are represented by an enumerated type, wxKeyCode. The possible
values are the ASCII character codes, plus the following: values are the ASCII character codes, plus the following:
@verbatim @verbatim
WXK_BACK = 8 WXK_BACK = 8
WXK_TAB = 9 WXK_TAB = 9
WXK_RETURN = 13 WXK_RETURN = 13
WXK_ESCAPE = 27 WXK_ESCAPE = 27
WXK_SPACE = 32 WXK_SPACE = 32
WXK_DELETE = 127 WXK_DELETE = 127
// These are by design not compatible with unicode characters. // These are by design not compatible with unicode characters.
// If you want to get a unicode character from a key event use // If you want to get a unicode character from a key event use
// wxKeyEvent::GetUnicodeKey instead. // wxKeyEvent::GetUnicodeKey instead.
WXK_START = 300 WXK_START = 300
WXK_LBUTTON WXK_LBUTTON
WXK_RBUTTON WXK_RBUTTON
WXK_CANCEL WXK_CANCEL
WXK_MBUTTON WXK_MBUTTON
WXK_CLEAR WXK_CLEAR
WXK_SHIFT WXK_SHIFT
WXK_ALT WXK_ALT
WXK_CONTROL WXK_CONTROL
WXK_MENU WXK_MENU
WXK_PAUSE WXK_PAUSE
WXK_CAPITAL WXK_CAPITAL
WXK_END WXK_END
WXK_HOME WXK_HOME
WXK_LEFT WXK_LEFT
WXK_UP WXK_UP
WXK_RIGHT WXK_RIGHT
WXK_DOWN WXK_DOWN
WXK_SELECT WXK_SELECT
WXK_PRINT WXK_PRINT
WXK_EXECUTE WXK_EXECUTE
WXK_SNAPSHOT WXK_SNAPSHOT
WXK_INSERT WXK_INSERT
WXK_HELP WXK_HELP
WXK_NUMPAD0 WXK_NUMPAD0
WXK_NUMPAD1 WXK_NUMPAD1
WXK_NUMPAD2 WXK_NUMPAD2
WXK_NUMPAD3 WXK_NUMPAD3
WXK_NUMPAD4 WXK_NUMPAD4
WXK_NUMPAD5 WXK_NUMPAD5
WXK_NUMPAD6 WXK_NUMPAD6
WXK_NUMPAD7 WXK_NUMPAD7
WXK_NUMPAD8 WXK_NUMPAD8
WXK_NUMPAD9 WXK_NUMPAD9
WXK_MULTIPLY WXK_MULTIPLY
WXK_ADD WXK_ADD
WXK_SEPARATOR WXK_SEPARATOR
WXK_SUBTRACT WXK_SUBTRACT
WXK_DECIMAL WXK_DECIMAL
WXK_DIVIDE WXK_DIVIDE
WXK_F1 WXK_F1
WXK_F2 WXK_F2
WXK_F3 WXK_F3
WXK_F4 WXK_F4
WXK_F5 WXK_F5
WXK_F6 WXK_F6
WXK_F7 WXK_F7
WXK_F8 WXK_F8
WXK_F9 WXK_F9
WXK_F10 WXK_F10
WXK_F11 WXK_F11
WXK_F12 WXK_F12
WXK_F13 WXK_F13
WXK_F14 WXK_F14
WXK_F15 WXK_F15
WXK_F16 WXK_F16
WXK_F17 WXK_F17
WXK_F18 WXK_F18
WXK_F19 WXK_F19
WXK_F20 WXK_F20
WXK_F21 WXK_F21
WXK_F22 WXK_F22
WXK_F23 WXK_F23
WXK_F24 WXK_F24
WXK_NUMLOCK WXK_NUMLOCK
WXK_SCROLL WXK_SCROLL
WXK_PAGEUP, WXK_PAGEUP,
WXK_PAGEDOWN, WXK_PAGEDOWN,
WXK_NUMPAD_SPACE, WXK_NUMPAD_SPACE,
WXK_NUMPAD_TAB, WXK_NUMPAD_TAB,
WXK_NUMPAD_ENTER, WXK_NUMPAD_ENTER,
WXK_NUMPAD_F1, WXK_NUMPAD_F1,
WXK_NUMPAD_F2, WXK_NUMPAD_F2,
WXK_NUMPAD_F3, WXK_NUMPAD_F3,
WXK_NUMPAD_F4, WXK_NUMPAD_F4,
WXK_NUMPAD_HOME, WXK_NUMPAD_HOME,
WXK_NUMPAD_LEFT, WXK_NUMPAD_LEFT,
WXK_NUMPAD_UP, WXK_NUMPAD_UP,
WXK_NUMPAD_RIGHT, WXK_NUMPAD_RIGHT,
WXK_NUMPAD_DOWN, WXK_NUMPAD_DOWN,
WXK_NUMPAD_PAGEUP, WXK_NUMPAD_PAGEUP,
WXK_NUMPAD_PAGEDOWN, WXK_NUMPAD_PAGEDOWN,
WXK_NUMPAD_END, WXK_NUMPAD_END,
WXK_NUMPAD_BEGIN, WXK_NUMPAD_BEGIN,
WXK_NUMPAD_INSERT, WXK_NUMPAD_INSERT,
WXK_NUMPAD_DELETE, WXK_NUMPAD_DELETE,
WXK_NUMPAD_EQUAL, WXK_NUMPAD_EQUAL,
WXK_NUMPAD_MULTIPLY, WXK_NUMPAD_MULTIPLY,
WXK_NUMPAD_ADD, WXK_NUMPAD_ADD,
WXK_NUMPAD_SEPARATOR, WXK_NUMPAD_SEPARATOR,
WXK_NUMPAD_SUBTRACT, WXK_NUMPAD_SUBTRACT,
WXK_NUMPAD_DECIMAL, WXK_NUMPAD_DECIMAL,
WXK_NUMPAD_DIVIDE, WXK_NUMPAD_DIVIDE,
// the following key codes are only generated under Windows currently // the following key codes are only generated under Windows currently
WXK_WINDOWS_LEFT, WXK_WINDOWS_LEFT,
WXK_WINDOWS_RIGHT, WXK_WINDOWS_RIGHT,
WXK_WINDOWS_MENU, WXK_WINDOWS_MENU,
WXK_COMMAND, WXK_COMMAND,
// Hardware-specific buttons // Hardware-specific buttons
WXK_SPECIAL1 = 193, WXK_SPECIAL1 = 193,
WXK_SPECIAL2, WXK_SPECIAL2,
WXK_SPECIAL3, WXK_SPECIAL3,
WXK_SPECIAL4, WXK_SPECIAL4,
WXK_SPECIAL5, WXK_SPECIAL5,
WXK_SPECIAL6, WXK_SPECIAL6,
WXK_SPECIAL7, WXK_SPECIAL7,
WXK_SPECIAL8, WXK_SPECIAL8,
WXK_SPECIAL9, WXK_SPECIAL9,
WXK_SPECIAL10, WXK_SPECIAL10,
WXK_SPECIAL11, WXK_SPECIAL11,
WXK_SPECIAL12, WXK_SPECIAL12,
WXK_SPECIAL13, WXK_SPECIAL13,
WXK_SPECIAL14, WXK_SPECIAL14,
WXK_SPECIAL15, WXK_SPECIAL15,
WXK_SPECIAL16, WXK_SPECIAL16,
WXK_SPECIAL17, WXK_SPECIAL17,
WXK_SPECIAL18, WXK_SPECIAL18,
WXK_SPECIAL19, WXK_SPECIAL19,
WXK_SPECIAL20 WXK_SPECIAL20
@endverbatim @endverbatim
*/ */

View File

@@ -9,34 +9,34 @@
/** /**
@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 enum wxKeyModifier
{ {
wxMOD_NONE = 0x0000, wxMOD_NONE = 0x0000,
wxMOD_ALT = 0x0001, wxMOD_ALT = 0x0001,
wxMOD_CONTROL = 0x0002, wxMOD_CONTROL = 0x0002,
wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL, wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL,
wxMOD_SHIFT = 0x0004, wxMOD_SHIFT = 0x0004,
wxMOD_META = 0x0008, wxMOD_META = 0x0008,
#if defined(__WXMAC__) || defined(__WXCOCOA__) #if defined(__WXMAC__) || defined(__WXCOCOA__)
wxMOD_CMD = wxMOD_META, wxMOD_CMD = wxMOD_META,
#else #else
wxMOD_CMD = wxMOD_CONTROL, wxMOD_CMD = wxMOD_CONTROL,
#endif #endif
wxMOD_ALL = 0xffff wxMOD_ALL = 0xffff
}; };
@endverbatim @endverbatim
Notice that @c wxMOD_CMD should be used instead of @c wxMOD_CONTROL Notice that @c wxMOD_CMD should be used instead of @c wxMOD_CONTROL
in portable code to account for the fact that although in portable code to account for the fact that although
@c Control modifier exists under Mac OS, it is not used for the same @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 purpose as under Windows or Unix there while the special Mac-specific
@c Command modifier is used in exactly the same way. @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 The following wxLanguage constants may be used to specify the language
in wxLocale::Init and are returned by wxLocale::GetSystemLanguage: 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 @todo ADAPT THE PYTHON SCRIPTS TO GENERATE HERE THE LIST
When making changes, please put them into misc/languages/langtabl.txt
<!-- 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 wxWidgets defines a special identifier value @c wxID_ANY which is used in
the following two situations: 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 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, macros or wxEvtHandler::Connect,
you may use it to indicate that you want to handle the events you may use it to indicate that you want to handle the events
coming from any control, regardless of its identifier coming from any control, regardless of its identifier
Another standard special identifier value is @c wxID_NONE: this is a value Another standard special identifier value is @c wxID_NONE: this is a value
which is not matched by any other id. which is not matched by any other id.
wxWidgets also defines a few standard command identifiers which may be used by 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 the user code and also are sometimes used by wxWidgets itself. These reserved
identifiers are all in the range between @c wxID_LOWEST and identifiers are all in the range between @c wxID_LOWEST and
@c wxID_HIGHEST and, accordingly, the user code should avoid defining its @c wxID_HIGHEST and, accordingly, the user code should avoid defining its
own constants in this range (e.g. by using wxNewId()). own constants in this range (e.g. by using wxNewId()).
@verbatim @verbatim
wxID_LOWEST = 4999, wxID_LOWEST = 4999,
wxID_OPEN, wxID_OPEN,
wxID_CLOSE, wxID_CLOSE,
wxID_NEW, wxID_NEW,
wxID_SAVE, wxID_SAVE,
wxID_SAVEAS, wxID_SAVEAS,
wxID_REVERT, wxID_REVERT,
wxID_EXIT, wxID_EXIT,
wxID_UNDO, wxID_UNDO,
wxID_REDO, wxID_REDO,
wxID_HELP, wxID_HELP,
wxID_PRINT, wxID_PRINT,
wxID_PRINT_SETUP, wxID_PRINT_SETUP,
wxID_PAGE_SETUP, wxID_PAGE_SETUP,
wxID_PREVIEW, wxID_PREVIEW,
wxID_ABOUT, wxID_ABOUT,
wxID_HELP_CONTENTS, wxID_HELP_CONTENTS,
wxID_HELP_INDEX, wxID_HELP_INDEX,
wxID_HELP_SEARCH, wxID_HELP_SEARCH,
wxID_HELP_COMMANDS, wxID_HELP_COMMANDS,
wxID_HELP_PROCEDURES, wxID_HELP_PROCEDURES,
wxID_HELP_CONTEXT, wxID_HELP_CONTEXT,
wxID_CLOSE_ALL, wxID_CLOSE_ALL,
wxID_PREFERENCES, wxID_PREFERENCES,
wxID_EDIT = 5030, wxID_EDIT = 5030,
wxID_CUT, wxID_CUT,
wxID_COPY, wxID_COPY,
wxID_PASTE, wxID_PASTE,
wxID_CLEAR, wxID_CLEAR,
wxID_FIND, wxID_FIND,
wxID_DUPLICATE, wxID_DUPLICATE,
wxID_SELECTALL, wxID_SELECTALL,
wxID_DELETE, wxID_DELETE,
wxID_REPLACE, wxID_REPLACE,
wxID_REPLACE_ALL, wxID_REPLACE_ALL,
wxID_PROPERTIES, wxID_PROPERTIES,
wxID_VIEW_DETAILS, wxID_VIEW_DETAILS,
wxID_VIEW_LARGEICONS, wxID_VIEW_LARGEICONS,
wxID_VIEW_SMALLICONS, wxID_VIEW_SMALLICONS,
wxID_VIEW_LIST, wxID_VIEW_LIST,
wxID_VIEW_SORTDATE, wxID_VIEW_SORTDATE,
wxID_VIEW_SORTNAME, wxID_VIEW_SORTNAME,
wxID_VIEW_SORTSIZE, wxID_VIEW_SORTSIZE,
wxID_VIEW_SORTTYPE, wxID_VIEW_SORTTYPE,
wxID_FILE = 5050, wxID_FILE = 5050,
wxID_FILE1, wxID_FILE1,
wxID_FILE2, wxID_FILE2,
wxID_FILE3, wxID_FILE3,
wxID_FILE4, wxID_FILE4,
wxID_FILE5, wxID_FILE5,
wxID_FILE6, wxID_FILE6,
wxID_FILE7, wxID_FILE7,
wxID_FILE8, wxID_FILE8,
wxID_FILE9, wxID_FILE9,
// Standard button and menu IDs // Standard button and menu IDs
wxID_OK = 5100, wxID_OK = 5100,
wxID_CANCEL, wxID_CANCEL,
wxID_APPLY, wxID_APPLY,
wxID_YES, wxID_YES,
wxID_NO, wxID_NO,
wxID_STATIC, wxID_STATIC,
wxID_FORWARD, wxID_FORWARD,
wxID_BACKWARD, wxID_BACKWARD,
wxID_DEFAULT, wxID_DEFAULT,
wxID_MORE, wxID_MORE,
wxID_SETUP, wxID_SETUP,
wxID_RESET, wxID_RESET,
wxID_CONTEXT_HELP, wxID_CONTEXT_HELP,
wxID_YESTOALL, wxID_YESTOALL,
wxID_NOTOALL, wxID_NOTOALL,
wxID_ABORT, wxID_ABORT,
wxID_RETRY, wxID_RETRY,
wxID_IGNORE, wxID_IGNORE,
wxID_ADD, wxID_ADD,
wxID_REMOVE, wxID_REMOVE,
wxID_UP, wxID_UP,
wxID_DOWN, wxID_DOWN,
wxID_HOME, wxID_HOME,
wxID_REFRESH, wxID_REFRESH,
wxID_STOP, wxID_STOP,
wxID_INDEX, wxID_INDEX,
wxID_BOLD, wxID_BOLD,
wxID_ITALIC, wxID_ITALIC,
wxID_JUSTIFY_CENTER, wxID_JUSTIFY_CENTER,
wxID_JUSTIFY_FILL, wxID_JUSTIFY_FILL,
wxID_JUSTIFY_RIGHT, wxID_JUSTIFY_RIGHT,
wxID_JUSTIFY_LEFT, wxID_JUSTIFY_LEFT,
wxID_UNDERLINE, wxID_UNDERLINE,
wxID_INDENT, wxID_INDENT,
wxID_UNINDENT, wxID_UNINDENT,
wxID_ZOOM_100, wxID_ZOOM_100,
wxID_ZOOM_FIT, wxID_ZOOM_FIT,
wxID_ZOOM_IN, wxID_ZOOM_IN,
wxID_ZOOM_OUT, wxID_ZOOM_OUT,
wxID_UNDELETE, wxID_UNDELETE,
wxID_REVERT_TO_SAVED, wxID_REVERT_TO_SAVED,
// System menu IDs (used by wxUniv) // System menu IDs (used by wxUniv)
wxID_SYSTEM_MENU = 5200, wxID_SYSTEM_MENU = 5200,
wxID_CLOSE_FRAME, wxID_CLOSE_FRAME,
wxID_MOVE_FRAME, wxID_MOVE_FRAME,
wxID_RESIZE_FRAME, wxID_RESIZE_FRAME,
wxID_MAXIMIZE_FRAME, wxID_MAXIMIZE_FRAME,
wxID_ICONIZE_FRAME, wxID_ICONIZE_FRAME,
wxID_RESTORE_FRAME, wxID_RESTORE_FRAME,
// IDs used by generic file dialog (13 consecutive starting from this value) // IDs used by generic file dialog (13 consecutive starting from this value)
wxID_FILEDLGG = 5900, wxID_FILEDLGG = 5900,
// IDs used by generic file ctrl (4 consecutive starting from this value) // IDs used by generic file ctrl (4 consecutive starting from this value)
wxID_FILECTRL = 5950, wxID_FILECTRL = 5950,
wxID_HIGHEST = 5999 wxID_HIGHEST = 5999
@endverbatim @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 Window IDs for which stock buttons and menu items are created
(see the wxButton constructor and the wxMenuItem constructor): (see the wxButton constructor and the wxMenuItem constructor):
@beginDefList @beginDefList
@itemdef{<b>Stock ID</b>, <b>Stock label</b>} @itemdef{<b>Stock ID</b>, <b>Stock label</b>}
@itemdef{wxID_ABOUT, "&About"} @itemdef{wxID_ABOUT, "&About"}
@itemdef{wxID_ADD, "Add" and} @itemdef{wxID_ADD, "Add" and}
@itemdef{wxID_APPLY, "&Apply"} @itemdef{wxID_APPLY, "&Apply"}
@itemdef{wxID_BOLD, "&Bold"} @itemdef{wxID_BOLD, "&Bold"}
@itemdef{wxID_CANCEL, "&Cancel"} @itemdef{wxID_CANCEL, "&Cancel"}
@itemdef{wxID_CLEAR, "&Clear"} @itemdef{wxID_CLEAR, "&Clear"}
@itemdef{wxID_CLOSE, "&Close"} @itemdef{wxID_CLOSE, "&Close"}
@itemdef{wxID_COPY, "&Copy"} @itemdef{wxID_COPY, "&Copy"}
@itemdef{wxID_CUT, "Cu&t"} @itemdef{wxID_CUT, "Cu&t"}
@itemdef{wxID_DELETE, "&Delete"} @itemdef{wxID_DELETE, "&Delete"}
@itemdef{wxID_EDIT, "&Edit"} @itemdef{wxID_EDIT, "&Edit"}
@itemdef{wxID_FIND, "&Find"} @itemdef{wxID_FIND, "&Find"}
@itemdef{wxID_FILE, "&File"} @itemdef{wxID_FILE, "&File"}
@itemdef{wxID_REPLACE, "Find and rep&lace"} @itemdef{wxID_REPLACE, "Find and rep&lace"}
@itemdef{wxID_BACKWARD, "&Back"} @itemdef{wxID_BACKWARD, "&Back"}
@itemdef{wxID_DOWN, "&Down"} @itemdef{wxID_DOWN, "&Down"}
@itemdef{wxID_FORWARD, "&Forward"} @itemdef{wxID_FORWARD, "&Forward"}
@itemdef{wxID_UP, "&Up"} @itemdef{wxID_UP, "&Up"}
@itemdef{wxID_HELP, "&Help"} @itemdef{wxID_HELP, "&Help"}
@itemdef{wxID_HOME, "&Home"} @itemdef{wxID_HOME, "&Home"}
@itemdef{wxID_INDENT, "Indent"} @itemdef{wxID_INDENT, "Indent"}
@itemdef{wxID_INDEX, "&Index"} @itemdef{wxID_INDEX, "&Index"}
@itemdef{wxID_ITALIC, "&Italic"} @itemdef{wxID_ITALIC, "&Italic"}
@itemdef{wxID_JUSTIFY_CENTER, "Centered"} @itemdef{wxID_JUSTIFY_CENTER, "Centered"}
@itemdef{wxID_JUSTIFY_FILL, "Justified"} @itemdef{wxID_JUSTIFY_FILL, "Justified"}
@itemdef{wxID_JUSTIFY_LEFT, "Align Left"} @itemdef{wxID_JUSTIFY_LEFT, "Align Left"}
@itemdef{wxID_JUSTIFY_RIGHT, "Align Right"} @itemdef{wxID_JUSTIFY_RIGHT, "Align Right"}
@itemdef{wxID_NEW, "&New"} @itemdef{wxID_NEW, "&New"}
@itemdef{wxID_NO, "&No"} @itemdef{wxID_NO, "&No"}
@itemdef{wxID_OK, "&OK"} @itemdef{wxID_OK, "&OK"}
@itemdef{wxID_OPEN, "&Open"} @itemdef{wxID_OPEN, "&Open"}
@itemdef{wxID_PASTE, "&Paste"} @itemdef{wxID_PASTE, "&Paste"}
@itemdef{wxID_PREFERENCES, "&Preferences"} @itemdef{wxID_PREFERENCES, "&Preferences"}
@itemdef{wxID_PRINT, "&Print"} @itemdef{wxID_PRINT, "&Print"}
@itemdef{wxID_PREVIEW, "Print previe&w"} @itemdef{wxID_PREVIEW, "Print previe&w"}
@itemdef{wxID_PROPERTIES, "&Properties"} @itemdef{wxID_PROPERTIES, "&Properties"}
@itemdef{wxID_EXIT, "&Quit"} @itemdef{wxID_EXIT, "&Quit"}
@itemdef{wxID_REDO, "&Redo"} @itemdef{wxID_REDO, "&Redo"}
@itemdef{wxID_REFRESH, "Refresh"} @itemdef{wxID_REFRESH, "Refresh"}
@itemdef{wxID_REMOVE, "Remove"} @itemdef{wxID_REMOVE, "Remove"}
@itemdef{wxID_REVERT_TO_SAVED, "Revert to Saved"} @itemdef{wxID_REVERT_TO_SAVED, "Revert to Saved"}
@itemdef{wxID_SAVE, "&Save"} @itemdef{wxID_SAVE, "&Save"}
@itemdef{wxID_SAVEAS, "Save &As..."} @itemdef{wxID_SAVEAS, "Save &As..."}
@itemdef{wxID_SELECTALL, "Select all"} @itemdef{wxID_SELECTALL, "Select all"}
@itemdef{wxID_STOP, "&Stop"} @itemdef{wxID_STOP, "&Stop"}
@itemdef{wxID_UNDELETE, "Undelete"} @itemdef{wxID_UNDELETE, "Undelete"}
@itemdef{wxID_UNDERLINE, "&Underline"} @itemdef{wxID_UNDERLINE, "&Underline"}
@itemdef{wxID_UNDO, "&Undo"} @itemdef{wxID_UNDO, "&Undo"}
@itemdef{wxID_UNINDENT, "&Unindent"} @itemdef{wxID_UNINDENT, "&Unindent"}
@itemdef{wxID_YES, "&Yes"} @itemdef{wxID_YES, "&Yes"}
@itemdef{wxID_ZOOM_100, "&Actual Size"} @itemdef{wxID_ZOOM_100, "&Actual Size"}
@itemdef{wxID_ZOOM_FIT, "Zoom to &Fit"} @itemdef{wxID_ZOOM_FIT, "Zoom to &Fit"}
@itemdef{wxID_ZOOM_IN, "Zoom &In"} @itemdef{wxID_ZOOM_IN, "Zoom &In"}
@itemdef{wxID_ZOOM_OUT, "Zoom &Out"} @itemdef{wxID_ZOOM_OUT, "Zoom &Out"}
@endDefList @endDefList
Note that some of the IDs listed above have also a stock accelerator Note that some of the IDs listed above have also a stock accelerator
and an help string associated. 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 This section documents the wxUSE preprocessor symbols used in the wxWidgets
source, grouped by category (and sorted by alphabetical order inside each source, grouped by category (and sorted by alphabetical order inside each
category). These symbols are always defined and whether the given feature is 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, 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 otherwise it is disabled. Because of this these symbols should be always tested
using @if_ and not @ifdef_. using @if_ and not @ifdef_.
@li @ref page_wxusedef_multi @li @ref page_wxusedef_multi
@li @ref page_wxusedef_unix @li @ref page_wxusedef_unix
@li @ref page_wxusedef_x11 @li @ref page_wxusedef_x11
@li @ref page_wxusedef_gtk @li @ref page_wxusedef_gtk
@li @ref page_wxusedef_mac @li @ref page_wxusedef_mac
@li @ref page_wxusedef_motif @li @ref page_wxusedef_motif
@li @ref page_wxusedef_cocoa @li @ref page_wxusedef_cocoa
@li @ref page_wxusedef_os2 @li @ref page_wxusedef_os2
@li @ref page_wxusedef_msw @li @ref page_wxusedef_msw
@li @ref page_wxusedef_univ @li @ref page_wxusedef_univ
<hr> <hr>
@section page_wxusedef_multi Generic wxUSE preprocessor symbols @section page_wxusedef_multi Generic wxUSE preprocessor symbols
@beginDefList @beginDefList
@itemdef{wxUSE_ABOUTDLG, Use wxAboutDialogInfo class.} @itemdef{wxUSE_ABOUTDLG, Use wxAboutDialogInfo class.}
@itemdef{wxUSE_ACCEL, Use wxAcceleratorTable/Entry classes and support for them in wxMenu, wxMenuBar.} @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_AFM_FOR_POSTSCRIPT, In wxPostScriptDC class use AFM (adobe font metrics) file for character widths.}
@itemdef{wxUSE_ANIMATIONCTRL, Use wxAnimationCtrl class.} @itemdef{wxUSE_ANIMATIONCTRL, Use wxAnimationCtrl class.}
@itemdef{wxUSE_APPLE_IEEE, IEEE Extended to/from double routines; see src/common/extended.c file.} @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_ARCHIVE_STREAMS, Enable streams for archive formats.}
@itemdef{wxUSE_AUI, Use AUI (dockable windows) library.} @itemdef{wxUSE_AUI, Use AUI (dockable windows) library.}
@itemdef{wxUSE_BASE64, Enables Base64 support.} @itemdef{wxUSE_BASE64, Enables Base64 support.}
@itemdef{wxUSE_BITMAPCOMBOBOX, Use wxBitmapComboBox class.} @itemdef{wxUSE_BITMAPCOMBOBOX, Use wxBitmapComboBox class.}
@itemdef{wxUSE_BMPBUTTON, Use wxBitmapButton class.} @itemdef{wxUSE_BMPBUTTON, Use wxBitmapButton class.}
@itemdef{wxUSE_BUSYINFO, Use wxBusyInfo class.} @itemdef{wxUSE_BUSYINFO, Use wxBusyInfo class.}
@itemdef{wxUSE_BUTTON, Use wxButton class.} @itemdef{wxUSE_BUTTON, Use wxButton class.}
@itemdef{wxUSE_CALENDARCTRL, Use wxCalendarCtrl class.} @itemdef{wxUSE_CALENDARCTRL, Use wxCalendarCtrl class.}
@itemdef{wxUSE_CARET, Use wxCaret class.} @itemdef{wxUSE_CARET, Use wxCaret class.}
@itemdef{wxUSE_CHECKBOX, Use wxCheckBox class.} @itemdef{wxUSE_CHECKBOX, Use wxCheckBox class.}
@itemdef{wxUSE_CHECKLISTBOX, Use wxCheckListBox class.} @itemdef{wxUSE_CHECKLISTBOX, Use wxCheckListBox class.}
@itemdef{wxUSE_CHOICE, Use wxChoice class.} @itemdef{wxUSE_CHOICE, Use wxChoice class.}
@itemdef{wxUSE_CHOICEBOOK, Use wxChoicebook class.} @itemdef{wxUSE_CHOICEBOOK, Use wxChoicebook class.}
@itemdef{wxUSE_CHOICEDLG, Use wxSingleChoiceDialog, or wxMultiChoiceDialog classes.} @itemdef{wxUSE_CHOICEDLG, Use wxSingleChoiceDialog, or wxMultiChoiceDialog classes.}
@itemdef{wxUSE_CLIPBOARD, Use wxClipboard class.} @itemdef{wxUSE_CLIPBOARD, Use wxClipboard class.}
@itemdef{wxUSE_CMDLINE_PARSER, Use wxCmdLineParser class.} @itemdef{wxUSE_CMDLINE_PARSER, Use wxCmdLineParser class.}
@itemdef{wxUSE_COLLPANE, Use wxCollapsiblePane class.} @itemdef{wxUSE_COLLPANE, Use wxCollapsiblePane class.}
@itemdef{wxUSE_COLOURDLG, Use wxColourDialog class.} @itemdef{wxUSE_COLOURDLG, Use wxColourDialog class.}
@itemdef{wxUSE_COLOURPICKERCTRL, Use wxColourPickerCtrl class.} @itemdef{wxUSE_COLOURPICKERCTRL, Use wxColourPickerCtrl class.}
@itemdef{wxUSE_COMBOBOX, Use wxComboBox class.} @itemdef{wxUSE_COMBOBOX, Use wxComboBox class.}
@itemdef{wxUSE_COMBOCTRL, Use wxComboCtrl class.} @itemdef{wxUSE_COMBOCTRL, Use wxComboCtrl class.}
@itemdef{wxUSE_CONFIG, Use wxConfig and related classes.} @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_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_CONSOLE_EVENTLOOP, Enable event loop in console programs.}
@itemdef{wxUSE_CONSTRAINTS, Use wxLayoutConstraints} @itemdef{wxUSE_CONSTRAINTS, Use wxLayoutConstraints}
@itemdef{wxUSE_CONTROLS, If set to $0$, no classes deriving from wxControl can be used.} @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_DATAOBJ, Use wxDataObject and related classes.}
@itemdef{wxUSE_DATAVIEWCTRL, Use wxDataViewCtrl class.} @itemdef{wxUSE_DATAVIEWCTRL, Use wxDataViewCtrl class.}
@itemdef{wxUSE_DATEPICKCTRL, Use wxDatePickerCtrl class.} @itemdef{wxUSE_DATEPICKCTRL, Use wxDatePickerCtrl class.}
@itemdef{wxUSE_DATETIME, Use wxDateTime and related classes.} @itemdef{wxUSE_DATETIME, Use wxDateTime and related classes.}
@itemdef{wxUSE_DBGHELP, Use wxDbgHelpDLL class.} @itemdef{wxUSE_DBGHELP, Use wxDbgHelpDLL class.}
@itemdef{wxUSE_DEBUG_CONTEXT, Use wxDebugContext class.} @itemdef{wxUSE_DEBUG_CONTEXT, Use wxDebugContext class.}
@itemdef{wxUSE_DEBUG_NEW_ALWAYS, See @ref overview_debugging} @itemdef{wxUSE_DEBUG_NEW_ALWAYS, See @ref overview_debugging}
@itemdef{wxUSE_DEBUGREPORT, Use wxDebugReport class.} @itemdef{wxUSE_DEBUGREPORT, Use wxDebugReport class.}
@itemdef{wxUSE_DIALUP_MANAGER, Use wxDialUpManager and related classes.} @itemdef{wxUSE_DIALUP_MANAGER, Use wxDialUpManager and related classes.}
@itemdef{wxUSE_DIRDLG, Use wxDirDialog class.} @itemdef{wxUSE_DIRDLG, Use wxDirDialog class.}
@itemdef{wxUSE_DIRPICKERCTRL, Use wxDirPickerCtrl class.} @itemdef{wxUSE_DIRPICKERCTRL, Use wxDirPickerCtrl class.}
@itemdef{wxUSE_DISPLAY, Use wxDisplay and related classes.} @itemdef{wxUSE_DISPLAY, Use wxDisplay and related classes.}
@itemdef{wxUSE_DOC_VIEW_ARCHITECTURE, Use wxDocument 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_DRAG_AND_DROP, Use Drag and drop classes.}
@itemdef{wxUSE_DRAGIMAGE, Use wxDragImage class.} @itemdef{wxUSE_DRAGIMAGE, Use wxDragImage class.}
@itemdef{wxUSE_DYNAMIC_LOADER, Use wxPluginManager and related classes. Requires wxDynamicLibrary} @itemdef{wxUSE_DYNAMIC_LOADER, Use wxPluginManager and related classes. Requires wxDynamicLibrary}
@itemdef{wxUSE_DYNLIB_CLASS, Use wxDynamicLibrary} @itemdef{wxUSE_DYNLIB_CLASS, Use wxDynamicLibrary}
@itemdef{wxUSE_EDITABLELISTBOX, Use wxEditableListBox class.} @itemdef{wxUSE_EDITABLELISTBOX, Use wxEditableListBox class.}
@itemdef{wxUSE_EXCEPTIONS, Use exception handling.} @itemdef{wxUSE_EXCEPTIONS, Use exception handling.}
@itemdef{wxUSE_EXPAT, enable XML support using expat parser.} @itemdef{wxUSE_EXPAT, enable XML support using expat parser.}
@itemdef{wxUSE_EXTENDED_RTTI, Use extended RTTI, see also Runtime class information (RTTI)} @itemdef{wxUSE_EXTENDED_RTTI, Use extended RTTI, see also Runtime class information (RTTI)}
@itemdef{wxUSE_FFILE, Use wxFFile class.} @itemdef{wxUSE_FFILE, Use wxFFile class.}
@itemdef{wxUSE_FILE, Use wxFile class.} @itemdef{wxUSE_FILE, Use wxFile class.}
@itemdef{wxUSE_FILECONFIG, Use wxFileConfig class.} @itemdef{wxUSE_FILECONFIG, Use wxFileConfig class.}
@itemdef{wxUSE_FILECTRL, Use wxFileCtrl class.} @itemdef{wxUSE_FILECTRL, Use wxFileCtrl class.}
@itemdef{wxUSE_FILEDLG, Use wxFileDialog class.} @itemdef{wxUSE_FILEDLG, Use wxFileDialog class.}
@itemdef{wxUSE_FILEPICKERCTRL, Use wxFilePickerCtrl class.} @itemdef{wxUSE_FILEPICKERCTRL, Use wxFilePickerCtrl class.}
@itemdef{wxUSE_FILESYSTEM, Use wxFileSystem and related classes.} @itemdef{wxUSE_FILESYSTEM, Use wxFileSystem and related classes.}
@itemdef{wxUSE_FINDREPLDLG, Use wxFindReplaceDialog class.} @itemdef{wxUSE_FINDREPLDLG, Use wxFindReplaceDialog class.}
@itemdef{wxUSE_FONTDLG, Use wxFontDialog class.} @itemdef{wxUSE_FONTDLG, Use wxFontDialog class.}
@itemdef{wxUSE_FONTENUM, Use wxFontEnumerator class.} @itemdef{wxUSE_FONTENUM, Use wxFontEnumerator class.}
@itemdef{wxUSE_FONTMAP, Use wxFontMapper class.} @itemdef{wxUSE_FONTMAP, Use wxFontMapper class.}
@itemdef{wxUSE_FONTPICKERCTRL, Use wxFontPickerCtrl class.} @itemdef{wxUSE_FONTPICKERCTRL, Use wxFontPickerCtrl class.}
@itemdef{wxUSE_FS_ARCHIVE, Use virtual archive filesystems like wxArchiveFSHandler in wxFileSystem 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_INET, Use virtual HTTP/FTP filesystems like wxInternetFSHandler in wxFileSystem class.}
@itemdef{wxUSE_FS_ZIP, Please use wxUSE_FS_ARCHIVE instead.} @itemdef{wxUSE_FS_ZIP, Please use wxUSE_FS_ARCHIVE instead.}
@itemdef{wxUSE_FSVOLUME, Use wxFSVolume class.} @itemdef{wxUSE_FSVOLUME, Use wxFSVolume class.}
@itemdef{wxUSE_GAUGE, Use wxGauge class.} @itemdef{wxUSE_GAUGE, Use wxGauge class.}
@itemdef{wxUSE_GENERIC_DRAGIMAGE, Used in wxDragImage sample.} @itemdef{wxUSE_GENERIC_DRAGIMAGE, Used in wxDragImage sample.}
@itemdef{wxUSE_GENERIC_DRAWELLIPSE, See comment in wx/dc.h file.} @itemdef{wxUSE_GENERIC_DRAWELLIPSE, See comment in wx/dc.h file.}
@itemdef{wxUSE_GEOMETRY, Use common geometry classes} @itemdef{wxUSE_GEOMETRY, Use common geometry classes}
@itemdef{wxUSE_GIF, Use GIF wxImageHandler} @itemdef{wxUSE_GIF, Use GIF wxImageHandler}
@itemdef{wxUSE_GLCANVAS, Enables OpenGL support.} @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_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_GRAPHICS_CONTEXT, Use wxGraphicsContext and related classes.}
@itemdef{wxUSE_GRID, Use wxGrid 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_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_HELP, Use wxHelpController and related classes.}
@itemdef{wxUSE_HTML, Use wxHtmlWindow and related classes.} @itemdef{wxUSE_HTML, Use wxHtmlWindow and related classes.}
@itemdef{wxUSE_HYPERLINKCTRL, Use wxHyperlinkCtrl} @itemdef{wxUSE_HYPERLINKCTRL, Use wxHyperlinkCtrl}
@itemdef{wxUSE_ICO_CUR, Support Windows ICO and CUR formats.} @itemdef{wxUSE_ICO_CUR, Support Windows ICO and CUR formats.}
@itemdef{wxUSE_IFF, Enables the wxImage handler for Amiga IFF images.} @itemdef{wxUSE_IFF, Enables the wxImage handler for Amiga IFF images.}
@itemdef{wxUSE_IMAGE, Use wxImage and related classes.} @itemdef{wxUSE_IMAGE, Use wxImage and related classes.}
@itemdef{wxUSE_IMAGLIST, Use wxImageList class.} @itemdef{wxUSE_IMAGLIST, Use wxImageList class.}
@itemdef{wxUSE_INTL, Use wxLocale and related classes.} @itemdef{wxUSE_INTL, Use wxLocale and related classes.}
@itemdef{wxUSE_IOSTREAMH, Use header "iostream.h" instead of "iostream".} @itemdef{wxUSE_IOSTREAMH, Use header "iostream.h" instead of "iostream".}
@itemdef{wxUSE_IPC, Use interprocess communication classes.} @itemdef{wxUSE_IPC, Use interprocess communication classes.}
@itemdef{wxUSE_IPV6, Use experimental wxIPV6address and related classes.} @itemdef{wxUSE_IPV6, Use experimental wxIPV6address and related classes.}
@itemdef{wxUSE_JOYSTICK, Use wxJoystick class.} @itemdef{wxUSE_JOYSTICK, Use wxJoystick class.}
@itemdef{wxUSE_LIBJPEG, Enables JPEG format support (requires libjpeg).} @itemdef{wxUSE_LIBJPEG, Enables JPEG format support (requires libjpeg).}
@itemdef{wxUSE_LIBPNG, Enables PNG format support (requires libpng). Also requires wxUSE_ZLIB.} @itemdef{wxUSE_LIBPNG, Enables PNG format support (requires libpng). Also requires wxUSE_ZLIB.}
@itemdef{wxUSE_LIBTIFF, Enables TIFF format support (requires libtiff).} @itemdef{wxUSE_LIBTIFF, Enables TIFF format support (requires libtiff).}
@itemdef{wxUSE_LISTBOOK, Use wxListbook class.} @itemdef{wxUSE_LISTBOOK, Use wxListbook class.}
@itemdef{wxUSE_LISTBOX, Use wxListBox class.} @itemdef{wxUSE_LISTBOX, Use wxListBox class.}
@itemdef{wxUSE_LISTCTRL, Use wxListCtrl class.} @itemdef{wxUSE_LISTCTRL, Use wxListCtrl class.}
@itemdef{wxUSE_LOG, Use wxLog and related classes.} @itemdef{wxUSE_LOG, Use wxLog and related classes.}
@itemdef{wxUSE_LOG_DEBUG, Enabled when wxLog used with __WXDEBUG__ defined.} @itemdef{wxUSE_LOG_DEBUG, Enabled when wxLog used with __WXDEBUG__ defined.}
@itemdef{wxUSE_LOG_DIALOG, Use wxLogDialog class.} @itemdef{wxUSE_LOG_DIALOG, Use wxLogDialog class.}
@itemdef{wxUSE_LOGGUI, Use wxLogGui class.} @itemdef{wxUSE_LOGGUI, Use wxLogGui class.}
@itemdef{wxUSE_LOGWINDOW, Use wxLogFrame class.} @itemdef{wxUSE_LOGWINDOW, Use wxLogFrame class.}
@itemdef{wxUSE_LONGLONG, Use wxLongLong class.} @itemdef{wxUSE_LONGLONG, Use wxLongLong class.}
@itemdef{wxUSE_LONGLONG_NATIVE, Use native <tt>long long</tt> type in wxLongLong implementation.} @itemdef{wxUSE_LONGLONG_NATIVE, Use native <tt>long long</tt> type in wxLongLong implementation.}
@itemdef{wxUSE_LONGLONG_WX, Use generic wxLongLong implementation.} @itemdef{wxUSE_LONGLONG_WX, Use generic wxLongLong implementation.}
@itemdef{wxUSE_MDI, Use wxMDIParentFrame, and wxMDIChildFrame} @itemdef{wxUSE_MDI, Use wxMDIParentFrame, and wxMDIChildFrame}
@itemdef{wxUSE_MDI_ARCHITECTURE, Use MDI-based document-view classes.} @itemdef{wxUSE_MDI_ARCHITECTURE, Use MDI-based document-view classes.}
@itemdef{wxUSE_MEDIACTRL, Use wxMediaCtrl.} @itemdef{wxUSE_MEDIACTRL, Use wxMediaCtrl.}
@itemdef{wxUSE_MEMORY_TRACING, Use wxWidgets memory leak detection, not recommended if using another memory debugging tool.} @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_MENUS, Use wxMenu and related classes.}
@itemdef{wxUSE_METAFILE, Use wxMetaFile and related classes.} @itemdef{wxUSE_METAFILE, Use wxMetaFile and related classes.}
@itemdef{wxUSE_MIMETYPE, Use wxFileType class.} @itemdef{wxUSE_MIMETYPE, Use wxFileType class.}
@itemdef{wxUSE_MINIFRAME, Use wxMiniFrame class.} @itemdef{wxUSE_MINIFRAME, Use wxMiniFrame class.}
@itemdef{wxUSE_MOUSEWHEEL, Support mouse wheel events.} @itemdef{wxUSE_MOUSEWHEEL, Support mouse wheel events.}
@itemdef{wxUSE_MSGDLG, Use wxMessageDialog class and wxMessageBox function.} @itemdef{wxUSE_MSGDLG, Use wxMessageDialog class and wxMessageBox function.}
@itemdef{wxUSE_NATIVE_STATUSBAR, Use native wxStatusBar class.} @itemdef{wxUSE_NATIVE_STATUSBAR, Use native wxStatusBar class.}
@itemdef{wxUSE_NOTEBOOK, Use wxNotebook and related classes.} @itemdef{wxUSE_NOTEBOOK, Use wxNotebook and related classes.}
@itemdef{wxUSE_NUMBERDLG, Use wxNumberEntryDialog class.} @itemdef{wxUSE_NUMBERDLG, Use wxNumberEntryDialog class.}
@itemdef{wxUSE_ODCOMBOBOX, Use wxOwnerDrawnComboBox class.} @itemdef{wxUSE_ODCOMBOBOX, Use wxOwnerDrawnComboBox class.}
@itemdef{wxUSE_ON_FATAL_EXCEPTION, Catch signals in wxApp::OnFatalException method.} @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_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_OWNER_DRAWN, Use interface for owner-drawn GUI elements.}
@itemdef{wxUSE_PALETTE, Use wxPalette and related classes.} @itemdef{wxUSE_PALETTE, Use wxPalette and related classes.}
@itemdef{wxUSE_PCX, Enables wxImage PCX handler.} @itemdef{wxUSE_PCX, Enables wxImage PCX handler.}
@itemdef{wxUSE_PNM, Enables wxImage PNM handler.} @itemdef{wxUSE_PNM, Enables wxImage PNM handler.}
@itemdef{wxUSE_POPUPWIN, Use wxPopupWindow class.} @itemdef{wxUSE_POPUPWIN, Use wxPopupWindow class.}
@itemdef{wxUSE_POSTSCRIPT, Use wxPostScriptPrinter class.} @itemdef{wxUSE_POSTSCRIPT, Use wxPostScriptPrinter class.}
@itemdef{wxUSE_PRINTF_POS_PARAMS, Use wxVsnprintf which supports positional parameters.} @itemdef{wxUSE_PRINTF_POS_PARAMS, Use wxVsnprintf which supports positional parameters.}
@itemdef{wxUSE_PRINTING_ARCHITECTURE, Enable printer classes.} @itemdef{wxUSE_PRINTING_ARCHITECTURE, Enable printer classes.}
@itemdef{wxUSE_PROGRESSDLG, Enables progress dialog classes.} @itemdef{wxUSE_PROGRESSDLG, Enables progress dialog classes.}
@itemdef{wxUSE_PROTOCOL, Use wxProtocol and derived classes.} @itemdef{wxUSE_PROTOCOL, Use wxProtocol and derived classes.}
@itemdef{wxUSE_PROTOCOL_FILE, Use wxFileProto class. (requires wxProtocol)} @itemdef{wxUSE_PROTOCOL_FILE, Use wxFileProto class. (requires wxProtocol)}
@itemdef{wxUSE_PROTOCOL_FTP, Use wxFTP class. (requires wxProtocol)} @itemdef{wxUSE_PROTOCOL_FTP, Use wxFTP class. (requires wxProtocol)}
@itemdef{wxUSE_PROTOCOL_HTTP, Use wxHTTP class. (requireswxProtocol)} @itemdef{wxUSE_PROTOCOL_HTTP, Use wxHTTP class. (requireswxProtocol)}
@itemdef{wxUSE_RADIOBOX, Use wxRadioBox class.} @itemdef{wxUSE_RADIOBOX, Use wxRadioBox class.}
@itemdef{wxUSE_RADIOBTN, Use wxRadioButton class.} @itemdef{wxUSE_RADIOBTN, Use wxRadioButton class.}
@itemdef{wxUSE_REGEX, Use wxRegEx class.} @itemdef{wxUSE_REGEX, Use wxRegEx class.}
@itemdef{wxUSE_RICHTEXT, Use wxRichTextCtrl class.} @itemdef{wxUSE_RICHTEXT, Use wxRichTextCtrl class.}
@itemdef{wxUSE_RICHTEXT_XML_HANDLER, See src/xrc/xh_richtext.cpp file.} @itemdef{wxUSE_RICHTEXT_XML_HANDLER, See src/xrc/xh_richtext.cpp file.}
@itemdef{wxUSE_SASH, Use wxSashWindow class.} @itemdef{wxUSE_SASH, Use wxSashWindow class.}
@itemdef{wxUSE_SCROLLBAR, Use wxScrollBar class.} @itemdef{wxUSE_SCROLLBAR, Use wxScrollBar class.}
@itemdef{wxUSE_SEARCHCTRL, Use wxSearchCtrl class.} @itemdef{wxUSE_SEARCHCTRL, Use wxSearchCtrl class.}
@itemdef{wxUSE_SELECT_DISPATCHER, Use wxSelectDispatcher class.} @itemdef{wxUSE_SELECT_DISPATCHER, Use wxSelectDispatcher class.}
@itemdef{wxUSE_SLIDER, Use wxSlider class.} @itemdef{wxUSE_SLIDER, Use wxSlider class.}
@itemdef{wxUSE_SNGLINST_CHECKER, Use wxSingleInstanceChecker class.} @itemdef{wxUSE_SNGLINST_CHECKER, Use wxSingleInstanceChecker class.}
@itemdef{wxUSE_SOCKETS, Enables Network address classes.} @itemdef{wxUSE_SOCKETS, Enables Network address classes.}
@itemdef{wxUSE_SOUND, Use wxSound class.} @itemdef{wxUSE_SOUND, Use wxSound class.}
@itemdef{wxUSE_SPINBTN, Use wxSpinButton class.} @itemdef{wxUSE_SPINBTN, Use wxSpinButton class.}
@itemdef{wxUSE_SPINCTRL, Use wxSpinCtrl class.} @itemdef{wxUSE_SPINCTRL, Use wxSpinCtrl class.}
@itemdef{wxUSE_SPLASH, Use wxSplashScreen class.} @itemdef{wxUSE_SPLASH, Use wxSplashScreen class.}
@itemdef{wxUSE_SPLINES, Provide methods for spline drawing in wxDC.} @itemdef{wxUSE_SPLINES, Provide methods for spline drawing in wxDC.}
@itemdef{wxUSE_SPLITTER, Use wxSplitterWindow class.} @itemdef{wxUSE_SPLITTER, Use wxSplitterWindow class.}
@itemdef{wxUSE_STACKWALKER, Enables wxStackWalker and related classes.} @itemdef{wxUSE_STACKWALKER, Enables wxStackWalker and related classes.}
@itemdef{wxUSE_STARTUP_TIPS, Use startup tips, wxTipProvider class.} @itemdef{wxUSE_STARTUP_TIPS, Use startup tips, wxTipProvider class.}
@itemdef{wxUSE_STATBMP, Use wxStaticBitmap class.} @itemdef{wxUSE_STATBMP, Use wxStaticBitmap class.}
@itemdef{wxUSE_STATBOX, Use wxStaticBox class.} @itemdef{wxUSE_STATBOX, Use wxStaticBox class.}
@itemdef{wxUSE_STATLINE, Use wxStaticLine class.} @itemdef{wxUSE_STATLINE, Use wxStaticLine class.}
@itemdef{wxUSE_STATTEXT, Use wxStaticText class.} @itemdef{wxUSE_STATTEXT, Use wxStaticText class.}
@itemdef{wxUSE_STATUSBAR, Use wxStatusBar class.} @itemdef{wxUSE_STATUSBAR, Use wxStatusBar class.}
@itemdef{wxUSE_STC, Use wxStyledTextCtrl.} @itemdef{wxUSE_STC, Use wxStyledTextCtrl.}
@itemdef{wxUSE_STD_IOSTREAM, Use standard C++ stream classes.} @itemdef{wxUSE_STD_IOSTREAM, Use standard C++ stream classes.}
@itemdef{wxUSE_STD_STRING, Use standard C++ string classes.} @itemdef{wxUSE_STD_STRING, Use standard C++ string classes.}
@itemdef{wxUSE_STDPATHS, Use wxStandardPaths class.} @itemdef{wxUSE_STDPATHS, Use wxStandardPaths class.}
@itemdef{wxUSE_STL, Use Standard Template Library for the container classes and wxString implementation.} @itemdef{wxUSE_STL, Use Standard Template Library for the container classes and wxString implementation.}
@itemdef{wxUSE_STOPWATCH, Use wxStopWatch class.} @itemdef{wxUSE_STOPWATCH, Use wxStopWatch class.}
@itemdef{wxUSE_STREAMS, Enable stream classes.} @itemdef{wxUSE_STREAMS, Enable stream classes.}
@itemdef{wxUSE_SVG, Use wxSVGFileDC class.} @itemdef{wxUSE_SVG, Use wxSVGFileDC class.}
@itemdef{wxUSE_SYSTEM_OPTIONS, Use wxSystemOptions class.} @itemdef{wxUSE_SYSTEM_OPTIONS, Use wxSystemOptions class.}
@itemdef{wxUSE_TAB_DIALOG, Use the obsolete wxTabControl class.} @itemdef{wxUSE_TAB_DIALOG, Use the obsolete wxTabControl class.}
@itemdef{wxUSE_TARSTREAM, Enable Tar files support.} @itemdef{wxUSE_TARSTREAM, Enable Tar files support.}
@itemdef{wxUSE_TASKBARICON, Use wxTaskBarIcon class.} @itemdef{wxUSE_TASKBARICON, Use wxTaskBarIcon class.}
@itemdef{wxUSE_TEXTBUFFER, Use wxTextBuffer class.} @itemdef{wxUSE_TEXTBUFFER, Use wxTextBuffer class.}
@itemdef{wxUSE_TEXTCTRL, Use wxTextCtrl class.} @itemdef{wxUSE_TEXTCTRL, Use wxTextCtrl class.}
@itemdef{wxUSE_TEXTDLG, Use wxTextEntryDialog class.} @itemdef{wxUSE_TEXTDLG, Use wxTextEntryDialog class.}
@itemdef{wxUSE_TEXTFILE, Use wxTextFile class.} @itemdef{wxUSE_TEXTFILE, Use wxTextFile class.}
@itemdef{wxUSE_TGA, Enable wxImage TGA handler.} @itemdef{wxUSE_TGA, Enable wxImage TGA handler.}
@itemdef{wxUSE_THREADS, Use wxThread and related classes.} @itemdef{wxUSE_THREADS, Use wxThread and related classes.}
@itemdef{wxUSE_TIMER, Use wxTimer class.} @itemdef{wxUSE_TIMER, Use wxTimer class.}
@itemdef{wxUSE_TIPWINDOW, Use wxTipWindow class.} @itemdef{wxUSE_TIPWINDOW, Use wxTipWindow class.}
@itemdef{wxUSE_TOGGLEBTN, Use wxToggleButton class.} @itemdef{wxUSE_TOGGLEBTN, Use wxToggleButton class.}
@itemdef{wxUSE_TOOLBAR, Use wxToolBar class.} @itemdef{wxUSE_TOOLBAR, Use wxToolBar class.}
@itemdef{wxUSE_TOOLBAR_NATIVE, Use native wxToolBar class.} @itemdef{wxUSE_TOOLBAR_NATIVE, Use native wxToolBar class.}
@itemdef{wxUSE_TOOLBOOK, Use wxToolbook class.} @itemdef{wxUSE_TOOLBOOK, Use wxToolbook class.}
@itemdef{wxUSE_TOOLTIPS, Use wxToolTip class.} @itemdef{wxUSE_TOOLTIPS, Use wxToolTip class.}
@itemdef{wxUSE_TREEBOOK, Use wxTreebook class.} @itemdef{wxUSE_TREEBOOK, Use wxTreebook class.}
@itemdef{wxUSE_TREECTRL, Use wxTreeCtrl class.} @itemdef{wxUSE_TREECTRL, Use wxTreeCtrl class.}
@itemdef{wxUSE_TTM_WINDOWFROMPOINT, Obsolete, do not use.} @itemdef{wxUSE_TTM_WINDOWFROMPOINT, Obsolete, do not use.}
@itemdef{wxUSE_UNICODE, Compiled with Unicode support.} @itemdef{wxUSE_UNICODE, Compiled with Unicode support.}
@itemdef{wxUSE_UNICODE_UTF8, Compiled with UTF8 support.} @itemdef{wxUSE_UNICODE_UTF8, Compiled with UTF8 support.}
@itemdef{wxUSE_UNICODE_WCHAR, Compiled with Unicode support and using wchar_t type.} @itemdef{wxUSE_UNICODE_WCHAR, Compiled with Unicode support and using wchar_t type.}
@itemdef{wxUSE_URL, Use wxURL class.} @itemdef{wxUSE_URL, Use wxURL class.}
@itemdef{wxUSE_URL_NATIVE, Use native support for some operations with wxURL.} @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_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_VALIDATORS, Use wxValidator class.}
@itemdef{wxUSE_VARIANT, Use wxVariant class.} @itemdef{wxUSE_VARIANT, Use wxVariant class.}
@itemdef{wxUSE_WIZARDDLG, Use wxWizard class.} @itemdef{wxUSE_WIZARDDLG, Use wxWizard class.}
@itemdef{wxUSE_WXHTML_HELP, Use wxHtmlHelpController and related classes.} @itemdef{wxUSE_WXHTML_HELP, Use wxHtmlHelpController and related classes.}
@itemdef{wxUSE_XML, Use XML parsing classes.} @itemdef{wxUSE_XML, Use XML parsing classes.}
@itemdef{wxUSE_XPM, Enable XPM reader for wxImage and wxBitmap classes.} @itemdef{wxUSE_XPM, Enable XPM reader for wxImage and wxBitmap classes.}
@itemdef{wxUSE_XRC, Use XRC XML-based resource system.} @itemdef{wxUSE_XRC, Use XRC XML-based resource system.}
@itemdef{wxUSE_ZIPSTREAM, Enable streams for Zip files.} @itemdef{wxUSE_ZIPSTREAM, Enable streams for Zip files.}
@itemdef{wxUSE_ZLIB, Use wxZlibInput and wxZlibOutputStream classes, required by wxUSE_LIBPNG.} @itemdef{wxUSE_ZLIB, Use wxZlibInput and wxZlibOutputStream classes, required by wxUSE_LIBPNG.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_EPOLL_DISPATCHER, Use wxEpollDispatcher class. See also wxUSE_SELECT_DISPATCHER.} @itemdef{wxUSE_EPOLL_DISPATCHER, Use wxEpollDispatcher class. See also wxUSE_SELECT_DISPATCHER.}
@itemdef{wxUSE_GSTREAMER, Use GStreamer library in wxMediaCtrl.} @itemdef{wxUSE_GSTREAMER, Use GStreamer library in wxMediaCtrl.}
@itemdef{wxUSE_LIBMSPACK, Use libmspack library.} @itemdef{wxUSE_LIBMSPACK, Use libmspack library.}
@itemdef{wxUSE_LIBSDL, Use SDL for wxSound implementation.} @itemdef{wxUSE_LIBSDL, Use SDL for wxSound implementation.}
@itemdef{wxUSE_PLUGINS, See also wxUSE_LIBSDL.} @itemdef{wxUSE_PLUGINS, See also wxUSE_LIBSDL.}
@itemdef{wxUSE_UNIX, Enabled on Unix Platform.} @itemdef{wxUSE_UNIX, Enabled on Unix Platform.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_NANOX, Use NanoX.} @itemdef{wxUSE_NANOX, Use NanoX.}
@itemdef{wxUSE_UNIV_TEXTCTRL, Use wxUniv's implementation of wxTextCtrl class.} @itemdef{wxUSE_UNIV_TEXTCTRL, Use wxUniv's implementation of wxTextCtrl class.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_DETECT_SM, Use code to detect X11 session manager.} @itemdef{wxUSE_DETECT_SM, Use code to detect X11 session manager.}
@itemdef{wxUSE_GTKPRINT, Use GTK+ printing support.} @itemdef{wxUSE_GTKPRINT, Use GTK+ printing support.}
@itemdef{wxUSE_LIBGNOMEPRINT, Use GNOME printing support.} @itemdef{wxUSE_LIBGNOMEPRINT, Use GNOME printing support.}
@itemdef{wxUSE_LIBGNOMEVFS, Use GNOME VFS support. Currently has no effect. } @itemdef{wxUSE_LIBGNOMEVFS, Use GNOME VFS support. Currently has no effect. }
@itemdef{wxUSE_LIBHILDON, Use Hildon framework for Nokia 770. Currently has no effect. } @itemdef{wxUSE_LIBHILDON, Use Hildon framework for Nokia 770. Currently has no effect. }
@endDefList @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 @beginDefList
@itemdef{wxUSE_MAC_CRITICAL_REGION_MUTEX, See src/mac/carbon/thread.cpp file.} @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_PTHREADS_MUTEX, See src/mac/carbon/thread.cpp file.}
@itemdef{wxUSE_MAC_SEMAPHORE_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.} @itemdef{wxUSE_WEBKIT, Use wxWebKitCtrl class.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_GADGETS, Use xmCascadeButtonGadgetClass, xmLabelGadgetClass, xmPushButtonGadgetClass and xmToggleButtonGadgetClass classes.} @itemdef{wxUSE_GADGETS, Use xmCascadeButtonGadgetClass, xmLabelGadgetClass, xmPushButtonGadgetClass and xmToggleButtonGadgetClass classes.}
@itemdef{wxUSE_INVISIBLE_RESIZE, See src/motif/dialog.cpp file.} @itemdef{wxUSE_INVISIBLE_RESIZE, See src/motif/dialog.cpp file.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_OBJC_UNIQUIFYING, Enable Objective-C class name uniquifying.} @itemdef{wxUSE_OBJC_UNIQUIFYING, Enable Objective-C class name uniquifying.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_CONSOLEDEBUG, See src/os2/app.cpp file.} @itemdef{wxUSE_CONSOLEDEBUG, See src/os2/app.cpp file.}
@itemdef{wxUSE_DDE, See src/os2/mimetype.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_MSW, See src/os2/clipbrd.cpp file.}
@itemdef{wxUSE_IMAGE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.} @itemdef{wxUSE_IMAGE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
@itemdef{wxUSE_NET_API, Use NetBios32GetInfo API call.} @itemdef{wxUSE_NET_API, Use NetBios32GetInfo API call.}
@itemdef{wxUSE_RESOURCE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.} @itemdef{wxUSE_RESOURCE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
@endDefList @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 @beginDefList
@itemdef{wxUSE_ACCESSIBILITY, Enable accessibility support} @itemdef{wxUSE_ACCESSIBILITY, Enable accessibility support}
@itemdef{wxUSE_ACTIVEX, Use wxActiveXContainer and related classes.} @itemdef{wxUSE_ACTIVEX, Use wxActiveXContainer and related classes.}
@itemdef{wxUSE_COMBOCTRL_POPUP_ANIMATION, See wx/msw/combo.h file.} @itemdef{wxUSE_COMBOCTRL_POPUP_ANIMATION, See wx/msw/combo.h file.}
@itemdef{wxUSE_COMCTL32_SAFELY, See src/msw/treectrl.cpp 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_COMMON_DIALOGS, Enable use of windows common dialogs from header commdlg.h; example PRINTDLG.}
@itemdef{wxUSE_CRASHREPORT, Use wxCrashReport class.} @itemdef{wxUSE_CRASHREPORT, Use wxCrashReport class.}
@itemdef{wxUSE_DATEPICKCTRL_GENERIC, Use generic wxDatePickerCtrl implementation in addition to the native one.} @itemdef{wxUSE_DATEPICKCTRL_GENERIC, Use generic wxDatePickerCtrl implementation in addition to the native one.}
@itemdef{wxUSE_DC_CACHEING, cache temporary wxDC objects.} @itemdef{wxUSE_DC_CACHEING, cache temporary wxDC objects.}
@itemdef{wxUSE_DIRECTDRAW, Enable use of the system include file ddraw.h.} @itemdef{wxUSE_DIRECTDRAW, Enable use of the system include file ddraw.h.}
@itemdef{wxUSE_DDE_FOR_IPC, See wx/ipc.h file.} @itemdef{wxUSE_DDE_FOR_IPC, See wx/ipc.h file.}
@itemdef{wxUSE_ENH_METAFILE, Use wxEnhMetaFile.} @itemdef{wxUSE_ENH_METAFILE, Use wxEnhMetaFile.}
@itemdef{wxUSE_HOTKEY, Use wxWindow::RegisterHotKey() and wxWindow::UnregisterHotKey} @itemdef{wxUSE_HOTKEY, Use wxWindow::RegisterHotKey() and wxWindow::UnregisterHotKey}
@itemdef{wxUSE_INKEDIT, Use InkEdit library. Related to Tablet PCs.} @itemdef{wxUSE_INKEDIT, Use InkEdit library. Related to Tablet PCs.}
@itemdef{wxUSE_MS_HTML_HELP, Use wxCHMHelpController class.} @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_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_NORLANDER_HEADERS, Using headers whose author is Anders Norlander.}
@itemdef{wxUSE_OLE, Enables OLE helper routines.} @itemdef{wxUSE_OLE, Enables OLE helper routines.}
@itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.} @itemdef{wxUSE_OLE_AUTOMATION, Enable OLE automation utilities.}
@itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.} @itemdef{wxUSE_OLE_CLIPBOARD, Use OLE clipboard.}
@itemdef{wxUSE_PENWINDOWS, See src/msw/penwin.cpp file.} @itemdef{wxUSE_PENWINDOWS, See src/msw/penwin.cpp file.}
@itemdef{wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW, Use PS printing in wxMSW.} @itemdef{wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW, Use PS printing in wxMSW.}
@itemdef{wxUSE_PS_PRINTING, See src/msw/dcprint.cpp file.} @itemdef{wxUSE_PS_PRINTING, See src/msw/dcprint.cpp file.}
@itemdef{wxUSE_REGKEY, Use wxRegKey class.} @itemdef{wxUSE_REGKEY, Use wxRegKey class.}
@itemdef{wxUSE_RICHEDIT, Enable use of riched32.dll in wxTextCtrl} @itemdef{wxUSE_RICHEDIT, Enable use of riched32.dll in wxTextCtrl}
@itemdef{wxUSE_RICHEDIT2, Enable use of riched20.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_VC_CRTDBG, See wx/msw/msvcrt.h file.}
@itemdef{wxUSE_UNICODE_MSLU, Use MSLU for Unicode support under Windows 9x systems.} @itemdef{wxUSE_UNICODE_MSLU, Use MSLU for Unicode support under Windows 9x systems.}
@itemdef{wxUSE_UXTHEME, Enable support for XP themes.} @itemdef{wxUSE_UXTHEME, Enable support for XP themes.}
@itemdef{wxUSE_WIN_METAFILES_ALWAYS, Use wxMetaFile even when wxUSE_ENH_METAFILE=$1$.} @itemdef{wxUSE_WIN_METAFILES_ALWAYS, Use wxMetaFile even when wxUSE_ENH_METAFILE=$1$.}
@itemdef{wxUSE_WXDIB, Use wxDIB class.} @itemdef{wxUSE_WXDIB, Use wxDIB class.}
@itemdef{wxUSE_XPM_IN_MSW, See also wxUSE_XPM} @itemdef{wxUSE_XPM_IN_MSW, See also wxUSE_XPM}
@endDefList @endDefList
@section page_wxusedef_univ wxUSE preprocessor symbols used only in wxUniversal @section page_wxusedef_univ wxUSE preprocessor symbols used only in wxUniversal
@beginDefList @beginDefList
@itemdef{wxUSE_ALL_THEMES, Use all themes in wxUniversal; See wx/univ/theme.h file.} @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_GTK, Use GTK+ 1-like theme in wxUniversal}
@itemdef{wxUSE_THEME_METAL, Use GTK+ 2-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_MONO, Use simple monochrome theme in wxUniversal}
@itemdef{wxUSE_THEME_WIN32, Use Win32-like theme in wxUniversal} @itemdef{wxUSE_THEME_WIN32, Use Win32-like theme in wxUniversal}
@endDefList @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_keycodes
@li @subpage page_keymodifiers @li @subpage page_keymodifiers
@li @subpage page_languagecodes @li @subpage page_languagecodes
@li @subpage page_stdevtid @li @subpage page_stdevtid
@li @subpage page_stockitems @li @subpage page_stockitems
@li @subpage page_cppconst @li @subpage page_cppconst
@li @subpage page_wxusedef @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 This chapter describes the practical details of using wxWidgets. Please
see the file install.txt for up-to-date installation instructions, and see the file install.txt for up-to-date installation instructions, and
changes.txt for differences between versions. changes.txt for differences between versions.
@li @ref page_multiplatform_includefiles @li @ref page_multiplatform_includefiles
@li @ref page_multiplatform_libraries @li @ref page_multiplatform_libraries
@li @ref page_multiplatform_configuration @li @ref page_multiplatform_configuration
@li @ref page_multiplatform_makefiles @li @ref page_multiplatform_makefiles
@li @ref page_multiplatform_windowsfiles @li @ref page_multiplatform_windowsfiles
@li @ref page_multiplatform_allocatingobjects @li @ref page_multiplatform_allocatingobjects
@li @ref page_multiplatform_architecturedependency @li @ref page_multiplatform_architecturedependency
@li @ref page_multiplatform_conditionalcompilation @li @ref page_multiplatform_conditionalcompilation
@li @ref page_multiplatform_cpp @li @ref page_multiplatform_cpp
@li @ref page_multiplatform_filehandling @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 The main include file is @c "wx/wx.h"; this includes the most commonly
used modules of wxWidgets. used modules of wxWidgets.
To save on compilation time, include only those header files relevant to the To save on compilation time, include only those header files relevant to the
source file. If you are using precompiled headers, you should include source file. If you are using precompiled headers, you should include
the following section before any other includes: the following section before any other includes:
@verbatim @verbatim
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h> #include <wx/wxprec.h>
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h // Include your minimal set of headers here, or wx.h
#include <wx/wx.h> #include <wx/wx.h>
#endif #endif
... now your other include files ... ... now your other include files ...
@endverbatim @endverbatim
The file @c "wx/wxprec.h" includes @c "wx/wx.h". Although this incantation 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, 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 and several Windows compilers to use precompilation which is largely automatic for
compilers with necessary support. Currently it is used for Visual C++ (including compilers with necessary support. Currently it is used for Visual C++ (including
embedded Visual C++), Borland C++, Open Watcom C++, Digital Mars C++ embedded Visual C++), Borland C++, Open Watcom C++, Digital Mars C++
and newer versions of GCC. and newer versions of GCC.
Some compilers might need extra work from the application developer to set the Some compilers might need extra work from the application developer to set the
build environment up as necessary for the support. 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 Most ports of wxWidgets can create either a static library or a shared
library. wxWidgets can also be built in multilib and monolithic variants. library. wxWidgets can also be built in multilib and monolithic variants.
See the @ref page_libs for more information on these. 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, When using project files and makefiles directly to build wxWidgets,
options are configurable in the file options are configurable in the file
@c "wx/XXX/setup.h" where XXX is the required platform (such as msw, motif, gtk, mac). Some @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 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 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. and @c install.txt files for details on configuration.
When using the 'configure' script to configure wxWidgets (on Unix and other platforms where 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 configure is available), the corresponding setup.h files are generated automatically
along with suitable makefiles. When using the RPM packages along with suitable makefiles. When using the RPM packages
for installing wxWidgets on Linux, a correct setup.h is shipped in the package and for installing wxWidgets on Linux, a correct setup.h is shipped in the package and
this must not be changed. 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 On Microsoft Windows, wxWidgets has a different set of makefiles for each
compiler, because each compiler's 'make' tool is slightly different. compiler, because each compiler's 'make' tool is slightly different.
Popular Windows compilers that we cater for, and the corresponding makefile Popular Windows compilers that we cater for, and the corresponding makefile
extensions, include: Microsoft Visual C++ (.vc), Borland C++ (.bcc), extensions, include: Microsoft Visual C++ (.vc), Borland C++ (.bcc),
OpenWatcom C++ (.wat) and MinGW/Cygwin (.gcc). Makefiles are provided OpenWatcom C++ (.wat) and MinGW/Cygwin (.gcc). Makefiles are provided
for the wxWidgets library itself, samples, demos, and utilities. for the wxWidgets library itself, samples, demos, and utilities.
On Linux, Mac and OS/2, you use the 'configure' command to On Linux, Mac and OS/2, you use the 'configure' command to
generate the necessary makefiles. You should also use this method when generate the necessary makefiles. You should also use this method when
building with MinGW/Cygwin on Windows. building with MinGW/Cygwin on Windows.
We also provide project files for some compilers, such as We also provide project files for some compilers, such as
Microsoft VC++. However, we recommend using makefiles Microsoft VC++. However, we recommend using makefiles
to build the wxWidgets library itself, because makefiles to build the wxWidgets library itself, because makefiles
can be more powerful and less manual intervention is required. can be more powerful and less manual intervention is required.
On Windows using a compiler other than MinGW/Cygwin, you would On Windows using a compiler other than MinGW/Cygwin, you would
build the wxWidgets library from the build/msw directory build the wxWidgets library from the build/msw directory
which contains the relevant makefiles. which contains the relevant makefiles.
On Windows using MinGW/Cygwin, and on Unix, MacOS X and OS/2, you invoke 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), 'configure' (found in the top-level of the wxWidgets source hierarchy),
from within a suitable empty directory for containing makefiles, object files and from within a suitable empty directory for containing makefiles, object files and
libraries. libraries.
For details on using makefiles, configure, and project files, For details on using makefiles, configure, and project files,
please see docs/xxx/install.txt in your distribution, where please see docs/xxx/install.txt in your distribution, where
xxx is the platform of interest, such as msw, gtk, x11, mac. 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 wxWidgets application compilation under MS Windows requires at least one
extra file: a resource file. 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) The least that must be defined in the Windows resource file (extension RC)
is the following statement: is the following statement:
@verbatim @verbatim
#include "wx/msw/wx.rc" #include "wx/msw/wx.rc"
@endverbatim @endverbatim
which includes essential internal wxWidgets definitions. The resource script which includes essential internal wxWidgets definitions. The resource script
may also contain references to icons, cursors, etc., for example: may also contain references to icons, cursors, etc., for example:
@verbatim @verbatim
wxicon icon wx.ico wxicon icon wx.ico
@endverbatim @endverbatim
The icon can then be referenced by name when creating a frame icon. See The icon can then be referenced by name when creating a frame icon. See
the MS Windows SDK documentation. 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 so programs that search your executable for icons (such
as the Program Manager) find your application icon first. 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 In general, classes derived from wxWindow must dynamically allocated
with @e new and deleted with @e delete. If you delete a window, with @e new and deleted with @e delete. If you delete a window,
all of its children and descendants will be automatically deleted, all of its children and descendants will be automatically deleted,
so you don't need to delete these descendants explicitly. so you don't need to delete these descendants explicitly.
When deleting a frame or dialog, use @b Destroy rather than @b delete so 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 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 (when all messages have been processed) to actually delete the window, to avoid
problems associated with the GUI sending events to deleted windows. problems associated with the GUI sending events to deleted windows.
Don't create a window on the stack, because this will interfere Don't create a window on the stack, because this will interfere
with delayed deletion. with delayed deletion.
If you decide to allocate a C++ array of objects (such as wxBitmap) that may 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 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 before wxWidgets has a chance to do so on exit, since calling @e delete on
array members will cause memory problems. array members will cause memory problems.
wxColour can be created statically: it is not automatically cleaned wxColour can be created statically: it is not automatically cleaned
up and is unlikely to be shared between other objects; it is lightweight up and is unlikely to be shared between other objects; it is lightweight
enough for copies to be made. enough for copies to be made.
Beware of deleting objects such as a wxPen or wxBitmap if they are still in use. 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 Windows is particularly sensitive to this: so make sure you
make calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) before deleting 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 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. 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 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 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 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 well as their byte order, which might be little endian (typically
on Intel computers) or big endian (typically on some Unix workstations). wxWidgets on Intel computers) or big endian (typically on some Unix workstations). wxWidgets
defines types and macros that make it easy to write architecture independent defines types and macros that make it easy to write architecture independent
code. The types are: 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 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 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 which is either wxBIG_ENDIAN or wxLITTLE_ENDIAN (in the future maybe wxPDP_ENDIAN
as well). as well).
The macros handling bit-swapping with respect to the applications endianness The macros handling bit-swapping with respect to the applications endianness
are described in the @ref page_macro_cat_byteorder section. 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 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. compilation in source code, which can be messy and confusing to follow.
However, sometimes it is necessary to incorporate platform-specific However, sometimes it is necessary to incorporate platform-specific
features (such as metafile use under MS Windows). The @ref page_wxusedef 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, symbols listed in the file @c setup.h may be used for this purpose,
along with any user-supplied ones. 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 wxWidgets does not use templates (except for some advanced features that
are switched off by default) since it is a notoriously unportable feature. 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 wxWidgets does not use C++ run-time type information since wxWidgets provides
its own run-time type information system, implemented using macros. 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 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 no conversion to pointers is allowed. Because of that, all these
occurrences of NULL in the GTK+ port use an explicit conversion such occurrences of NULL in the GTK+ port use an explicit conversion such
as as
@code @code
wxWindow *my_window = (wxWindow*) NULL; wxWindow *my_window = (wxWindow*) NULL;
@endcode @endcode
It is recommended to adhere to this in all code using wxWidgets as It is recommended to adhere to this in all code using wxWidgets as
this make the code (a bit) more portable. 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 Some compilers, such as Borland C++ and Microsoft C++, support
precompiled headers. This can save a great deal of compiling time. The precompiled headers. This can save a great deal of compiling time. The
recommended approach is to precompile @c "wx.h", using this recommended approach is to precompile @c "wx.h", using this
precompiled header for compiling both wxWidgets itself and any precompiled header for compiling both wxWidgets itself and any
wxWidgets applications. For Windows compilers, two dummy source files wxWidgets applications. For Windows compilers, two dummy source files
are provided (one for normal applications and one for creating DLLs) are provided (one for normal applications and one for creating DLLs)
to allow initial creation of the precompiled header. to allow initial creation of the precompiled header.
However, there are several downsides to using precompiled headers. One However, there are several downsides to using precompiled headers. One
is that to take advantage of the facility, you often need to include 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 more header files than would normally be the case. This means that
changing a header file will cause more recompilations (in the case of changing a header file will cause more recompilations (in the case of
wxWidgets, everything needs to be recompiled since everything includes @c "wx.h" !) wxWidgets, everything needs to be recompiled since everything includes @c "wx.h" !)
A related problem is that for compilers that don't have precompiled A related problem is that for compilers that don't have precompiled
headers, including a lot of header files slows down compilation headers, including a lot of header files slows down compilation
considerably. For this reason, you will find (in the common considerably. For this reason, you will find (in the common
X and Windows parts of the library) conditional X and Windows parts of the library) conditional
compilation that under Unix, includes a minimal set of headers; compilation that under Unix, includes a minimal set of headers;
and when using Visual C++, includes @c wx.h. This should help provide and when using Visual C++, includes @c wx.h. This should help provide
the optimal compilation for each compiler, although it is the optimal compilation for each compiler, although it is
biased towards the precompiled headers facility available biased towards the precompiled headers facility available
in Microsoft C++. 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 When building an application which may be used under different
environments, one difficulty is coping with documents which may be environments, one difficulty is coping with documents which may be
moved to different directories on other machines. Saving a file which moved to different directories on other machines. Saving a file which
has pointers to full pathnames is going to be inherently unportable. has pointers to full pathnames is going to be inherently unportable.
One approach is to store filenames on their own, with no directory One approach is to store filenames on their own, with no directory
information. The application then searches into a list of standard information. The application then searches into a list of standard
paths (platform-specific) through the use of wxStandardPaths. 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. Nowadays the limitations of DOS 8+3 filenames doesn't apply anymore.
Most modern operating systems allow at least 255 characters in the filename; 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, 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 are OS-specific so you should try to avoid extremely long (> 255 chars) filenames
and/or filenames with non-ANSI characters. and/or filenames with non-ANSI characters.
Another thing you need to keep in mind is that all Windows operating systems 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 are case-insensitive, while Unix operating systems (Linux, Mac, etc) are
case-sensitive. case-sensitive.
Also, for text files, different OSes use different End Of Lines (EOL). Also, for text files, different OSes use different End Of Lines (EOL).
Windows uses CR+LF convention, Linux uses LF only, Mac CR only. Windows uses CR+LF convention, Linux uses LF only, Mac CR only.
The wxTextFile, wxTextInputStream, wxTextOutputStream classes help to abstract The wxTextFile, wxTextInputStream, wxTextOutputStream classes help to abstract
from these differences. from these differences.
Of course, there are also 3rd party utilities such as @c dos2unix and @c unix2dos Of course, there are also 3rd party utilities such as @c dos2unix and @c unix2dos
which do the EOL conversions. which do the EOL conversions.
See also the @ref page_func_cat_file section of the reference See also the @ref page_func_cat_file section of the reference
manual for the description of miscellaneous file handling functions. 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_whatis
@li @ref page_introduction_why @li @ref page_introduction_why
@li @ref page_introduction_requirements @li @ref page_introduction_requirements
@li @ref page_introduction_where @li @ref page_introduction_where
@li @ref page_introduction_acknowledgements @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 wxWidgets is a C++ framework providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version 2 and higher 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, 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. Unix with Motif, Unix with just X11, Unix with DirectFB, Mac OS X, OS/2.
wxWidgets was originally developed at the Artificial Intelligence wxWidgets was originally developed at the Artificial Intelligence
Applications Institute, University of Edinburgh, for internal use, Applications Institute, University of Edinburgh, for internal use,
and was first made publicly available in 1992. and was first made publicly available in 1992.
Version 2 is a vastly improved version written and maintained by Version 2 is a vastly improved version written and maintained by
Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others. Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others.
This manual contains a class reference and topic overviews. This manual contains a class reference and topic overviews.
For a selection of wxWidgets tutorials, please see the documentation page For a selection of wxWidgets tutorials, please see the documentation page
on the wxWidgets web site: http://www.wxwidgets.org. on the wxWidgets web site: http://www.wxwidgets.org.
Please note that in the following, ``MS Windows" often refers to all Please note that in the following, ``MS Windows" often refers to all
platforms related to Microsoft Windows, including 32-bit and 64-bit platforms related to Microsoft Windows, including 32-bit and 64-bit
variants, unless otherwise stated. All trademarks are acknowledged. 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 wxWidgets was developed to provide a cheap and flexible way to maximize
investment in GUI application development. While a number of commercial investment in GUI application development. While a number of commercial
class libraries already existed for cross-platform development, class libraries already existed for cross-platform development,
none met all of the following criteria: none met all of the following criteria:
@li low price; @li low price;
@li source availability; @li source availability;
@li simplicity of programming; @li simplicity of programming;
@li support for a wide range of compilers. @li support for a wide range of compilers.
Since wxWidgets was started, several other free or almost-free Since wxWidgets was started, several other free or almost-free
GUI frameworks have emerged. However, none has the range of GUI frameworks have emerged. However, none has the range of
features, flexibility, documentation and the well-established features, flexibility, documentation and the well-established
development team that wxWidgets has. development team that wxWidgets has.
As open source software, wxWidgets has benefited from comments, As open source software, wxWidgets has benefited from comments,
ideas, bug fixes, enhancements and the sheer enthusiasm of ideas, bug fixes, enhancements and the sheer enthusiasm of
users. This gives wxWidgets a certain advantage over its users. This gives wxWidgets a certain advantage over its
commercial competitors (and over free libraries without an commercial competitors (and over free libraries without an
independent development team), plus a robustness against the independent development team), plus a robustness against the
transience of one individual or company. This openness and transience of one individual or company. This openness and
availability of source code is especially important when the availability of source code is especially important when the
future of thousands of lines of application code may depend upon future of thousands of lines of application code may depend upon
the longevity of the underlying class library. the longevity of the underlying class library.
Version 2 goes much further than previous versions in terms of Version 2 goes much further than previous versions in terms of
generality and features, allowing applications to be produced generality and features, allowing applications to be produced
that are often indistinguishable from those produced using that are often indistinguishable from those produced using
single-platform toolkits such as Motif, GTK+ and MFC. single-platform toolkits such as Motif, GTK+ and MFC.
The importance of using a platform-independent class library The importance of using a platform-independent class library
cannot be overstated, since GUI application development is very cannot be overstated, since GUI application development is very
time-consuming, and sustained popularity of particular GUIs time-consuming, and sustained popularity of particular GUIs
cannot be guaranteed. Code can very quickly become obsolete if cannot be guaranteed. Code can very quickly become obsolete if
it addresses the wrong platform or audience. wxWidgets helps to it addresses the wrong platform or audience. wxWidgets helps to
insulate the programmer from these winds of change. Although insulate the programmer from these winds of change. Although
wxWidgets may not be suitable for every application (such as an wxWidgets may not be suitable for every application (such as an
OLE-intensive program), it provides access to most of the OLE-intensive program), it provides access to most of the
functionality a GUI program normally requires, plus many extras functionality a GUI program normally requires, plus many extras
such as network programming, PostScript output, and HTML such as network programming, PostScript output, and HTML
rendering; and it can of course be extended as needs dictate. rendering; and it can of course be extended as needs dictate.
As a bonus, it provides a far cleaner and easier programming As a bonus, it provides a far cleaner and easier programming
interface than the native APIs. Programmers may find it interface than the native APIs. Programmers may find it
worthwhile to use wxWidgets even if they are developing on only worthwhile to use wxWidgets even if they are developing on only
one platform. one platform.
It is impossible to sum up the functionality of wxWidgets in a few paragraphs, but It is impossible to sum up the functionality of wxWidgets in a few paragraphs, but
here are some of the benefits: here are some of the benefits:
@li Low cost (free, in fact!) @li Low cost (free, in fact!)
@li You get the source. @li You get the source.
@li Available on a variety of popular platforms. @li Available on a variety of popular platforms.
@li Works with almost all popular C++ compilers and Python. @li Works with almost all popular C++ compilers and Python.
@li Over 70 example programs. @li Over 70 example programs.
@li Over 1000 pages of printable and on-line documentation. @li Over 1000 pages of printable and on-line documentation.
@li Simple-to-use, object-oriented API. @li Simple-to-use, object-oriented API.
@li Flexible event system. @li Flexible event system.
@li Graphics calls include lines, rounded rectangles, splines, polylines, etc. @li Graphics calls include lines, rounded rectangles, splines, polylines, etc.
@li Constraint-based and sizer-based layouts. @li Constraint-based and sizer-based layouts.
@li Print/preview and document/view architectures. @li Print/preview and document/view architectures.
@li Toolbar, notebook, tree control, advanced list control classes. @li Toolbar, notebook, tree control, advanced list control classes.
@li PostScript generation under Unix, normal MS Windows printing on the PC. @li PostScript generation under Unix, normal MS Windows printing on the PC.
@li MDI (Multiple Document Interface) support. @li MDI (Multiple Document Interface) support.
@li Can be used to create DLLs under Windows, dynamic libraries on Unix. @li Can be used to create DLLs under Windows, dynamic libraries on Unix.
@li Common dialogs for file browsing, printing, colour selection, etc. @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 Under MS Windows, support for creating metafiles and copying them to the clipboard.
@li An API for invoking help from applications. @li An API for invoking help from applications.
@li Ready-to-use HTML window (supporting a subset of HTML). @li Ready-to-use HTML window (supporting a subset of HTML).
@li Network support via a family of socket and protocol classes. @li Network support via a family of socket and protocol classes.
@li Support for platform independent image processing. @li Support for platform independent image processing.
@li Built-in support for many file formats (BMP, PNG, JPEG, GIF, XPM, PNM, PCX). @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 Includes Tex2RTF, to allow you to produce your own documentation
in Windows Help, HTML and Word RTF formats. 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 32-bit or 64-bit PC running MS Windows.
@li A Windows compiler: MS Visual C++ (embedded Visual C++ for wxWinCE @li A Windows compiler: MS Visual C++ (embedded Visual C++ for wxWinCE
port), Borland C++, Watcom C++, Cygwin, MinGW, Metrowerks CodeWarrior, port), Borland C++, Watcom C++, Cygwin, MinGW, Metrowerks CodeWarrior,
Digital Mars C++. See @c install.txt for details about compiler Digital Mars C++. See @c install.txt for details about compiler
version supported. 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. 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 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 many features of wxGTK2), Motif 1.2 or higher or Lesstif. If using the wxX11
port, no such widget set is required. 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 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 The Apple Developer Tools (eg. GNU C++) or MetroWerks CodeWarrior (not
actively supported) actively supported)
Under all platforms it's recommended to have large amounts of free hard disk 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 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 configurations but to give an example, a debug build of the library may take up
to 500MB. 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 wxWidgets is available by anonymous FTP and World Wide Web
from ftp://biolpc22.york.ac.uk/pub and/or http://www.wxwidgets.org. 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 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 it running and have provided an invaluable, extensive and high-quality amount of
changes over the many of years of wxWidgets' life: changes over the many of years of wxWidgets' life:
@li Julian Smart @li Julian Smart
@li Vadim Zeitlin @li Vadim Zeitlin
@li Robert Roebling @li Robert Roebling
@li Robin Dunn @li Robin Dunn
@li Stefan Csomor @li Stefan Csomor
@li Vaclav Slavik @li Vaclav Slavik
@li Paul Cornett @li Paul Cornett
@li Wlodzimierz `ABX' Skiba @li Wlodzimierz `ABX' Skiba
@li Chris Elliott @li Chris Elliott
@li David Elliott @li David Elliott
@li Kevin Hock @li Kevin Hock
@li Stefan Neis @li Stefan Neis
@li Michael Wetherell @li Michael Wetherell
We would particularly like to thank the following peoples for their contributions 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. 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: Apologies for any unintentional omissions from this alphabetic list:
Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI, Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI,
Patrick Albert, Karsten Ballueder, Mattia Barbon, Michael Bedward, Patrick Albert, Karsten Ballueder, Mattia Barbon, Michael Bedward,
Kai Bendorf, Yura Bidus, Keith Gary Boyce, Chris Breeze, Pete Britton, Kai Bendorf, Yura Bidus, Keith Gary Boyce, Chris Breeze, Pete Britton,
Ian Brown, C. Buckley, Marco Cavallini, Dmitri Chubraev, Robin Corbet, Cecil Coupe, Ian Brown, C. Buckley, Marco Cavallini, Dmitri Chubraev, Robin Corbet, Cecil Coupe,
Andrew Davison, Gilles Depeyrot, Neil Dudman, Hermann Dunkel, Jos van Eijndhoven, Andrew Davison, Gilles Depeyrot, Neil Dudman, Hermann Dunkel, Jos van Eijndhoven,
Tom Felici, Thomas Fettig, Matthew Flatt, Pasquale Foggia, Josep Fortiana, Todd Fries, Tom Felici, Thomas Fettig, Matthew Flatt, Pasquale Foggia, Josep Fortiana, Todd Fries,
Dominic Gallagher, Guillermo Rodriguez Garcia, Wolfram Gloger, Norbert Grotz, Dominic Gallagher, Guillermo Rodriguez Garcia, Wolfram Gloger, Norbert Grotz,
Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle, Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle,
Harco de Hilster, Cord Hockemeyer, Markus Holzem, Olaf Klein, Leif Jensen, Harco de Hilster, Cord Hockemeyer, Markus Holzem, Olaf Klein, Leif Jensen,
Bart Jourquin, Guilhem Lavaux, Ron Lee, Jan Lessner, Nicholas Liebmann, Bart Jourquin, Guilhem Lavaux, Ron Lee, Jan Lessner, Nicholas Liebmann,
Torsten Liermann, Per Lindqvist, Francesco Montorsi, Thomas Runge, Tatu M&auml;nnist&ouml;, Torsten Liermann, Per Lindqvist, Francesco Montorsi, Thomas Runge, Tatu M&auml;nnist&ouml;,
Scott Maxwell, Thomas Myers, Oliver Niedung, Ryan Norton, Hernan Otero, Scott Maxwell, Thomas Myers, Oliver Niedung, Ryan Norton, Hernan Otero,
Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti, Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti,
Garrett Potts, Marcel Rasche, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton, Garrett Potts, Marcel Rasche, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton,
Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, Kari Syst&auml;, George Tasker, Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, Kari Syst&auml;, George Tasker,
Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli, Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli,
David Webster, Otto Wyss, Xiaokun Zhu, Edward Zimmermann. David Webster, Otto Wyss, Xiaokun Zhu, Edward Zimmermann.
Many thanks also to AIAI for being willing to release the original version of Many thanks also to AIAI for being willing to release the original version of
wxWidgets into the public domain, and to our patient partners. wxWidgets into the public domain, and to our patient partners.
`Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos `Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos
T.J. van Eijndhoven of Eindhoven University of Technology. The code has T.J. van Eijndhoven of Eindhoven University of Technology. The code has
been used in wxGraphLayout (not in wxWidgets anymore) with his permission. been used in wxGraphLayout (not in wxWidgets anymore) with his permission.
We also acknowledge the author of XFIG, the excellent Unix drawing tool, We also acknowledge the author of XFIG, the excellent Unix drawing tool,
from the source of which we have borrowed some spline drawing code. from the source of which we have borrowed some spline drawing code.
His copyright is included below. His copyright is included below.
<em> <em>
XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. Permission to XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. Permission to
use, copy, modify, distribute, and sell this software and its use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific, publicity pertaining to distribution of the software without specific,
written prior permission. M.I.T. makes no representations about the written prior permission. M.I.T. makes no representations about the
suitability of this software for any purpose. It is provided ``as is'' suitability of this software for any purpose. It is provided ``as is''
without express or implied warranty. without express or implied warranty.
</em> </em>
*/ */

View File

@@ -9,25 +9,25 @@
/** /**
@mainpage wxWidgets 2.9.0: A portable C++ GUI toolkit @mainpage wxWidgets 2.9.0: A portable C++ GUI toolkit
@author Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al @author Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al
@date February, 2008 @date February, 2008
@image html main_wxlogo.png @image html main_wxlogo.png
@section manual_contents Contents @section manual_contents Contents
@li @subpage page_copyright @li @subpage page_copyright
@li @subpage page_introduction @li @subpage page_introduction
@li @subpage page_multiplatform @li @subpage page_multiplatform
@li @subpage page_utils @li @subpage page_utils
@li @subpage page_samples @li @subpage page_samples
@li @subpage page_strategies @li @subpage page_strategies
@li @subpage page_libs @li @subpage page_libs
@li @subpage page_constants @li @subpage page_constants
@li @subpage page_class_cat @li @subpage page_class_cat
@li @subpage page_func_cat @li @subpage page_func_cat
@li @subpage page_macro_cat @li @subpage page_macro_cat
@li @subpage page_topics @li @subpage page_topics
@li @subpage page_port @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 This chapter is intended to list strategies that may be useful when
writing and debugging wxWidgets programs. If you have any good tips, writing and debugging wxWidgets programs. If you have any good tips,
please submit them for inclusion here. please submit them for inclusion here.
@li @ref page_strategies_reducingerr @li @ref page_strategies_reducingerr
@li @ref page_strategies_portability @li @ref page_strategies_portability
@li @ref page_strategies_debug @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 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. that should or should not hold, and print out appropriate error messages.
These can be compiled out of a non-debugging version of wxWidgets These can be compiled out of a non-debugging version of wxWidgets
and your application. Using ASSERT is an example of `defensive programming': and your application. Using ASSERT is an example of `defensive programming':
it can alert you to problems later on. 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 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. 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 wxString won't add a significant overhead to your program; the overhead is compensated
for by easier manipulation (which means less code). 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 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. 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 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. 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 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: 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 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 to remember similar incidents that threw you into the depths of despair. But
remember, you always solved the problem, somehow! remember, you always solved the problem, somehow!
Perseverance is often the key, even though a seemingly trivial problem Perseverance is often the key, even though a seemingly trivial problem
can take an apparently inordinate amount of time to solve. In the end, 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 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 isn't painful at the time. Try not to worry -- there are many more important
things in life. 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 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 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 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 doesn't hide the problem (you may have attempted to minimize the problem
in some way: but now you want to expose it). in some way: but now you want to expose it).
With luck, you can add a small amount of code that causes the program 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 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 to the problem. In some cases though, such as memory leaks or wrong
deallocation, this can still give totally spurious results! 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 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 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 use a debugger, but it really is essential for anything but the most
trivial programs. 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: There is a variety of logging functions that you can use in your program:
see @ref page_func_cat_log. see @ref page_func_cat_log.
Using tracing statements may be more convenient than using the debugger Using tracing statements may be more convenient than using the debugger
in some circumstances (such as when your debugger doesn't support a lot 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). 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 You can use wxDebugContext to check for
memory leaks and corrupt memory: in fact in debugging mode, wxWidgets will 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 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 configured. Depending on the operating system and compiler, more or less
specific information about the problem will be logged. specific information about the problem will be logged.
You should also use @ref page_macro_cat_debugging as part of a `defensive programming' strategy, 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. 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. 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_introduction
@li @ref overview_datetime_classes @li @ref overview_datetime_classes
@li @ref overview_datetime_characteristics @li @ref overview_datetime_characteristics
@li @ref overview_datetime_timespandiff @li @ref overview_datetime_timespandiff
@li @ref overview_datetime_arithmetics @li @ref overview_datetime_arithmetics
@li @ref overview_datetime_timezones @li @ref overview_datetime_timezones
@li @ref overview_datetime_dst @li @ref overview_datetime_dst
@li @ref overview_datetime_holidays @li @ref overview_datetime_holidays
@li @ref overview_datetime_compat @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 wxWidgets provides a set of powerful classes to work with dates and times. Some
of the supported features of wxDateTime class are: 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. 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. 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 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 astronomical functions, conversion to and from strings in either strict or free
format. 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 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 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 - which represents an absolute moment in time, there are also two classes -
wxTimeSpan and wxDateSpan - which represent the intervals of time. wxTimeSpan and wxDateSpan - which represent the intervals of time.
There are also helper classes which are used together with wxDateTime: There are also helper classes which are used together with wxDateTime:
wxDateTimeHolidayAuthority which is used to determine whether a given date wxDateTimeHolidayAuthority which is used to determine whether a given date
is a holiday or not and wxDateTimeWorkDays which is a derivation of this 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 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). 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 Finally, in other parts of this manual you may find mentions of wxDate and
wxTime classes. @ref overview_datetime_compat are obsolete and wxTime classes. @ref overview_datetime_compat are obsolete and
superseded by wxDateTime. superseded by wxDateTime.
@section overview_datetime_characteristics wxDateTime characteristics @section overview_datetime_characteristics wxDateTime characteristics
wxDateTime stores the time as a signed number of wxDateTime stores the time as a signed number of
milliseconds since the Epoch which is fixed, by convention, to Jan 1, 1970 - 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 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 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 does mean that the best resolution which can be achieved with this class is 1
millisecond. millisecond.
The size of wxDateTime object is 8 bytes because it is represented as a 64 bit 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 integer. The resulting range of supported dates is thus approximatively 580
million years, but due to the current limitations in the Gregorian calendar 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 support, only dates from Nov 24, 4714BC are supported (this is subject to
change if there is sufficient interest in doing it). change if there is sufficient interest in doing it).
Finally, the internal representation is time zone independent (always in GMT) 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 and the time zones only come into play when a date is broken into
year/month/day components. See more about timezones below year/month/day components. See more about timezones below
(see @ref overview_datetime_timezones). (see @ref overview_datetime_timezones).
Currently, the only supported calendar is Gregorian one (which is used even 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 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 first done on Oct 15, 1582 but is, generally speaking, country, and even
region, dependent). Future versions will probably have Julian calendar support region, dependent). Future versions will probably have Julian calendar support
as well and support for other calendars (Maya, Hebrew, Chinese...) is not as well and support for other calendars (Maya, Hebrew, Chinese...) is not
ruled out. 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 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 time (and hence only one wxDateTime class), there are at least two methods to
describe a time interval. describe a time interval.
First, there is the direct and self-explaining way implemented by First, there is the direct and self-explaining way implemented by
wxTimeSpan: it is just a difference in milliseconds wxTimeSpan: it is just a difference in milliseconds
between two moments in time. Adding or subtracting such an interval to between two moments in time. Adding or subtracting such an interval to
wxDateTime is always well-defined and is a fast operation. wxDateTime is always well-defined and is a fast operation.
But in the daily life other, calendar-dependent time interval specifications are 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 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 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 month later' Feb 15 is Mar 15 and not Mar 17 or Mar 16 (depending on whether
the year is leap or not). the year is leap or not).
This is why there is another class for representing such intervals called This is why there is another class for representing such intervals called
wxDateSpan. It handles these sort of operations in the wxDateSpan. It handles these sort of operations in the
most natural way possible, but note that manipulating with intervals of most natural way possible, but note that manipulating with intervals of
this kind is not always well-defined. Consider, for example, Jan 31 + '1 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 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 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 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 interval from Feb 28 will result in Jan 28 and @b not Jan 31 we started
with! with!
So, unless you plan to implement some kind of natural language parsing in the 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 program, you should probably use wxTimeSpan instead of wxDateSpan (which is
also more efficient). However, wxDateSpan may be very useful in situations 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 when you do need to understand what 'in a month' means (of course, it is
just @c wxDateTime::Now() + wxDateSpan::Month()). 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 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 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 operation, even though multiplying either of the time span classes by a number
is perfectly valid. 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 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. 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 allowed and, additionally, a difference between two wxDateTime objects can be
taken and this will yield wxTimeSpan. 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. 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 negated giving an interval of the same magnitude but of opposite time
direction. direction.
For all these operations there are corresponding global (overloaded) operators For all these operations there are corresponding global (overloaded) operators
and also member functions which are synonyms for them: Add(), Subtract() and and also member functions which are synonyms for them: Add(), Subtract() and
Multiply(). Unary minus as well as composite assignment operations (like +=) Multiply(). Unary minus as well as composite assignment operations (like +=)
are only implemented as members and Neg() is the synonym for unary minus. 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 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 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 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 time zone. Thus, @c wxDateTime(1, wxDateTime::Jan, 1970) will not
correspond to the wxDateTime Epoch unless you happen to live in the UK. correspond to the wxDateTime Epoch unless you happen to live in the UK.
All methods returning the date components (year, month, day, hour, minute, All methods returning the date components (year, month, day, hour, minute,
second...) will also return the correct values for the local time zone by 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 default, so, generally, doing the natural things will lead to natural and
correct results. correct results.
If you only want to do this, you may safely skip the rest of this section. 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 However, if you want to work with different time zones, you should read it to
the end. the end.
In this (rare) case, you are still limited to the local time zone when 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 constructing wxDateTime objects, i.e. there is no way to construct a
wxDateTime corresponding to the given date in, say, Pacific Standard Time. wxDateTime corresponding to the given date in, say, Pacific Standard Time.
To do it, you will need to call wxDateTime::ToTimezone or wxDateTime::MakeTimezone 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 methods to adjust the date for the target time zone. There are also special
versions of these functions wxDateTime::ToUTC and wxDateTime::MakeUTC for versions of these functions wxDateTime::ToUTC and wxDateTime::MakeUTC for
the most common case - when the date should be constructed in UTC. 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 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 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 methods which are affected by the time zone (all methods getting date
components and the date formatting ones, for example). In particular, the components and the date formatting ones, for example). In particular, the
Format() family of methods accepts a TimeZone parameter and this allows to Format() family of methods accepts a TimeZone parameter and this allows to
simply print time in any time zone. simply print time in any time zone.
To see how to do it, the last issue to address is how to construct a TimeZone 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 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 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 usually you will just use one of the @ref overview_datetime and
let the conversion constructor do the job. let the conversion constructor do the job.
I.e. you would just write I.e. you would just write
@code @code
wxDateTime dt(...whatever...); wxDateTime dt(...whatever...);
printf("The time is %s in local time zone", dt.FormatTime().c_str()); 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()); printf("The time is %s in GMT", dt.FormatTime(wxDateTime::GMT).c_str());
@endcode @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 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 left to the operating system which is supposed to be configured by the
administrator to behave correctly. Unfortunately, when doing calculations with administrator to behave correctly. Unfortunately, when doing calculations with
date outside of the range supported by the standard library, we are forced to date outside of the range supported by the standard library, we are forced to
deal with these issues ourselves. deal with these issues ourselves.
Several functions are provided to calculate the beginning and end of DST in 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 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 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 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 (any information about other ones appreciated!) and even for them the rules
may perfectly well change in the future. may perfectly well change in the future.
The time zone handling methods (see @ref overview_datetime_timezones) use The time zone handling methods (see @ref overview_datetime_timezones) use
these functions too, so they are subject to the same limitations. 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 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 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 them is strongly discouraged because they have a few quirks/bugs and were not
'Y2K' compatible. '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, wxMetafileDC, wxMemoryDC, wxPrinterDC, wxScreenDC, wxClientDC,
wxPaintDC, wxWindowDC. wxPaintDC, wxWindowDC.
A wxDC is a @e device context onto which graphics and text can be drawn. 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 The device context is intended to represent a number of output devices in a
generic way, with the same API being used throughout. generic way, with the same API being used throughout.
Some device contexts are created temporarily in order to draw on a window. Some device contexts are created temporarily in order to draw on a window.
This is @true of wxScreenDC, wxClientDC, wxPaintDC, and wxWindowDC. This is @true of wxScreenDC, wxClientDC, wxPaintDC, and wxWindowDC.
The following describes the differences between these device contexts and The following describes the differences between these device contexts and
when you should use them. when you should use them.
@li @b wxScreenDC. Use this to paint on the screen, as opposed to an individual window. @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 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. 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. 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. 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 To use a client, paint or window device context, create an object on the stack with
the window as argument, for example: the window as argument, for example:
@code @code
void MyWindow::OnMyCmd(wxCommandEvent& event) void MyWindow::OnMyCmd(wxCommandEvent& event)
{ {
wxClientDC dc(window); wxClientDC dc(window);
DrawMyPicture(dc); DrawMyPicture(dc);
} }
@endcode @endcode
Try to write code so it is parameterised by wxDC - if you do this, the same piece of code may 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 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 work for everything (for example not all device contexts support bitmap drawing) but
will work most of the time. will work most of the time.
*/ */

View File

@@ -8,137 +8,137 @@
/** /**
@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 @ref page_func_cat_log, @ref page_macro_cat_debugging
Various classes, functions and macros are provided in wxWidgets to help you debug 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. Most of these are only available if you compile both wxWidgets,
your application and @e all libraries that use wxWidgets with the __WXDEBUG__ symbol 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 defined. You can also test the __WXDEBUG__ symbol in your own applications to execute
code that should be active only in debug mode. code that should be active only in debug mode.
@li @ref overview_debugging_dbgctx @li @ref overview_debugging_dbgctx
@li @ref overview_debugging_dbgmacros @li @ref overview_debugging_dbgmacros
@li @ref overview_debugging_logging @li @ref overview_debugging_logging
@li @ref overview_debugging_dbgctx2 @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 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, 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. 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 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 from a wxWidgets class, so that wxDebugContext::Dump can call it and
give valuable information about the state of the application. give valuable information about the state of the application.
If you have difficulty tracking down a memory leak, recompile If you have difficulty tracking down a memory leak, recompile
in debugging mode and call wxDebugContext::Dump and wxDebugContext::PrintStatistics at in debugging mode and call wxDebugContext::Dump and wxDebugContext::PrintStatistics at
appropriate places. They will tell you what objects have not yet been 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 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, 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 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 and compiler -- some systems don't allow all memory logging to be enabled). See the
memcheck sample for example of usage. memcheck sample for example of usage.
For wxDebugContext to do its work, the @e new and @e delete operators for wxObject 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 have been redefined to store extra information about dynamically allocated objects
(but not statically declared objects). (but not statically declared objects).
This slows down a debugging version of an application, but can This slows down a debugging version of an application, but can
find difficult-to-detect memory leaks (objects are not find difficult-to-detect memory leaks (objects are not
deallocated), overwrites (writing past the end of your object) and deallocated), overwrites (writing past the end of your object) and
underwrites (writing to memory in front of the object). underwrites (writing to memory in front of the object).
If debugging mode is on and the symbols wxUSE_GLOBAL_MEMORY_OPERATORS and 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: wxUSE_DEBUG_NEW_ALWAYS are set to 1 in setup.h, 'new' is defined to be:
@code @code
#define new new(__FILE__,__LINE__) #define new new(__FILE__,__LINE__)
@endcode @endcode
All occurrences of 'new' in wxWidgets and your own application will use 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 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 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 file and on what line you allocated the object. Unfortunately not all
compilers allow this definition to work properly, but most do. 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' 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 strategy, scattering wxASSERTs liberally to test for problems in your code as early as
possible. possible.
Forward thinking will save a surprising amount of time in the long run. 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 #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 is not @true. You can also use #wxASSERT_MSG to supply your
own helpful error message. For example: own helpful error message. For example:
@code @code
void MyClass::MyFunction(wxObject* object) void MyClass::MyFunction(wxObject* object)
{ {
wxASSERT_MSG( (object != NULL), "object should not be NULL in MyFunction!" ); 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 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 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 You can use the wxLogDebug and wxLogTrace functions to output debugging information in
debug mode; it will do nothing for non-debugging code. 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 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 no instances. Probably the most useful members are SetFile (for directing output
to a file, instead of the default standard error or debugger output); to a file, instead of the default standard error or debugger output);
Dump (for dumping the dynamically allocated objects) and PrintStatistics Dump (for dumping the dynamically allocated objects) and PrintStatistics
(for dumping information about allocation of objects). You can also call (for dumping information about allocation of objects). You can also call
Check to check memory blocks for integrity. Check to check memory blocks for integrity.
Here's an example of use. The SetCheckpoint ensures that only the Here's an example of use. The SetCheckpoint ensures that only the
allocations done after the checkpoint will be dumped. allocations done after the checkpoint will be dumped.
@code @code
wxDebugContext::SetCheckpoint(); 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::Dump();
wxDebugContext::PrintStatistics(); wxDebugContext::PrintStatistics();
@endcode @endcode
You can use wxDebugContext if __WXDEBUG__ is defined, or you can use it 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 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 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. 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. 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 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: be used for placing controls, with the following exceptions:
@li A surrounding frame is implicitly created. @li A surrounding frame is implicitly created.
@li Extra functionality is automatically given to the dialog box, @li Extra functionality is automatically given to the dialog box,
such as tabbing between items (currently Windows only). 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. until the dialog box is dismissed.
For a set of dialog convenience functions, including file selection, see For a set of dialog convenience functions, including file selection, see
@ref page_func_cat_dialog. @ref page_func_cat_dialog.
See also wxTopLevelWindow and wxWindow for inherited See also wxTopLevelWindow and wxWindow for inherited
member functions. Validation of data in controls is covered in @ref overview_validator. 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 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 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 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. dialogs for the lower resolution screens that inevitably accompany a smaller form factor.
wxDialog therefore supplies a global wxDialogLayoutAdapter class that implements wxDialog therefore supplies a global wxDialogLayoutAdapter class that implements
automatic scrolling adaptation for most sizer-based custom dialogs. automatic scrolling adaptation for most sizer-based custom dialogs.
Many applications should therefore be able to adapt to small displays with little Many applications should therefore be able to adapt to small displays with little
or no work, as far as dialogs are concerned. or no work, as far as dialogs are concerned.
By default this adaptation is off. To switch scrolling adaptation on globally in By default this adaptation is off. To switch scrolling adaptation on globally in
your application, call the static function wxDialog::EnableLayoutAdaptation passing @true. your application, call the static function wxDialog::EnableLayoutAdaptation passing @true.
You can also adjust adaptation on a per-dialog basis by calling You can also adjust adaptation on a per-dialog basis by calling
wxDialog::SetLayoutAdaptationMode with one of @c wxDIALOG_ADAPTATION_MODE_DEFAULT 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. (use the global setting), @c wxDIALOG_ADAPTATION_MODE_ENABLED or @c wxDIALOG_ADAPTATION_MODE_DISABLED.
The last two modes override the global adaptation setting. 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 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, 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. leaving standard buttons in a non-scrolling part at the bottom of the dialog.
This is done as follows, in wxDialogLayoutAdapter::DoLayoutAdaptation called from This is done as follows, in wxDialogLayoutAdapter::DoLayoutAdaptation called from
within wxDialog::Show or wxDialog::ShowModal: 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. 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 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 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. 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. and adds them to a wxStdDialogButtonSizer.
If no standard buttons were found, the whole dialog content will scroll. 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 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. 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, 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 you can choose how aggressively wxWidgets will search for standard buttons by setting
wxDialog::SetLayoutAdaptationLevel. By default, all the steps described above will be 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 performed but by setting the level to 1, for example, you can choose to only look for
wxStdDialogButtonSizer. wxStdDialogButtonSizer.
You can use wxDialog::AddMainButtonId to add identifiers for buttons that should also be You can use wxDialog::AddMainButtonId to add identifiers for buttons that should also be
treated as standard buttons for the non-scrolling area. treated as standard buttons for the non-scrolling area.
You can derive your own class from wxDialogLayoutAdapter or wxStandardDialogLayoutAdapter and call You can derive your own class from wxDialogLayoutAdapter or wxStandardDialogLayoutAdapter and call
wxDialog::SetLayoutAdapter, deleting the old object that this function returns. Override wxDialog::SetLayoutAdapter, deleting the old object that this function returns. Override
the functions CanDoLayoutAdaptation and DoLayoutAdaptation to test for adaptation applicability the functions CanDoLayoutAdaptation and DoLayoutAdaptation to test for adaptation applicability
and perform the adaptation. and perform the adaptation.
You can also override wxDialog::CanDoLayoutAdaptation and wxDialog::DoLayoutAdaptation You can also override wxDialog::CanDoLayoutAdaptation and wxDialog::DoLayoutAdaptation
in a class derived from wxDialog. 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, Because adaptation rearranges your sizer and window hierarchy, it is not fool-proof,
and may fail in the following situations: and may fail in the following situations:
@li The dialog doesn't use sizers. @li The dialog doesn't use sizers.
@li The dialog implementation makes assumptions about the window hierarchy, @li The dialog implementation makes assumptions about the window hierarchy,
for example getting the parent of a control and casting to the dialog class. 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 If this problem can be solved globally, you can derive a new adapter class from
wxStandardDialogLayoutAdapter and override its CreateScrolledWindow function to return wxStandardDialogLayoutAdapter and override its CreateScrolledWindow function to return
an instance of your own class. 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. 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 children of the top-level sizer. However, the original sizer hierarchy will still hold
until Show or ShowModal is called. 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 avoiding the above situations and assumptions;
@li using wxStdDialogButtonSizer; @li using wxStdDialogButtonSizer;
@li only making assumptions about hierarchy immediately after the dialog is created; @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 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; 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. 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 Adaptation for wxPropertySheetDialog is always done by simply making the pages
scrollable, since wxDialog::GetContentWindow returns the dialog's book control and scrollable, since wxDialog::GetContentWindow returns the dialog's book control and
this is handled by the standard layout adapter. this is handled by the standard layout adapter.
wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather
than the global adapter: again, only the wizard pages are made scrollable. 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, wxDocChildFrame, wxDocMDIParentFrame, wxDocMDIChildFrame,
wxCommand, wxCommandProcessor wxCommand, wxCommandProcessor
The document/view framework is found in most application frameworks, because it The document/view framework is found in most application frameworks, because it
can dramatically simplify the code required to build many kinds of application. 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 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 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 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. 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. 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. 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 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 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 modifications, routing menu commands to appropriate (possibly default) code, even
some default print/preview functionality and support for command undo/redo. some default print/preview functionality and support for command undo/redo.
The framework is highly modular, allowing overriding and replacement of functionality The framework is highly modular, allowing overriding and replacement of functionality
and objects to achieve more than the default behaviour. and objects to achieve more than the default behaviour.
These are the overall steps involved in creating an application based on the These are the overall steps involved in creating an application based on the
document/view framework: 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. 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 You may need to route some events to views or documents, for example OnPaint needs
to be routed to wxView::OnDraw. 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 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). 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 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). 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 as many wxDocTemplate instances as necessary to define relationships between documents and
views. For a simple application, there will be just one wxDocTemplate. 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 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 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 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. 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 Here are a few examples of the tailoring you can do to go beyond the default framework
behaviour: 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. 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. class, to provide multi-page document facilities.
@li Override wxDocManager::SelectDocumentPath to provide a different file selector. @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 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 Note that to activate framework functionality, you need to use some or all of
the wxWidgets @ref overview_docview_predefid in your menus. the wxWidgets @ref overview_docview_predefid in your menus.
@beginWxPerlOnly @beginWxPerlOnly
The document/view framework is available in wxPerl. To use it, The document/view framework is available in wxPerl. To use it,
you will need the following statements in your application code: you will need the following statements in your application code:
@code @code
use Wx::DocView; use Wx::DocView;
use Wx ':docview'; # import constants (optional) use Wx ':docview'; # import constants (optional)
@endcode @endcode
@endWxPerlOnly @endWxPerlOnly
@li @ref overview_docview_wxdoc @li @ref overview_docview_wxdoc
@li @ref overview_docview_wxview @li @ref overview_docview_wxview
@li @ref overview_docview_wxdoctemplate @li @ref overview_docview_wxdoctemplate
@li @ref overview_docview_wxdocmanager @li @ref overview_docview_wxdocmanager
@li @ref overview_docview_wxcommand @li @ref overview_docview_wxcommand
@li @ref overview_docview_wxcommandproc @li @ref overview_docview_wxcommandproc
@li @ref overview_docview_filehistory @li @ref overview_docview_filehistory
@li @ref overview_docview_predefid @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 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, data. It is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocTemplate and wxDocManager classes. and cooperates with the wxView, wxDocTemplate and wxDocManager classes.
Using this framework can save a lot of routine user-interface programming, 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 since a range of menu commands -- such as open, save, save as -- are supported
automatically. automatically.
The programmer just needs to define a minimal set of classes and member functions 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 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 the data, are explicitly separated out in this model, and the concept of multiple
@e views onto the same data is supported. @e views onto the same data is supported.
Note that the document/view model will suit many but not all styles of application. 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 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 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. files. But probably the majority of applications are document-based.
See the example application in @c samples/docview. See the example application in @c samples/docview.
To use the abstract wxDocument class, you need to derive a new class and override 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 at least the member functions SaveObject and LoadObject. SaveObject and
LoadObject will be called by the framework when the document needs to be saved LoadObject will be called by the framework when the document needs to be saved
or loaded. or loaded.
Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order 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 to allow the framework to create document objects on demand. When you create
a wxDocTemplate object on application initialization, you a wxDocTemplate object on application initialization, you
should pass CLASSINFO(YourDocumentClass) to the wxDocTemplate constructor should pass CLASSINFO(YourDocumentClass) to the wxDocTemplate constructor
so that it knows how to create an instance of this class. 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 If you do not wish to use the wxWidgets method of creating document
objects dynamically, you must override wxDocTemplate::CreateDocument objects dynamically, you must override wxDocTemplate::CreateDocument
to return an instance of the appropriate class. 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 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 an application's file-based data. It is part of the document/view framework
supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate
and wxDocManager classes. 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 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 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. want to respond to menu commands from the frame containing the view.
Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order 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 to allow the framework to create view objects on demand. When you create
a wxDocTemplate object on application initialization, you a wxDocTemplate object on application initialization, you
should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor
so that it knows how to create an instance of this class. 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 If you do not wish to use the wxWidgets method of creating view
objects dynamically, you must override wxDocTemplate::CreateView objects dynamically, you must override wxDocTemplate::CreateView
to return an instance of the appropriate class. 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 The wxDocTemplate class is used to model the relationship between a
document class and a view class. The application creates a document document class and a view class. The application creates a document
template object for each document/view pair. The list of document template object for each document/view pair. The list of document
templates managed by the wxDocManager instance is used to create templates managed by the wxDocManager instance is used to create
documents and views. Each document template knows what file filters documents and views. Each document template knows what file filters
and default extension are appropriate for a document/view combination, and default extension are appropriate for a document/view combination,
and how to create a document or view. and how to create a document or view.
For example, you might write a small doodling application that can load 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 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 a list of the segments -- then you would create one document class DoodleDocument,
and two view classes (DoodleGraphicView and DoodleListView). You would also and two view classes (DoodleGraphicView and DoodleListView). You would also
need two document templates, one for the graphical view and another for the 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 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 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 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 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 the filter selects the wxDocTemplate, and when a file is selected, that template
will be used for creating a document and view. will be used for creating a document and view.
For the case where an application has one document type and one view type, 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 a single document template is constructed, and dialogs will be appropriately
simplified. simplified.
wxDocTemplate is part of the document/view framework supported by wxWidgets, wxDocTemplate is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument and wxDocManager classes. 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. To use the wxDocTemplate class, you do not need to derive a new class.
Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass) Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass)
and CLASSINFO(YourViewClass) to allow dynamic instance creation. and CLASSINFO(YourViewClass) to allow dynamic instance creation.
If you do not wish to use the wxWidgets method of creating document If you do not wish to use the wxWidgets method of creating document
objects dynamically, you must override wxDocTemplate::CreateDocument objects dynamically, you must override wxDocTemplate::CreateDocument
and wxDocTemplate::CreateView to return instances of the appropriate class. 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, The wxDocManager class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument and wxDocTemplate classes. and cooperates with the wxView, wxDocument and wxDocTemplate classes.
A wxDocManager instance coordinates documents, views and document templates. A wxDocManager instance coordinates documents, views and document templates.
It keeps a list of document and template instances, and much functionality is routed It keeps a list of document and template instances, and much functionality is routed
through this object, such as providing selection and file dialogs. 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 The application can use this class 'as is' or derive a class and override some members
to extend or change the functionality. to extend or change the functionality.
Create an instance of this class near the beginning of your application initialization, Create an instance of this class near the beginning of your application initialization,
before any documents, views or templates are manipulated. before any documents, views or templates are manipulated.
There may be multiple wxDocManager instances in an application. There may be multiple wxDocManager instances in an application.
See the example application in @c samples/docview. 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, wxCommand is a base class for modelling an application command,
which is an action usually performed by selecting a menu item, pressing which is an action usually performed by selecting a menu item, pressing
a toolbar button or any other means provided by the application to a toolbar button or any other means provided by the application to
change the data or view. change the data or view.
Instead of the application functionality being scattered around Instead of the application functionality being scattered around
switch statements and functions in a way that may be hard to switch statements and functions in a way that may be hard to
read and maintain, the functionality for a command is explicitly represented read and maintain, the functionality for a command is explicitly represented
as an object which can be manipulated by a framework or application. as an object which can be manipulated by a framework or application.
When a user interface event occurs, the application @e submits a command When a user interface event occurs, the application @e submits a command
to a wxCommandProcessor object to execute and store. to a wxCommandProcessor object to execute and store.
The wxWidgets document/view framework handles Undo and Redo by use of The wxWidgets document/view framework handles Undo and Redo by use of
wxCommand and wxCommandProcessor objects. You might find further uses wxCommand and wxCommandProcessor objects. You might find further uses
for wxCommand, such as implementing a macro facility that stores, loads for wxCommand, such as implementing a macro facility that stores, loads
and replays commands. and replays commands.
An application can derive a new class for every command, or, more likely, use An application can derive a new class for every command, or, more likely, use
one class parameterized with an integer or string command identifier. 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 wxCommandProcessor is a class that maintains a history of wxCommand
instances, with undo/redo functionality built-in. Derive a new class from this instances, with undo/redo functionality built-in. Derive a new class from this
if you want different behaviour. 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 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. 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 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 to derive from it to allow different behaviour, such as popping up a scrolling
list of files. list of files.
By calling wxFileHistory::UseMenu() you can associate a file menu with the file 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. 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() 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 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 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 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 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, 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: you need to handle them using an event handler, for example:
@code @code
BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame) BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame)
EVT_MENU(wxID_EXIT, wxDocParentFrame::OnExit) EVT_MENU(wxID_EXIT, wxDocParentFrame::OnExit)
EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, wxDocParentFrame::OnMRUFile) 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(); Close();
} }
void wxDocParentFrame::OnMRUFile(wxCommandEvent& event) void wxDocParentFrame::OnMRUFile(wxCommandEvent& event)
{ {
wxString f(m_docManager->GetHistoryFile(event.GetId() - wxID_FILE1)); wxString f(m_docManager->GetHistoryFile(event.GetId() - wxID_FILE1));
if (!f.empty()) if (!f.empty())
(void)m_docManager-CreateDocument(f, wxDOC_SILENT); (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 To allow communication between the application's menus and the
document/view framework, several command identifiers are predefined for you document/view framework, several command identifiers are predefined for you
to use in menus. to use in menus.
@verbatim @verbatim
wxID_OPEN (5000) wxID_OPEN (5000)
wxID_CLOSE (5001) wxID_CLOSE (5001)
wxID_NEW (5002) wxID_NEW (5002)
wxID_SAVE (5003) wxID_SAVE (5003)
wxID_SAVEAS (5004) wxID_SAVEAS (5004)
wxID_REVERT (5005) wxID_REVERT (5005)
wxID_EXIT (5006) wxID_EXIT (5006)
wxID_UNDO (5007) wxID_UNDO (5007)
wxID_REDO (5008) wxID_REDO (5008)
wxID_HELP (5009) wxID_HELP (5009)
wxID_PRINT (5010) wxID_PRINT (5010)
wxID_PRINT_SETUP (5011) wxID_PRINT_SETUP (5011)
wxID_PREVIEW (5012) wxID_PREVIEW (5012)
@endverbatim @endverbatim
*/ */

View File

@@ -8,32 +8,32 @@
/** /**
@page overview_envvars Environment Variables @page overview_envvars Environment Variables
This section describes all environment variables that affect execution of This section describes all environment variables that affect execution of
wxWidgets programs. wxWidgets programs.
@beginDefList @beginDefList
@itemdef{WXTRACE, @itemdef{WXTRACE,
(Debug build only.) (Debug build only.)
This variable can be set to a comma-separated list of trace masks used in This variable can be set to a comma-separated list of trace masks used in
wxLogTrace calls; wxLog::AddTraceMask is called for every mask wxLogTrace calls; wxLog::AddTraceMask is called for every mask
in the list during wxWidgets initialization.} in the list during wxWidgets initialization.}
@itemdef{WXPREFIX, @itemdef{WXPREFIX,
(Unix only.) (Unix only.)
Overrides installation prefix. Normally, the prefix Overrides installation prefix. Normally, the prefix
is hard-coded and is the same as the value passed to @c configure via is hard-coded and is the same as the value passed to @c configure via
the @c --prefix switch when compiling the library (typically the @c --prefix switch when compiling the library (typically
@c /usr/local or @c /usr). You can set WXPREFIX if you are for example @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 distributing a binary version of an application and you don't know in advance
where it will be installed.} where it will be installed.}
@itemdef{WXMODE, @itemdef{WXMODE,
(wxMGL only.) (wxMGL only.)
Sets MGL video mode. The value must be in form Sets MGL video mode. The value must be in form
@e widthx@e height-@e depth. The default is @c 640x480-16.} @e widthx@e height-@e depth. The default is @c 640x480-16.}
@itemdef{WXSTDERR, @itemdef{WXSTDERR,
(wxMGL only.) (wxMGL only.)
Redirects stderr output to a file.} 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_introduction
@li @ref overview_exceptions_strategies @li @ref overview_exceptions_strategies
@li @ref overview_exceptions_tech @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 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 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 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 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 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 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. could result in memory and/or resource leaks, and also not very convenient.
wxWidgets is exception-friendly. wxWidgets is exception-friendly.
It still doesn't use the exceptions by itself but it should be now safe to use the 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 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. 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 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 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 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 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. 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 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 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 behaviour -- to simply terminate the program -- may be appropriate. If it is
not, you may override wxApp::OnUnhandledException() not, you may override wxApp::OnUnhandledException()
in your wxApp-derived class to perform any clean up tasks. Note, however, that 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 any information about the exact exception type is lost when this function is
called, so if you need you should override wxApp::OnRun() and 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 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 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 event loop. To deal with the exceptions which may arise during the program
startup and/or shutdown you should insert try/catch clauses in startup and/or shutdown you should insert try/catch clauses in
wxApp::OnInit() and/or wxApp::OnExit() as well. wxApp::OnInit() and/or wxApp::OnExit() as well.
Finally, you may also want to continue running even when certain exceptions 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 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 single class (or only in the classes derived from it), you may centralize your
exception handling code in wxApp::ProcessEvent exception handling code in wxApp::ProcessEvent
method of this class. If this is impractical, you may also consider overriding method of this class. If this is impractical, you may also consider overriding
the wxApp::HandleEvent() which allows you to handle the wxApp::HandleEvent() which allows you to handle
all the exceptions thrown by any event handler. 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 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 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 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 Windows or run @c configure with @c --enable-exceptions argument
under Unix. under Unix.
On the other hand, if you do not plan to use exceptions, setting this 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 flag to 0 or using @c --disable-exceptions could result in a leaner and
slightly faster library. slightly faster library.
As for any other library feature, there is a sample (@c except) 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. 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. wxWidgets provides some functions and classes to facilitate working with files.
As usual, the accent is put on cross-platform features which explains, for As usual, the accent is put on cross-platform features which explains, for
example, the wxTextFile class which may be used to convert example, the wxTextFile class which may be used to convert
between different types of text files (DOS/Unix/Mac). 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 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 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 using standard C functions, has error checking (in case of an error a message
is logged using wxLog facilities) and closes the file is logged using wxLog facilities) and closes the file
automatically in the destructor which may be quite convenient. automatically in the destructor which may be quite convenient.
wxTempFile is a very small file designed to make replacing the files contents wxTempFile is a very small file designed to make replacing the files contents
safer - see its documentation for more details. safer - see its documentation for more details.
wxTextFile is a general purpose class for working with small text files on line 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 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 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 native" line termination characters and write them as "native" files if needed
(in fact, the files may be written in any format). (in fact, the files may be written in any format).
wxDir is a helper class for enumerating the files or subdirectories of a 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 directory. It may be used to enumerate all files, only files satisfying the
given template mask or only non-hidden files. 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 The wxHTML library uses a @b virtual file systems mechanism
similar to the one used in Midnight Commander, Dos Navigator, similar to the one used in Midnight Commander, Dos Navigator,
FAR or almost any modern file manager. It allows the user to access 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 data stored in archives as if they were ordinary files. On-the-fly
generated files that exist only in memory are also supported. generated files that exist only in memory are also supported.
@li @ref overview_fs_classes @li @ref overview_fs_classes
@li @ref overview_fs_locations @li @ref overview_fs_locations
@li @ref overview_fs_combined @li @ref overview_fs_combined
@li @ref overview_fs_wxhtmlfs @li @ref overview_fs_wxhtmlfs
@li @ref overview_fs_init @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). 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 Its main methods are ChangePathTo() and OpenFile(). This class
is most often used by the end user. 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 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 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 wxFileSystem's AddHandler() method. In the new handler you only need to
override the OpenFile() and CanOpen() methods. 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". 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". 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". 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. It is used by 'local' protocols such as ZIP.
See Combined Protocols paragraph for details. 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 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: protocols - for example you may want to access files in a ZIP archive:
file:archives/cpp_doc.zip#zip:reference/fopen.htm#syntax file:archives/cpp_doc.zip#zip:reference/fopen.htm#syntax
In this example, the protocol is "zip", right location is In this example, the protocol is "zip", right location is
"reference/fopen.htm", anchor is "syntax" and left location "reference/fopen.htm", anchor is "syntax" and left location
is "file:archives/cpp_doc.zip". 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 A handler for archives such as zip
and tar. Include file is wx/fs_arc.h. URLs examples: and tar. Include file is wx/fs_arc.h. URLs examples:
"archive.zip#zip:filename", "archive.tar.gz#gzip:#tar:filename". "archive.zip#zip:filename", "archive.tar.gz#gzip:#tar:filename".
@li @b wxFilterFSHandler: @li @b wxFilterFSHandler:
A handler for compression schemes such A handler for compression schemes such
as gzip. Header is wx/fs_filter.h. URLs are in the form, e.g.: as gzip. Header is wx/fs_filter.h. URLs are in the form, e.g.:
"document.ps.gz#gzip:". "document.ps.gz#gzip:".
@li @b wxInternetFSHandler: @li @b wxInternetFSHandler:
A handler for accessing documents A handler for accessing documents
via HTTP or FTP protocols. Include file is wx/fs_inet.h. via HTTP or FTP protocols. Include file is wx/fs_inet.h.
@li @b wxMemoryFSHandler: @li @b wxMemoryFSHandler:
This handler allows you to access This handler allows you to access
data stored in memory (such as bitmaps) as if they were regular files. data stored in memory (such as bitmaps) as if they were regular files.
See wxMemoryFSHandler for details. See wxMemoryFSHandler for details.
Include file is wx/fs_mem.h. URL is prefixed with memory:, e.g. Include file is wx/fs_mem.h. URL is prefixed with memory:, e.g.
"memory:myfile.htm" "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 @code
#include <wx/fs_mem.h> #include <wx/fs_mem.h>
... ...
bool MyApp::OnInit() bool MyApp::OnInit()
{ {
wxFileSystem::AddHandler(new wxMemoryFSHandler); wxFileSystem::AddHandler(new wxMemoryFSHandler);
... ...
} }
@endcode @endcode
*/ */

View File

@@ -8,79 +8,79 @@
/** /**
@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_intro
@li @ref overview_font_nativeinfo @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 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 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): the following parameters (not all of them have to be specified, of course):
@beginDefList @beginDefList
@itemdef{Point size, This is the standard way of referring to text size.} @itemdef{Point size, This is the standard way of referring to text size.}
@itemdef{Family, @itemdef{Family,
Supported families are: Supported families are:
@b wxDEFAULT, @b wxDECORATIVE, @b wxROMAN, @b wxSCRIPT, @b wxSWISS, @b wxMODERN. @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.} @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{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{Weight, The value can be @b wxNORMAL, @b wxLIGHT or @b wxBOLD.}
@itemdef{Underlining, The value can be @true or @false.} @itemdef{Underlining, The value can be @true or @false.}
@itemdef{Face name, @itemdef{Face name,
An optional string specifying the actual typeface to be used. If @NULL, An optional string specifying the actual typeface to be used. If @NULL,
a default typeface will chosen based on the family.} a default typeface will chosen based on the family.}
@itemdef{Encoding, @itemdef{Encoding,
The font encoding (see @b wxFONTENCODING_XXX The font encoding (see @b wxFONTENCODING_XXX
constants and the @ref overview_fontencoding for more details)} constants and the @ref overview_fontencoding for more details)}
@endDefList @endDefList
Specifying a family, rather than a specific typeface name, ensures a degree of 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 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 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 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 and this is where using the native font descriptions may be helpful - see
below. below.
Under Windows, the face name can be one of the installed fonts on the user's 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 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 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 the family name with any file that might be transported to a different Windows
machine or other platform. 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 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 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 Windows, the unit for text is points but the text is scaled according to the
current mapping mode. However, user scaling on a device context will also current mapping mode. However, user scaling on a device context will also
scale fonts under both environments. scale fonts under both environments.
@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. 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 This is the only acceptable solution if the user is allowed to choose the font
using the wxFontDialog because the selected font cannot using the wxFontDialog because the selected font cannot
be described using only the family name and so, if only family name is stored 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 permanently, the user would almost surely see a different font in the program
later. later.
Instead, you should store the value returned by wxFont::GetNativeFontInfoDesc and pass Instead, you should store the value returned by wxFont::GetNativeFontInfoDesc and pass
it to wxFont::SetNativeFontInfo later to recreate exactly the same font. 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 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 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 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 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 are available for all the ports and should be used to make your program work
correctly when they are implemented later. correctly when they are implemented later.
*/ */

View File

@@ -8,82 +8,82 @@
/** /**
@page overview_grid wxGrid Overview @page overview_grid wxGrid Overview
Classes: wxGrid Classes: wxGrid
@li @ref overview_grid_intro @li @ref overview_grid_intro
@li @ref overview_grid_simpleexample @li @ref overview_grid_simpleexample
@li @ref overview_grid_complexexample @li @ref overview_grid_complexexample
@li @ref overview_grid_classrelations @li @ref overview_grid_classrelations
@li @ref overview_grid_keyboardmouse @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 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 code. This example shows how you might create a grid in a frame or
dialog constructor and illustrates some of the formatting functions. dialog constructor and illustrates some of the formatting functions.
@code @code
// Create a wxGrid object // Create a wxGrid object
grid = new wxGrid( this, grid = new wxGrid( this,
-1, -1,
wxPoint( 0, 0 ), wxPoint( 0, 0 ),
wxSize( 400, 300 ) ); wxSize( 400, 300 ) );
// Then we call CreateGrid to set the dimensions of the grid // Then we call CreateGrid to set the dimensions of the grid
// (100 rows and 10 columns in this example) // (100 rows and 10 columns in this example)
grid->CreateGrid( 100, 10 ); grid->CreateGrid( 100, 10 );
// We can set the sizes of individual rows and columns // We can set the sizes of individual rows and columns
// in pixels // in pixels
grid->SetRowSize( 0, 60 ); grid->SetRowSize( 0, 60 );
grid->SetColSize( 0, 120 ); grid->SetColSize( 0, 120 );
// And set grid cell contents as strings // And set grid cell contents as strings
grid->SetCellValue( 0, 0, "wxGrid is good" ); grid->SetCellValue( 0, 0, "wxGrid is good" );
// We can specify that some cells are read->only // We can specify that some cells are read->only
grid->SetCellValue( 0, 3, "This is read->only" ); grid->SetCellValue( 0, 3, "This is read->only" );
grid->SetReadOnly( 0, 3 ); grid->SetReadOnly( 0, 3 );
// Colours can be specified for grid cell contents // Colours can be specified for grid cell contents
grid->SetCellValue(3, 3, "green on grey"); grid->SetCellValue(3, 3, "green on grey");
grid->SetCellTextColour(3, 3, *wxGREEN); grid->SetCellTextColour(3, 3, *wxGREEN);
grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY); grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY);
// We can specify the some cells will store numeric // We can specify the some cells will store numeric
// values rather than strings. Here we set grid column 5 // values rather than strings. Here we set grid column 5
// to hold floating point values displayed with width of 6 // to hold floating point values displayed with width of 6
// and precision of 2 // and precision of 2
grid->SetColFormatFloat(5, 6, 2); grid->SetColFormatFloat(5, 6, 2);
grid->SetCellValue(0, 6, "3.1415"); 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,173 +8,173 @@
/** /**
@page overview_helloworld Hello World Example @page overview_helloworld Hello World Example
Many people have requested a mini-sample to be published here Many people have requested a mini-sample to be published here
so that some quick judgment concerning syntax so that some quick judgment concerning syntax
and basic principles can be made, so here we go. and basic principles can be made, so here we go.
First, you have to include wxWidgets' header files, of course. This can 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>) 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 or using one global include (<tt>@#include "wx/wx.h"</tt>). This is
also useful on platforms which support precompiled headers such also useful on platforms which support precompiled headers such
as all major compilers on the Windows platform and GCC on Unix platforms. as all major compilers on the Windows platform and GCC on Unix platforms.
@code @code
// //
// file name: hworld.cpp // file name: hworld.cpp
// //
// purpose: wxWidgets "Hello world" // purpose: wxWidgets "Hello world"
// //
// For compilers that support precompilation, includes "wx/wx.h". // For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
@endcode @endcode
Practically every app should define a new class derived from wxApp. Practically every app should define a new class derived from wxApp.
By overriding wxApp's OnInit() the program can be initialized, By overriding wxApp's OnInit() the program can be initialized,
e.g. by creating a new main window. e.g. by creating a new main window.
@code @code
class MyApp: public wxApp class MyApp: public wxApp
{ {
virtual bool OnInit(); virtual bool OnInit();
}; };
@endcode @endcode
The main window is created by deriving a class from wxFrame and 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 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 that wishes to respond to any "event" (such as mouse clicks or
messages from the menu or a button) must declare an event table messages from the menu or a button) must declare an event table
using the macro below. using the macro below.
Finally, the way to react to such events must be done in "handlers". 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 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. displaying an "About" window. These handlers should not be virtual.
@code @code
class MyFrame: public wxFrame class MyFrame: public wxFrame
{ {
public: public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
void OnQuit(wxCommandEvent& event); void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event); void OnAbout(wxCommandEvent& event);
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
@endcode @endcode
In order to be able to react to a menu command, it must be given a unique 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. identifier such as a const or an enum.
@code @code
enum enum
{ {
ID_Quit = 1, ID_Quit = 1,
ID_About, ID_About,
}; };
@endcode @endcode
We then proceed to actually implement an event table in which the events We then proceed to actually implement an event table in which the events
are routed to their respective handler functions in the class MyFrame. are routed to their respective handler functions in the class MyFrame.
There are predefined macros for routing all common events, ranging from 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 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 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 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. 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 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, 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 which holds various information about the event (such as the ID of and a
pointer to the class, which emitted the event). pointer to the class, which emitted the event).
@code @code
BEGIN_EVENT_TABLE(MyFrame, wxFrame) BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(ID_Quit, MyFrame::OnQuit) EVT_MENU(ID_Quit, MyFrame::OnQuit)
EVT_MENU(ID_About, MyFrame::OnAbout) EVT_MENU(ID_About, MyFrame::OnAbout)
END_EVENT_TABLE() END_EVENT_TABLE()
@endcode @endcode
As in all programs there must be a "main" function. Under wxWidgets main is implemented 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. using this macro, which creates an application instance and starts the program.
@code @code
IMPLEMENT_APP(MyApp) IMPLEMENT_APP(MyApp)
@endcode @endcode
As mentioned above, wxApp::OnInit() is called upon startup and should be As mentioned above, wxApp::OnInit() is called upon startup and should be
used to initialize the program, maybe showing a "splash screen" and creating 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") 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 and a position and start-up size. One frame can also be declared to be the
top window. Returning @true indicates a successful initialization. top window. Returning @true indicates a successful initialization.
@code @code
bool MyApp::OnInit() bool MyApp::OnInit()
{ {
MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) ); MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) );
frame->Show( true ); frame->Show( true );
SetTopWindow( frame ); SetTopWindow( frame );
return true; return true;
} }
@endcode @endcode
In the constructor of the main window (or later on) we create a menu with two menu 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 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. to be "announced" to the frame with respective calls.
@code @code
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size) : wxFrame((wxFrame *)NULL, -1, title, pos, size)
{ {
wxMenu *menuFile = new wxMenu; wxMenu *menuFile = new wxMenu;
menuFile->Append( ID_About, "" ); menuFile->Append( ID_About, "" );
menuFile->AppendSeparator(); menuFile->AppendSeparator();
menuFile->Append( ID_Quit, "E" ); menuFile->Append( ID_Quit, "E" );
wxMenuBar *menuBar = new wxMenuBar; wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append( menuFile, "" ); menuBar->Append( menuFile, "" );
SetMenuBar( menuBar ); SetMenuBar( menuBar );
CreateStatusBar(); CreateStatusBar();
SetStatusText( "Welcome to wxWidgets!" ); SetStatusText( "Welcome to wxWidgets!" );
} }
@endcode @endcode
Here are the actual event handlers. MyFrame::OnQuit() closes the main window 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 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 power such as after asking "Do you really want to close?". If there is no other
main window left, the application will quit. main window left, the application will quit.
@code @code
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{ {
Close( true ); Close( true );
} }
@endcode @endcode
MyFrame::OnAbout() will display a small window with some text in it. In this MyFrame::OnAbout() will display a small window with some text in it. In this
case a typical "About" window with information about the program. case a typical "About" window with information about the program.
@code @code
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{ {
wxMessageBox( "This is a wxWidgets' Hello world sample", wxMessageBox( "This is a wxWidgets' Hello world sample",
"About Hello World", wxOK | wxICON_INFORMATION ); "About Hello World", wxOK | wxICON_INFORMATION );
} }
@endcode @endcode
*/ */

View File

@@ -8,579 +8,579 @@
/** /**
@page overview_html wxHTML Overview @page overview_html wxHTML Overview
The wxHTML library provides classes for parsing and displaying HTML. 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 It is not intended to be a high-end HTML browser. If you are looking for
something like that try <http://www.mozilla.org/>. something like that try <http://www.mozilla.org/>.
wxHTML can be used as a generic rich text viewer - for example to display 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 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 database searching. There is a wxFileSystem class which allows you to use
your own virtual file systems. your own virtual file systems.
wxHtmlWindow supports tag handlers. This means that you can easily wxHtmlWindow supports tag handlers. This means that you can easily
extend wxHtml library with new, unsupported tags. Not only that, extend wxHtml library with new, unsupported tags. Not only that,
you can even use your own application-specific tags! 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_quickstart
@li @ref overview_html_printing @li @ref overview_html_printing
@li @ref overview_html_helpformats @li @ref overview_html_helpformats
@li @ref overview_html_filters @li @ref overview_html_filters
@li @ref overview_html_cells @li @ref overview_html_cells
@li @ref overview_html_handlers @li @ref overview_html_handlers
@li @ref overview_html_supptags @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. It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage.
LoadPage loads and displays HTML file while SetPage displays directly the LoadPage loads and displays HTML file while SetPage displays directly the
passed @b string. See the example: passed @b string. See the example:
@code @code
mywin -> LoadPage("test.htm"); mywin -> LoadPage("test.htm");
mywin -> SetPage("htmlbody" mywin -> SetPage("htmlbody"
"h1Error/h1" "h1Error/h1"
"Some error occurred :-H)" "Some error occurred :-H)"
"/body/hmtl"); "/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 Because wxHtmlWindow is derived from wxScrolledWindow and not from
wxFrame, it doesn't have visible frame. But the user usually wants to see 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 title of HTML page displayed somewhere and the frame's titlebar is
the ideal place for it. the ideal place for it.
wxHtmlWindow provides 2 methods in order to handle this: wxHtmlWindow provides 2 methods in order to handle this:
wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar.
See the example: See the example:
@code @code
html = new wxHtmlWindow(this); html = new wxHtmlWindow(this);
html -> SetRelatedFrame(this, "HTML : %%s"); html -> SetRelatedFrame(this, "HTML : %%s");
html -> SetRelatedStatusBar(0); html -> SetRelatedStatusBar(0);
@endcode @endcode
The first command associates the HTML object with its parent frame The first command associates the HTML object with its parent frame
(this points to wxFrame object there) and sets the format of the title. (this points to wxFrame object there) and sets the format of the title.
Page title "Hello, world!" will be displayed as "HTML : Hello, world!" Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
in this example. in this example.
The second command sets which frame's status bar should be used to display 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). 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 You can customize wxHtmlWindow by setting font size, font face and
borders (space between border of window and displayed HTML). Related functions: borders (space between border of window and displayed HTML). Related functions:
@li wxHtmlWindow::SetFonts @li wxHtmlWindow::SetFonts
@li wxHtmlWindow::SetBorders @li wxHtmlWindow::SetBorders
@li wxHtmlWindow::ReadCustomization @li wxHtmlWindow::ReadCustomization
@li wxHtmlWindow::WriteCustomization @li wxHtmlWindow::WriteCustomization
The last two functions are used to store user customization info wxConfig stuff 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). (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 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 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 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 about deriving from the wxPrintout class at all. It is only a simple wrapper around the
wxHtmlPrintout, normal wxWidgets printout class. wxHtmlPrintout, normal wxWidgets printout class.
And finally there is the low level class wxHtmlDCRenderer which you can use to And finally there is the low level class wxHtmlDCRenderer which you can use to
render HTML into a rectangular area on any DC. render HTML into a rectangular area on any DC.
It supports rendering into multiple rectangles with the same It supports rendering into multiple rectangles with the same
width. (The most common use of this is placing one rectangle on each page or width. (The most common use of this is placing one rectangle on each page or
printing into two columns.) 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. wxHTML library uses a reduced version of MS HTML Workshop format.
Tex2RTF can produce these files when generating HTML, if you set Tex2RTF can produce these files when generating HTML, if you set
@b htmlWorkshopFiles to @true in your tex2rtf.ini file. @b htmlWorkshopFiles to @true in your tex2rtf.ini file.
(See wxHtmlHelpController for help controller description.) (See wxHtmlHelpController for help controller description.)
A @b book consists of three files: the header file, the contents file A @b book consists of three files: the header file, the contents file
and the index file. and the index file.
You can make a regular zip archive of these files, plus the HTML and any 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 image files, for wxHTML (or helpview) to read; and the @c .zip file can
optionally be renamed to @c .htb. 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 The header file must contain these lines (and may contain additional lines
which are ignored): which are ignored):
@code @code
Contents file=filename.hhc Contents file=filename.hhc
Index file=filename.hhk Index file=filename.hhk
Title=title of your book Title=title of your book
Default topic=default page to be displayed.htm Default topic=default page to be displayed.htm
@endcode @endcode
All filenames (including the Default topic) are relative to the All filenames (including the Default topic) are relative to the
location of the @c .hhp file. 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 @code
Charset=rfc_charset Charset=rfc_charset
@endcode @endcode
which specifies what charset (e.g. "iso8859_1") was used in contents which specifies what charset (e.g. "iso8859_1") was used in contents
and index files. Please note that this line is incompatible with and index files. Please note that this line is incompatible with
MS HTML Help Workshop and it would either silently remove it or complain MS HTML Help Workshop and it would either silently remove it or complain
with some error. See also @ref overview_nonenglish. 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. 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): It contains exactly one list (@c &lt;ul&gt;....@c &lt;/ul&gt; statement):
@code @code
<ul> <ul>
<li><object type="text/sitemap"> <li><object type="text/sitemap">
<param name="Name" value="@topic name@"> <param name="Name" value="@topic name@">
<param name="ID" value=@numeric_id@> <param name="ID" value=@numeric_id@>
<param name="Local" value="@filename.htm@"> <param name="Local" value="@filename.htm@">
</object> </object>
<li><object type="text/sitemap"> <li><object type="text/sitemap">
<param name="Name" value="@topic name@"> <param name="Name" value="@topic name@">
<param name="ID" value=@numeric_id@> <param name="ID" value=@numeric_id@>
<param name="Local" value="@filename.htm@"> <param name="Local" value="@filename.htm@">
</object> </object>
... ...
</ul> </ul>
@endcode @endcode
You can modify value attributes of param tags. You can modify value attributes of param tags.
The <em>topic name</em> is name of chapter/topic as is displayed in 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) 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). 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 @code
<ul> <ul>
<li><object type="text/sitemap"> <li><object type="text/sitemap">
<param name="Name" value="Top node"> <param name="Name" value="Top node">
<param name="Local" value="top.htm"> <param name="Local" value="top.htm">
</object> </object>
<ul> <ul>
<li><object type="text/sitemap"> <li><object type="text/sitemap">
<param name="Name" value="subnode in topnode"> <param name="Name" value="subnode in topnode">
<param name="Local" value="subnode1.htm"> <param name="Local" value="subnode1.htm">
</object> </object>
... ...
</ul> </ul>
<li><object type="text/sitemap"> <li><object type="text/sitemap">
<param name="Name" value="Another Top"> <param name="Name" value="Another Top">
<param name="Local" value="top2.htm"> <param name="Local" value="top2.htm">
</object> </object>
... ...
</ul> </ul>
@endcode @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 Index files have same format as contents file except that ID params are ignored
and sublists are @b not allowed. 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 The wxHTML library provides a mechanism for reading and displaying
files of many different file formats. files of many different file formats.
wxHtmlWindow::LoadPage can load not only HTML files but any known file. 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 To make a file type known to wxHtmlWindow you must create a wxHtmlFilter filter and
register it using wxHtmlWindow::AddFilter. 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 This article describes mechanism used by wxHtmlWinParser and
wxHtmlWindow to parse and display HTML documents. 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 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 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 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). "magic" cells with zero dimensions - e.g. colour changers or font changers).
See wxHtmlCell. 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 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). 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 See wxHtmlContainerCell, wxHtmlCell::Layout. This image shows the cells and
containers: 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. wxHtmlWinParser provides a user-friendly way of managing containers.
It is based on the idea of opening and closing containers. It is based on the idea of opening and closing containers.
Use wxHtmlWinParser::OpenContainer to open new a container @e within an already Use wxHtmlWinParser::OpenContainer to open new a container @e within an already
opened container. opened container.
This new container is a @e sub-container of the old one. (If you want to create a 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();.) new container with the same depth level you can call @c CloseContainer(); OpenContainer();.)
Use wxHtmlWinParser::CloseContainer to close the container. Use wxHtmlWinParser::CloseContainer to close the container.
This doesn't create a new container with same depth level but it returns "control" This doesn't create a new container with same depth level but it returns "control"
to the parent container. See explanation: 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 There clearly must be same number of calls to OpenContainer as to
CloseContainer. 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) This code creates a new paragraph (container at same depth level)
with "Hello, world!": with "Hello, world!":
@code @code
m_WParser -> CloseContainer(); m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer(); c = m_WParser -> OpenContainer();
m_WParser -> AddText("Hello, "); m_WParser -> AddText("Hello, ");
m_WParser -> AddText("world!"); m_WParser -> AddText("world!");
m_WParser -> CloseContainer(); m_WParser -> CloseContainer();
m_WParser -> OpenContainer(); m_WParser -> OpenContainer();
@endcode @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. 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 We closed it, created our own container, then closed our container and opened
new container. new container.
The result was that we had @e same depth level after executing. The result was that we had @e same depth level after executing.
This is general rule that should be followed by tag handlers: This is general rule that should be followed by tag handlers:
leave depth level of containers unmodified (in other words, number of leave depth level of containers unmodified (in other words, number of
OpenContainer and CloseContainer calls should be same within OpenContainer and CloseContainer calls should be same within
wxHtmlTagHandler::HandleTag's body). wxHtmlTagHandler::HandleTag's body).
Notice that it would be usually better to use wxHtmlContainerCell::InsertCell instead Notice that it would be usually better to use wxHtmlContainerCell::InsertCell instead
of adding text to the parser directly. 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. The wxHTML library provides architecture of pluggable @e tag handlers.
Tag handler is class that understands particular HTML tag (or tags) and is Tag handler is class that understands particular HTML tag (or tags) and is
able to interpret it. able to interpret it.
wxHtmlWinParser has a static table of @b modules. wxHtmlWinParser has a static table of @b modules.
Each module contains one or more tag handlers. Each time a new wxHtmlWinParser Each module contains one or more tag handlers. Each time a new wxHtmlWinParser
object is constructed all modules are scanned and handlers are added object is constructed all modules are scanned and handlers are added
to wxHtmlParser's list of available handlers (note: wxHtmlParser's list to wxHtmlParser's list of available handlers (note: wxHtmlParser's list
is non-static). 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 Save state of parent parser into local variables
@li Change parser state according to tag's params @li Change parser state according to tag's params
@li Parse text between the tag and paired ending tag (if present) @li Parse text between the tag and paired ending tag (if present)
@li Restore original parser state @li Restore original parser state
See wxHtmlWinParser for methods for modifying parser's state. See wxHtmlWinParser for methods for modifying parser's state.
In general you can do things like opening/closing containers, changing colors, fonts etc. 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 @code
#include <mod_templ.h> #include <mod_templ.h>
#include <forcelink.h> #include <forcelink.h>
FORCE_LINK_ME(yourmodulefilenamewithoutcpp) FORCE_LINK_ME(yourmodulefilenamewithoutcpp)
@endcode @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 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 for details). Handler definition must start with @b TAG_HANDLER_BEGIN macro
and end with @b TAG_HANDLER_END macro. and end with @b TAG_HANDLER_END macro.
I strongly recommend to have a look at @e include/wxhtml/mod_templ.h file. I strongly recommend to have a look at @e include/wxhtml/mod_templ.h file.
Otherwise you won't understand the structure of macros. Otherwise you won't understand the structure of macros.
See macros reference: See macros reference:
@li @b TAG_HANDLER_BEGIN(@e name, @e tags): @li @b TAG_HANDLER_BEGIN(@e name, @e tags):
Starts handler definition. @e name is handler identifier (in fact Starts handler definition. @e name is handler identifier (in fact
part of class name), @e tags is string containing list of tags part of class name), @e tags is string containing list of tags
supported by this handler (in uppercase). This macro derives new class from supported by this handler (in uppercase). This macro derives new class from
wxHtmlWinTagHandler and implements it is wxHtmlTagHandler::GetSupportedTags method. wxHtmlWinTagHandler and implements it is wxHtmlTagHandler::GetSupportedTags method.
Example: TAG_HANDLER_BEGIN(FONTS, "B,I,U,T") 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 This macro starts block of variables definitions. (Variables are identical
to class attributes.) Example: to class attributes.) Example:
@code @code
TAG_HANDLER_BEGIN(VARS_ONLY, "CRAZYTAG") TAG_HANDLER_BEGIN(VARS_ONLY, "CRAZYTAG")
TAG_HANDLER_VARS TAG_HANDLER_VARS
int my_int_var; int my_int_var;
wxString something_else; wxString something_else;
TAG_HANDLER_END(VARS_ONLY) TAG_HANDLER_END(VARS_ONLY)
@endcode @endcode
This macro is used only in rare cases. 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 This macro supplies object constructor. @e name is same name as the one
from TAG_HANDLER_BEGIN macro. Body of constructor follow after from TAG_HANDLER_BEGIN macro. Body of constructor follow after
this macro (you must use { and } ). Example: this macro (you must use { and } ). Example:
@code @code
TAG_HANDLER_BEGIN(VARS2, "CRAZYTAG") TAG_HANDLER_BEGIN(VARS2, "CRAZYTAG")
TAG_HANDLER_VARS TAG_HANDLER_VARS
int my_int_var; int my_int_var;
TAG_HANDLER_CONSTR(vars2) TAG_HANDLER_CONSTR(vars2)
{ // !!!!!! { // !!!!!!
my_int_var = 666; my_int_var = 666;
} // !!!!!! } // !!!!!!
TAG_HANDLER_END(VARS2) TAG_HANDLER_END(VARS2)
@endcode @endcode
Never used in wxHTML :-) 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 This is very important macro. It defines wxHtmlTagHandler::HandleTag
method. @e varib is name of parameter passed to the method, usually method. @e varib is name of parameter passed to the method, usually
@e tag. Body of method follows after this macro. @e tag. Body of method follows after this macro.
Note than you must use { and } ! Note than you must use { and } !
Example: Example:
@code @code
TAG_HANDLER_BEGIN(TITLE, "TITLE") TAG_HANDLER_BEGIN(TITLE, "TITLE")
TAG_HANDLER_PROC(tag) TAG_HANDLER_PROC(tag)
{ {
printf("TITLE found...\n"); printf("TITLE found...\n");
} }
TAG_HANDLER_END(TITLE) TAG_HANDLER_END(TITLE)
@endcode @endcode
@li @b TAG_HANDLER_END(@e name): @li @b TAG_HANDLER_END(@e name):
Ends definition of tag handler @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 You can use set of 3 macros TAGS_MODULE_BEGIN, TAGS_MODULE_ADD and
TAGS_MODULE_END to inherit new module from TAGS_MODULE_END to inherit new module from
wxHtmlTagsModule and to create instance of it. 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. 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. 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. Ends the definition of module.
Example: Example:
@code @code
TAGS_MODULE_BEGIN(Examples) TAGS_MODULE_BEGIN(Examples)
TAGS_MODULE_ADD(VARS_ONLY) TAGS_MODULE_ADD(VARS_ONLY)
TAGS_MODULE_ADD(VARS2) TAGS_MODULE_ADD(VARS2)
TAGS_MODULE_ADD(TITLE) TAGS_MODULE_ADD(TITLE)
TAGS_MODULE_END(Examples) TAGS_MODULE_END(Examples)
@endcode @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 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. 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). (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 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. either @c paramname="paramvalue" or @c paramname=paramvalue - these two are equivalent.
Unless stated otherwise, wxHTML is case-insensitive. 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 @code
[alignment] CENTER [alignment] CENTER
LEFT LEFT
RIGHT RIGHT
JUSTIFY JUSTIFY
[v_alignment] TOP [v_alignment] TOP
BOTTOM BOTTOM
CENTER CENTER
[color] HTML 4.0-compliant colour specification [color] HTML 4.0-compliant colour specification
[fontsize] -2 [fontsize] -2
-1 -1
+0 +0
+1 +1
+2 +2
+3 +3
+4 +4
1 1
2 2
3 3
4 4
5 5
6 6
7 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 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 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 @code
A NAME=[string] A NAME=[string]
HREF=[url] HREF=[url]
TARGET=[target window spec] TARGET=[target window spec]
ADDRESS ADDRESS
AREA SHAPE=POLY AREA SHAPE=POLY
SHAPE=CIRCLE SHAPE=CIRCLE
SHAPE=RECT SHAPE=RECT
COORDS=[coords] COORDS=[coords]
HREF=[url] HREF=[url]
B B
BIG BIG
BLOCKQUOTE BLOCKQUOTE
BODY TEXT=[color] BODY TEXT=[color]
LINK=[color] LINK=[color]
BGCOLOR=[color] BGCOLOR=[color]
BR ALIGN=[alignment] BR ALIGN=[alignment]
CENTER CENTER
CITE CITE
CODE CODE
DD DD
DIV ALIGN=[alignment] DIV ALIGN=[alignment]
DL DL
DT DT
EM EM
FONT COLOR=[color] FONT COLOR=[color]
SIZE=[fontsize] SIZE=[fontsize]
FACE=[comma-separated list of facenames] FACE=[comma-separated list of facenames]
HR ALIGN=[alignment] HR ALIGN=[alignment]
SIZE=[pixels] SIZE=[pixels]
WIDTH=[percent|pixels] WIDTH=[percent|pixels]
NOSHADE NOSHADE
H1 H1
H2 H2
H3 H3
H4 H4
H5 H5
H6 H6
I I
IMG SRC=[url] IMG SRC=[url]
WIDTH=[pixels] WIDTH=[pixels]
HEIGHT=[pixels] HEIGHT=[pixels]
ALIGN=TEXTTOP ALIGN=TEXTTOP
ALIGN=CENTER ALIGN=CENTER
ALIGN=ABSCENTER ALIGN=ABSCENTER
ALIGN=BOTTOM ALIGN=BOTTOM
USEMAP=[url] USEMAP=[url]
KBD KBD
LI LI
MAP NAME=[string] MAP NAME=[string]
META HTTP-EQUIV="Content-Type" META HTTP-EQUIV="Content-Type"
CONTENT=[string] CONTENT=[string]
OL OL
P ALIGN=[alignment] P ALIGN=[alignment]
PRE PRE
SAMP SAMP
SMALL SMALL
STRIKE STRIKE
STRONG STRONG
SUB SUB
SUP SUP
TABLE ALIGN=[alignment] TABLE ALIGN=[alignment]
WIDTH=[percent|pixels] WIDTH=[percent|pixels]
BORDER=[pixels] BORDER=[pixels]
VALIGN=[v_alignment] VALIGN=[v_alignment]
BGCOLOR=[color] BGCOLOR=[color]
CELLSPACING=[pixels] CELLSPACING=[pixels]
CELLPADDING=[pixels] CELLPADDING=[pixels]
TD ALIGN=[alignment] TD ALIGN=[alignment]
VALIGN=[v_alignment] VALIGN=[v_alignment]
BGCOLOR=[color] BGCOLOR=[color]
WIDTH=[percent|pixels] WIDTH=[percent|pixels]
COLSPAN=[pixels] COLSPAN=[pixels]
ROWSPAN=[pixels] ROWSPAN=[pixels]
NOWRAP NOWRAP
TH ALIGN=[alignment] TH ALIGN=[alignment]
VALIGN=[v_alignment] VALIGN=[v_alignment]
BGCOLOR=[color] BGCOLOR=[color]
WIDTH=[percent|pixels] WIDTH=[percent|pixels]
COLSPAN=[pixels] COLSPAN=[pixels]
ROWSPAN=[pixels] ROWSPAN=[pixels]
TITLE TITLE
TR ALIGN=[alignment] TR ALIGN=[alignment]
VALIGN=[v_alignment] VALIGN=[v_alignment]
BGCOLOR=[color] BGCOLOR=[color]
TT TT
U U
UL UL
@endcode @endcode
*/ */

View File

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