removed trailing whitespace in Doxygen files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -217,7 +217,7 @@ The following are relevant to the GDI (Graphics Device Interface).
|
||||
|
||||
@warning These functions are deprecated, use the wxClipboard class instead.
|
||||
|
||||
These clipboard functions are implemented for Windows only.
|
||||
These clipboard functions are implemented for Windows only.
|
||||
|
||||
@header{wx/clipbrd.h}
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
@section page_cppconst_guisystem GUI system
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
|
||||
@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
|
||||
@@ -48,7 +48,7 @@
|
||||
@itemdef{__WXMOTIF20__, Motif 2.0 or higher}
|
||||
@itemdef{__WXMAC__, Mac OS all targets}
|
||||
@itemdef{__WXMAC_CLASSIC__, MacOS for Classic}
|
||||
@itemdef{__WXMAC_CARBON__, MacOS for Carbon CFM (running under Classic or OSX)
|
||||
@itemdef{__WXMAC_CARBON__, MacOS for Carbon CFM (running under Classic or OSX)
|
||||
or true OS X Mach-O Builds}
|
||||
@itemdef{__WXMAC_OSX__, MacOS X Carbon Mach-O Builds}
|
||||
@itemdef{__WXMGL__, SciTech Soft MGL (__WXUNIVERSAL__ will be also defined)}
|
||||
@@ -64,33 +64,33 @@
|
||||
to one of the symbols above so this should be tested first.}
|
||||
@itemdef{__X__, any X11-based GUI toolkit except GTK+}
|
||||
@endDefList
|
||||
|
||||
There are two wxWidgets ports to Mac OS. One of them, wxMac, exists in two versions:
|
||||
Classic and Carbon. The Classic version is the only one to work on Mac OS version 8.
|
||||
|
||||
There are two wxWidgets ports to Mac OS. One of them, wxMac, exists in two versions:
|
||||
Classic and Carbon. The Classic version is the only one to work on Mac OS version 8.
|
||||
The Carbon version may be built either as CFM or Mach-O (binary format, like ELF)
|
||||
and the former may run under OS 9 while the latter only runs under OS X.
|
||||
Finally, there is a new Cocoa port which can only be used under OS X. To
|
||||
summarize:
|
||||
|
||||
|
||||
@li If you want to test for all Mac platforms, classic and OS X, you
|
||||
should test both @c __WXMAC__ and @c __WXCOCOA__.
|
||||
@li If you want to test for any GUI Mac port under OS X, use
|
||||
@c __WXOSX__.
|
||||
@li If you want to test for any port under Mac OS X, including, for
|
||||
example, wxGTK and also wxBase, use @c __DARWIN__ (see below).
|
||||
|
||||
|
||||
The convention is to use the @c __WX prefix for these
|
||||
symbols, although this has not always been followed.
|
||||
|
||||
|
||||
|
||||
@section page_cppconst_os Operating systems
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{__APPLE__, any Mac OS version}
|
||||
@itemdef{__AIX__, AIX}
|
||||
@itemdef{__BSD__, Any *BSD system}
|
||||
@itemdef{__CYGWIN__, Cygwin: Unix on Win32}
|
||||
@itemdef{__DARWIN__, Mac OS X using the BSD Unix C library
|
||||
@itemdef{__DARWIN__, Mac OS X using the BSD Unix C library
|
||||
(as opposed to using the Metrowerks MSL C/C++ library)}
|
||||
@itemdef{__DATA_GENERAL__, DG-UX}
|
||||
@itemdef{__DOS_GENERAL__, DOS (used with wxMGL only)}
|
||||
@@ -116,12 +116,12 @@
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_cppconst_cpu Hardware architectures (CPU)
|
||||
|
||||
|
||||
Note that not all of these symbols are always defined, it depends on the
|
||||
compiler used.
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{__ALPHA__, DEC Alpha architecture}
|
||||
@itemdef{__INTEL__, Intel i386 or compatible}
|
||||
@@ -130,9 +130,9 @@
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_cppconst_hardware Hardware type
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{__SMARTPHONE__, Generic mobile devices with phone buttons and a small display}
|
||||
@itemdef{__PDA__, Personal digital assistant, usually with touch screen}
|
||||
@@ -144,9 +144,9 @@
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_cppconst_compiler Compilers
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{__BORLANDC__, Borland C++. The value of the macro corresponds
|
||||
to the compiler version: $500$ is $5.0$.}
|
||||
@@ -159,10 +159,10 @@
|
||||
@itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
|
||||
@itemdef{__SYMANTECC__, Symantec C++}
|
||||
@itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
|
||||
@itemdef{__VISUALC__, Microsoft Visual C++, see also wxCHECK_VISUALC_VERSION.
|
||||
The value of this macro corresponds to the compiler version:
|
||||
@c 1020 for @c 4.2 (the first supported version), @c 1100 for
|
||||
@c 5.0, @c 1200 for @c 6.0 and so on. For convenience, the symbols
|
||||
@itemdef{__VISUALC__, Microsoft Visual C++, see also wxCHECK_VISUALC_VERSION.
|
||||
The value of this macro corresponds to the compiler version:
|
||||
@c 1020 for @c 4.2 (the first supported version), @c 1100 for
|
||||
@c 5.0, @c 1200 for @c 6.0 and so on. For convenience, the symbols
|
||||
__VISUALCn__ are also defined for each major compiler version from
|
||||
5 to 9, i.e. you can use tests such @ifdef_ __VISUALC7__ to test
|
||||
for compiler version being precisely 7.}
|
||||
@@ -173,17 +173,17 @@
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
|
||||
@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
|
||||
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
|
||||
in @c setup.h or by running configure script) and which must be always
|
||||
defined as either $0$ or $1$, the @c wxHAS symbols are only defined if
|
||||
the corresponding feature is available and not defined at all otherwise.
|
||||
|
||||
|
||||
Currently the following symbols exist:
|
||||
|
||||
@beginDefList
|
||||
@@ -198,15 +198,15 @@
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_cppconst_miscellaneous Miscellaneous
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{__WXWINDOWS__,
|
||||
always defined in wxWidgets applications, see also wxCHECK_VERSION}
|
||||
@itemdef{__WXDEBUG__, defined in debug mode, undefined in release mode}
|
||||
@itemdef{wxUSE_XXX,
|
||||
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,
|
||||
use @if_ and not @ifdef_ to test for them)}
|
||||
@itemdef{WX_PRECOMP,
|
||||
@@ -227,20 +227,20 @@
|
||||
building wxBase code, either as a standalone library or as part of the
|
||||
monolithic wxWidgets library, defined as $0$ when building GUI library only)}
|
||||
@itemdef{wxNO_RTTI, is defined if the compiler RTTI support has been switched off}
|
||||
@itemdef{wxNO_EXCEPTIONS,
|
||||
@itemdef{wxNO_EXCEPTIONS,
|
||||
is defined if the compiler support for C++ exceptions has been switched off}
|
||||
@itemdef{wxNO_THREADS,
|
||||
@itemdef{wxNO_THREADS,
|
||||
if this macro is defined, the compilation options
|
||||
don't include compiler flags needed for multithreaded code generation. This
|
||||
implies that wxUSE_THREADS is $0$ and also that other (non-wx-based) threading
|
||||
packages cannot be used neither.}
|
||||
@itemdef{WXMAKINGDLL_XXX,
|
||||
@itemdef{WXMAKINGDLL_XXX,
|
||||
used internally and defined when building the
|
||||
library @c XXX as a DLL; when a monolithic wxWidgets build is used only a
|
||||
single @c WXMAKINGDLL symbol is defined}
|
||||
@itemdef{WXUSINGDLL,
|
||||
@itemdef{WXUSINGDLL,
|
||||
defined when compiling code which uses wxWidgets as a DLL/shared library}
|
||||
@itemdef{WXBUILDING,
|
||||
@itemdef{WXBUILDING,
|
||||
defined when building wxWidgets itself, whether as a static or shared library}
|
||||
@endDefList
|
||||
|
||||
|
@@ -10,12 +10,12 @@
|
||||
/**
|
||||
|
||||
@page page_keycodes Keycodes
|
||||
|
||||
|
||||
@header{wx/defs.h}
|
||||
|
||||
|
||||
Keypresses are represented by an enumerated type, wxKeyCode. The possible
|
||||
values are the ASCII character codes, plus the following:
|
||||
|
||||
|
||||
@verbatim
|
||||
WXK_BACK = 8
|
||||
WXK_TAB = 9
|
||||
@@ -23,7 +23,7 @@
|
||||
WXK_ESCAPE = 27
|
||||
WXK_SPACE = 32
|
||||
WXK_DELETE = 127
|
||||
|
||||
|
||||
// These are by design not compatible with unicode characters.
|
||||
// If you want to get a unicode character from a key event use
|
||||
// wxKeyEvent::GetUnicodeKey instead.
|
||||
@@ -95,7 +95,7 @@
|
||||
WXK_SCROLL
|
||||
WXK_PAGEUP,
|
||||
WXK_PAGEDOWN,
|
||||
|
||||
|
||||
WXK_NUMPAD_SPACE,
|
||||
WXK_NUMPAD_TAB,
|
||||
WXK_NUMPAD_ENTER,
|
||||
@@ -121,13 +121,13 @@
|
||||
WXK_NUMPAD_SUBTRACT,
|
||||
WXK_NUMPAD_DECIMAL,
|
||||
WXK_NUMPAD_DIVIDE,
|
||||
|
||||
|
||||
// the following key codes are only generated under Windows currently
|
||||
WXK_WINDOWS_LEFT,
|
||||
WXK_WINDOWS_RIGHT,
|
||||
WXK_WINDOWS_MENU,
|
||||
WXK_COMMAND,
|
||||
|
||||
|
||||
// Hardware-specific buttons
|
||||
WXK_SPECIAL1 = 193,
|
||||
WXK_SPECIAL2,
|
||||
|
@@ -10,11 +10,11 @@
|
||||
/**
|
||||
|
||||
@page page_keymodifiers Key Modifiers
|
||||
|
||||
|
||||
@header{wx/defs.h}
|
||||
|
||||
|
||||
The following key modifier constants are defined:
|
||||
|
||||
|
||||
@verbatim
|
||||
enum wxKeyModifier
|
||||
{
|
||||
@@ -32,11 +32,11 @@
|
||||
wxMOD_ALL = 0xffff
|
||||
};
|
||||
@endverbatim
|
||||
|
||||
Notice that @c wxMOD_CMD should be used instead of @c wxMOD_CONTROL
|
||||
in portable code to account for the fact that although
|
||||
|
||||
Notice that @c wxMOD_CMD should be used instead of @c wxMOD_CONTROL
|
||||
in portable code to account for the fact that although
|
||||
@c Control modifier exists under Mac OS, it is not used for the same
|
||||
purpose as under Windows or Unix there while the special Mac-specific
|
||||
purpose as under Windows or Unix there while the special Mac-specific
|
||||
@c Command modifier is used in exactly the same way.
|
||||
|
||||
*/
|
||||
|
@@ -10,15 +10,15 @@
|
||||
/**
|
||||
|
||||
@page page_languagecodes Language identifiers
|
||||
|
||||
|
||||
The following wxLanguage constants may be used to specify the language
|
||||
in wxLocale::Init and are returned by wxLocale::GetSystemLanguage:
|
||||
|
||||
|
||||
<!-- generated code begins 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 -->
|
||||
|
||||
*/
|
||||
|
@@ -13,26 +13,26 @@
|
||||
|
||||
wxWidgets defines a special identifier value @c wxID_ANY which is used in
|
||||
the following two situations:
|
||||
|
||||
|
||||
@li when creating a new window you may specify @c wxID_ANY to let
|
||||
wxWidgets assign an unused identifier to it automatically
|
||||
@li when installing an event handler using either the event table
|
||||
macros or wxEvtHandler::Connect,
|
||||
you may use it to indicate that you want to handle the events
|
||||
coming from any control, regardless of its identifier
|
||||
|
||||
|
||||
Another standard special identifier value is @c wxID_NONE: this is a value
|
||||
which is not matched by any other id.
|
||||
|
||||
|
||||
wxWidgets also defines a few standard command identifiers which may be used by
|
||||
the user code and also are sometimes used by wxWidgets itself. These reserved
|
||||
identifiers are all in the range between @c wxID_LOWEST and
|
||||
identifiers are all in the range between @c wxID_LOWEST and
|
||||
@c wxID_HIGHEST and, accordingly, the user code should avoid defining its
|
||||
own constants in this range.
|
||||
|
||||
|
||||
@verbatim
|
||||
wxID_LOWEST = 4999,
|
||||
|
||||
|
||||
wxID_OPEN,
|
||||
wxID_CLOSE,
|
||||
wxID_NEW,
|
||||
@@ -55,7 +55,7 @@
|
||||
wxID_HELP_PROCEDURES,
|
||||
wxID_HELP_CONTEXT,
|
||||
wxID_CLOSE_ALL,
|
||||
|
||||
|
||||
wxID_EDIT = 5030,
|
||||
wxID_CUT,
|
||||
wxID_COPY,
|
||||
@@ -68,7 +68,7 @@
|
||||
wxID_REPLACE,
|
||||
wxID_REPLACE_ALL,
|
||||
wxID_PROPERTIES,
|
||||
|
||||
|
||||
wxID_VIEW_DETAILS,
|
||||
wxID_VIEW_LARGEICONS,
|
||||
wxID_VIEW_SMALLICONS,
|
||||
@@ -77,7 +77,7 @@
|
||||
wxID_VIEW_SORTNAME,
|
||||
wxID_VIEW_SORTSIZE,
|
||||
wxID_VIEW_SORTTYPE,
|
||||
|
||||
|
||||
wxID_FILE = 5050,
|
||||
wxID_FILE1,
|
||||
wxID_FILE2,
|
||||
@@ -88,7 +88,7 @@
|
||||
wxID_FILE7,
|
||||
wxID_FILE8,
|
||||
wxID_FILE9,
|
||||
|
||||
|
||||
// Standard button IDs
|
||||
wxID_OK = 5100,
|
||||
wxID_CANCEL,
|
||||
@@ -108,14 +108,14 @@
|
||||
wxID_ABORT,
|
||||
wxID_RETRY,
|
||||
wxID_IGNORE,
|
||||
|
||||
|
||||
wxID_UP,
|
||||
wxID_DOWN,
|
||||
wxID_HOME,
|
||||
wxID_REFRESH,
|
||||
wxID_STOP,
|
||||
wxID_INDEX,
|
||||
|
||||
|
||||
wxID_BOLD,
|
||||
wxID_ITALIC,
|
||||
wxID_JUSTIFY_CENTER,
|
||||
@@ -131,7 +131,7 @@
|
||||
wxID_ZOOM_OUT,
|
||||
wxID_UNDELETE,
|
||||
wxID_REVERT_TO_SAVED,
|
||||
|
||||
|
||||
// System menu IDs (used by wxUniv):
|
||||
wxID_SYSTEM_MENU = 5200,
|
||||
wxID_CLOSE_FRAME,
|
||||
@@ -140,10 +140,10 @@
|
||||
wxID_MAXIMIZE_FRAME,
|
||||
wxID_ICONIZE_FRAME,
|
||||
wxID_RESTORE_FRAME,
|
||||
|
||||
|
||||
// IDs used by generic file dialog (13 consecutive starting from this value)
|
||||
wxID_FILEDLGG = 5900,
|
||||
|
||||
|
||||
wxID_HIGHEST = 5999
|
||||
@endverbatim
|
||||
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
@section page_wxusedef_multi Generic wxUSE preprocessor symbols
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_ABOUTDLG, Use wxAboutDialogInfo class.}
|
||||
@itemdef{wxUSE_ACCEL, Use wxAcceleratorTable/Entry classes and support for them in wxMenu, wxMenuBar.}
|
||||
@@ -238,7 +238,7 @@
|
||||
@itemdef{wxUSE_XRC, Use XRC XML-based resource system.}
|
||||
@itemdef{wxUSE_ZIPSTREAM, Enable streams for Zip files.}
|
||||
@itemdef{wxUSE_ZLIB, Use wxZlibInput and wxZlibOutputStream classes, required by wxUSE_LIBPNG.}
|
||||
@endDefList
|
||||
@endDefList
|
||||
|
||||
|
||||
@section page_wxusedef_unix wxUSE preprocessor symbols used only under Unix platforms
|
||||
@@ -259,10 +259,10 @@
|
||||
@itemdef{wxUSE_NANOX, Use NanoX.}
|
||||
@itemdef{wxUSE_UNIV_TEXTCTRL, Use wxUniv's implementation of wxTextCtrl class.}
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_gtk wxUSE preprocessor symbols used only in wxGTK port
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_DETECT_SM, Use code to detect X11 session manager.}
|
||||
@itemdef{wxUSE_GTKPRINT, Use GTK+ printing support.}
|
||||
@@ -271,9 +271,9 @@
|
||||
@itemdef{wxUSE_LIBHILDON, Use Hildon framework for Nokia 770. Currently has no effect. }
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_mac wxUSE preprocessor symbols used only in wxMac port
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_MAC_CRITICAL_REGION_MUTEX, See src/mac/carbon/thread.cpp file.}
|
||||
@itemdef{wxUSE_MAC_PTHREADS_MUTEX, See src/mac/carbon/thread.cpp file.}
|
||||
@@ -281,24 +281,24 @@
|
||||
@itemdef{wxUSE_WEBKIT, Use wxWebKitCtrl class.}
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_motif wxUSE preprocessor symbols used only in wxMotif port
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_GADGETS, Use xmCascadeButtonGadgetClass, xmLabelGadgetClass, xmPushButtonGadgetClass and xmToggleButtonGadgetClass classes.}
|
||||
@itemdef{wxUSE_INVISIBLE_RESIZE, See src/motif/dialog.cpp file.}
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_cocoa wxUSE preprocessor symbols used only in Cocoa port
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_OBJC_UNIQUIFYING, Enable Objective-C class name uniquifying.}
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_os2 wxUSE preprocessor symbols used only in OS2 port
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_CONSOLEDEBUG, See src/os2/app.cpp file.}
|
||||
@itemdef{wxUSE_DDE, See src/os2/mimetype.cpp file.}
|
||||
@@ -308,9 +308,9 @@
|
||||
@itemdef{wxUSE_RESOURCE_LOADING_IN_OS2, See src/os2/gdiimage.cpp file.}
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_msw wxUSE preprocessor symbols used only in wxMSW port
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_ACCESSIBILITY, Enable accessibility support}
|
||||
@itemdef{wxUSE_ACTIVEX, Use wxActiveXContainer and related classes.}
|
||||
@@ -345,9 +345,9 @@
|
||||
@itemdef{wxUSE_XPM_IN_MSW, See also wxUSE_XPM}
|
||||
@endDefList
|
||||
|
||||
|
||||
|
||||
@section page_wxusedef_univ wxUSE preprocessor symbols used only in wxUniversal
|
||||
|
||||
|
||||
@beginDefList
|
||||
@itemdef{wxUSE_ALL_THEMES, Use all themes in wxUniversal; See wx/univ/theme.h file.}
|
||||
@itemdef{wxUSE_THEME_GTK, Use GTK+ 1-like theme in wxUniversal}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others.
|
||||
|
||||
This manual contains a class reference and topic overviews.
|
||||
For a selection of wxWidgets tutorials, please see the documentation page
|
||||
For a selection of wxWidgets tutorials, please see the documentation page
|
||||
on the wxWidgets web site: http://www.wxwidgets.org.
|
||||
|
||||
Please note that in the following, ``MS Windows" often refers to all
|
||||
|
@@ -82,7 +82,7 @@ Requires @ref page_libs_wxbase.
|
||||
|
||||
This contains the Advanced User Interface docking library.
|
||||
|
||||
Requires @ref page_libs_wxadv, @ref page_libs_wxhtml, @ref page_libs_wxxml,
|
||||
Requires @ref page_libs_wxadv, @ref page_libs_wxhtml, @ref page_libs_wxxml,
|
||||
@ref page_libs_wxcore, @ref page_libs_wxbase.
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ Requires @ref page_libs_wxbase.
|
||||
|
||||
This contains generic rich text control functionality.
|
||||
|
||||
Requires @ref page_libs_wxadv, @ref page_libs_wxhtml, @ref page_libs_wxxml,
|
||||
Requires @ref page_libs_wxadv, @ref page_libs_wxhtml, @ref page_libs_wxxml,
|
||||
@ref page_libs_wxcore, @ref page_libs_wxbase.
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ Requires @ref page_libs_wxxml, @ref page_libs_wxcore, @ref page_libs_wxbase.
|
||||
This library contains wxXmlResource class that provides access to XML resource
|
||||
files in XRC format.
|
||||
|
||||
Requires @ref page_libs_wxadv, @ref page_libs_wxhtml, @ref page_libs_wxxml,
|
||||
Requires @ref page_libs_wxadv, @ref page_libs_wxhtml, @ref page_libs_wxxml,
|
||||
@ref page_libs_wxcore, @ref page_libs_wxbase.
|
||||
|
||||
|
||||
|
@@ -31,48 +31,48 @@
|
||||
|
||||
|
||||
|
||||
@section page_port_wxgtk wxGTK
|
||||
@section page_port_wxgtk wxGTK
|
||||
|
||||
@htmlonly
|
||||
<img src="gtk_logo.png" alt="GTK logo" title="GTK logo" class="logo">
|
||||
@endhtmlonly
|
||||
|
||||
|
||||
wxGTK is a port of wxWidgets using the GTK+ library.
|
||||
It makes use of GTK+'s native widgets wherever possible and uses
|
||||
wxWidgets' generic controls when needed. GTK+ itself has been
|
||||
ported to a number of systems, but so far only the original X11
|
||||
version is supported. Support for other GTK+ backends is planned,
|
||||
such as the new DirectFB backend.
|
||||
|
||||
|
||||
All work is being done on GTK+ version 2.0 and above. Support for
|
||||
GTK+ 1.2 will be deprecated in a later release.
|
||||
|
||||
|
||||
You will need GTK+ 2.0 or higher which is available from:
|
||||
|
||||
|
||||
http://www.gtk.org
|
||||
|
||||
|
||||
The newer version of GTK+ you use, the more native widgets and
|
||||
features will be utilized. We have gone to a great extent to
|
||||
allow compiling wxWidgets applications with a latest version of
|
||||
GTK+, with the resulting binary working on systems even with a
|
||||
much lower version of GTK+. You will have to ensure that the
|
||||
application is launched with lazy symbol binding for that.
|
||||
|
||||
In order to configure wxWidgets to compile wxGTK you will
|
||||
|
||||
In order to configure wxWidgets to compile wxGTK you will
|
||||
need use the @c --with-gtk argument to the @c configure script.
|
||||
This is the default for many systems.
|
||||
|
||||
|
||||
GTK+ 1.2 can still be used, albeit discouraged. For that you can
|
||||
pass @c --with-gtk=1 to the @c configure script.
|
||||
|
||||
|
||||
For further information, please see the files in docs/gtk
|
||||
in the distribution.
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxmac wxMac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxmac wxMac
|
||||
|
||||
@htmlonly
|
||||
<img src="osxleopard_logo.png" alt="Mac OS X (Leopard) logo"
|
||||
title="Mac OS X (Leopard) logo" class="logo">
|
||||
@@ -88,15 +88,15 @@
|
||||
API (and optionally the Classic API under MacOS 8.X). You
|
||||
will need wxWidgets version 2.3.3 or higher for a stable
|
||||
version of wxMac.
|
||||
|
||||
|
||||
For further information, please see the files in docs/mac
|
||||
in the distribution.
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxmgl wxMGL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxmgl wxMGL
|
||||
|
||||
wxMGL is a port of wxWidgets using the MGL library available
|
||||
from SciTech as the underlying graphics backend. wxMGL draws
|
||||
its widgets using the wxUniversal widget set which is now
|
||||
@@ -104,35 +104,35 @@
|
||||
including DOS, Linux hardware (similar to the Linux framebuffer)
|
||||
and various graphics systems such as Win32, X11 and OS/2.
|
||||
Note that currently MGL for Linux runs only on x86-based systems.
|
||||
|
||||
|
||||
You will need wxWidgets 2.3.3 or higher and MGL 5.0 or higher.
|
||||
The latter is available from
|
||||
|
||||
|
||||
http://www.scitechsoft.com/products/product_download.html
|
||||
|
||||
|
||||
In order to configure wxWidgets to compile wxMGL you will
|
||||
need to type:
|
||||
|
||||
|
||||
@verbatim configure --with-mgl --with-universal @endverbatim
|
||||
|
||||
|
||||
Under DOS, wxMGL uses a dmake based make system.
|
||||
|
||||
|
||||
For further information, please see the files in docs/mgl
|
||||
in the distribution.
|
||||
|
||||
|
||||
|
||||
@section page_port_wxos2 wxOS2
|
||||
|
||||
|
||||
|
||||
@section page_port_wxos2 wxOS2
|
||||
|
||||
wxOS2 is a port of wxWidgets for the IBM OS/2 Warp3 and Warp4 platforms.
|
||||
This port is currently under construction and in beta phase.
|
||||
|
||||
For more info about OS2 see:
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxx11 wxX11
|
||||
|
||||
|
||||
|
||||
@section page_port_wxx11 wxX11
|
||||
|
||||
@htmlonly
|
||||
<img src="x11_logo.png" alt="X.org logo" title="X.org logo" class="logo">
|
||||
@@ -145,21 +145,21 @@
|
||||
as those running on systems with few resources (PDAs) or for
|
||||
applications which need to use a special themed look. You will need
|
||||
wxWidgets 2.3.2 or higher.
|
||||
|
||||
In order to configure wxWidgets to compile wxX11 you will
|
||||
|
||||
In order to configure wxWidgets to compile wxX11 you will
|
||||
need to type:
|
||||
|
||||
|
||||
@verbatim configure --with-x11 --with-universal @endverbatim
|
||||
|
||||
|
||||
For further information, please see the files in docs/x11
|
||||
in the distribution. There is also a page on the use of
|
||||
wxWidgets for embedded applications on the wxWidgets web site.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxmsw wxMSW
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@section page_port_wxmsw wxMSW
|
||||
|
||||
@htmlonly
|
||||
<img src="win_logo.png" alt="Windows logo" title="Windows logo" class="logo">
|
||||
@@ -174,35 +174,35 @@
|
||||
including MS VC++, Borland 5.5, MinGW32, Cygwin and
|
||||
Watcom as well as cross-compilation with a Linux hosted
|
||||
MinGW32 tool chain.
|
||||
|
||||
|
||||
For further information, please see the files in docs/msw
|
||||
in the distribution.
|
||||
|
||||
|
||||
@subsection page_port_wxmsw_themedborders Themed borders on Windows
|
||||
|
||||
|
||||
Starting with wxWidgets 2.8.5, you can specify the wxBORDER_THEME style to have wxWidgets
|
||||
use a themed border. Using the default XP theme, this is a thin 1-pixel blue border,
|
||||
with an extra 1-pixel border in the window client background colour (usually white) to
|
||||
separate the client area's scrollbars from the border.
|
||||
|
||||
|
||||
If you don't specify a border style for a wxTextCtrl in rich edit mode, wxWidgets now gives
|
||||
the control themed borders automatically, where previously they would take the Windows 95-style
|
||||
sunken border. Other native controls such as wxTextCtrl in non-rich edit mode, and wxComboBox,
|
||||
already paint themed borders where appropriate. To use themed borders on other windows, such
|
||||
as wxPanel, pass the wxBORDER_THEME style, or (apart from wxPanel) pass no border style.
|
||||
|
||||
|
||||
In general, specifying wxBORDER_THEME will cause a border of some kind to be used, chosen by the platform
|
||||
and control class. To leave the border decision entirely to wxWidgets, pass wxBORDER_DEFAULT.
|
||||
This is not to be confused with specifying wxBORDER_NONE, which says that there should
|
||||
definitely be @e no border.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_themedborders_details More detail on border implementation
|
||||
|
||||
|
||||
The way that wxMSW decides whether to apply a themed border is as follows.
|
||||
The theming code calls wxWindow::GetBorder() to obtain a border. If no border style has been
|
||||
passed to the window constructor, GetBorder() calls GetDefaultBorder() for this window.
|
||||
If wxBORDER_THEME was passed to the window constructor, GetBorder() calls GetDefaultBorderForControl().
|
||||
|
||||
|
||||
The implementation of wxWindow::GetDefaultBorder() on wxMSW calls wxWindow::CanApplyThemeBorder()
|
||||
which is a virtual function that tells wxWidgets whether a control can have a theme
|
||||
applied explicitly (some native controls already paint a theme in which case we should not
|
||||
@@ -210,47 +210,47 @@
|
||||
we wish to create a window with no border (for example, notebook pages). So wxPanel
|
||||
overrides GetDefaultBorder() in order to call the generic wxWindowBase::GetDefaultBorder(),
|
||||
returning wxBORDER_NONE.
|
||||
|
||||
|
||||
@subsection page_port_wxmsw_wince wxWinCE
|
||||
|
||||
|
||||
wxWinCE is the name given to wxMSW when compiled on Windows CE devices;
|
||||
most of wxMSW is common to Win32 and Windows CE but there are
|
||||
some simplifications, enhancements, and differences in
|
||||
behaviour.
|
||||
|
||||
|
||||
For building instructions, see docs/msw/wince in the
|
||||
distribution, also the section about Visual Studio 2005 project
|
||||
files below. The rest of this section documents issues you
|
||||
need to be aware of when programming for Windows CE devices.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_ General issues for wxWinCE programming
|
||||
|
||||
|
||||
Mobile applications generally have fewer features and
|
||||
simpler user interfaces. Simply omit whole sizers, static
|
||||
lines and controls in your dialogs, and use comboboxes instead
|
||||
of listboxes where appropriate. You also need to reduce
|
||||
the amount of spacing used by sizers, for which you can
|
||||
use a macro such as this:
|
||||
|
||||
|
||||
@verbatim
|
||||
#if defined(__WXWINCE__)
|
||||
#define wxLARGESMALL(large,small) small
|
||||
#else
|
||||
#define wxLARGESMALL(large,small) large
|
||||
#endif
|
||||
|
||||
|
||||
// Usage
|
||||
topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
|
||||
@endverbatim
|
||||
|
||||
|
||||
There is only ever one instance of a Windows CE application running,
|
||||
and wxWidgets will take care of showing the current instance and
|
||||
shutting down the second instance if necessary.
|
||||
|
||||
|
||||
You can test the return value of wxSystemSettings::GetScreenType()
|
||||
for a qualitative assessment of what kind of display is available,
|
||||
or use wxGetDisplaySize() if you need more information.
|
||||
|
||||
|
||||
You can also use wxGetOsVersion to test for a version of Windows CE at
|
||||
run-time (see the next section). However, because different builds
|
||||
are currently required to target different kinds of device, these
|
||||
@@ -259,19 +259,19 @@
|
||||
platforms. This would require a different approach to the way
|
||||
wxWidgets adapts its behaviour (such as for menubars) to suit the
|
||||
style of device.
|
||||
|
||||
|
||||
See the "Life!" example (demos/life) for an example of
|
||||
an application that has been tailored for PocketPC and Smartphone use.
|
||||
|
||||
|
||||
@note don't forget to have this line in your .rc file, as for
|
||||
desktop Windows applications:
|
||||
|
||||
|
||||
@verbatim #include "wx/msw/wx.rc" @endverbatim
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_sdk Testing for WinCE SDKs
|
||||
|
||||
|
||||
Use these preprocessor symbols to test for the different types of device or SDK:
|
||||
|
||||
|
||||
@li @b __SMARTPHONE__ Generic mobile devices with phone buttons and a small display
|
||||
@li @b __PDA__ Generic mobile devices with no phone
|
||||
@li @b __HANDHELDPC__ Generic mobile device with a keyboard
|
||||
@@ -280,58 +280,58 @@
|
||||
@li @b __POCKETPC__ Microsoft-powered PocketPC devices with touch-screen
|
||||
@li @b __WINCE_STANDARDSDK__ Microsoft-powered Windows CE devices, for generic Windows CE applications
|
||||
@li @b __WINCE_NET__ Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater)
|
||||
|
||||
|
||||
wxGetOsVersion will return these values:
|
||||
|
||||
|
||||
@li @b wxWINDOWS_POCKETPC The application is running under PocketPC.
|
||||
@li @b wxWINDOWS_SMARTPHONE The application is running under Smartphone.
|
||||
@li @b wxWINDOWS_CE The application is running under Windows CE (built with the Standard SDK).
|
||||
|
||||
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_sizing Window sizing in wxWinCE
|
||||
|
||||
|
||||
Top level windows (dialogs, frames) are created always full-screen. Fit() of sizers will not rescale top
|
||||
level windows but instead will scale window content.
|
||||
|
||||
|
||||
If the screen orientation changes, the windows will automatically be resized
|
||||
so no further action needs to be taken (unless you want to change the layout
|
||||
according to the orientation, which you could detect in idle time, for example).
|
||||
When input panel (SIP) is shown, top level windows (frames and dialogs) resize
|
||||
accordingly (see wxTopLevelWindow::HandleSettingChange).
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_toplevel Closing top-level windows in wxWinCE
|
||||
|
||||
|
||||
You won't get a wxCloseEvent when the user clicks on the X in the titlebar
|
||||
on Smartphone and PocketPC; the window is simply hidden instead. However the system may send the
|
||||
event to force the application to close down.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_hibernation Hibernation in wxWinCE
|
||||
|
||||
|
||||
Smartphone and PocketPC will send a wxEVT_HIBERNATE to the application object in low
|
||||
memory conditions. Your application should release memory and close dialogs,
|
||||
and wake up again when the next wxEVT_ACTIVATE or wxEVT_ACTIVATE_APP message is received.
|
||||
(wxEVT_ACTIVATE_APP is generated whenever a wxEVT_ACTIVATE event is received
|
||||
in Smartphone and PocketPC, since these platforms do not support WM_ACTIVATEAPP.)
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_hwbutt Hardware buttons in wxWinCE
|
||||
|
||||
|
||||
Special hardware buttons are sent to a window via the wxEVT_HOTKEY event
|
||||
under Smartphone and PocketPC. You should first register each required button with
|
||||
under Smartphone and PocketPC. You should first register each required button with
|
||||
wxWindow::RegisterHotKey, and unregister the button when you're done with it. For example:
|
||||
|
||||
|
||||
@verbatim
|
||||
win->RegisterHotKey(0, wxMOD_WIN, WXK_SPECIAL1);
|
||||
win->UnregisterHotKey(0);
|
||||
@endverbatim
|
||||
|
||||
|
||||
You may have to register the buttons in a wxEVT_ACTIVATE event handler
|
||||
since other applications will grab the buttons.
|
||||
|
||||
|
||||
There is currently no method of finding out the names of the special
|
||||
buttons or how many there are.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_dialogs Dialogs in wxWinCE
|
||||
|
||||
|
||||
PocketPC dialogs have an OK button on the caption, and so you should generally
|
||||
not repeat an OK button on the dialog. You can add a Cancel button if necessary, but some dialogs
|
||||
simply don't offer you the choice (the guidelines recommend you offer an Undo facility
|
||||
@@ -339,11 +339,11 @@
|
||||
a wxID_OK event by default. If you wish to change this, call wxDialog::SetAffirmativeId
|
||||
with the required identifier to be used. Or, override wxDialog::DoOK (return @false to
|
||||
have wxWidgets simply call Close to dismiss the dialog).
|
||||
|
||||
|
||||
Smartphone dialogs do @e not have an OK button on the caption, and are closed
|
||||
using one of the two menu buttons. You need to assign these using wxTopLevelWindow::SetLeftMenu
|
||||
and wxTopLevelWindow::SetRightMenu, for example:
|
||||
|
||||
|
||||
@verbatim
|
||||
#ifdef __SMARTPHONE__
|
||||
SetLeftMenu(wxID_OK);
|
||||
@@ -354,30 +354,30 @@
|
||||
topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxEXPAND | wxALL, 10 );
|
||||
#endif
|
||||
@endverbatim
|
||||
|
||||
|
||||
For implementing property sheets (flat tabs), use a wxNotebook with wxNB_FLAT|wxNB_BOTTOM
|
||||
and have the notebook left, top and right sides overlap the dialog by about 3 pixels
|
||||
to eliminate spurious borders. You can do this by using a negative spacing in your
|
||||
sizer Add() call. The cross-platform property sheet dialog wxPropertySheetDialog is
|
||||
provided, to show settings in the correct style on PocketPC and on other platforms.
|
||||
|
||||
|
||||
Notifications (bubble HTML text with optional buttons and links) will also be
|
||||
implemented in the future for PocketPC.
|
||||
|
||||
|
||||
Modeless dialogs probably don't make sense for PocketPC and Smartphone, since
|
||||
frames and dialogs are normally full-screen, and a modeless dialog is normally
|
||||
intended to co-exist with the main application frame.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_ppc Menubars and toolbars in PocketPC
|
||||
|
||||
|
||||
On PocketPC, a frame must always have a menubar, even if it's empty.
|
||||
An empty menubar/toolbar is automatically provided for dialogs, to hide
|
||||
any existing menubar for the duration of the dialog.
|
||||
|
||||
|
||||
Menubars and toolbars are implemented using a combined control,
|
||||
but you can use essentially the usual wxWidgets API; wxWidgets will combine the menubar
|
||||
and toolbar. However, there are some restrictions:
|
||||
|
||||
|
||||
@li You must create the frame's primary toolbar with wxFrame::CreateToolBar,
|
||||
because this uses the special wxToolMenuBar class (derived from wxToolBar)
|
||||
to implement the combined toolbar and menubar. Otherwise, you can create and manage toolbars
|
||||
@@ -391,20 +391,20 @@
|
||||
or with transparency (for example, using XPMs).
|
||||
@li Adding controls to wxToolMenuBar is not supported. However, wxToolBar supports
|
||||
controls.
|
||||
|
||||
|
||||
Unlike in all other ports, a wxDialog has a wxToolBar, automatically created
|
||||
for you. You may either leave it blank, or access it with wxDialog::GetToolBar
|
||||
and add buttons, then calling wxToolBar::Realize. You cannot set or recreate
|
||||
the toolbar.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_smart Menubars and toolbars in Smartphone
|
||||
|
||||
|
||||
On Smartphone, there are only two menu buttons, so a menubar is simulated
|
||||
using a nested menu on the right menu button. Any toolbars are simply ignored on
|
||||
Smartphone.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_closing Closing windows in wxWinCE
|
||||
|
||||
|
||||
The guidelines state that applications should not have a Quit menu item,
|
||||
since the user should not have to know whether an application is in memory
|
||||
or not. The close button on a window does not call the window's
|
||||
@@ -412,141 +412,141 @@
|
||||
the Ctrl+Q accelerator can be used to quit the application, so wxWidgets
|
||||
defines this accelerator by default and if your application handles
|
||||
wxID_EXIT, it will do the right thing.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_ctx Context menus in wxWinCE
|
||||
|
||||
|
||||
To enable context menus in PocketPC, you currently need to call wxWindow::EnableContextMenu,
|
||||
a wxWinCE-only function. Otherwise the context menu event (wxContextMenuEvent) will
|
||||
never be sent. This API is subject to change.
|
||||
|
||||
|
||||
Context menus are not supported in Smartphone.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_ctrl Control differences on wxWinCE
|
||||
|
||||
|
||||
These controls and styles are specific to wxWinCE:
|
||||
|
||||
|
||||
@li wxTextCtrl The wxTE_CAPITALIZE style causes a CAPEDIT control to
|
||||
be created, which capitalizes the first letter.
|
||||
|
||||
|
||||
These controls are missing from wxWinCE:
|
||||
|
||||
|
||||
@li MDI classes MDI is not supported under Windows CE.
|
||||
@li wxMiniFrame Not supported under Windows CE.
|
||||
|
||||
|
||||
Tooltips are not currently supported for controls, since on PocketPC controls with
|
||||
tooltips are distinct controls, and it will be hard to add dynamic
|
||||
tooltip support.
|
||||
|
||||
|
||||
Control borders on PocketPC and Smartphone should normally be specified with
|
||||
wxBORDER_SIMPLE instead of wxBORDER_SUNKEN. Controls will usually adapt
|
||||
appropriately by virtue of their GetDefaultBorder() function, but if you
|
||||
wish to specify a style explicitly you can use wxDEFAULT_CONTROL_BORDER
|
||||
which will give a simple border on PocketPC and Smartphone, and the sunken border on
|
||||
other platforms.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_help Online help in wxWinCE
|
||||
|
||||
|
||||
You can use the help controller wxWinceHelpController which controls
|
||||
simple @c .htm files, usually installed in the Windows directory.
|
||||
See the Windows CE reference for how to format the HTML files.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_install Installing your PocketPC and Smartphone applications
|
||||
|
||||
|
||||
To install your application, you need to build a CAB file using
|
||||
the parameters defined in a special .inf file. The CabWiz program
|
||||
in your SDK will compile the CAB file from the .inf file and
|
||||
files that it specifies.
|
||||
|
||||
|
||||
For delivery, you can simply ask the user to copy the CAB file to the
|
||||
device and execute the CAB file using File Explorer. Or, you can
|
||||
write a program for the desktop PC that will find the ActiveSync
|
||||
Application Manager and install the CAB file on the device,
|
||||
which is obviously much easier for the user.
|
||||
|
||||
|
||||
Here are some links that may help.
|
||||
|
||||
|
||||
@li A setup builder that takes CABs and builds a setup program is at
|
||||
http://www.eskimo.com/~scottlu/win/index.html.
|
||||
@li Sample installation files can be found in
|
||||
@li Sample installation files can be found in
|
||||
<tt>Windows CE Tools/wce420/POCKET PC 2003/Samples/Win32/AppInst</tt>.
|
||||
@li An installer generator using wxPython can be found at
|
||||
@li An installer generator using wxPython can be found at
|
||||
http://ppcquicksoft.iespana.es/ppcquicksoft/myinstall.html.
|
||||
@li Miscellaneous Windows CE resources can be found at
|
||||
@li Miscellaneous Windows CE resources can be found at
|
||||
http://www.orbworks.com/pcce/resources.html.
|
||||
@li Installer creation instructions with a setup.exe for installing to PPC can be found at
|
||||
@li Installer creation instructions with a setup.exe for installing to PPC can be found at
|
||||
http://www.pocketpcdn.com/articles/creatingsetup.html.
|
||||
@li Microsoft instructions are at
|
||||
@li Microsoft instructions are at
|
||||
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnce30/html/appinstall30.asp?frame=true
|
||||
@li Troubleshooting WinCE application installations:
|
||||
@li Troubleshooting WinCE application installations:
|
||||
http://support.microsoft.com/default.aspx?scid=KB;en-us;q181007
|
||||
|
||||
|
||||
You may also check out <tt>demos/life/setup/wince</tt> which contains
|
||||
scripts to create a PocketPC installation for ARM-based
|
||||
devices. In particular, @c build.bat builds the distribution and
|
||||
copies it to a directory called @c Deliver.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_filedlg wxFileDialog in PocketPC
|
||||
|
||||
|
||||
Allowing the user to access files on memory cards, or on arbitrary
|
||||
parts of the filesystem, is a pain; the standard file dialog only
|
||||
shows folders under My Documents or folders on memory cards
|
||||
(not the system or card root directory, for example). This is
|
||||
a known problem for PocketPC developers.
|
||||
|
||||
|
||||
If you need a file dialog that allows access to all folders,
|
||||
you can use wxGenericFileDialog instead. You will need to include
|
||||
you can use wxGenericFileDialog instead. You will need to include
|
||||
@c wx/generic/filedlgg.h.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_evc Embedded Visual C++ Issues
|
||||
|
||||
|
||||
<b>Run-time type information</b>
|
||||
|
||||
|
||||
If you wish to use runtime type information (RTTI) with eVC++ 4, you need to download
|
||||
an extra library, @c ccrtrtti.lib, and link with it. At the time of
|
||||
writing you can get it from here:
|
||||
|
||||
|
||||
@verbatim
|
||||
http://support.microsoft.com/kb/830482/en-us
|
||||
@endverbatim
|
||||
|
||||
|
||||
Otherwise you will get linker errors similar to this:
|
||||
|
||||
|
||||
@verbatim
|
||||
wxwince26d.lib(control.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
|
||||
@endverbatim
|
||||
|
||||
|
||||
<b>Windows Mobile 5.0 emulator</b>
|
||||
|
||||
|
||||
Note that there is no separate emulator configuration for Windows Mobile 5.0: the
|
||||
emulator runs the ARM code directly.
|
||||
|
||||
|
||||
<b>Visual Studio 2005 project files</b>
|
||||
|
||||
|
||||
Unfortunately, Visual Studio 2005, required to build Windows Mobile 5.0 applications,
|
||||
doesn't do a perfect job of converting the project files from eVC++ format.
|
||||
|
||||
|
||||
When you have converted the wxWidgets workspace, edit the configuration properties
|
||||
for each configuration and in the Librarian, add a relative path ..\\..\\lib to
|
||||
each library path. For example:
|
||||
each library path. For example:
|
||||
<tt>..\\$(PlatformName)\\$(ConfigurationName)\\wx_mono.lib</tt>.
|
||||
|
||||
|
||||
Then, for a sample you want to compile, edit the configuration properties
|
||||
and make sure
|
||||
<tt>..\\..\\lib\\$(PlatformName)\\$(ConfigurationName)</tt>
|
||||
is in the Linker/General/Additional Library Directories property.
|
||||
Also change the Linker/Input/Additional Dependencies property to something like
|
||||
<tt>coredll.lib wx_mono.lib wx_wxjpeg.lib wx_wxpng.lib wx_wxzlib.lib wx_wxexpat.lib
|
||||
and make sure
|
||||
<tt>..\\..\\lib\\$(PlatformName)\\$(ConfigurationName)</tt>
|
||||
is in the Linker/General/Additional Library Directories property.
|
||||
Also change the Linker/Input/Additional Dependencies property to something like
|
||||
<tt>coredll.lib wx_mono.lib wx_wxjpeg.lib wx_wxpng.lib wx_wxzlib.lib wx_wxexpat.lib
|
||||
commctrl.lib winsock.lib wininet.lib</tt>
|
||||
(since the library names in the wxWidgets workspace were changed by VS 2005).
|
||||
|
||||
|
||||
Alternately, you could could edit all the names to be identical to the original eVC++
|
||||
names, but this will probably be more fiddly.
|
||||
|
||||
|
||||
@subsubsection page_port_wxmsw_wince_issues Remaining issues
|
||||
|
||||
|
||||
These are some of the remaining problems to be sorted out, and features
|
||||
to be supported.
|
||||
|
||||
|
||||
@li <b>Windows Mobile 5 issues.</b> It is not possible to get the HMENU for
|
||||
the command bar on Mobile 5, so the menubar functions need to be rewritten
|
||||
to get the individual menus without use of a menubar handle. Also the
|
||||
@@ -567,15 +567,15 @@
|
||||
missing styles are implemented with WM_PAINT.
|
||||
@li <b>HTML control.</b> PocketPC has its own HTML control which can be used for showing
|
||||
local pages or navigating the web. We should create a version of wxHtmlWindow that uses this
|
||||
control, or have a separately-named control (wxHtmlCtrl), with a syntax as close as possible
|
||||
control, or have a separately-named control (wxHtmlCtrl), with a syntax as close as possible
|
||||
to wxHtmlWindow.
|
||||
@li <b>Tooltip control.</b> PocketPC uses special TTBUTTON and TTSTATIC controls for adding
|
||||
tooltips, with the tooltip separated from the label with a double tilde. We need to support
|
||||
this using SetToolTip.(Unfortunately it does not seem possible to dynamically remove the tooltip,
|
||||
tooltips, with the tooltip separated from the label with a double tilde. We need to support
|
||||
this using SetToolTip.(Unfortunately it does not seem possible to dynamically remove the tooltip,
|
||||
so an extra style may be required.)
|
||||
@li <b>Focus.</b> In the wxPropertySheetDialog demo on Smartphone, it's not possible to navigate
|
||||
between controls. The focus handling in wxWidgets needs investigation. See in particular
|
||||
src/common/containr.cpp, and note that the default OnActivate handler in src/msw/toplevel.cpp
|
||||
between controls. The focus handling in wxWidgets needs investigation. See in particular
|
||||
src/common/containr.cpp, and note that the default OnActivate handler in src/msw/toplevel.cpp
|
||||
sets the focus to the first child of the dialog.
|
||||
@li <b>OK button.</b> We should allow the OK button on a dialog to be optional, perhaps
|
||||
by using wxCLOSE_BOX to indicate when the OK button should be displayed.
|
||||
|
@@ -117,7 +117,7 @@
|
||||
specific information about the problem will be logged.
|
||||
|
||||
You should also use @ref page_macro_cat_debugging as part of a `defensive programming' strategy,
|
||||
scattering wxASSERTs liberally to test for problems in your code as early as possible.
|
||||
scattering wxASSERTs liberally to test for problems in your code as early as possible.
|
||||
Forward thinking will save a surprising amount of time in the long run.
|
||||
|
||||
See the @ref overview_debugging for further information.
|
||||
|
@@ -36,10 +36,10 @@
|
||||
|
||||
@subsection page_utils_utils_tex2rtf Tex2RTF
|
||||
|
||||
Supplied with wxWidgets is a utility called Tex2RTF for
|
||||
Supplied with wxWidgets is a utility called Tex2RTF for
|
||||
converting @e LaTeX manuals HTML, MS HTML Help, wxHTML Help, RTF, and Windows
|
||||
Help RTF formats. Tex2RTF was used for the wxWidgets manuals and can be used
|
||||
independently by authors wishing to create on-line and printed manuals from the
|
||||
Help RTF formats. Tex2RTF was used for the wxWidgets manuals and can be used
|
||||
independently by authors wishing to create on-line and printed manuals from the
|
||||
same @e LaTeX source. Please see the separate documentation for Tex2RTF.
|
||||
You can find it under @c utils/tex2rtf.
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
@section page_utils_samples Samples
|
||||
|
||||
|
||||
Probably the best way to learn wxWidgets is by reading the source of some 50+
|
||||
samples provided with it. Many aspects of wxWidgets programming can be learnt
|
||||
from them, but sometimes it is not simple to just choose the right sample to
|
||||
@@ -68,82 +68,82 @@
|
||||
make it easier to find the relevant one if a simple grep through all sources
|
||||
didn't help. They also provide some notes about using the samples and what
|
||||
features of wxWidgets are they supposed to test.
|
||||
|
||||
|
||||
There are currently more than 50 different samples as part of wxWidgets and
|
||||
this list is not complete. You should start your tour of wxWidgets with the
|
||||
minimal sample which is the wxWidgets version of
|
||||
"Hello, world!". It shows the basic structure of wxWidgets program and is the
|
||||
most commented sample of all - looking at its source code is recommended.
|
||||
|
||||
|
||||
The next most useful samples are probably widgets
|
||||
and controls which show many of wxWidgets native and
|
||||
generic controls, such as buttons, listboxes, checkboxes, comboboxes etc.
|
||||
|
||||
|
||||
Other, more complicated controls, have their own samples. In this category you
|
||||
may find the following samples showing the corresponding controls:
|
||||
|
||||
|
||||
@li wxCalendarCtrl: @ref page_utils_samples_calendar
|
||||
@li wxListCtrl: @ref page_utils_samples_listctrl
|
||||
@li wxTreeCtrl: @ref page_utils_samples_treectrl
|
||||
@li wxGrid: @ref page_utils_samples_grid
|
||||
|
||||
|
||||
Finally, it might be helpful to do a search in the entire sample directory if
|
||||
you can't find the sample showing the control you are interested in by
|
||||
name. Most classes contained in wxWidgets occur in at least one of the samples.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_minimal Minimal sample
|
||||
|
||||
|
||||
The minimal sample is what most people will know under the term Hello World,
|
||||
i.e. a minimal program that doesn't demonstrate anything apart from what is
|
||||
needed to write a program that will display a "hello" dialog. This is usually
|
||||
a good starting point for learning how to use wxWidgets.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_animate Animate sample
|
||||
|
||||
|
||||
The @c animate sample shows how you can use wxAnimationCtrl
|
||||
control and shows concept of a platform-dependent animation encapsulated
|
||||
in wxAnimation.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_artprovider Art provider sample
|
||||
|
||||
|
||||
The @c artprov sample shows how you can customize the look of standard
|
||||
wxWidgets dialogs by replacing default bitmaps/icons with your own versions.
|
||||
It also shows how you can use wxArtProvider to
|
||||
get stock bitmaps for use in your application.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_calendar Calendar sample
|
||||
|
||||
|
||||
This font shows the calendar control in action. It
|
||||
shows how to configure the control (see the different options in the calendar
|
||||
menu) and also how to process the notifications from it.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_config Config sample
|
||||
|
||||
|
||||
This sample demonstrates the wxConfig classes in a platform
|
||||
independent way, i.e. it uses text based files to store a given configuration under
|
||||
Unix and uses the Registry under Windows.
|
||||
|
||||
|
||||
See @ref overview_config for the descriptions of all features of this class.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_controls Controls sample
|
||||
|
||||
|
||||
The controls sample is the main test program for most simple controls used in
|
||||
wxWidgets. The sample tests their basic functionality, events, placement,
|
||||
modification in terms of colour and font as well as the possibility to change
|
||||
the controls programmatically, such as adding an item to a list box etc. Apart
|
||||
from that, the sample uses a wxNotebook and tests most
|
||||
features of this special control (using bitmap in the tabs, using
|
||||
wxSizer instances and wxLayoutConstraints within notebook pages, advancing pages
|
||||
wxSizer instances and wxLayoutConstraints within notebook pages, advancing pages
|
||||
programmatically and vetoing a page change by intercepting the wxNotebookEvent.
|
||||
|
||||
|
||||
The various controls tested are listed here:
|
||||
|
||||
|
||||
@li wxButton
|
||||
@li wxBitmapButton
|
||||
@li wxCheckBox
|
||||
@@ -159,10 +159,10 @@
|
||||
@li wxRadioBox
|
||||
@li wxRadioButton
|
||||
@li wxSlider
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_debugrpt DebugRpt sample
|
||||
|
||||
|
||||
This sample shows how to use wxDebugReport class to
|
||||
generate a debug report in case of a program crash or otherwise. On start up,
|
||||
it proposes to either crash itself (by dereferencing a NULL pointer) or
|
||||
@@ -170,54 +170,54 @@
|
||||
with standard information adding a custom file to it (just a timestamp) and
|
||||
allows to view the information gathered using
|
||||
wxDebugReportPreview.
|
||||
|
||||
|
||||
For the report processing part of the sample to work you should make available
|
||||
a Web server accepting form uploads, otherwise
|
||||
wxDebugReportUpload will report an error.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_dialogs Dialogs sample
|
||||
|
||||
|
||||
This sample shows how to use the common dialogs available from wxWidgets. These
|
||||
dialogs are described in detail in the @ref overview_cmndlg.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_dialup Dialup sample
|
||||
|
||||
|
||||
This sample shows the wxDialUpManager
|
||||
class. In the status bar, it displays the information gathered through its
|
||||
interface: in particular, the current connection status (online or offline) and
|
||||
whether the connection is permanent (in which case a string `LAN' appears in
|
||||
the third status bar field - but note that you may be on a LAN not
|
||||
connected to the Internet, in which case you will not see this) or not.
|
||||
|
||||
|
||||
Using the menu entries, you may also dial or hang up the line if you have a
|
||||
modem attached and (this only makes sense for Windows) list the available
|
||||
connections.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_dnd DnD sample
|
||||
|
||||
|
||||
This sample shows both clipboard and drag and drop in action. It is quite non
|
||||
trivial and may be safely used as a basis for implementing the clipboard and
|
||||
drag and drop operations in a real-life program.
|
||||
|
||||
|
||||
When you run the sample, its screen is split in several parts. On the top,
|
||||
there are two listboxes which show the standard derivations of
|
||||
wxDropTarget:
|
||||
wxTextDropTarget and
|
||||
wxFileDropTarget.
|
||||
|
||||
|
||||
The middle of the sample window is taken by the log window which shows what is
|
||||
going on (of course, this only works in debug builds) and may be helpful to see
|
||||
the sequence of steps of data transfer.
|
||||
|
||||
|
||||
Finally, the last part is used for dragging text from it to either one of the
|
||||
listboxes (only one will accept it) or another application. The last
|
||||
functionality available from the main frame is to paste a bitmap from the
|
||||
clipboard (or, in the case of the Windows version, also a metafile) - it will be
|
||||
shown in a new frame.
|
||||
|
||||
|
||||
So far, everything we mentioned was implemented with minimal amount of code
|
||||
using standard wxWidgets classes. The more advanced features are demonstrated
|
||||
if you create a shape frame from the main frame menu. A shape is a geometric
|
||||
@@ -230,93 +230,93 @@
|
||||
bitmaps which allows them to be pasted/dropped in many other applications
|
||||
(and, under Windows, also as metafiles which are supported by most of Windows
|
||||
programs as well - try Write/Wordpad, for example).
|
||||
|
||||
|
||||
Take a look at DnDShapeDataObject class to see how you may use
|
||||
wxDataObject to achieve this.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_event Event sample
|
||||
|
||||
|
||||
The event sample demonstrates various features of the wxWidgets events. It
|
||||
shows using dynamic events and connecting/disconnecting the event handlers
|
||||
during run time and also using
|
||||
PushEventHandler() and
|
||||
PopEventHandler().
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_except Except(ions) sample
|
||||
|
||||
|
||||
This very simple sample shows how to use C++ exceptions in wxWidgets programs,
|
||||
i.e. where to catch the exception which may be thrown by the program code. It
|
||||
doesn't do anything very exciting by itself, you need to study its code to
|
||||
understand what goes on.
|
||||
|
||||
|
||||
You need to build the library with @c wxUSE_EXCEPTIONS being set to @c 1
|
||||
and compile your code with C++ exceptions support to be able to build this
|
||||
sample.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_exec Exec sample
|
||||
|
||||
|
||||
The exec sample demonstrates the wxExecute and
|
||||
wxShell functions. Both of them are used to execute the
|
||||
external programs and the sample shows how to do this synchronously (waiting
|
||||
until the program terminates) or asynchronously (notification will come later).
|
||||
|
||||
|
||||
It also shows how to capture the output of the child process in both
|
||||
synchronous and asynchronous cases and how to kill the processes with
|
||||
wxProcess::Kill and test for their existence with
|
||||
wxProcess::Exists.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_font Font sample
|
||||
|
||||
|
||||
The font sample demonstrates wxFont,
|
||||
wxFontEnumerator and
|
||||
wxFontMapper classes. It allows you to see the fonts
|
||||
available (to wxWidgets) on the computer and shows all characters of the
|
||||
chosen font as well.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_grid Grid sample
|
||||
|
||||
|
||||
TODO.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_html HTML samples
|
||||
|
||||
|
||||
Eight HTML samples (you can find them in directory @c samples/html)
|
||||
cover all features of the HTML sub-library.
|
||||
|
||||
|
||||
@li @b Test demonstrates how to create wxHtmlWindow
|
||||
and also shows most supported HTML tags.
|
||||
|
||||
|
||||
@li @b Widget shows how you can embed ordinary controls or windows within an
|
||||
HTML page. It also nicely explains how to write new tag handlers and extend
|
||||
the library to work with unsupported tags.
|
||||
|
||||
|
||||
@li @b About may give you an idea how to write good-looking About boxes.
|
||||
|
||||
|
||||
@li @b Zip demonstrates use of virtual file systems in wxHTML. The zip archives
|
||||
handler (ships with wxWidgets) allows you to access HTML pages stored
|
||||
in a compressed archive as if they were ordinary files.
|
||||
|
||||
|
||||
@li @b Virtual is yet another virtual file systems demo. This one generates pages at run-time.
|
||||
You may find it useful if you need to display some reports in your application.
|
||||
|
||||
|
||||
@li @b Printing explains use of wxHtmlEasyPrinting
|
||||
class which serves as as-simple-as-possible interface for printing HTML
|
||||
documents without much work. In fact, only few function calls are sufficient.
|
||||
|
||||
|
||||
@li @b Help and @b Helpview are variations on displaying HTML help
|
||||
(compatible with MS HTML Help Workshop). @e Help shows how to embed
|
||||
wxHtmlHelpController in your application
|
||||
while @e Helpview is a simple tool that only pops up the help window and
|
||||
displays help books given at command line.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_image Image sample
|
||||
|
||||
|
||||
The image sample demonstrates use of the wxImage class
|
||||
and shows how to download images in a variety of formats, currently PNG, GIF,
|
||||
TIFF, JPEG, BMP, PNM and PCX. The top of the sample shows two rectangles, one
|
||||
@@ -324,7 +324,7 @@
|
||||
wxBitmap, converted to a wxImage, saved as a PNG image
|
||||
and then reloaded from the PNG file again so that conversions between wxImage
|
||||
and wxBitmap as well as loading and saving PNG files are tested.
|
||||
|
||||
|
||||
At the bottom of the main frame there is a test for using a monochrome bitmap by
|
||||
drawing into a wxMemoryDC. The bitmap is then drawn
|
||||
specifying the foreground and background colours with
|
||||
@@ -332,25 +332,25 @@
|
||||
wxDC::SetTextBackground (on the left). The
|
||||
bitmap is then converted to a wxImage and the foreground colour (black) is
|
||||
replaced with red using wxImage::Replace.
|
||||
|
||||
|
||||
This sample also contains the code for testing the image rotation and resizing
|
||||
and using raw bitmap access, see the corresponding menu commands.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_internat Internat(ionalization) sample
|
||||
|
||||
|
||||
The not very clearly named internat sample demonstrates the wxWidgets
|
||||
internationalization (i18n for short from now on) features. To be more
|
||||
precise, it only shows localization support, i.e. support for translating the
|
||||
program messages into another language while true i18n would also involve
|
||||
changing the other aspects of the programs behaviour.
|
||||
|
||||
|
||||
More information about this sample can be found in the @c readme.txt file in
|
||||
its directory. Please also see the @ref overview_i18n.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_layout Layout sample
|
||||
|
||||
|
||||
The layout sample demonstrates the two different layout systems offered
|
||||
by wxWidgets. When starting the program, you will see a frame with some
|
||||
controls and some graphics. The controls will change their size whenever
|
||||
@@ -359,70 +359,70 @@
|
||||
class. See also the overview and the
|
||||
wxIndividualLayoutConstraint
|
||||
class for further information.
|
||||
|
||||
|
||||
The menu in this sample offers two more tests, one showing how to use
|
||||
a wxBoxSizer in a simple dialog and the other one
|
||||
showing how to use sizers in connection with a wxNotebook
|
||||
class. See also wxSizer.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_listctrl Listctrl sample
|
||||
|
||||
|
||||
This sample shows the wxListCtrl control. Different modes
|
||||
supported by the control (list, icons, small icons, report) may be chosen from
|
||||
the menu.
|
||||
|
||||
|
||||
The sample also provides some timings for adding/deleting/sorting a lot of
|
||||
(several thousands) items into the control.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_mediaplayer Mediaplayer sample
|
||||
|
||||
|
||||
This sample demonstrates how to use all the features of
|
||||
wxMediaCtrl and play various types of sound, video,
|
||||
and other files.
|
||||
|
||||
|
||||
It replaces the old dynamic sample.
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_notebook Notebook sample
|
||||
|
||||
|
||||
This samples shows wxBookCtrl family of controls.
|
||||
Although initially it was written to demonstrate wxNotebook
|
||||
only, it can now be also used to see wxListbook,
|
||||
wxChoicebook and wxTreebook in action.
|
||||
Test each of the controls, their orientation, images and pages using
|
||||
Test each of the controls, their orientation, images and pages using
|
||||
commands through menu.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_render Render sample
|
||||
|
||||
|
||||
This sample shows how to replace the default wxWidgets
|
||||
renderer and also how to write a shared library
|
||||
(DLL) implementing a renderer and load and unload it during the run-time.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_scrollsub Scroll subwindow sample
|
||||
|
||||
|
||||
This sample demonstrates use of the wxScrolledWindow
|
||||
class including placing subwindows into it and drawing simple graphics. It uses the
|
||||
SetTargetWindow method and thus the effect
|
||||
of scrolling does not show in the scrolled window itself, but in one of its subwindows.
|
||||
|
||||
|
||||
Additionally, this samples demonstrates how to optimize drawing operations in wxWidgets,
|
||||
in particular using the wxWindow::IsExposed method with
|
||||
the aim to prevent unnecessary drawing in the window and thus reducing or removing
|
||||
flicker on screen.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_sockets Sockets sample
|
||||
|
||||
|
||||
The sockets sample demonstrates how to use the communication facilities
|
||||
provided by wxSocket. There are two different
|
||||
applications in this sample: a server, which is implemented using a
|
||||
wxSocketServer object, and a client, which
|
||||
is implemented as a wxSocketClient.
|
||||
|
||||
|
||||
The server binds to the local address, using TCP port number 3000,
|
||||
sets up an event handler to be notified of incoming connection requests
|
||||
(@b wxSOCKET_CONNECTION events), and sits there, waiting for clients
|
||||
@@ -435,13 +435,13 @@
|
||||
handler is the same for all connections; to find out which socket the
|
||||
event is addressed to, the GetSocket function
|
||||
is used.
|
||||
|
||||
|
||||
Although it might take some time to get used to the event-oriented
|
||||
system upon which wxSocket is built, the benefits are many. See, for
|
||||
example, that the server application, while being single-threaded
|
||||
(and of course without using fork() or ugly select() loops) can handle
|
||||
an arbitrary number of connections.
|
||||
|
||||
|
||||
The client starts up unconnected, so you can use the Connect... option
|
||||
to specify the address of the server you are going to connect to (the
|
||||
TCP port number is hard-coded as 3000). Once connected, a number of
|
||||
@@ -454,70 +454,70 @@
|
||||
both clients and connection objects in the server set up an event handler
|
||||
to catch @b wxSOCKET_LOST events, each one is immediately notified
|
||||
if the other end closes the connection.
|
||||
|
||||
|
||||
There is also a URL test which shows how to use
|
||||
the wxURL class to fetch data from a given URL.
|
||||
|
||||
|
||||
The sockets sample is work in progress. Some things to do:
|
||||
|
||||
|
||||
@li More tests for basic socket functionality.
|
||||
@li More tests for protocol classes (wxProtocol and its descendants).
|
||||
@li Tests for the recently added (and still in alpha stage) datagram sockets.
|
||||
@li New samples which actually do something useful (suggestions accepted).
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_sound Sound sample
|
||||
|
||||
|
||||
The @c sound sample shows how to use wxSound for simple
|
||||
audio output (e.g. notifications).
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_statbar Statbar sample
|
||||
|
||||
|
||||
This sample shows how to create and use wxStatusBar. Although most of the
|
||||
samples have a statusbar, they usually only create a default one and only
|
||||
do it once.
|
||||
|
||||
|
||||
Here you can see how to recreate the statusbar (with possibly different number
|
||||
of fields) and how to use it to show icons/bitmaps and/or put arbitrary
|
||||
controls into it.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_taborder Tab order sample
|
||||
|
||||
This sample allows to test keyboard navigation (mostly done using the
|
||||
|
||||
This sample allows to test keyboard navigation (mostly done using the
|
||||
@c TAB key, hence the sample name) between different controls.
|
||||
It shows the use of wxWindow::MoveBeforeInTabOrder() and
|
||||
It shows the use of wxWindow::MoveBeforeInTabOrder() and
|
||||
MoveAfterInTabOrder() methods to change
|
||||
the default order of the windows in the navigation chain and of
|
||||
the default order of the windows in the navigation chain and of
|
||||
wxWindow::Navigate() for moving focus along this
|
||||
chain.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_text Text sample
|
||||
|
||||
|
||||
This sample demonstrates four features: firstly the use and many variants of
|
||||
the wxTextCtrl class (single line, multi line, read only,
|
||||
password, ignoring TAB, ignoring ENTER).
|
||||
|
||||
|
||||
Secondly it shows how to intercept a wxKeyEvent in both
|
||||
the raw form using the @c EVT_KEY_UP and @c EVT_KEY_DOWN macros and the
|
||||
higher level from using the @c EVT_CHAR macro. All characters will be logged
|
||||
in a log window at the bottom of the main window. By pressing some of the function
|
||||
keys, you can test some actions in the text ctrl as well as get statistics on the
|
||||
text ctrls, which is useful for testing if these statistics actually are correct.
|
||||
|
||||
|
||||
Thirdly, on platforms which support it, the sample will offer to copy text to the
|
||||
wxClipboard and to paste text from it. The GTK version will
|
||||
use the so called PRIMARY SELECTION, which is the pseudo clipboard under X and
|
||||
best known from pasting text to the XTerm program.
|
||||
|
||||
|
||||
Last not least: some of the text controls have tooltips and the sample also shows
|
||||
how tooltips can be centrally disabled and their latency controlled.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_thread Thread sample
|
||||
|
||||
|
||||
This sample demonstrates use of threads in connection with GUI programs.
|
||||
There are two fundamentally different ways to use threads in GUI programs and
|
||||
either way has to take care of the fact that the GUI library itself usually
|
||||
@@ -527,22 +527,22 @@
|
||||
background. In order to make communication between the main thread and the
|
||||
worker threads possible, wxWidgets offers the wxPostEvent
|
||||
function and this sample makes use of this function.
|
||||
|
||||
|
||||
The other way to use a so called Mutex (such as those offered in the wxMutex
|
||||
class) that prevent threads from accessing the GUI classes as long as any other
|
||||
thread accesses them. For this, wxWidgets has the wxMutexGuiEnter
|
||||
and wxMutexGuiLeave functions, both of which are
|
||||
used and tested in the sample as well.
|
||||
|
||||
|
||||
See also @ref overview_thread and wxThread.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_toolbar Toolbar sample
|
||||
|
||||
|
||||
The toolbar sample shows the wxToolBar class in action.
|
||||
|
||||
|
||||
The following things are demonstrated:
|
||||
|
||||
|
||||
@li Creating the toolbar using wxToolBar::AddTool and wxToolBar::AddControl: see
|
||||
MyApp::InitToolbar in the sample.
|
||||
@li Using @c EVT_UPDATE_UI handler for automatically enabling/disabling
|
||||
@@ -550,46 +550,46 @@
|
||||
in MyFrame::OnUpdateCopyAndCut.
|
||||
@li Using wxToolBar::DeleteTool and wxToolBar::InsertTool to dynamically update the
|
||||
toolbar.
|
||||
|
||||
|
||||
Some buttons in the main toolbar are check buttons, i.e. they stay checked when
|
||||
pressed. On the platforms which support it, the sample also adds a combobox
|
||||
to the toolbar showing how you can use arbitrary controls and not only buttons
|
||||
in it.
|
||||
|
||||
|
||||
If you toggle another toolbar in the sample (using @c Ctrl-A) you will also
|
||||
see the radio toolbar buttons in action: the first three buttons form a radio
|
||||
group, i.e. checking any of them automatically unchecks the previously
|
||||
checked one.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_treectrl Treectrl sample
|
||||
|
||||
|
||||
This sample demonstrates using the wxTreeCtrl class. Here
|
||||
you may see how to process various notification messages sent by this control
|
||||
and also when they occur (by looking at the messages in the text control in
|
||||
the bottom part of the frame).
|
||||
|
||||
|
||||
Adding, inserting and deleting items and branches from the tree as well as
|
||||
sorting (in default alphabetical order as well as in custom one) is
|
||||
demonstrated here as well - try the corresponding menu entries.
|
||||
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_widgets Widgets sample
|
||||
|
||||
|
||||
The widgets sample is the main presentation program for most simple and advanced
|
||||
native controls and complex generic widgets provided by wxWidgets.
|
||||
The sample tests their basic functionality, events, placement, modification
|
||||
in terms of colour and font as well as the possibility to change
|
||||
the controls programmatically, such as adding an item to a list box etc.
|
||||
All widgets are categorized for easy browsing.
|
||||
|
||||
|
||||
|
||||
@subsection page_utils_samples_wizard Wizard sample
|
||||
|
||||
|
||||
This sample shows the so-called wizard dialog (implemented using
|
||||
wxWizard and related classes). It shows almost all
|
||||
features supported:
|
||||
|
||||
|
||||
@li Using bitmaps with the wizard and changing them depending on the page
|
||||
shown (notice that wxValidationPage in the sample has a different image from
|
||||
the other ones)
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
@section overview_dataobject_source The data provider (source) duties
|
||||
|
||||
The data provider is responsible for creating a wxDataObject containing the
|
||||
The data provider is responsible for creating a wxDataObject containing the
|
||||
data to be transferred. Then it should either pass it to the clipboard using
|
||||
wxClipboard::SetData function or to wxDropSource and call wxDropSource::DoDragDrop
|
||||
function.
|
||||
@@ -69,12 +69,12 @@
|
||||
@section overview_dataobject_target The data receiver (target) duties
|
||||
|
||||
To receive (paste in usual terminology) data from the clipboard, you should
|
||||
create a wxDataObject derived class which supports the data formats you need
|
||||
create a wxDataObject derived class which supports the data formats you need
|
||||
and pass it as argument to wxClipboard::GetData. If it returns @false,
|
||||
no data in (any of) the supported format(s) is available. If it returns @true,
|
||||
the data has been successfully transferred to wxDataObject.
|
||||
|
||||
For drag and drop case, the wxDropTarget::OnData virtual function will be called
|
||||
For drag and drop case, the wxDropTarget::OnData virtual function will be called
|
||||
when a data object is dropped, from which the data itself may be requested by calling
|
||||
wxDropTarget::GetData method which fills the data object.
|
||||
|
||||
|
@@ -49,12 +49,12 @@
|
||||
|
||||
@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 -
|
||||
wxTimeSpan and wxDateSpan - which represent the intervals of time.
|
||||
|
||||
There are also helper classes which are used together with wxDateTime:
|
||||
wxDateTimeHolidayAuthority which is used to determine whether a given date
|
||||
wxDateTimeHolidayAuthority which is used to determine whether a given date
|
||||
is a holiday or not and wxDateTimeWorkDays which is a derivation of this
|
||||
class for which (only) Saturdays and Sundays are the holidays. See more about
|
||||
these classes in the discussion of the holidays (see @ref overview_datetime_holidays).
|
||||
|
@@ -11,16 +11,16 @@
|
||||
@page overview_dc Device Contexts
|
||||
|
||||
Classes: wxBufferedDC, wxBufferedPaintDC, wxDC, wxPostScriptDC,
|
||||
wxMetafileDC, wxMemoryDC, wxPrinterDC, wxScreenDC, wxClientDC,
|
||||
wxMetafileDC, wxMemoryDC, wxPrinterDC, wxScreenDC, wxClientDC,
|
||||
wxPaintDC, wxWindowDC.
|
||||
|
||||
A wxDC is a @e device context onto which graphics and text can be drawn.
|
||||
The device context is intended to represent a number of output devices in a
|
||||
The device context is intended to represent a number of output devices in a
|
||||
generic way, with the same API being used throughout.
|
||||
|
||||
Some device contexts are created temporarily in order to draw on a window.
|
||||
This is @true of wxScreenDC, wxClientDC, wxPaintDC, and wxWindowDC.
|
||||
The following describes the differences between these device contexts and
|
||||
The following describes the differences between these device contexts and
|
||||
when you should use them.
|
||||
|
||||
@li @b wxScreenDC. Use this to paint on the screen, as opposed to an individual window.
|
||||
|
@@ -22,7 +22,7 @@
|
||||
@li @ref overview_debugging_dbgctx
|
||||
@li @ref overview_debugging_dbgmacros
|
||||
@li @ref overview_debugging_logging
|
||||
@li @ref overview_debugging_dbgctx2
|
||||
@li @ref overview_debugging_dbgctx2
|
||||
|
||||
|
||||
<hr>
|
||||
@@ -31,7 +31,7 @@
|
||||
@section overview_debugging_dbgctx wxDebugContext
|
||||
|
||||
wxDebugContext is a class that never gets instantiated, but ties together
|
||||
various static functions and variables. It allows you to dump all objects to that stream,
|
||||
various static functions and variables. It allows you to dump all objects to that stream,
|
||||
write statistics about object allocation, and check memory for errors.
|
||||
|
||||
It is good practice to define a wxObject::Dump member function for each class you derive
|
||||
@@ -47,9 +47,9 @@
|
||||
and compiler -- some systems don't allow all memory logging to be enabled). See the
|
||||
memcheck sample for example of usage.
|
||||
|
||||
For wxDebugContext to do its work, the @e new and @e delete operators for wxObject
|
||||
have been redefined to store extra information about dynamically allocated objects
|
||||
(but not statically declared objects).
|
||||
For wxDebugContext to do its work, the @e new and @e delete operators for wxObject
|
||||
have been redefined to store extra information about dynamically allocated objects
|
||||
(but not statically declared objects).
|
||||
|
||||
This slows down a debugging version of an application, but can
|
||||
find difficult-to-detect memory leaks (objects are not
|
||||
@@ -64,7 +64,7 @@
|
||||
@endcode
|
||||
|
||||
All occurrences of 'new' in wxWidgets and your own application will use
|
||||
the overridden form of the operator with two extra arguments. This means that
|
||||
the overridden form of the operator with two extra arguments. This means that
|
||||
the debugging output (and error messages reporting memory problems) will tell you what
|
||||
file and on what line you allocated the object. Unfortunately not all
|
||||
compilers allow this definition to work properly, but most do.
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
@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.
|
||||
|
||||
|
||||
|
@@ -37,29 +37,29 @@
|
||||
|
||||
@section overview_dialog_autoscrolling Automatic scrolling dialogs
|
||||
|
||||
As an ever greater variety of mobile hardware comes to market, it becomes more
|
||||
imperative for wxWidgets applications to adapt to these platforms without putting
|
||||
As an ever greater variety of mobile hardware comes to market, it becomes more
|
||||
imperative for wxWidgets applications to adapt to these platforms without putting
|
||||
too much burden on the programmer. One area where wxWidgets can help is in adapting
|
||||
dialogs for the lower resolution screens that inevitably accompany a smaller form factor.
|
||||
wxDialog therefore supplies a global wxDialogLayoutAdapter class that implements
|
||||
wxDialog therefore supplies a global wxDialogLayoutAdapter class that implements
|
||||
automatic scrolling adaptation for most sizer-based custom dialogs.
|
||||
|
||||
Many applications should therefore be able to adapt to small displays with little
|
||||
Many applications should therefore be able to adapt to small displays with little
|
||||
or no work, as far as dialogs are concerned.
|
||||
By default this adaptation is off. To switch scrolling adaptation on globally in
|
||||
By default this adaptation is off. To switch scrolling adaptation on globally in
|
||||
your application, call the static function wxDialog::EnableLayoutAdaptation passing @true.
|
||||
You can also adjust adaptation on a per-dialog basis by calling
|
||||
wxDialog::SetLayoutAdaptationMode with one of @c wxDIALOG_ADAPTATION_MODE_DEFAULT
|
||||
wxDialog::SetLayoutAdaptationMode with one of @c wxDIALOG_ADAPTATION_MODE_DEFAULT
|
||||
(use the global setting), @c wxDIALOG_ADAPTATION_MODE_ENABLED or @c wxDIALOG_ADAPTATION_MODE_DISABLED.
|
||||
|
||||
The last two modes override the global adaptation setting.
|
||||
With adaptation enabled, if the display size is too small for the dialog, wxWidgets (or rather the
|
||||
standard adapter class wxStandardDialogLayoutAdapter) will make part of the dialog scrolling,
|
||||
leaving standard buttons in a non-scrolling part at the bottom of the dialog.
|
||||
This is done as follows, in wxDialogLayoutAdapter::DoLayoutAdaptation called from
|
||||
This is done as follows, in wxDialogLayoutAdapter::DoLayoutAdaptation called from
|
||||
within wxDialog::Show or wxDialog::ShowModal:
|
||||
|
||||
@li If wxDialog::GetContentWindow returns a window derived from wxBookCtrlBase,
|
||||
@li If wxDialog::GetContentWindow returns a window derived from wxBookCtrlBase,
|
||||
the pages are made scrollable and no other adaptation is done.
|
||||
@li wxWidgets looks for a wxStdDialogButtonSizer and uses it for the non-scrolling part.
|
||||
@li If that search failed, wxWidgets looks for a horizontal wxBoxSizer with one or more
|
||||
@@ -67,17 +67,17 @@
|
||||
@li If that search failed too, wxWidgets finds 'loose' standard buttons (in any kind of sizer)
|
||||
and adds them to a wxStdDialogButtonSizer.
|
||||
If no standard buttons were found, the whole dialog content will scroll.
|
||||
@li All the children apart from standard buttons are reparented onto a new wxScrolledWindow
|
||||
object, using the old top-level sizer for the scrolled window and creating a new top-level
|
||||
@li All the children apart from standard buttons are reparented onto a new wxScrolledWindow
|
||||
object, using the old top-level sizer for the scrolled window and creating a new top-level
|
||||
sizer to lay out the scrolled window and standard button sizer.
|
||||
|
||||
|
||||
@subsection overview_dialog_autoscrolling_custom Customising scrolling adaptation
|
||||
|
||||
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
|
||||
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
|
||||
wxDialog::SetLayoutAdaptationLevel. By default, all the steps described above will be
|
||||
performed but by setting the level to 1, for example, you can choose to only look for
|
||||
wxStdDialogButtonSizer.
|
||||
|
||||
You can use wxDialog::AddMainButtonId to add identifiers for buttons that should also be
|
||||
@@ -88,7 +88,7 @@
|
||||
the functions CanDoLayoutAdaptation and DoLayoutAdaptation to test for adaptation applicability
|
||||
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.
|
||||
|
||||
|
||||
@@ -100,13 +100,13 @@
|
||||
@li The dialog doesn't use sizers.
|
||||
@li The dialog implementation makes assumptions about the window hierarchy,
|
||||
for example getting the parent of a control and casting to the dialog class.
|
||||
@li The dialog does custom painting and/or event handling not handled by the scrolled window.
|
||||
@li The dialog does custom painting and/or event handling not handled by the scrolled window.
|
||||
If this problem can be solved globally, you can derive a new adapter class from
|
||||
wxStandardDialogLayoutAdapter and override its CreateScrolledWindow function to return
|
||||
wxStandardDialogLayoutAdapter and override its CreateScrolledWindow function to return
|
||||
an instance of your own class.
|
||||
@li The dialog has unusual layout, for example a vertical sizer containing a mixture of
|
||||
@li The dialog has unusual layout, for example a vertical sizer containing a mixture of
|
||||
standard buttons and other controls.
|
||||
@li The dialog makes assumptions about the sizer hierarchy, for example to show or hide
|
||||
@li The dialog makes assumptions about the sizer hierarchy, for example to show or hide
|
||||
children of the top-level sizer. However, the original sizer hierarchy will still hold
|
||||
until Show or ShowModal is called.
|
||||
|
||||
@@ -115,19 +115,19 @@
|
||||
@li avoiding the above situations and assumptions;
|
||||
@li using wxStdDialogButtonSizer;
|
||||
@li only making assumptions about hierarchy immediately after the dialog is created;
|
||||
@li using an intermediate sizer under the main sizer, a @false top-level sizer that
|
||||
@li using an intermediate sizer under the main sizer, a @false top-level sizer that
|
||||
can be relied on to exist for the purposes of manipulating child sizers and windows;
|
||||
@li overriding wxDialog::GetContentWindow to return a book control if your dialog implements
|
||||
@li overriding wxDialog::GetContentWindow to return a book control if your dialog implements
|
||||
pages: wxWidgets will then only make the pages scrollable.
|
||||
|
||||
|
||||
@subsection overview_dialog_propertysheet wxPropertySheetDialog and wxWizard
|
||||
|
||||
Adaptation for wxPropertySheetDialog is always done by simply making the pages
|
||||
scrollable, since wxDialog::GetContentWindow returns the dialog's book control and
|
||||
Adaptation for wxPropertySheetDialog is always done by simply making the pages
|
||||
scrollable, since wxDialog::GetContentWindow returns the dialog's book control and
|
||||
this is handled by the standard layout adapter.
|
||||
|
||||
wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather
|
||||
wxWizard uses its own CanDoLayoutAdaptation and DoLayoutAdaptation functions rather
|
||||
than the global adapter: again, only the wizard pages are made scrollable.
|
||||
|
||||
*/
|
||||
|
@@ -29,22 +29,22 @@
|
||||
|
||||
@li @b Preparation: First of all, a data object must be created and
|
||||
initialized with the data you wish to drag. For example:
|
||||
|
||||
|
||||
@code
|
||||
wxTextDataObject my_data("This text will be dragged.");
|
||||
@endcode
|
||||
|
||||
@li <b>Drag start</b>: To start the dragging process (typically in response to a
|
||||
mouse click) you must call wxDropSource::DoDragDrop like this:
|
||||
|
||||
|
||||
@code
|
||||
wxDropSource dragSource( this );
|
||||
dragSource.SetData( my_data );
|
||||
wxDragResult result = dragSource.DoDragDrop( true );
|
||||
@endcode
|
||||
|
||||
@li @b Dragging: The call to DoDragDrop() blocks the program until the user releases
|
||||
the mouse button (unless you override the wxDropSource::GiveFeedback function to
|
||||
@li @b Dragging: The call to DoDragDrop() blocks the program until the user releases
|
||||
the mouse button (unless you override the wxDropSource::GiveFeedback function to
|
||||
do something special). When the mouse moves in a window of a program which understands
|
||||
the same drag-and-drop protocol (any program under Windows or any program supporting
|
||||
the XDnD protocol under X Windows), the corresponding wxDropTarget methods
|
||||
@@ -56,7 +56,7 @@
|
||||
@code
|
||||
switch (result)
|
||||
{
|
||||
case wxDragCopy:
|
||||
case wxDragCopy:
|
||||
// copy the data
|
||||
break;
|
||||
case wxDragMove:
|
||||
@@ -73,7 +73,7 @@
|
||||
follow the instructions below:
|
||||
|
||||
@li @b Initialization: For a window to be a drop target, it needs to have
|
||||
an associated wxDropTarget object. Normally, you will call wxWindow::SetDropTarget
|
||||
an associated wxDropTarget object. Normally, you will call wxWindow::SetDropTarget
|
||||
during window creation associating your drop target with it. You must derive a class
|
||||
from wxDropTarget and override its pure virtual methods. Alternatively, you may
|
||||
derive from wxTextDropTarget or wxFileDropTarget and override their OnDropText()
|
||||
@@ -83,7 +83,7 @@
|
||||
asks the associated wxDropTarget object if it accepts the data. For this,
|
||||
a wxDataObject must be associated with the drop target and this data object will
|
||||
be responsible for the format negotiation between the drag source and the drop target.
|
||||
If all goes well, then wxDropTarget::OnData will get called and the wxDataObject belonging
|
||||
If all goes well, then wxDropTarget::OnData will get called and the wxDataObject belonging
|
||||
to the drop target can get filled with data.
|
||||
|
||||
@li <b>The end</b>: After processing the data, DoDragDrop() returns either
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
@page overview_docview Document/View Framework
|
||||
|
||||
Classes: wxDocument, wxView, wxDocTemplate, wxDocManager, wxDocParentFrame,
|
||||
Classes: wxDocument, wxView, wxDocTemplate, wxDocManager, wxDocParentFrame,
|
||||
wxDocChildFrame, wxDocMDIParentFrame, wxDocMDIChildFrame,
|
||||
wxCommand, wxCommandProcessor
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
If a document's data changes, all views should be updated to reflect the change.
|
||||
The framework can provide many user-interface elements based on this model.
|
||||
|
||||
Once you have defined your own classes and the relationships between them, the framework
|
||||
Once you have defined your own classes and the relationships between them, the framework
|
||||
takes care of popping up file selectors, opening and closing files, asking the user to save
|
||||
modifications, routing menu commands to appropriate (possibly default) code, even
|
||||
some default print/preview functionality and support for command undo/redo.
|
||||
@@ -33,13 +33,13 @@
|
||||
The framework is highly modular, allowing overriding and replacement of functionality
|
||||
and objects to achieve more than the default behaviour.
|
||||
|
||||
These are the overall steps involved in creating an application based on the
|
||||
These are the overall steps involved in creating an application based on the
|
||||
document/view framework:
|
||||
|
||||
@li Define your own document and view classes, overriding a minimal set of
|
||||
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).
|
||||
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.
|
||||
@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
|
||||
@@ -136,7 +136,7 @@
|
||||
Class: wxView
|
||||
|
||||
The wxView class can be used to model the viewing and editing component of
|
||||
an application's file-based data. It is part of the document/view framework
|
||||
an application's file-based data. It is part of the document/view framework
|
||||
supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate
|
||||
and wxDocManager classes.
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
document templates, but each would be passed a different view class. When
|
||||
the user clicks on the Open menu item, the file selector is displayed
|
||||
with a list of possible file filters -- one for each wxDocTemplate. Selecting
|
||||
the filter selects the wxDocTemplate, and when a file is selected, that template
|
||||
the filter selects the wxDocTemplate, and when a file is selected, that template
|
||||
will be used for creating a document and view.
|
||||
|
||||
For the case where an application has one document type and one view type,
|
||||
@@ -192,7 +192,7 @@
|
||||
See the example application in @c samples/docview.
|
||||
|
||||
To use the wxDocTemplate class, you do not need to derive a new class.
|
||||
Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass)
|
||||
Just pass relevant information to the constructor including CLASSINFO(YourDocumentClass)
|
||||
and CLASSINFO(YourViewClass) to allow dynamic instance creation.
|
||||
|
||||
If you do not wish to use the wxWidgets method of creating document
|
||||
@@ -210,10 +210,10 @@
|
||||
The wxDocManager class is part of the document/view framework supported by wxWidgets,
|
||||
and cooperates with the wxView, wxDocument and wxDocTemplate classes.
|
||||
|
||||
A wxDocManager instance coordinates documents, views and document templates.
|
||||
It keeps a list of document and template instances, and much functionality is routed
|
||||
through this object, such as providing selection and file dialogs.
|
||||
The application can use this class 'as is' or derive a class and override some members
|
||||
A wxDocManager instance coordinates documents, views and document templates.
|
||||
It keeps a list of document and template instances, and much functionality is routed
|
||||
through this object, such as providing selection and file dialogs.
|
||||
The application can use this class 'as is' or derive a class and override some members
|
||||
to extend or change the functionality.
|
||||
|
||||
Create an instance of this class near the beginning of your application initialization,
|
||||
@@ -271,13 +271,13 @@
|
||||
to derive from it to allow different behaviour, such as popping up a scrolling
|
||||
list of files.
|
||||
|
||||
By calling wxFileHistory::UseMenu() you can associate a file menu with the file history.
|
||||
By calling wxFileHistory::UseMenu() you can associate a file menu with the file history.
|
||||
The menu will then be used for appending filenames that are added to the history.
|
||||
|
||||
Please notice that currently if the history already contained filenames when UseMenu()
|
||||
Please notice that currently if the history already contained filenames when UseMenu()
|
||||
is called (e.g. when initializing a second MDI child frame), the menu is not automatically
|
||||
initialized with the existing filenames in the history and so you need to call
|
||||
wxFileHistory::AddFilesToMenu() after UseMenu() explicitly in order to initialize the menu with
|
||||
wxFileHistory::AddFilesToMenu() after UseMenu() explicitly in order to initialize the menu with
|
||||
the existing list of MRU files (otherwise an assertion failure is raised in debug builds).
|
||||
|
||||
The filenames are appended using menu identifiers in the range @c wxID_FILE1 to @c wxID_FILE9.
|
||||
|
@@ -63,9 +63,9 @@
|
||||
member function in a derived class will not have any effect. These member
|
||||
functions take an event argument, and the class of event differs according to
|
||||
the type of event and the class of the originating window. For size events,
|
||||
wxSizeEvent is used. For menu commands and most control commands
|
||||
wxSizeEvent is used. For menu commands and most control commands
|
||||
(such as button presses), wxCommandEvent is used. When controls get more
|
||||
complicated, then specific event classes are used, such as wxTreeEvent for
|
||||
complicated, then specific event classes are used, such as wxTreeEvent for
|
||||
events from wxTreeCtrl windows.
|
||||
|
||||
As well as the event table in the implementation file, there must also be a
|
||||
@@ -152,9 +152,9 @@
|
||||
@li If the object is a wxWindow, @b ProcessEvent is recursively called on the window's
|
||||
wxValidator. If this returns @true, the function exits.
|
||||
@li @b SearchEventTable is called for this event handler. If this fails, the base
|
||||
class table is tried, and so on until no more tables exist or an appropriate
|
||||
class table is tried, and so on until no more tables exist or an appropriate
|
||||
function was found, in which case the function exits.
|
||||
@li The search is applied down the entire chain of event handlers (usually the chain has
|
||||
@li The search is applied down the entire chain of event handlers (usually the chain has
|
||||
a length of one). If this succeeds, the function exits.
|
||||
@li If the object is a wxWindow and the event is set to set to propagate (in the library only
|
||||
wxCommandEvent based events are set to propagate), @b ProcessEvent is recursively applied
|
||||
@@ -232,13 +232,13 @@
|
||||
|
||||
While generically wxEvents can be generated both by user
|
||||
actions (e.g. resize of a wxWindow) and by calls to functions
|
||||
(e.g. wxWindow::SetSize), wxWidgets controls normally send wxCommandEvent-derived
|
||||
(e.g. wxWindow::SetSize), wxWidgets controls normally send wxCommandEvent-derived
|
||||
events only for the user-generated events. The only @b exceptions to this rule are:
|
||||
|
||||
@li wxNotebook::AddPage: No event-free alternatives
|
||||
@li wxNotebook::AdvanceSelection: No event-free alternatives
|
||||
@li wxNotebook::DeletePage: No event-free alternatives
|
||||
@li wxNotebook::SetSelection: Use wxNotebook::ChangeSelection instead, as
|
||||
@li wxNotebook::SetSelection: Use wxNotebook::ChangeSelection instead, as
|
||||
wxNotebook::SetSelection is deprecated
|
||||
@li wxTreeCtrl::Delete: No event-free alternatives
|
||||
@li wxTreeCtrl::DeleteAllItems: No event-free alternatives
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
In fact, you don't have to derive a new class from a window class
|
||||
if you don't want to. You can derive a new class from wxEvtHandler instead,
|
||||
defining the appropriate event table, and then call wxWindow::SetEventHandler
|
||||
defining the appropriate event table, and then call wxWindow::SetEventHandler
|
||||
(or, preferably, wxWindow::PushEventHandler) to make this
|
||||
event handler the object that responds to events. This way, you can avoid
|
||||
a lot of class derivation, and use instances of the same event handler class (but different
|
||||
@@ -461,7 +461,7 @@
|
||||
@row2col{EVT_CUSTOM_RANGE(event\, id1\, id2\, func),
|
||||
The same as EVT_CUSTOM, but responds to a range of window identifiers.}
|
||||
@row2col{EVT_COMMAND(id\, event\, func),
|
||||
The same as EVT_CUSTOM, but expects a member function with a
|
||||
The same as EVT_CUSTOM, but expects a member function with a
|
||||
wxCommandEvent argument.}
|
||||
@row2col{EVT_COMMAND_RANGE(id1\, id2\, event\, func),
|
||||
The same as EVT_CUSTOM_RANGE, but
|
||||
|
@@ -36,7 +36,7 @@
|
||||
Its main methods are ChangePathTo() and OpenFile(). This class
|
||||
is most often used by the end user.
|
||||
@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
|
||||
wxFileSystem's AddHandler() method. In the new handler you only need to
|
||||
override the OpenFile() and CanOpen() methods.
|
||||
|
@@ -26,14 +26,14 @@
|
||||
|
||||
@beginDefList
|
||||
@itemdef{Point size, This is the standard way of referring to text size.}
|
||||
@itemdef{Family,
|
||||
@itemdef{Family,
|
||||
Supported families are:
|
||||
@b wxDEFAULT, @b wxDECORATIVE, @b wxROMAN, @b wxSCRIPT, @b wxSWISS, @b wxMODERN.
|
||||
@b wxMODERN is a fixed pitch font; the others are either fixed or variable pitch.}
|
||||
@itemdef{Style, The value can be @b wxNORMAL, @b wxSLANT or @b wxITALIC.}
|
||||
@itemdef{Weight, The value can be @b wxNORMAL, @b wxLIGHT or @b wxBOLD.}
|
||||
@itemdef{Underlining, The value can be @true or @false.}
|
||||
@itemdef{Face name,
|
||||
@itemdef{Face name,
|
||||
An optional string specifying the actual typeface to be used. If @NULL,
|
||||
a default typeface will chosen based on the family.}
|
||||
@itemdef{Encoding,
|
||||
|
@@ -21,8 +21,8 @@
|
||||
(see @ref overview_unicode).
|
||||
|
||||
Font encoding support is ensured by several classes:
|
||||
wxFont itself, but also wxFontEnumerator and wxFontMapper. wxFont encoding
|
||||
support is reflected by a (new) constructor parameter @e encoding which takes
|
||||
wxFont itself, but also wxFontEnumerator and wxFontMapper. wxFont encoding
|
||||
support is reflected by a (new) constructor parameter @e encoding which takes
|
||||
one of the following values (elements of enumeration type @c wxFontEncoding):
|
||||
|
||||
@beginDefList
|
||||
|
@@ -54,7 +54,7 @@
|
||||
giving it a menu and a status bar in its constructor. Also, any class
|
||||
that wishes to respond to any "event" (such as mouse clicks or
|
||||
messages from the menu or a button) must declare an event table
|
||||
using the macro below.
|
||||
using the macro below.
|
||||
|
||||
Finally, the way to react to such events must be done in "handlers".
|
||||
In our sample, we react to two menu items, one for "Quit" and one for
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
wxHTML can be used as a generic rich text viewer - for example to display
|
||||
a nice About Box (like those of GNOME apps) or to display the result of
|
||||
database searching. There is a wxFileSystem class which allows you to use
|
||||
database searching. There is a wxFileSystem class which allows you to use
|
||||
your own virtual file systems.
|
||||
|
||||
wxHtmlWindow supports tag handlers. This means that you can easily
|
||||
@@ -60,7 +60,7 @@
|
||||
@endcode
|
||||
|
||||
@subsection overview_html_quickstart_disphelp Displaying Help
|
||||
|
||||
|
||||
See wxHtmlHelpController.
|
||||
|
||||
@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow
|
||||
@@ -113,30 +113,30 @@
|
||||
wxHtmlPrintout, normal wxWidgets printout class.
|
||||
|
||||
And finally there is the low level class wxHtmlDCRenderer which you can use to
|
||||
render HTML into a rectangular area on any DC.
|
||||
render HTML into a rectangular area on any DC.
|
||||
|
||||
It supports rendering into multiple rectangles with the same
|
||||
width. (The most common use of this is placing one rectangle on each page or
|
||||
width. (The most common use of this is placing one rectangle on each page or
|
||||
printing into two columns.)
|
||||
|
||||
|
||||
@section overview_html_helpformats Help Files Format
|
||||
|
||||
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.
|
||||
(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.
|
||||
|
||||
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
|
||||
You can make a regular zip archive of these files, plus the HTML and any
|
||||
image files, for wxHTML (or helpview) to read; and the @c .zip file can
|
||||
optionally be renamed to @c .htb.
|
||||
|
||||
@subsection overview_html_helpformats_hhp Header file (.hhp)
|
||||
|
||||
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):
|
||||
|
||||
@code
|
||||
@@ -212,8 +212,8 @@
|
||||
@endcode
|
||||
|
||||
@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.
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
The wxHTML library provides a mechanism for reading and displaying
|
||||
files of many different file formats.
|
||||
|
||||
wxHtmlWindow::LoadPage can load not only HTML files but any known file.
|
||||
wxHtmlWindow::LoadPage can load not only HTML files but any known file.
|
||||
To make a file type known to wxHtmlWindow you must create a wxHtmlFilter filter and
|
||||
register it using wxHtmlWindow::AddFilter.
|
||||
|
||||
@@ -251,15 +251,15 @@
|
||||
|
||||
@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.
|
||||
|
||||
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.
|
||||
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();.)
|
||||
|
||||
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"
|
||||
to the parent container. See explanation:
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
@li Parse text between the tag and paired ending tag (if present)
|
||||
@li Restore original parser state
|
||||
|
||||
See wxHtmlWinParser for methods for modifying parser's state.
|
||||
See wxHtmlWinParser for methods for modifying parser's state.
|
||||
In general you can do things like opening/closing containers, changing colors, fonts etc.
|
||||
|
||||
@subsection overview_html_handlers_custom Providing own tag handlers
|
||||
@@ -346,7 +346,7 @@
|
||||
for details). Handler definition must start with @b TAG_HANDLER_BEGIN macro
|
||||
and end with @b TAG_HANDLER_END macro.
|
||||
|
||||
I strongly recommend to have a look at @e include/wxhtml/mod_templ.h file.
|
||||
I strongly recommend to have a look at @e include/wxhtml/mod_templ.h file.
|
||||
Otherwise you won't understand the structure of macros.
|
||||
|
||||
See macros reference:
|
||||
@@ -360,7 +360,7 @@
|
||||
@li @b TAG_HANDLER_VARS:
|
||||
This macro starts block of variables definitions. (Variables are identical
|
||||
to class attributes.) Example:
|
||||
|
||||
|
||||
@code
|
||||
TAG_HANDLER_BEGIN(VARS_ONLY, "CRAZYTAG")
|
||||
TAG_HANDLER_VARS
|
||||
@@ -368,14 +368,14 @@
|
||||
wxString something_else;
|
||||
TAG_HANDLER_END(VARS_ONLY)
|
||||
@endcode
|
||||
|
||||
|
||||
This macro is used only in rare cases.
|
||||
|
||||
@li @b TAG_HANDLER_CONSTR(@e name):
|
||||
This macro supplies object constructor. @e name is same name as the one
|
||||
from TAG_HANDLER_BEGIN macro. Body of constructor follow after
|
||||
this macro (you must use { and } ). Example:
|
||||
|
||||
|
||||
@code
|
||||
TAG_HANDLER_BEGIN(VARS2, "CRAZYTAG")
|
||||
TAG_HANDLER_VARS
|
||||
@@ -386,7 +386,7 @@
|
||||
} // !!!!!!
|
||||
TAG_HANDLER_END(VARS2)
|
||||
@endcode
|
||||
|
||||
|
||||
Never used in wxHTML :-)
|
||||
|
||||
@li @b TAG_HANDLER_PROC(@e varib):
|
||||
@@ -395,7 +395,7 @@
|
||||
@e tag. Body of method follows after this macro.
|
||||
Note than you must use { and } !
|
||||
Example:
|
||||
|
||||
|
||||
@code
|
||||
TAG_HANDLER_BEGIN(TITLE, "TITLE")
|
||||
TAG_HANDLER_PROC(tag)
|
||||
@@ -423,7 +423,7 @@
|
||||
@li @b TAGS_MODULE_END(@e modname):
|
||||
Ends the definition of module.
|
||||
Example:
|
||||
|
||||
|
||||
@code
|
||||
TAGS_MODULE_BEGIN(Examples)
|
||||
TAGS_MODULE_ADD(VARS_ONLY)
|
||||
@@ -442,7 +442,7 @@
|
||||
Following tables list all tags known to wxHTML, together with supported parameters.
|
||||
|
||||
A tag has general form of @c tagname param_1 param_2 ... param_n where param_i is
|
||||
either @c paramname="paramvalue" or @c paramname=paramvalue - these two are equivalent.
|
||||
either @c paramname="paramvalue" or @c paramname=paramvalue - these two are equivalent.
|
||||
Unless stated otherwise, wxHTML is case-insensitive.
|
||||
|
||||
@subsection overview_html_supptags_commonvalues Table of common parameter values
|
||||
|
@@ -295,7 +295,7 @@ MyDialog::MyDialog(wxFrame *parent, wxWindowID id, const wxString &title )
|
||||
{
|
||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
// create text ctrl with minimal size 100x60 that is horizontally and
|
||||
// create text ctrl with minimal size 100x60 that is horizontally and
|
||||
// vertically stretchable with a border width of 10
|
||||
topsizer->Add(
|
||||
new wxTextCtrl( this, -1, "My text.", wxDefaultPosition, wxSize(100,60), wxTE_MULTILINE),
|
||||
@@ -303,20 +303,20 @@ MyDialog::MyDialog(wxFrame *parent, wxWindowID id, const wxString &title )
|
||||
|
||||
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
//create two buttons that are horizontally unstretchable,
|
||||
//create two buttons that are horizontally unstretchable,
|
||||
// with an all-around border with a width of 10 and implicit top alignment
|
||||
button_sizer->Add(
|
||||
new wxButton( this, wxID_OK, "OK" ),
|
||||
wxSizerFlags(0).Align().Border(wxALL, 10));
|
||||
wxSizerFlags(0).Align().Border(wxALL, 10));
|
||||
|
||||
button_sizer->Add(
|
||||
new wxButton( this, wxID_CANCEL, "Cancel" ),
|
||||
wxSizerFlags(0).Align().Border(wxALL, 10));
|
||||
wxSizerFlags(0).Align().Border(wxALL, 10));
|
||||
|
||||
//create a sizer with no border and centered horizontally
|
||||
topsizer->Add(
|
||||
button_sizer,
|
||||
wxSizerFlags(0).Center() );
|
||||
wxSizerFlags(0).Center() );
|
||||
|
||||
SetSizerAndFit(topsizer); // use the sizer for layout and set size and hints
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ if (in_stream.Read(data, nb_datas).LastError() != wxSTREAM_NOERROR) {
|
||||
// You can also get the last number of bytes REALLY put into the buffer.
|
||||
size_t really_read = in_stream.LastRead();
|
||||
|
||||
// Ok, moves to the beginning of the stream. SeekI returns the last position
|
||||
// Ok, moves to the beginning of the stream. SeekI returns the last position
|
||||
// in the stream counted from the beginning.
|
||||
off_t old_position = in_stream.SeekI(0, wxFromBeginning);
|
||||
|
||||
|
@@ -466,7 +466,7 @@ initialized.
|
||||
|
||||
A simple example will help understand how the scheme works. Suppose you have a
|
||||
XRC file defining a top level window @c TestWnd_Base, which subclasses wxFrame
|
||||
(any other class like @c wxDialog will do also), and has subwidgets wxTextCtrl A
|
||||
(any other class like @c wxDialog will do also), and has subwidgets wxTextCtrl A
|
||||
and wxButton B.
|
||||
|
||||
The XRC file and corresponding class definition in the header file will be
|
||||
@@ -624,7 +624,7 @@ wxObject *MyControlXmlHandler::DoCreateResource()
|
||||
// do most of your work.
|
||||
// If e.g. the MyControl::Create function looks like:
|
||||
//
|
||||
// bool MyControl::Create(wxWindow *parent, int id,
|
||||
// bool MyControl::Create(wxWindow *parent, int id,
|
||||
// const wxBitmap &first, const wxPoint &posFirst,
|
||||
// const wxBitmap &second, const wxPoint &posSecond,
|
||||
// const wxString &theTitle, const wxFont &titleFont,
|
||||
|
Reference in New Issue
Block a user