@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}
@section page_cppconst_guisystem GUI system
-
+
@beginDefList
@itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
@itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
@itemdef{__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)}
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)}
@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}
@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}
@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$.}
@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.}
@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
@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,
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
/**
@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
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.
WXK_SCROLL
WXK_PAGEUP,
WXK_PAGEDOWN,
-
+
WXK_NUMPAD_SPACE,
WXK_NUMPAD_TAB,
WXK_NUMPAD_ENTER,
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,
/**
@page page_keymodifiers Key Modifiers
-
+
@header{wx/defs.h}
-
+
The following key modifier constants are defined:
-
+
@verbatim
enum wxKeyModifier
{
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.
*/
/**
@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 -->
*/
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,
wxID_HELP_PROCEDURES,
wxID_HELP_CONTEXT,
wxID_CLOSE_ALL,
-
+
wxID_EDIT = 5030,
wxID_CUT,
wxID_COPY,
wxID_REPLACE,
wxID_REPLACE_ALL,
wxID_PROPERTIES,
-
+
wxID_VIEW_DETAILS,
wxID_VIEW_LARGEICONS,
wxID_VIEW_SMALLICONS,
wxID_VIEW_SORTNAME,
wxID_VIEW_SORTSIZE,
wxID_VIEW_SORTTYPE,
-
+
wxID_FILE = 5050,
wxID_FILE1,
wxID_FILE2,
wxID_FILE7,
wxID_FILE8,
wxID_FILE9,
-
+
// Standard button IDs
wxID_OK = 5100,
wxID_CANCEL,
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,
wxID_ZOOM_OUT,
wxID_UNDELETE,
wxID_REVERT_TO_SAVED,
-
+
// System menu IDs (used by wxUniv):
wxID_SYSTEM_MENU = 5200,
wxID_CLOSE_FRAME,
wxID_MAXIMIZE_FRAME,
wxID_ICONIZE_FRAME,
wxID_RESTORE_FRAME,
-
+
// IDs used by generic file dialog (13 consecutive starting from this value)
wxID_FILEDLGG = 5900,
-
+
wxID_HIGHEST = 5999
@endverbatim
@section page_wxusedef_multi Generic wxUSE preprocessor symbols
-
+
@beginDefList
@itemdef{wxUSE_ABOUTDLG, Use wxAboutDialogInfo class.}
@itemdef{wxUSE_ACCEL, Use wxAcceleratorTable/Entry classes and support for them in wxMenu, wxMenuBar.}
@itemdef{wxUSE_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
@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.}
@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.}
@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.}
@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.}
@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}
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
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.
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.
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.
- @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">
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
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">
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">
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
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
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
@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
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);
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
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
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
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.
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.
@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.
@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
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
@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
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
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
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
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
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
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
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
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
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)
@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.
@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.
@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).
@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.
@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>
@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
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
@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.
@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.
@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
@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
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.
@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.
@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.
*/
@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
@code
switch (result)
{
- case wxDragCopy:
+ case wxDragCopy:
// copy the data
break;
case wxDragMove:
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()
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
@page overview_docview Document/View Framework
- Classes: wxDocument, wxView, wxDocTemplate, wxDocManager, wxDocParentFrame,
+ Classes: wxDocument, wxView, wxDocTemplate, wxDocManager, wxDocParentFrame,
wxDocChildFrame, wxDocMDIParentFrame, wxDocMDIChildFrame,
wxCommand, wxCommandProcessor
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.
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
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.
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,
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
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,
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.
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
@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
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
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
@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
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.
@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,
(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
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
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
@endcode
@subsection overview_html_quickstart_disphelp Displaying Help
-
+
See wxHtmlHelpController.
@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow
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
@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.
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.
@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:
@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
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:
@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
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
} // !!!!!!
TAG_HANDLER_END(VARS2)
@endcode
-
+
Never used in wxHTML :-)
@li @b TAG_HANDLER_PROC(@e varib):
@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)
@li @b TAGS_MODULE_END(@e modname):
Ends the definition of module.
Example:
-
+
@code
TAGS_MODULE_BEGIN(Examples)
TAGS_MODULE_ADD(VARS_ONLY)
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
{
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),
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
}
// 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);
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
// 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,
/**
Adds an artist name to be shown in the program credits.
-
+
@see SetArtists()
*/
void AddArtist(const wxString& artist);
/**
Adds a developer name to be shown in the program credits.
-
+
@see SetDevelopers()
*/
void AddDeveloper(const wxString& developer);
/**
Adds a documentation writer name to be shown in the program credits.
-
+
@see SetDocWriters()
*/
void AddDocWriter(const wxString& docwriter);
translation of the string @c translator-credits from the currently used message
catalog -- this can be used to show just the name of the translator of the
program in the current language.
-
+
@see SetTranslators()
*/
void AddTranslator(const wxString& translator);
/**
Sets the the list of artists to be shown in the program credits.
-
+
@see AddArtist()
*/
void SetArtists(const wxArrayString& artists);
/**
Set the list of developers of the program.
-
+
@see AddDeveloper()
*/
void SetDevelopers(const wxArrayString& developers);
/**
Set the list of documentation writers.
-
+
@see AddDocWriter()
*/
void SetDocWriters(const wxArrayString& docwriters);
/**
Sets the accelerator entry parameters.
-
+
@param flags
A combination of the wxAcceleratorEntryFlags values, which
indicates which modifier keys are held down.
/**
Initializes the accelerator table from an array of wxAcceleratorEntry.
-
+
@param n
Number of accelerator entries.
@param entries
/**
Loads the accelerator table from a Windows resource (Windows only).
-
+
@param resource
Name of a Windows accelerator.
*/
/**
Assignment operator, using @ref overview_refcount "reference counting".
-
+
@param accel
Accelerator table to assign.
*/
/**
Returns a status value and object id to indicate whether the given point
- was on this or a child object. Can return either a child object, or an
+ was on this or a child object. Can return either a child object, or an
integer representing the child element, starting from 1.
@a pt is in screen coordinates.
/**
Creates the control with the given @a anim animation.
-
+
After control creation you must explicitely call Play() to start to play
the animation. Until that function won't be called, the first frame
of the animation is displayed.
-
+
@param parent
Parent window, must be non-@NULL.
@param id
The window style, see wxAC_* flags.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
/**
Loads an animation from a file.
-
+
@param name
The name of the file to load.
@param type
/**
Loads an animation from the given stream.
-
+
@param stream
The stream to use to load the animation.
@param type
@li wxANIMATION_TYPE_GIF: loads an animated GIF file;
@li wxANIMATION_TYPE_ANI: load an ANI file;
@li wxANIMATION_TYPE_ANY: tries to autodetect the filetype.
-
+
@returns @true if the operation succeeded, @false otherwise.
*/
bool Load(wxInputStream& stream,
/**
Loads an animation from a file.
-
+
@param name
A filename.
@param type
One of the wxAnimationType values; wxANIMATION_TYPE_ANY
means that the function should try to autodetect the filetype.
-
+
@returns @true if the operation succeeded, @false otherwise.
*/
bool LoadFile(const wxString& name,
/**
Creates a wxLog class for the application to use for logging errors.
The default implementation returns a new wxLogGui class.
-
+
@see wxLog
*/
virtual wxLog* CreateLogTarget();
/**
Creates the wxAppTraits object when GetTraits() needs it for the first time.
-
+
@see wxAppTraits
*/
virtual wxAppTraits* CreateTraits();
while (app.Pending())
Dispatch();
@endcode
-
+
@see Pending()
*/
virtual void Dispatch();
int FilterEvent(wxEvent& event);
/**
- Returns the user-readable application name.
-
+ Returns the user-readable application name.
+
The difference between this string and the one returned by GetAppName() is that
this one is meant to be shown to the user and so should be used for the window
titles, page headers and so on while the other one should be only used internally,
e.g. for the file names or configuration file keys.
By default, returns the same string as GetAppName().
-
+
@wxsince{2.9.0}
*/
wxString GetAppDisplayName() const;
/**
Returns the application name.
-
+
@remarks wxWidgets sets this to a reasonable default before calling
OnInit(), but the application can reset it at will.
-
+
@see GetAppDisplayName()
*/
wxString GetAppName() const;
/**
Gets the class name of the application. The class name may be used in a
platform specific manner to refer to the application.
-
+
@see SetClassName()
*/
wxString GetClassName() const;
/**
Returns @true if the application will exit when the top-level window is
deleted, @false otherwise.
-
+
@see SetExitOnFrameDelete(), @ref overview_app_shutdown
*/
bool GetExitOnFrameDelete() const;
/**
Returns the one and only global application object.
Usually ::wxTheApp is usead instead.
-
+
@see SetInstance()
*/
static wxAppConsole* GetInstance();
/**
Returns a pointer to the top window.
-
+
@remarks If the top window hasn't been set using SetTopWindow(),
this function will find the first top-level window
(frame or dialog) and return that.
-
+
@see SetTopWindow()
*/
virtual wxWindow* GetTopWindow() const;
/**
Returns @true if the application will use the best visual on systems that support
different visuals, @false otherwise.
-
+
@see SetUseBestVisual()
*/
bool GetUseBestVisual() const;
configuration file keys.
By default, returns the same string as GetVendorName().
-
+
@wxsince{2.9.0}
*/
wxString GetVendorDisplayName() const;
/**
Returns @true if the application is active, i.e. if one of its windows is
currently in the foreground.
-
+
If this function returns @false and you need to attract users attention to
the application, you may use wxTopLevelWindow::RequestUserAttention to do it.
*/
/**
Called by wxWidgets on creation of the application. Override this if you wish
to provide your own (environment-dependent) main loop.
-
+
@returns Returns 0 under X, and the wParam of the WM_QUIT message under
Windows.
*/
asserts are not left in the release code at all.
The base class version shows the default assert failure dialog box proposing to
the user to stop the program, continue or ignore all subsequent asserts.
-
+
@param file
the name of the source file where the assert occurred
@param line
Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program.
-
+
@see OnInitCmdLine()
*/
bool OnCmdLineError(wxCmdLineParser& parser);
Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program.
-
+
@see OnInitCmdLine()
*/
bool OnCmdLineHelp(wxCmdLineParser& parser);
processing of the standard command line options.
Return @true to continue normal execution or @false to return @false from
OnInit() thus terminating the program.
-
+
@see OnInitCmdLine()
*/
bool OnCmdLineParsed(wxCmdLineParser& parser);
Generally speaking, this function should only show a message to the user and
return. You may attempt to save unsaved data but this is not guaranteed to
work and, in fact, probably won't.
-
+
@see wxHandleFatalExceptions()
*/
void OnFatalException();
/**
Returns @true if unprocessed events are in the window system event queue.
-
+
@see Dispatch()
*/
virtual bool Pending();
The function returns @true if the message was processed, @false otherwise.
If you use wxWidgets with another class library with its own message loop,
you should make sure that this function is called to allow wxWidgets to
- receive messages. For example, to allow co-existence with the Microsoft
+ receive messages. For example, to allow co-existence with the Microsoft
Foundation Classes, override the PreTranslateMessage function:
-
+
@code
// Provide wxWidgets message loop compatibility
BOOL CTheApp::PreTranslateMessage(MSG *msg)
Sends idle events to a window and its children.
Please note that this function is internal to wxWidgets and shouldn't be used
by user code.
-
+
@remarks These functions poll the top-level windows, and their children,
for idle event processing. If @true is returned, more OnIdle
processing is requested by one or more window.
-
+
@see wxIdleEvent
*/
bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
SetAppDisplayName() is used instead.
By default the application name is set to the name of its executable file.
-
+
@see GetAppName()
*/
void SetAppName(const wxString& name);
/**
Sets the class name of the application. This may be used in a platform specific
manner to refer to the application.
-
+
@see GetClassName()
*/
void SetClassName(const wxString& name);
/**
Allows the programmer to specify whether the application will exit when the
top-level frame is deleted.
-
+
@param flag
If @true (the default), the application will exit when the top-level frame
is deleted. If @false, the application will continue to run.
-
+
@see GetExitOnFrameDelete(), @ref overview_app_shutdown
*/
void SetExitOnFrameDelete(bool flag);
/**
Allows external code to modify global ::wxTheApp, but you should really
know what you're doing if you call it.
-
+
@param app
Replacement for the global application object.
-
+
@see GetInstance()
*/
static void SetInstance(wxAppConsole* app);
Currently implemented for wxGTK2-only.
Return @true if theme was successfully changed.
-
+
@param theme
The name of the new theme or an absolute path to a gtkrc-theme-file
*/
can use a specific window as the top window. If no top window is specified by the
application, wxWidgets just uses the first frame or dialog in its top-level window
list, when it needs to use the top window.
-
+
@param window
The new top window.
-
+
@see GetTopWindow(), OnInit()
*/
void SetTopWindow(wxWindow* window);
Note that this function has to be called in the constructor of the wxApp
instance and won't have any effect when called later on.
This function currently only has effect under GTK.
-
+
@param flag
If @true, the app will use the best visual.
@param forceTrueColour
/**
Sets the name of application's vendor. The name will be used
in registry access. A default name is set by wxWidgets.
-
+
@see GetVendorName()
*/
void SetVendorName(const wxString& name);
// OnExit isn't called by CleanUp so must be called explicitly.
wxTheApp->OnExit();
wxApp::CleanUp();
-
+
return CWinApp::ExitInstance();
}
@endcode
The names of directory entries are returned without any trailing path
separator. This gives a canonical name that can be used in comparisons.
-
+
@see @ref overview_archive_byname
*/
wxString GetInternalName() const;
wxArchiveClassFactory::Find can also search for a factory by MIME type
or wxFileSystem protocol.
- The available factories can be enumerated using
+ The available factories can be enumerated using
wxArchiveClassFactory::GetFirst() and wxArchiveClassFactory::GetNext().
@library{wxbase}
@code
wxString list;
const wxArchiveClassFactory *factory = wxArchiveClassFactory::GetFirst();
-
+
while (factory) {
list << factory->GetProtocol() << _T("\n");
factory = factory->GetNext();
}
@endcode
-
+
GetFirst() and GetNext() return a pointer to a factory or @NULL if no more
are available. They do not give away ownership of the factory.
*/
@code
wxString list;
const wxChar *const *p;
-
+
for (p = factory->GetProtocols(wxSTREAM_FILEEXT); *p; p++)
list << *p << _T("\n");
@encode
The first template parameter should be the type of archive input stream
(e.g. wxArchiveInputStream) and the second can either be a pointer to an entry
- (e.g. wxArchiveEntry*), or a string/pointer pair (e.g. std::pairwxString,
+ (e.g. wxArchiveEntry*), or a string/pointer pair (e.g. std::pairwxString,
wxArchiveEntry*).
The @c wx/archive.h header defines the following typedefs:
/**
Empties the array: after a call to this function GetCount() will return 0.
- However, this function does not free the memory used by the array and so
+ However, this function does not free the memory used by the array and so
should be used when the array is going to be reused for storing other strings.
Otherwise, you should use Clear() to empty the array and free memory.
*/
@code
Insert("foo", 0);
@endcode
-
+
If @a nIndex is equal to @e GetCount() this function behaves as Add().
*/
void Insert(const wxString& str, size_t nIndex,
/**
Sorts the array using the specified @a compareFunction for item comparison.
@e CompareFunction is defined as a function taking two @e const wxString
- parameters and returning an @e int value less than, equal to or greater
+ parameters and returning an @e int value less than, equal to or greater
than 0 if the first string is less than, equal to or greater than the
second one.
{
return first.length() - second.length();
}
-
+
...
-
+
wxArrayString array;
-
+
array.Add("one");
array.Add("two");
array.Add("three");
array.Add("four");
-
+
array.Sort(CompareStringLen);
@endcode
*/
/**
@copydoc wxArrayString::Index()
- This function uses binary search for wxSortedArrayString, but it ignores
+ This function uses binary search for wxSortedArrayString, but it ignores
the @a bCase and @a bFromEnd parameters.
*/
int Index(const wxString& sz, bool bCase = true,
Client is the entity that calls wxArtProvider's GetBitmap or GetIcon function.
It is represented by wxClientID type and can have one of these values:
- @li wxART_TOOLBAR
- @li wxART_MENU
- @li wxART_BUTTON
- @li wxART_FRAME_ICON
- @li wxART_CMN_DIALOG
- @li wxART_HELP_BROWSER
- @li wxART_MESSAGE_BOX
- @li wxART_OTHER (used for all requests that don't fit into any of the
+ @li wxART_TOOLBAR
+ @li wxART_MENU
+ @li wxART_BUTTON
+ @li wxART_FRAME_ICON
+ @li wxART_CMN_DIALOG
+ @li wxART_HELP_BROWSER
+ @li wxART_MESSAGE_BOX
+ @li wxART_OTHER (used for all requests that don't fit into any of the
categories above)
Client ID servers as a hint to wxArtProvider that is supposed to help it to
resource. Note that returned bitmaps are cached by wxArtProvider and it is
therefore not necessary to optimize CreateBitmap() for speed (e.g. you may
create wxBitmap objects from XPMs here).
-
+
@param id
wxArtID unique identifier of the bitmap.
@param client
This is not part of wxArtProvider's public API, use wxArtProvider::GetBitmap
or wxArtProvider::GetIconBundle or wxArtProvider::GetIcon to query wxArtProvider
for a resource.
-
+
@see CreateIconBundle()
*/
wxBitmap CreateBitmap(const wxArtID& id,
/**
Query registered providers for bitmap with given ID.
-
+
@param id
wxArtID unique identifier of the bitmap.
@param client
wxArtClient identifier of the client (i.e. who is asking for the bitmap).
@param size
Size of the returned bitmap or wxDefaultSize if size doesn't matter.
-
+
@returns The bitmap if one of registered providers recognizes the ID or
wxNullBitmap otherwise.
*/
/**
Query registered providers for icon bundle with given ID.
-
+
@param id
wxArtID unique identifier of the icon bundle.
@param client
wxArtClient identifier of the client (i.e. who is asking for the icon
bundle).
-
+
@returns The icon bundle if one of registered providers recognizes the ID
or wxNullIconBundle otherwise.
*/
/**
Register new art provider and add it to the bottom of providers stack
(i.e. it will be queried as the last one).
-
+
@see Push()
*/
static void Insert(wxArtProvider* provider);
/**
Register new art provider and add it to the top of providers stack
(i.e. it will be queried as the first provider).
-
+
@see Insert()
*/
static void Push(wxArtProvider* provider);
The length of the input string or special value wxNO_LEN if the string is
NUL-terminated and the length should be computed by this function itself.
@param mode
- This parameter specifies the function behaviour when invalid characters
+ This parameter specifies the function behaviour when invalid characters
are encountered in input. By default, any such character stops the
decoding with error. If the mode is wxBase64DecodeMode_SkipWS, then the
white space characters are silently skipped instead. And if it is
This overload allocates memory internally and returns it as wxMemoryBuffer
and is recommended for normal use.
- This overload returns a buffer with the base64 decoded binary equivalent
+ This overload returns a buffer with the base64 decoded binary equivalent
of the input string. In neither case is the buffer @NULL-terminated.
*/
wxMemoryBuffer wxBase64Decode(const char* src,
/**
Gets the background colour of the header part of the calendar window.
-
+
@see SetHeaderColours()
*/
const wxColour GetHeaderColourBg() const;
/**
Gets the foreground colour of the header part of the calendar window.
-
+
@see SetHeaderColours()
*/
const wxColour GetHeaderColourFg() const;
/**
Gets the background highlight colour.
-
+
@see SetHighlightColours()
*/
const wxColour GetHighlightColourBg() const;
/**
Gets the foreground highlight colour.
-
+
@see SetHighlightColours()
*/
const wxColour GetHighlightColourFg() const;
/**
Return the background colour currently used for holiday highlighting.
-
+
@see SetHolidayColours()
*/
const wxColour GetHolidayColourBg() const;
/**
Return the foreground colour currently used for holiday highlighting.
-
+
@see SetHolidayColours()
*/
const wxColour GetHolidayColourFg() const;
//@{
/**
Get the caret position (in pixels).
-
+
@b GetPosition()
-
+
Returns a Wx::Point
-
+
@b GetPositionXY()
-
+
Returns a 2-element list
@c ( x, y )
*/
//@{
/**
Get the caret size.
-
+
@b GetSize()
-
+
Returns a Wx::Size
-
+
@b GetSizeWH()
-
+
Returns a 2-element list
@c ( width, height )
*/
/**
Sets the blink time for all the carets.
-
+
@remarks Under Windows, this function will change the blink time for all
carets permanently (until the next time it is called),
even for the carets in other applications.
-
+
@see GetBlinkTime()
*/
static void SetBlinkTime(int milliseconds);
//@{
/**
Constructor, creating and showing a checkbox.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxCheckBox();
/**
Gets the state of a 3-state checkbox.
-
+
@returns Returns wxCHK_UNCHECKED when the checkbox is unchecked,
wxCHK_CHECKED when it is checked and
wxCHK_UNDETERMINED when it's in the undetermined state.
/**
Gets the state of a 2-state checkbox.
-
+
@returns Returns @true if it is checked, @false otherwise.
*/
bool GetValue() const;
/**
Returns whether or not the checkbox is a 3-state checkbox.
-
+
@returns Returns @true if this checkbox is a 3-state checkbox, @false if
it's a 2-state checkbox.
*/
/**
Returns whether or not the user can set the checkbox to the third state.
-
+
@returns Returns @true if the user can set the third state of this
checkbox, @false if it can only be set programmatically
or if it's a 2-state checkbox.
/**
Sets the checkbox to the given state. This does not cause a
wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
-
+
@param state
If @true, the check is on, otherwise it is off.
*/
//@{
/**
Constructor, creating and showing a list box.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
/**
Checks the given item. Note that calling this method doesn't result in
wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
-
+
@param item
Index of item to check.
@param check
//@{
/**
Constructor, creating and showing a choice.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxChoice();
/**
Gets the number of columns in this choice item.
-
+
@remarks This is implemented for Motif only and always returns 1 for the
other platforms.
*/
That is, while the dropdown list is shown, it returns the currently selected
item in it. When it is not shown, its result is the same as for the other
function.
-
+
@wxsince{2.6.2} (before this version
wxControlWithItems::GetSelection itself behaved like
this).
/**
Sets the number of columns in this choice item.
-
+
@param n
Number of columns.
*/
After this function has been called, the clipboard owns the data, so do not
delete
the data explicitly.
-
+
@see SetData()
*/
bool AddData(wxDataObject* data);
After this function has been called, the clipboard owns the data, so do not
delete
the data explicitly.
-
+
@see AddData()
*/
bool SetData(wxDataObject* data);
{
public:
/**
-
+
*/
wxClientDataContainer();
/**
-
+
*/
~wxClientDataContainer();
Validator which can be used for additional date checks.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
/**
Returns @true if long options are enabled, otherwise @false.
-
+
@see EnableLongOptions()
*/
bool AreLongOptionsEnabled() const;
Enable or disable support for the long options.
As long options are not (yet) POSIX-compliant, this option allows to disable
them.
-
+
@see Customization() and AreLongOptionsEnabled()
*/
void EnableLongOptions(bool enable = true);
Parse the command line, return 0 if ok, -1 if @c "-h" or @c "--help"
option was encountered and the help message was given or a positive value if a
syntax error occurred.
-
+
@param giveUsage
If @true (default), the usage message is given if a
syntax error was encountered while parsing the command line or if help was
Give the standard usage message describing all program options. It will use the
options and parameters descriptions specified earlier, so the resulting message
will not be helpful to the user unless the descriptions were indeed specified.
-
+
@see SetLogo()
*/
void Usage() const;
Returns the current print quality. This can be a positive integer, denoting the
number of dots per inch, or
one of the following identifiers:
-
+
On input you should pass one of these identifiers, but on return you may get
back a positive integer
indicating the current resolution setting.
Sets the desired print quality. This can be a positive integer, denoting the
number of dots per inch, or
one of the following identifiers:
-
+
On input you should pass one of these identifiers, but on return you may get
back a positive integer
indicating the current resolution setting.
Validator which can be used for additional date checks.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
Invalid entries in custom colours list will be ignored on some platforms (GTK)
or replaced with white colour on platforms where custom colours palette has
fixed size (MSW).
-
+
@see wxColourData
*/
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
//@{
/**
Copy constructor.
-
+
@param red
The red value.
@param green
The colour name.
@param colour
The colour to copy.
-
+
@see wxColourDatabase
*/
wxColour();
/**
is not
specified in flags.
-
+
@wxsince{2.7.0}
*/
wxString GetAsString(long flags);
and the HTML-like syntax (i.e. @c "#" followed by 6 hexadecimal digits
for red, green, blue components).
Returns @true if the conversion was successful, @false otherwise.
-
+
@wxsince{2.7.0}
*/
void Set(unsigned char red, unsigned char green,
//@{
/**
Assignment operator, using a colour name to be found in the colour database.
-
+
@see wxColourDatabase
*/
wxColour operator =(const wxColour& colour);
/**
The derived class must implement this to create the popup control.
-
+
@returns @true if the call succeeded, @false otherwise.
*/
bool Create(wxWindow* parent);
/**
The derived class may implement this to return adjusted size
for the popup control, according to the variables given.
-
+
@param minWidth
Preferred minimum width.
@param prefHeight
@param maxWidth
Max height for window, as limited by
screen size.
-
+
@remarks Called each time popup is about to be shown.
*/
wxSize GetAdjustedSize(int minWidth, int prefHeight,
until the popup is shown for the first time. It is more
efficient, but on the other hand it is often more convenient
to have the control created immediately.
-
+
@remarks Base implementation returns @false.
*/
bool LazyCreate();
//@{
/**
Constructor, creating and showing a combo control.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxComboCtrl();
This member function is not normally called in application code.
Instead, it can be implemented in a derived class to create a
custom popup animation.
-
+
@returns @true if animation finishes before the function returns. @false
otherwise. In the latter case you need to manually call
DoShowPopup after the animation ends.
is properly shown after a popup animation has finished (but only
if AnimateShow() did not finish
the animation within it's function scope).
-
+
@param rect
Position to show the popup window at, in screen coordinates.
@param flags
/**
Returns disabled button bitmap that has been set with
SetButtonBitmaps().
-
+
@returns A reference to the disabled state bitmap.
*/
const wxBitmap GetBitmapDisabled() const;
/**
Returns button mouse hover bitmap that has been set with
SetButtonBitmaps().
-
+
@returns A reference to the mouse hover state bitmap.
*/
const wxBitmap GetBitmapHover() const;
/**
Returns default button bitmap that has been set with
SetButtonBitmaps().
-
+
@returns A reference to the normal state bitmap.
*/
const wxBitmap GetBitmapNormal() const;
/**
Returns depressed button bitmap that has been set with
SetButtonBitmaps().
-
+
@returns A reference to the depressed state bitmap.
*/
const wxBitmap GetBitmapPressed() const;
/**
Returns custom painted area in control.
-
+
@see SetCustomPaintWidth().
*/
int GetCustomPaintWidth() const;
Returns features supported by wxComboCtrl. If needed feature is missing,
you need to instead use wxGenericComboCtrl, which however may lack
native look and feel (but otherwise sports identical API).
-
+
@returns Value returned is a combination of following flags:
*/
static int GetFeatures();
/**
Returns @true if the popup window is in the given state.
Possible values are:
-
+
@c Hidden()
-
+
Popup window is hidden.
-
+
@c Animating()
-
+
Popup window is being shown, but the
popup animation has not yet finished.
-
+
@c Visible()
-
+
Popup window is fully visible.
*/
bool IsPopupWindowState(int state) const;
/**
Removes the text between the two positions in the combo control text field.
-
+
@param from
The first position.
@param to
/**
Replaces the text between two positions with the given text, in the combo
control text field.
-
+
@param from
The first position.
@param to
/**
Sets custom dropdown button graphics.
-
+
@param bmpNormal
Default button image.
@param pushButtonBg
/**
Sets size and position of dropdown button.
-
+
@param width
Button width. Value = 0 specifies default.
@param height
/**
Sets the insertion point in the text field.
-
+
@param pos
The new insertion point.
*/
/**
Extends popup size horizontally, relative to the edges of the combo control.
-
+
@param extLeft
How many pixel to extend beyond the left edge of the
control. Default is 0.
@param extRight
How many pixel to extend beyond the right edge of the
control. Default is 0.
-
+
@remarks Popup minimum width may override arguments.
*/
void SetPopupExtents(int extLeft, int extRight);
/**
Sets preferred maximum height of the popup.
-
+
@remarks Value -1 indicates the default.
*/
void SetPopupMaxHeight(int height);
/**
Sets minimum width of the popup. If wider than combo control, it will extend to
the left.
-
+
@remarks Value -1 indicates the default.
*/
void SetPopupMinWidth(int width);
/**
Selects the text between the two positions, in the combo control text field.
-
+
@param from
The first position.
@param to
//@{
/**
Constructor, creating and showing a combobox.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxComboBox();
/**
Removes the text between the two positions in the combobox text field.
-
+
@param from
The first position.
@param to
/**
Replaces the text between two positions with the given text, in the combobox
text field.
-
+
@param from
The first position.
@param to
/**
Sets the insertion point in the combobox text field.
-
+
@param pos
The new insertion point.
*/
/**
Selects the text between the two positions, in the combobox text field.
-
+
@param from
The first position.
@param to
Sets the text for the combobox text field.
@b NB: For a combobox with @c wxCB_READONLY style the string must be in
the combobox choices list, otherwise the call to SetValue() is ignored.
-
+
@param text
The text to set.
*/
)
This is the default and only constructor of the wxConfigBase class, and
derived classes.
-
+
@param appName
The application name. If this is empty, the class will
normally use wxApp::GetAppName to set it. The
This parameter is only used by wxFileConfig when compiled
in Unicode mode. It specifies the encoding in which the configuration file
is written.
-
+
@remarks By default, environment variable expansion is on and recording
defaults is off.
*/
/**
@ref ctor() wxConfigBase
-
+
@ref dtor() ~wxConfigBase
*/
config file. @e DeleteAll() is especially useful if you want to erase all
traces of your program presence: for example, when you uninstall it.
DeleteEntry()
-
+
DeleteGroup()
-
+
DeleteAll()
*/
from running several enumerations simultaneously, that's why you must pass it
explicitly.
Having said all this, enumerating the config entries/groups is very simple:
-
+
There are also functions to get the number of entries/subgroups without
actually enumerating them, but you will probably never need them.
GetFirstGroup()
-
+
GetNextGroup()
-
+
GetFirstEntry()
-
+
GetNextEntry()
-
+
GetNumberOfEntries()
-
+
GetNumberOfGroups()
*/
bool GetNextGroup(wxString& str, long& index) const;
/**
-
+
*/
uint GetNumberOfEntries(bool bRecursive = false) const;
Final remark: the @e szKey parameter for all these functions can contain an
arbitrary path (either relative or absolute), not just the key name.
Read()
-
+
Write()
-
+
Flush()
*/
/**
GetAppName()
-
+
GetVendorName()
-
+
wxFileConfig::SetUmask
*/
first of them is the expansion of environment variables in the string values
read from the config file: for example, if you have the following in your
config file:
-
+
the call to @c config-Read("UserData") will return something like
@c "/home/zeitlin/data" if you're lucky enough to run a Linux system ;-)
Although this feature is very useful, it may be annoying if you read a value
would be to prefix the offending symbols with a backslash.
The following functions control this option:
IsExpandingEnvVars()
-
+
SetExpandEnvVars()
-
+
SetRecordDefaults()
-
+
IsRecordingDefaults()
*/
which makes it possible to use the relative paths. To clarify all this, here
is an example (it is only for the sake of demonstration, it doesn't do anything
sensible!):
-
+
@e Warning: it is probably a good idea to always restore the path to its
old value on function exit:
-
+
because otherwise the assert in the following example will surely fail
(we suppose here that @e foo() function is the same as above except that it
doesn't save and restore the path):
-
+
Finally, the path separator in wxConfigBase and derived classes is always '/',
regardless of the platform (i.e. it is @b not '\\' under Windows).
SetPath()
-
+
GetPath()
*/
returning @true if the value was found.
If the value was not found, @a defaultVal is used instead.
bool Read(const wxStringkey, T* value) const;
-
-
+
+
@b Read(key, default="")
-
+
Returns a string
-
+
@b ReadInt(key, default=0)
-
+
Returns an integer
-
+
@b ReadFloat(key, default=0.0)
-
+
Returns a floating point number
-
+
@b ReadBool(key, default=0)
-
+
Returns a boolean
*/
bool Read(const wxString& key, wxString* str) const;
the new name already exists or because the function is not supported in this
wxConfig implementation.
RenameEntry()
-
+
RenameGroup()
*/
in it. For example wxFontMapper or Unix version
of wxFileDialog have the ability to use wxConfig class.
Set()
-
+
Get()
-
+
Create()
-
+
DontCreateOnDemand()
*/
/**
HasGroup()
-
+
HasEntry()
-
+
Exists()
-
+
GetEntryType()
*/
These functions write the specified value to the config file and return @true
on success. In the last one, function wxToString() must be
defined for type @e T.
-
-
+
+
@b Write(key, value)
-
+
Writes a string
-
+
@b WriteInt(key, value)
-
+
Writes an integer
-
+
@b WriteFloat(key, value)
-
+
Writes a floating point number
-
+
@b WriteBool(key, value)
-
+
Writes a boolean
*/
bool Write(const wxString& key, const wxString& value);
the latter if the help doesn't depend on the position.
Returns @true if help was shown, or @false if no help was available for this
window.
-
+
@param window
Window to show help text for.
@param point
//@{
/**
Constructor, creating and showing a context help button.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Appends several items at once to the control. Notice that calling this method
is usually much faster than appending them one by one if you need to add a lot
of items.
-
+
@param item
String to add.
@param stringsArray
Number of items in the strings array.
@param clientData
Array of client data pointers of size n to associate with the new items.
-
+
@returns When appending a single item, the return value is the index of
the newly added item which may be different from the
last one if the control is sorted (e.g. has wxLB_SORT
Note that it is an error (signalled by an assert failure in debug builds) to
remove an item with the index negative or greater or equal than the number of
items in the control.
-
+
@param n
The zero-based item index.
-
+
@see Clear()
*/
void Delete(unsigned int n);
/**
Finds an item whose label matches the given string.
-
+
@param string
String to find.
@param caseSensitive
Whether search is case sensitive (default is not).
-
+
@returns The zero-based position of the item, or wxNOT_FOUND if the
string was not found.
*/
It is an error to call this function for a control which doesn't have untyped
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
-
+
@param n
The zero-based position of the item.
-
+
@returns A pointer to the client data, or @NULL if not present.
*/
void* GetClientData(unsigned int n) const;
It is an error to call this function for a control which doesn't have typed
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
-
+
@param n
The zero-based position of the item.
-
+
@returns A pointer to the client data, or @NULL if not present.
*/
wxClientData* GetClientObject(unsigned int n) const;
/**
Returns the number of items in the control.
-
+
@see IsEmpty()
*/
unsigned int GetCount() const;
/**
Returns the index of the selected item or @c wxNOT_FOUND if no item is
selected.
-
+
@returns The position of the current selection.
-
+
@remarks This method can be used with single selection list boxes only,
you should use wxListBox::GetSelections for the list
boxes with wxLB_MULTIPLE style.
-
+
@see SetSelection(), GetStringSelection()
*/
int GetSelection() const;
/**
Returns the label of the item with the given index.
-
+
@param n
The zero-based index.
-
+
@returns The label of the item or an empty string if the position was
invalid.
*/
/**
Returns the label of the selected item or an empty string if no item is
selected.
-
+
@see GetSelection()
*/
wxString GetStringSelection() const;
is usually much faster than inserting them one by one if you need to insert a
lot
of items.
-
+
@param item
String to add.
@param pos
Number of items in the strings array.
@param clientData
Array of client data pointers of size n to associate with the new items.
-
+
@returns The return value is the index of the newly inserted item. If the
insertion failed for some reason, -1 is returned.
*/
/**
Returns @true if the control is empty or @false if it has some items.
-
+
@see GetCount()
*/
bool IsEmpty() const;
Replaces the current control contents with the given items. Notice that calling
this method is much faster than appending the items one by one if you need to
append a lot of them.
-
+
@param item
The single item to insert into the control.
@param stringsArray
'strings'.
@param clientData
Client data to associate with the item(s).
-
+
@returns When the control is sorted (e.g. has wxLB_SORT or wxCB_SORT
style) the return value could be different from
(GetCount() - 1). When setting a single item to the
Associates the given untyped client data pointer with the given item. Note that
it is an error to call this function if any typed client data pointers had been
associated with the control items before.
-
+
@param n
The zero-based item index.
@param data
control itself is destroyed).
Note that it is an error to call this function if any untyped client data
pointers had been associated with the control items before.
-
+
@param n
The zero-based item index.
@param data
if @a n == @c wxNOT_FOUND.
Note that this does not cause any command events to be emitted nor does it
deselect any other items in the controls which support multiple selections.
-
+
@param n
The string position to select, starting from zero.
-
+
@see SetString(), SetStringSelection()
*/
void SetSelection(int n);
/**
Sets the label for the given item.
-
+
@param n
The zero-based item index.
@param string
/**
Selects the item with the specified string in the control. This doesn't cause
any command events to be emitted.
-
+
@param string
The string to select.
-
+
@returns @true if the specified string has been selected, @false if it
wasn't found in the control.
*/
//@{
/**
Copy constructor, uses @ref overview_trefcount "reference counting".
-
+
@param bits
An array of bits.
@param maskBits
it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to
wxBITMAP_TYPE_MACCURSOR_RESOURCE.
Under X, the permitted cursor types are:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxBITMAP_TYPE_XBM
-
-
-
-
+
+
+
+
Load an X bitmap file.
-
-
-
-
-
+
+
+
+
+
Under Windows, the permitted types are:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxBITMAP_TYPE_CUR
-
-
-
-
+
+
+
+
Load a cursor from a .cur cursor file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_CUR_RESOURCE
-
-
-
-
+
+
+
+
Load a Windows resource (as specified in the .rc file).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h). Specify hotSpotX and hotSpotY.
@param cursorId
A stock cursor identifier. May be one of:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxCURSOR_ARROW
-
-
-
-
+
+
+
+
A standard arrow cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_RIGHT_ARROW
-
-
-
-
+
+
+
+
A standard arrow cursor
pointing to the right.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_BLANK
-
-
-
-
+
+
+
+
Transparent cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_BULLSEYE
-
-
-
-
+
+
+
+
Bullseye cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_CHAR
-
-
-
-
+
+
+
+
Rectangular character cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_CROSS
-
-
-
-
+
+
+
+
A cross cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_HAND
-
-
-
-
+
+
+
+
A hand cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_IBEAM
-
-
-
-
+
+
+
+
An I-beam cursor (vertical line).
-
-
-
-
-
+
+
+
+
+
wxCURSOR_LEFT_BUTTON
-
-
-
-
+
+
+
+
Represents a mouse with the left button depressed.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_MAGNIFIER
-
-
-
-
+
+
+
+
A magnifier icon.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_MIDDLE_BUTTON
-
-
-
-
+
+
+
+
Represents a mouse with the middle button depressed.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_NO_ENTRY
-
-
-
-
+
+
+
+
A no-entry sign cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_PAINT_BRUSH
-
-
-
-
+
+
+
+
A paintbrush cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_PENCIL
-
-
-
-
+
+
+
+
A pencil cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_POINT_LEFT
-
-
-
-
+
+
+
+
A cursor that points left.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_POINT_RIGHT
-
-
-
-
+
+
+
+
A cursor that points right.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_QUESTION_ARROW
-
-
-
-
+
+
+
+
An arrow and question mark.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_RIGHT_BUTTON
-
-
-
-
+
+
+
+
Represents a mouse with the right button depressed.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_SIZENESW
-
-
-
-
+
+
+
+
A sizing cursor pointing NE-SW.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_SIZENS
-
-
-
-
+
+
+
+
A sizing cursor pointing N-S.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_SIZENWSE
-
-
-
-
+
+
+
+
A sizing cursor pointing NW-SE.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_SIZEWE
-
-
-
-
+
+
+
+
A sizing cursor pointing W-E.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_SIZING
-
-
-
-
+
+
+
+
A general sizing cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_SPRAYCAN
-
-
-
-
+
+
+
+
A spraycan cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_WAIT
-
-
-
-
+
+
+
+
A wait cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_WATCH
-
-
-
-
+
+
+
+
A watch cursor.
-
-
-
-
-
+
+
+
+
+
wxCURSOR_ARROWWAIT
-
-
-
-
+
+
+
+
A cursor with both an arrow and
an hourglass, (windows.)
-
-
-
-
-
+
+
+
+
+
Note that not all cursors are available on all platforms.
@param cursor
Pointer or reference to a cursor to copy.
public:
//@{
/**
-
+
*/
wxDataViewEvent(wxEventType commandType = wxEVT_NULL,
int winid = 0);
const wxVariant GetValue() const;
/**
-
+
*/
void SetColumn(int col);
void SetDataViewColumn(wxDataViewColumn* col);
/**
-
+
*/
void SetModel(wxDataViewModel* model);
/**
-
+
*/
void SetValue(const wxVariant& value);
};
{
public:
/**
-
+
*/
wxDataViewIconTextRenderer(const wxString& varianttype = "wxDataViewIconText",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
*/
virtual bool Activate( wxRect cell,
wxDataViewModel* model,
- const wxDataViewItem & item,
+ const wxDataViewItem & item,
unsigned int col );
/**
virtual bool LeftClick( wxPoint cursor,
wxRect cell,
wxDataViewModel * model,
- const wxDataViewItem & item,
+ const wxDataViewItem & item,
unsigned int col );
/**
virtual bool RightClick(wxPoint cursor,
wxRect cell,
wxDataViewModel* model,
- const wxDataViewItem & item,
+ const wxDataViewItem & item,
unsigned int col);
/**
*/
virtual bool StartDrag(wxPoint cursor, wxRect cell,
wxDataViewModel* model,
- const wxDataViewItem & item,
+ const wxDataViewItem & item,
unsigned int col);
};
{
public:
/**
-
+
*/
wxDataViewBitmapRenderer(const wxString& varianttype = "wxBitmap",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
public:
//@{
/**
-
+
*/
wxDataViewItem(void* id = NULL);
wxDataViewItem(const wxDataViewItem& item);
{
public:
/**
-
+
*/
wxDataViewTextRenderer(const wxString& varianttype = "string",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
{
public:
/**
-
+
*/
wxDataViewProgressRenderer(const wxString& label = wxEmptyString,
const wxString& varianttype = "long",
{
public:
/**
-
+
*/
wxDataViewToggleRenderer(const wxString& varianttype = "bool",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT);
~wxDataViewTreeCtrl();
/**
-
+
*/
wxDataViewItem AppendContainer(const wxDataViewItem& parent,
const wxString& text,
wxClientData* data = NULL);
/**
-
+
*/
wxDataViewItem AppendItem(const wxDataViewItem& parent,
const wxString& text,
{
public:
/**
-
+
*/
wxDataViewDateRenderer(const wxString& varianttype = "datetime",
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE);
{
public:
/**
-
+
*/
wxDataViewTextRendererAttr(const wxString& varianttype = "string",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
Validator which can be used for additional date checks.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
SetRange(), returns the lower and upper
bounds of this range. If no range is set (or only one of the bounds is set),
@a dt1 and/or @a dt2 are set to be invalid.
-
+
@param dt1
Pointer to the object which receives the lower range limit or
becomes invalid if it is not set. May be @NULL if the caller is not
interested in lower limit
@param dt2
Same as above but for the upper limit
-
+
@returns @false if no range limits are currently set, @true if at least one
bound is set.
*/
control. The native version always uses the current system locale.
Sets the display format for the date in the control. See wxDateTime for the
meaning of format strings.
-
+
@remarks If the format parameter is invalid, the behaviour is undefined.
*/
void SetFormat(const wxChar* format);
Sets the valid range for the date selection. If @a dt1 is valid, it becomes
the earliest date (inclusive) accepted by the control. If @a dt2 is valid,
it becomes the latest possible date.
-
+
@remarks If the current value of the control is outside of the newly set
range bounds, the behaviour is undefined.
*/
some more complicated calculations to find the answer are under the
@ref overview_datetimecalculations "Calendar calculations" section.
IsValid()
-
+
GetTicks()
-
+
GetCentury()
-
+
GetYear()
-
+
GetMonth()
-
+
GetDay()
-
+
GetWeekDay()
-
+
GetHour()
-
+
GetMinute()
-
+
GetSecond()
-
+
GetMillisecond()
-
+
GetDayOfYear()
-
+
GetWeekOfYear()
-
+
GetWeekOfMonth()
-
+
GetYearDay()
-
+
IsWorkDay()
-
+
IsGregorianDate()
-
+
GetAsDOS()
*/
@ref getmodifiedjuliandaynumber() MJD or
@ref getratadie() "Rata Die number" from it.
@ref wxdatetimejdn() "wxDateTime(double jdn)"
-
+
@ref setjdn() "Set(double jdn)"
-
+
GetJulianDayNumber()
-
+
GetJDN()
-
+
GetModifiedJulianDayNumber()
-
+
GetMJD()
-
+
GetRataDie()
*/
All (non-const) functions in this section don't modify the time part of the
wxDateTime -- they only work with the date part of it.
SetToWeekDayInSameWeek()
-
+
GetWeekDayInSameWeek()
-
+
SetToNextWeekDay()
-
+
GetNextWeekDay()
-
+
SetToPrevWeekDay()
-
+
GetPrevWeekDay()
-
+
SetToWeekDay()
-
+
@ref wxDateTime::getweekday2 GetWeekDay
-
+
SetToLastWeekDay()
-
+
GetLastWeekDay()
-
+
SetToWeekOfYear()
-
+
SetToLastMonthDay()
-
+
GetLastMonthDay()
-
+
SetToYearDay()
-
+
GetYearDay()
*/
should use IsValid() method to check that the
values were correct as constructors can not return an error code.
@ref wxdatetimedef() wxDateTime
-
+
@ref wxdatetimetimet() wxDateTime(time_t)
-
+
@ref wxdatetimetm() "wxDateTime(struct tm)"
-
+
@ref wxdatetimejdn() "wxDateTime(double jdn)"
-
+
@ref wxdatetimetime() "wxDateTime(h, m, s, ms)"
-
+
@ref wxdatetimedate() "wxDateTime(day, mon, year, h, m, s, ms)"
-
+
SetToCurrent()
-
+
@ref settimet() Set(time_t)
-
+
@ref settm() "Set(struct tm)"
-
+
@ref setjdn() "Set(double jdn)"
-
+
@ref settime() "Set(h, m, s, ms)"
-
+
@ref setdate() "Set(day, mon, year, h, m, s, ms)"
-
+
@ref setfromdos() "SetFromDOS(unsigned long ddt)"
-
+
ResetTime()
-
+
SetYear()
-
+
SetMonth()
-
+
@ref setdate() SetDay
-
+
SetHour()
-
+
SetMinute()
-
+
SetSecond()
-
+
SetMillisecond()
-
+
@ref operatoreqtimet() operator=(time_t)
-
+
@ref operatoreqtm() "operator=(struct tm)"
*/
modifies the object to which it is applied. The operators -= and += are
defined to be equivalent to the second forms of these functions.
@ref addts() Add(wxTimeSpan)
-
+
@ref addds() Add(wxDateSpan)
-
+
@ref subtractts() Subtract(wxTimeSpan)
-
+
@ref subtractds() Subtract(wxDateSpan)
-
+
@ref subtractdt() Subtract(wxDateTime)
-
+
@ref addts() oparator+=(wxTimeSpan)
-
+
@ref addds() oparator+=(wxDateSpan)
-
+
@ref subtractts() oparator-=(wxTimeSpan)
-
+
@ref subtractds() oparator-=(wxDateSpan)
*/
There are several function to allow date comparison. To supplement them, a few
global operators , etc taking wxDateTime are defined.
IsEqualTo()
-
+
IsEarlierThan()
-
+
IsLaterThan()
-
+
IsStrictlyBetween()
-
+
IsBetween()
-
+
IsSameDate()
-
+
IsSameTime()
-
+
IsEqualUpTo()
*/
It also accepts a few wxWidgets-specific extensions: you can optionally specify
the width of the field to follow using @c printf(3)-like syntax and the
format specification @c %l can be used to get the number of milliseconds.
-
+
@see ParseFormat()
*/
wxString Format(const wxChar* format = wxDefaultDateTimeFormat,
result exactly corresponding to the ISO standard, but it can also be useful to
use a space as seprator if a more human-readable combined date-time
representation is needed.
-
+
@see FormatISODate(), FormatISOTime(),
ParseISOCombined()
*/
Get the beginning of DST for the given country in the given year (current one
by default). This function suffers from limitations described in
@ref overview_tdatedst "DST overview".
-
+
@see GetEndDST()
*/
static wxDateTime GetBeginDST(int year = Inv_Year,
/**
Returns the current default country. The default country is used for DST
calculations, for example.
-
+
@see SetCountry()
*/
static Country GetCountry();
/**
Returns the object having the same date component as this one but time of
00:00:00.
-
+
@wxsince{2.8.2}
-
+
@see ResetTime()
*/
wxDateTime GetDateOnly() const;
/**
Returns the end of DST for the given country in the given year (current one by
default).
-
+
@see GetBeginDST()
*/
static wxDateTime GetEndDST(int year = Inv_Year,
/**
Returns the @ref setjdn() JDN corresponding to this date. Beware
of rounding errors!
-
+
@see GetModifiedJulianDayNumber()
*/
double GetJulianDayNumber() const;
/**
Gets the full (default) or abbreviated (specify @c Name_Abbr name of the
given month.
-
+
@see GetWeekDayName()
*/
static wxString GetMonthName(Month month,
/**
Gets the full (default) or abbreviated (specify @c Name_Abbr name of the
given week day.
-
+
@see GetMonthName()
*/
static wxString GetWeekDayName(WeekDay weekday,
/**
Returns @true if IsStrictlyBetween()
is @true or if the date is equal to one of the limit values.
-
+
@see IsStrictlyBetween()
*/
bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
/**
Returns @true if this date lies strictly between the two others,
-
+
@see IsBetween()
*/
bool IsStrictlyBetween(const wxDateTime& t1,
/**
Returns the object corresponding to the current time.
Example:
-
+
Note that this function is accurate up to second:
UNow() should be used for better precision
(but it is less efficient and might not be available on all platforms).
-
+
@see Today()
*/
static wxDateTime Now();
additional argument of wxString::const_iterator type in which, if it is not
@NULL, an iterator pointing to the end of the scanned string part is returned.
ParseFormat()
-
+
ParseDateTime()
-
+
ParseDate()
-
+
ParseTime()
-
+
ParseISODate()
-
+
ParseISOTime()
-
+
ParseISOCombined()
-
+
wxDateTime::ParseRfc822Date
-
+
Format()
-
+
FormatDate()
-
+
FormatTime()
-
+
FormatISOCombined()
-
+
FormatISODate()
-
+
FormatISOTime()
*/
calculations, date formatting and other things.
The possible values for @a country parameter are enumerated in
@ref overview_wxdatetime "wxDateTime constants section".
-
+
@see GetCountry()
*/
static void SetCountry(Country country);
Please note that although several function accept an extra @e Calendar
parameter, it is currently ignored as only the Gregorian calendar is
supported. Future versions will support other calendars.
-
+
SetCountry()
-
+
GetCountry()
-
+
IsWestEuropeanCountry()
-
+
GetCurrentYear()
-
+
ConvertYearToBC()
-
+
GetCurrentMonth()
-
+
IsLeapYear()
-
+
@ref getcenturystatic() GetCentury
-
+
GetNumberOfDays()
-
+
GetNumberOfDays()
-
+
GetMonthName()
-
+
GetWeekDayName()
-
+
GetAmPmStrings()
-
+
IsDSTApplicable()
-
+
GetBeginDST()
-
+
GetEndDST()
-
+
Now()
-
+
UNow()
-
+
Today()
*/
Please see the @ref overview_tdatetimezones "time zone overview" for more
information about time zones. Normally, these functions should be rarely used.
FromTimezone()
-
+
ToTimezone()
-
+
MakeTimezone()
-
+
MakeFromTimezone()
-
+
ToUTC()
-
+
MakeUTC()
-
+
GetBeginDST()
-
+
GetEndDST()
-
+
IsDST()
*/
/**
Returns the object corresponding to the midnight of the current day (i.e. the
same as Now(), but the time part is set to 0).
-
+
@see Now()
*/
static wxDateTime Today();
Returns the object corresponding to the current time including the
milliseconds if a function to get time with such precision is available on the
current platform (supported under most Unices and Win32).
-
+
@see Now()
*/
static wxDateTime UNow();
/**
Returns a date span object corresponding to one day.
-
+
@see Days()
*/
static wxDateSpan Day();
/**
Returns a date span object corresponding to the given number of days.
-
+
@see Day()
*/
static wxDateSpan Days(int days);
/**
Returns the number of days (only, that it not counting the weeks component!)
in this date span.
-
+
@see GetTotalDays()
*/
int GetDays() const;
/**
Returns the combined number of days in this date span, counting both weeks and
days. It still doesn't take neither months nor years into the account.
-
+
@see GetWeeks(), GetDays()
*/
int GetTotalDays() const;
/**
Returns the number of weeks in this date span.
-
+
@see GetTotalDays()
*/
int GetWeeks() const;
/**
Returns a date span object corresponding to one month.
-
+
@see Months()
*/
static wxDateSpan Month();
/**
Returns a date span object corresponding to the given number of months.
-
+
@see Month()
*/
static wxDateSpan Months(int mon);
//@{
/**
Changes the sign of this date span.
-
+
@see Negate()
*/
wxDateSpan Neg();
/**
Returns the date span with the opposite sign.
-
+
@see Neg()
*/
wxDateSpan Negate() const;
/**
Returns a date span object corresponding to one week.
-
+
@see Weeks()
*/
static wxDateSpan Week();
/**
Returns a date span object corresponding to the given number of weeks.
-
+
@see Week()
*/
static wxDateSpan Weeks(int weeks);
/**
Returns a date span object corresponding to one year.
-
+
@see Years()
*/
static wxDateSpan Year();
/**
Returns a date span object corresponding to the given number of years.
-
+
@see Year()
*/
static wxDateSpan Years(int years);
/**
GetSeconds()
-
+
GetMinutes()
-
+
GetHours()
-
+
GetDays()
-
+
GetWeeks()
-
+
GetValue()
*/
/**
Returns the string containing the formatted representation of the time span.
The following format specifiers are allowed after %:
-
+
H
-
+
number of @b Hours
-
+
M
-
+
number of @b Minutes
-
+
S
-
+
number of @b Seconds
-
+
l
-
+
number of mi@b lliseconds
-
+
D
-
+
number of @b Days
-
+
E
-
+
number of w@b Eeks
-
+
%
-
+
the percent character
-
+
Note that, for example, the number of hours in the description above is not
well defined: it can be either the total number of hours (for example, for a
time span of 50 hours this would be 50) or just the hour part of the time
/**
Add()
-
+
Subtract()
-
+
Multiply()
-
+
Negate()
-
+
Neg()
-
+
Abs()
*/
/**
Milliseconds()
-
+
Millisecond()
-
+
Seconds()
-
+
Second()
-
+
Minutes()
-
+
Minute()
-
+
Hours()
-
+
Hour()
-
+
Days()
-
+
Day()
-
+
Weeks()
-
+
Week()
*/
/**
IsNull()
-
+
IsPositive()
-
+
IsNegative()
-
+
IsEqualTo()
-
+
IsLongerThan()
-
+
IsShorterThan()
*/
)
Constructs a datastream object from an output stream. Only write methods will
be available. The second form is only available in Unicode build of wxWidgets.
-
+
@param stream
The output stream.
@param conv
)
Constructs a datastream object from an input stream. Only read methods will
be available. The second form is only available in Unicode build of wxWidgets.
-
+
@param stream
The input stream.
@param conv
Copy from a source DC to this DC, specifying the destination
coordinates, size of area to copy, source DC, source coordinates,
logical function, whether to use a bitmap mask, and mask source position.
-
+
@param xdest
Destination device context x position.
@param ydest
with the bitmap
selected into the source device context. The Windows implementation does
the following if MaskBlt cannot be used:
-
-
+
+
Creates a temporary bitmap and copies the destination area into it.
Copies the source area into the temporary bitmap using the specified
logical function.
and the background colour set to WHITE.
ORs the temporary bitmap with the destination area.
Deletes the temporary bitmap.
-
-
+
+
This sequence of operations ensures that the source's transparent area need
not be black,
and logical functions are supported.
and ysrc
will be assumed for the mask source position. Currently only implemented on
Windows.
-
+
@remarks There is partial support for Blit in wxPostScriptDC, under X.
-
+
@see StretchBlit(), wxMemoryDC, wxBitmap, wxMask
*/
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width,
Adds the specified point to the bounding box which can be retrieved with
MinX(), MaxX() and
MinY(), MaxY() functions.
-
+
@see ResetBoundingBox()
*/
void CalcBoundingBox(wxCoord x, wxCoord y);
//@{
/**
Draws a circle with the given centre and radius.
-
+
@see DrawEllipse()
*/
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
Draws an ellipse contained in the rectangle specified either with the given top
left corner and the given size or directly. The current pen is used for the
outline and the current brush for filling the shape.
-
+
@see DrawCircle()
*/
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
particular, a font different from @c wxNORMAL_FONT should be used as the
latter is not a TrueType font. @c wxSWISS_FONT is an example of a font
which is.
-
+
@see DrawText()
*/
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
/**
Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT.
-
+
@see SetBackgroundMode()
*/
int GetBackgroundMode() const;
/**
Returns the depth (number of bits/pixel) of this DC.
-
+
@see wxDisplayDepth()
*/
int GetDepth() const;
is supported, the return value will either be @c wxLayout_LeftToRight or
@c wxLayout_RightToLeft. If RTL layout is not supported, the return value will
be @c wxLayout_Default.
-
+
@see SetLayoutDirection()
*/
wxLayoutDirection GetLayoutDirection() const;
If the optional parameter @a font is specified and valid, then it is used
for the text extent calculation. Otherwise the currently selected font is.
Note that this function works both with single-line and multi-line strings.
-
+
@see wxFont, SetFont(), GetPartialTextExtents(), GetTextExtent()
*/
void GetMultiLineTextExtent(const wxString& string, wxCoord* w,
various platforms have a native API function that is faster or more
accurate than the generic implementation then it should be used
instead.
-
+
@see GetMultiLineTextExtent(), GetTextExtent()
*/
bool GetPartialTextExtents(const wxString& text,
represent the maximum horizontal and vertical 'pixel' values used in your
application, the following code will scale the graphic to fit on the
printer page:
-
-
+
+
@b GetSize()
-
+
Returns a Wx::Size
-
+
@b GetSizeWH()
-
+
Returns a 2-element list
@c ( width, height )
*/
If the optional parameter @a font is specified and valid, then it is used
for the text extent calculation. Otherwise the currently selected font is.
Note that this function only works with single-line strings.
-
+
@see wxFont, SetFont(), GetPartialTextExtents(),
GetMultiLineTextExtent()
*/
/**
Resets the bounding box: after a call to this function, the bounding box
doesn't contain anything.
-
+
@see CalcBoundingBox()
*/
void ResetBoundingBox();
Sets the x and y axis orientation (i.e., the direction from lowest to
highest values on the axis). The default orientation is
x axis from left to right and y axis from top down.
-
+
@param xLeftRight
True to set the x axis orientation to the natural
left to right orientation, @false to invert it.
The clipping region is an area to which drawing is restricted. Possible uses
for the clipping region are for clipping text or for speeding up window redraws
when only a known area of the screen is damaged.
-
+
@see DestroyClippingRegion(), wxRegion
*/
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
/**
Sets the current layout direction for the device context. @a dir may be either
@c wxLayout_Default, @c wxLayout_LeftToRight or @c wxLayout_RightToLeft.
-
+
@see GetLayoutDirection()
*/
void SetLayoutDirection(wxLayoutDirection dir);
The possible values
and their meaning in terms of source and destination pixel values are
as follows:
-
+
The default is wxCOPY, which simply draws with the current colour.
The others combine the current colour and the background using a
logical operation. wxINVERT is commonly used for drawing rubber bands or
Drawing to a Windows printer device context uses the current mapping mode,
but mapping mode is currently ignored for PostScript output.
The mapping mode can be one of the following:
-
+
wxMM_TWIPS
-
+
Each logical unit is 1/20 of a point, or 1/1440 of
an inch.
-
+
wxMM_POINTS
-
+
Each logical unit is a point, or 1/72 of an inch.
-
+
wxMM_METRIC
-
+
Each logical unit is 1 mm.
-
+
wxMM_LOMETRIC
-
+
Each logical unit is 1/10 of a mm.
-
+
wxMM_TEXT
-
+
Each logical unit is 1 device pixel.
*/
void SetMapMode(int int);
coordinates, destination size, source DC, source coordinates,
size of source area to copy, logical function, whether to use a bitmap mask,
and mask source position.
-
+
@param xdest
Destination device context x position.
@param ydest
with the bitmap
selected into the source device context. The Windows implementation does
the following if MaskBlt cannot be used:
-
-
+
+
Creates a temporary bitmap and copies the destination area into it.
Copies the source area into the temporary bitmap using the specified
logical function.
and the background colour set to WHITE.
ORs the temporary bitmap with the destination area.
Deletes the temporary bitmap.
-
-
+
+
This sequence of operations ensures that the source's transparent area need
not be black,
and logical functions are supported.
and ysrc
will be assumed for the mask source position. Currently only implemented on
Windows.
-
+
@remarks There is partial support for Blit in wxPostScriptDC, under X.
*/
bool StretchBlit(wxCoord xdest, wxCoord ydest, wxCoord dstWidth,
Init() methods later in order to use the object.
The other constructors initialize the object immediately and @c Init()
must not be called after using them.
-
+
@param dc
The underlying DC: everything drawn to this object will be
flushed to this DC when this object is destroyed. You may pass @NULL
Also, before using the updated bitmap data, make sure to select it out of
context first
(for example by selecting wxNullBitmap into the device context).
-
+
@see wxDC::DrawBitmap
*/
void SelectObject(wxBitmap& bitmap);
You might use this pair of functions when implementing a drag feature, for
example
as in the wxSplitterWindow implementation.
-
+
@remarks This function is probably obsolete since the X implementations
allow drawing directly on the screen now. However, the
fact that this function allows the screen to be
//@{
/**
Draws a circle with the given centre and radius.
-
+
@see wxDC::DrawEllipse
*/
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
Draws an ellipse contained in the rectangle specified either with the given top
left corner and the given size or directly. The current pen is used for the
outline and the current brush for filling the shape.
-
+
@see wxDC::DrawCircle
*/
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
/**
Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT.
-
+
@see wxDC::SetBackgroundMode
*/
int GetBackgroundMode() const;
/**
Resets the bounding box: after a call to this function, the bounding box
doesn't contain anything.
-
+
@see wxDC::CalcBoundingBox
*/
void ResetBoundingBox();
Sets the x and y axis orientation (i.e., the direction from lowest to
highest values on the axis). The default orientation is the natural
orientation, e.g. x axis from left to right and y axis from bottom up.
-
+
@param xLeftRight
True to set the x axis orientation to the natural
left to right orientation, @false to invert it.
uses the current mapping mode, but mapping mode is currently ignored for
PostScript output.
The mapping mode can be one of the following:
-
+
wxMM_TWIPS
-
+
Each logical unit is 1/20 of a point, or 1/1440 of
an inch.
-
+
wxMM_POINTS
-
+
Each logical unit is a point, or 1/72 of an inch.
-
+
wxMM_METRIC
-
+
Each logical unit is 1 mm.
-
+
wxMM_LOMETRIC
-
+
Each logical unit is 1/10 of a mm.
-
+
wxMM_TEXT
-
+
Each logical unit is 1 pixel.
*/
void SetMapMode(int int);
//@{
/**
Constructor.
-
+
@param parent
Can be @NULL, a frame or another dialog box.
@param id
Used to associate a name with the window,
allowing the application user to set Motif resource values for
individual dialog boxes.
-
+
@see Create()
*/
wxDialog();
/**
Centres the dialog box on the display.
-
+
@param direction
May be wxHORIZONTAL, wxVERTICAL or wxBOTH.
*/
/**
Ends a modal dialog, passing a value to be returned from the ShowModal()
invocation.
-
+
@param retCode
The value that should be returned by ShowModal.
-
+
@see ShowModal(), GetReturnCode(), SetReturnCode()
*/
void EndModal(int retCode);
/**
Gets the identifier of the button which works like standard OK button in this
dialog.
-
+
@see SetAffirmativeId()
*/
int GetAffirmativeId() const;
/**
Gets the identifier of the button to map presses of @c ESC
button to.
-
+
@see SetEscapeId()
*/
int GetEscapeId() const;
/**
Gets the return code for this window.
-
+
@remarks A return code is normally associated with a modal dialog, where
ShowModal() returns a code to the application.
-
+
@see SetReturnCode(), ShowModal(), EndModal()
*/
int GetReturnCode();
/**
Iconizes or restores the dialog. Windows only.
-
+
@param iconize
If @true, iconizes the dialog box; if @false, shows and restores it.
-
+
@remarks Note that in Windows, iconization has no effect since dialog
boxes cannot be iconized. However, applications may
need to explicitly restore dialog boxes under Motif
/**
Returns @true if the dialog box is iconized. Windows only.
-
+
@remarks Always returns @false under Windows since dialogs cannot be
iconized.
*/
/**
The default handler for wxEVT_SYS_COLOUR_CHANGED.
-
+
@param event
The colour change event.
-
+
@remarks Changes the dialog's colour to conform to the current settings
(Windows only). Add an event table entry for your
dialog class if you wish the behaviour to be different
you do override this function, call wxEvent::Skip to
propagate the notification to child windows and
controls.
-
+
@see wxSysColourChangedEvent
*/
void OnSysColourChanged(wxSysColourChangedEvent& event);
the special OK button in the PocketPC title bar, an event with this id is
generated.
By default, the affirmative id is wxID_OK.
-
+
@see GetAffirmativeId(), SetEscapeId()
*/
void SetAffirmativeId(int id);
/**
Sets the icon for this dialog.
-
+
@param icon
The icon to associate with this dialog.
*/
/**
Sets the icons for this dialog.
-
+
@param icons
The icons to associate with this dialog.
*/
/**
Sets the adaptation mode, overriding the global adaptation flag. @a mode may be
one of the following values:
-
+
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation.
*/
Allows the programmer to specify whether the dialog box is modal (Show() blocks
control
until the dialog is hidden) or modeless (control returns immediately).
-
+
@param flag
If @true, the dialog will be modal, otherwise it will be modeless.
*/
/**
Sets the return code for this window.
-
+
@param retCode
The integer return code, usually a control identifier.
-
+
@remarks A return code is normally associated with a modal dialog, where
ShowModal() returns a code to the application.
The function EndModal() calls SetReturnCode.
-
+
@see GetReturnCode(), ShowModal(), EndModal()
*/
void SetReturnCode(int retCode);
/**
Hides or shows the dialog.
-
+
@param show
If @true, the dialog box is shown and brought to the front;
otherwise the box is hidden. If @false and the dialog is
modal, control is returned to the calling program.
-
+
@remarks The preferred way of dismissing a modal dialog is to use
EndModal().
*/
Shows a modal dialog. Program flow does not return until the dialog has been
dismissed with
EndModal().
-
+
@returns The return value is the value set with SetReturnCode().
*/
int ShowModal();
Cancel dialing the number initiated with Dial()
with async parameter equal to @true.
Note that this won't result in DISCONNECTED event being sent.
-
+
@see IsDialing()
*/
bool CancelDialing();
/**
Returns @true if (async) dialing is in progress.
-
+
@see Dial()
*/
bool IsDialing() const;
so, in general, the user should be allowed to override it. This function
allows to forcefully set the online status - whatever our internal
algorithm may think about it.
-
+
@see IsOnline()
*/
void SetOnlineStatus(bool isOnline = true);
//@{
/**
Main constructor.
-
+
@param parent
Parent window.
@param id
/**
Constructor. Use ShowModal() to show
the dialog.
-
+
@param parent
Parent window.
@param message
public:
/**
Constructor, setting up a wxDisplay instance with the specified display.
-
+
@param index
The index of the display to use. This must be non-negative
and lower than the value returned by GetCount().
/**
Returns the index of the display on which the given point lies. Returns
@c wxNOT_FOUND if the point is not on any connected display.
-
+
@param pt
The point to locate.
*/
If the window is on more than one display it gets the display that overlaps the
window the most.
Returns @c wxNOT_FOUND if the window is not on any connected display.
-
+
@param win
The window to locate.
*/
/**
Override this function to receive dropped text.
-
+
@param x
The x coordinate of the mouse.
@param y
/**
Called when the mouse is being dragged over the drop target. By default,
this calls functions return the suggested return value @e def.
-
+
@param x
The x coordinate of the mouse.
@param y
The y coordinate of the mouse.
@param def
Suggested value for return value. Determined by SHIFT or CONTROL key states.
-
+
@returns Returns the desired operation or wxDragNone. This is used for
optical feedback from the side of the drop source,
typically in form of changing the icon.
/**
Called when the user drops a data object on the target. Return @false to veto
the operation.
-
+
@param x
The x coordinate of the mouse.
@param y
The y coordinate of the mouse.
-
+
@returns Return @true to accept the data, @false to veto the operation.
*/
virtual bool OnDrop(wxCoord x, wxCoord y);
/**
Called when the mouse enters the drop target. By default, this calls
OnDragOver().
-
+
@param x
The x coordinate of the mouse.
@param y
@param def
Suggested default for return value. Determined by SHIFT or CONTROL key
states.
-
+
@returns Returns the desired operation or wxDragNone. This is used for
optical feedback from the side of the drop source,
typically in form of changing the icon.
between wxMSW and wxGTK: these are cursors under Windows but icons for GTK.
You should use the macro wxDROP_ICON() in portable
programs instead of directly using either of these types.
-
+
@param win
The window which initiates the drag and drop operation.
@param iconCopy
//@}
/**
-
+
*/
~wxDropSource();
Do it (call this in response to a mouse button press, for example). This starts
the drag-and-drop operation which will terminate when the user releases the
mouse.
-
+
@param flags
If wxDrag_AllowMove is included in the flags, data may
be moved and not only copied (default). If wxDrag_DefaultMove is
specified (which includes the previous flag), this is even the default
operation
-
+
@returns Returns the operation requested by the user, may be wxDragCopy,
wxDragMove, wxDragLink, wxDragCancel or wxDragNone if
an error occurred.
in this function. It is called on each mouse move, so your implementation must
not be too
slow.
-
+
@param effect
The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and
wxDragNone.
@param scrolling
@true if the window is scrolling. MSW only.
-
+
@returns Return @false if you want default feedback, or @true if you
implement your own feedback. The return values is
ignored under GTK.
/**
Set the icon to use for a certain drag result.
-
+
@param res
The drag result to set the icon for.
@param cursor
/**
Override this function to receive dropped files.
-
+
@param x
The x coordinate of the mouse.
@param y
wxTEMPLATE_VISIBLE The template may be displayed to the user in dialogs.
wxTEMPLATE_INVISIBLE The template may not be displayed to the user in dialogs.
wxDEFAULT_TEMPLATE_FLAGS Defined as wxTEMPLATE_VISIBLE.
-
-
+
+
@b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags
)
-
+
will construct document and view objects from the class information
-
+
@b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassName, viewClassName, flags
)
-
+
will construct document and view objects from perl packages
-
+
@b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName )
-
+
@c Wx::DocTemplate::CreateDocument() and
@c Wx::DocTemplate::CreateView() must be overridden
*/
/**
Loads the file history from a config object.
-
+
@see wxConfig()
*/
void FileHistoryLoad(wxConfigBase& config);
/**
Saves the file history into a config object. This must be called
explicitly by the application.
-
+
@see wxConfig()
*/
void FileHistorySave(wxConfigBase& resourceFile);
Returns a document template by asking the user (if there is more than one
template).
This function is used in CreateDocument().
-
+
@param templates
Pointer to an array of templates from which to choose a desired template.
@param noTemplates
If more than one template is passed in in templates,
then this parameter indicates whether the list of templates that the user
will have to choose from is sorted or not when shown the choice box dialog.
-
+
Default is @false.
*/
wxDocTemplate* SelectDocumentType(wxDocTemplate** templates,
The dialog normally will not appear because the array of templates only contains
those relevant to the document in question, and often there will only be one
such.
-
+
@param templates
Pointer to an array of templates from which to choose a desired template.
@param noTemplates
If more than one template is passed in in templates,
then this parameter indicates whether the list of templates that the user
will have to choose from is sorted or not when shown the choice box dialog.
-
+
Default is @false.
*/
wxDocTemplate* SelectViewType(wxDocTemplate** templates,
/**
Returns the list of menus that are managed by this file history object.
-
+
@see UseMenu()
*/
const wxList GetMenus() const;
/**
Loads the file history from the given config object. This function should be
called explicitly by the application.
-
+
@see wxConfig()
*/
void Load(wxConfigBase& config);
/**
Saves the file history into the given config object. This must be called
explicitly by the application.
-
+
@see wxConfig()
*/
void Save(wxConfigBase& config);
for
wxGenericDragImage, and can be used when the application
supplies DoDrawImage() and GetImageRect().
-
+
@param image
Icon or bitmap to be used as the drag image. The bitmap can
have a mask.
and Move() to show the image on the screen.
Call EndDrag() when the drag has finished.
Note that this call automatically calls CaptureMouse.
-
+
@param hotspot
The location of the drag position relative to the upper-left corner
of the image.
/**
wxArray::Add
-
+
wxArray::AddAt
-
+
wxArray::Insert
-
+
wxArray::SetCount
-
+
WX_APPEND_ARRAY()
-
+
WX_PREPEND_ARRAY()
*/
never use wxBaseArray anyhow it shouldn't be a problem) and that you should not
derive your own classes from the array classes.
@ref wxArray::ctordef "wxArray default constructor"
-
+
@ref wxArray::ctorcopy "wxArray copy constructors and assignment operators"
-
+
@ref wxArray::dtor ~wxArray
*/
WX_DECLARE_OBJARRAY macros and must be fully declared before you use
WX_DEFINE_OBJARRAY macro.
WX_DEFINE_ARRAY()
-
+
WX_DEFINE_EXPORTED_ARRAY()
-
+
WX_DEFINE_USER_EXPORTED_ARRAY()
-
+
WX_DEFINE_SORTED_ARRAY()
-
+
WX_DEFINE_SORTED_EXPORTED_ARRAY()
-
+
WX_DEFINE_SORTED_USER_EXPORTED_ARRAY()
-
+
WX_DECLARE_EXPORTED_OBJARRAY()
-
+
WX_DECLARE_USER_EXPORTED_OBJARRAY()
-
+
WX_DEFINE_OBJARRAY()
-
+
WX_DEFINE_EXPORTED_OBJARRAY()
-
+
WX_DEFINE_USER_EXPORTED_OBJARRAY()
To slightly complicate the matters even further, the operator - defined by
default for the array iterators by these macros only makes sense if the array
provokes warnings from some compilers and to avoid them you should use the
@c _PTR versions of the macros above. For example, to define an array of
pointers to @c double you should use:
-
+
Note that the above macros are generally only useful for
wxObject types. There are separate macros for declaring an array of a simple
type,
such as an int.
The following simple types are supported:
-
+
int
-
+
long
-
+
size_t
-
+
double
To create an array of a simple type, simply append the type you want in CAPS to
the array definition.
For example, for an integer array, you'd use one of the following variants:
WX_DEFINE_ARRAY_INT()
-
+
WX_DEFINE_EXPORTED_ARRAY_INT()
-
+
WX_DEFINE_USER_EXPORTED_ARRAY_INT()
-
+
WX_DEFINE_SORTED_ARRAY_INT()
-
+
WX_DEFINE_SORTED_EXPORTED_ARRAY_INT()
-
+
WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_INT()
*/
going to put in the array and will prevent the array code from reallocating the
memory more times than needed.
wxArray::Alloc
-
+
wxArray::Shrink
*/
retrieve them - possibly using just the C array indexing [] operator which
does exactly the same as wxArray::Item method.
wxArray::GetCount
-
+
wxArray::IsEmpty
-
+
wxArray::Item
-
+
wxArray::Last
*/
Detach() if you don't want this to happen. On the
other hand, when an object is removed from a wxArray nothing happens - you
should delete it manually if required:
-
+
See also WX_CLEAR_ARRAY() macro which deletes all
elements of a wxArray (supposed to contain pointers).
*/
Detach() if you don't want this to happen. On
the other hand, when an object is removed from a wxArray nothing happens -
you should delete it manually if required:
-
+
See also WX_CLEAR_ARRAY() macro which deletes all
elements of a wxArray (supposed to contain pointers).
*/
/**
WX_CLEAR_ARRAY()
-
+
wxArray::Empty
-
+
wxArray::Clear
-
+
wxArray::RemoveAt
-
+
wxArray::Remove
*/
/**
wxArray::Index
-
+
wxArray::IndexForInsert
-
+
wxArray::Sort
*/
@e count. If the array has already @a count or more items, nothing is
done. Otherwise, @c count - GetCount() elements are added and initialized to
the value @e defval.
-
+
@see wxArray::GetCount
*/
void SetCount(size_t count);
/**
The notation CMPFUNCT should be read as if we had the following declaration:
-
+
where @e T is the type of the array elements. I.e. it is a function returning
@e int which is passed two arguments of type @e T *.
Sorts the array using the specified compare function: this function should
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
-
+
You must use WX_DEFINE_OBJARRAY() macro to define
the array class - otherwise you would get link errors.
*/
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
-
+
Note that wxWidgets predefines the following standard array classes: @b
wxArrayInt,
@b wxArrayLong, @b wxArrayShort, @b wxArrayDouble, @b wxArrayPtrVoid.
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
-
+
You will have to initialize the objects of this class by passing a comparison
function to the array object constructor like this:
*/
public:
/**
Retrieves the load address and the size of this module.
-
+
@param addr
the pointer to the location to return load address in, may be
@NULL
@param len
pointer to the location to return the size of this module in
memory in, may be @NULL
-
+
@returns @true if the load address and module size were retrieved, @false
if this information is not available.
*/
function name.
Returned value will be @NULL if the symbol was not found in the DLL or if
an error occurred.
-
+
@param dllHandle
Valid handle previously returned by
LoadLibrary
Returns a handle to the loaded DLL. Use @a success parameter to test if it
is valid. If the handle is valid, the library must be unloaded later with
UnloadLibrary().
-
+
@param libname
Name of the shared object to load.
@param success
it adds a @c ".dll" extension under Windows and @c "lib" prefix and
@c ".so", @c ".sl" or maybe @c ".dylib" extension under Unix.
The possible values for @a cat are:
-
-
+
+
wxDL_LIBRARY
-
+
normal library
-
+
wxDL_MODULE
-
+
a loadable module or plugin
-
+
@see CanonicalizePluginName()
*/
static wxString CanonicalizeName(const wxString& name,
to the name to ensure that the plugin which is going to be loaded will be
compatible with the main program.
The possible values for @a cat are:
-
-
+
+
wxDL_PLUGIN_GUI
-
+
plugin which uses GUI classes (default)
-
+
wxDL_PLUGIN_BASE
-
+
plugin which only uses wxBase
*/
static wxString CanonicalizePluginName(const wxString& name,
/**
Returns pointer to symbol @a name in the library or @NULL if the library
contains no such symbol.
-
+
@see wxDYNLIB_FUNCTION()
*/
void* GetSymbol(const wxString& name) const;
Returns @true if the symbol with the given @a name is present in the dynamic
library, @false otherwise. Unlike GetSymbol(),
this function doesn't log an error message if the symbol is not found.
-
+
@wxsince{2.5.4}
*/
bool HasSymbol(const wxString& name) const;
/**
Loads DLL with the given @a name into memory. The @a flags argument can
be a combination of the following bits:
-
+
wxDL_LAZY
-
+
equivalent of RTLD_LAZY under Unix, ignored elsewhere
-
+
wxDL_NOW
-
+
equivalent of RTLD_NOW under Unix, ignored elsewhere
-
+
wxDL_GLOBAL
-
+
equivalent of RTLD_GLOBAL under Unix, ignored elsewhere
-
+
wxDL_VERBATIM
-
+
don't try to append the appropriate extension to
the library name (this is done by default).
-
+
wxDL_DEFAULT
-
+
default flags, same as wxDL_NOW currently
-
+
wxDL_QUIET
-
+
don't log an error message if the library couldn't be
loaded.
-
+
Returns @true if the library was successfully loaded, @false otherwise.
*/
bool Load(const wxString& name, int flags = wxDL_DEFAULT);
//@{
/**
Constructor, creating and showing a list box.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window style. See wxEditableListBox.
@param name
Window name.
-
+
@see Create()
*/
wxEditableListBox();
wxPLATFORM_CURRENT
wxPLATFORM_CURRENT means the platform this binary was compiled for.
Examples:
-
+
Equivalence is defined in terms of convertibility:
two encodings are equivalent if you can convert text between
then without losing information (it may - and will - happen
it more than once in order to switch to another conversion.
@e Method affects behaviour of Convert() in case input character
cannot be converted because it does not exist in output encoding:
-
+
@b wxCONVERT_STRICT
-
+
follow behaviour of GNU Recode -
just copy unconvertible characters to output and don't change them
(its integer value will stay the same)
-
+
@b wxCONVERT_SUBSTITUTE
-
+
try some (lossy) substitutions
- e.g. replace unconvertible latin capitals with acute by ordinary
capitals, replace en-dash or em-dash by '-' etc.
-
+
Both modes guarantee that output string will have same length
as input string.
*/
Notice that this function is easier to use correctly than, for example,
ControlDown() because when using the latter you
also have to remember to test that none of the other modifiers is pressed:
-
+
and forgetting to do it can result in serious program bugs (e.g. program not
working with European keyboard layout where ALTGR key which is seen by
the program as combination of CTRL and ALT is used). On the
other hand, you can simply write
-
+
with this function.
*/
int GetModifiers() const;
/**
Returns @true if the event was a down event from the specified button (or any
button).
-
+
@param button
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
/**
Returns @true if the specified button (or any button) was in a down state.
-
+
@param button
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
/**
Returns @true if the event was an up event from the specified button (or any
button).
-
+
@param button
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
the interval is set to 0; so update events will be sent as
often as possible. You can reduce the frequency that events
are sent by changing the mode and/or setting an update interval.
-
+
@see ResetUpdateTime(), SetUpdateInterval(),
SetMode()
*/
current time. It is assumed that update events are
normally sent in idle time, so this is called at the end of
idle processing.
-
+
@see CanUpdate(), SetUpdateInterval(),
SetMode()
*/
public:
/**
Constructor. Valid event types are:
-
+
@b wxEVT_ENTER_WINDOW
@b wxEVT_LEAVE_WINDOW
@b wxEVT_LEFT_DOWN
/**
Returns @true if the identified mouse button is changing state. Valid
values of @a button are:
-
+
@c wxMOUSE_BTN_LEFT
-
+
check if left button was pressed
-
+
@c wxMOUSE_BTN_MIDDLE
-
+
check if middle button was pressed
-
+
@c wxMOUSE_BTN_RIGHT
-
+
check if right button was pressed
-
+
@c wxMOUSE_BTN_AUX1
-
+
check if the first extra button was pressed
-
+
@c wxMOUSE_BTN_AUX2
-
+
check if the second extra button was pressed
-
+
@c wxMOUSE_BTN_ANY
-
+
check if any button was pressed
*/
bool Button(int button);
/**
Same as MetaDown() under Mac, same as
ControlDown() elsewhere.
-
+
@see wxKeyEvent::CmdDown
*/
bool CmdDown() const;
/**
Returns @true if this was a dragging event (motion while a button is depressed).
-
+
@see Moving()
*/
bool Dragging();
Currently this function is implemented only in wxMac and returns -1 for the
other platforms (you can still distinguish simple clicks from double-clicks as
they generate different kinds of events however).
-
+
@wxsince{2.9.0}
*/
int GetClickCount() const;
public:
/**
Constructor.
-
+
@param win
The direct child which is (or which contains the window which is) receiving
the focus.
/**
Returns the origin of the help event which is one of the following values:
-
+
@b Origin_Unknown
-
+
Unrecognized event source.
-
+
@b Origin_Keyboard
-
+
Event generated by @c F1 key press.
-
+
@b Origin_HelpButton
-
+
Event generated by
wxContextHelp or using the "?" title bur button under
MS Windows.
-
+
The application may handle events generated using the keyboard or mouse
differently, e.g. by using wxGetMousePosition()
for the mouse events.
-
+
@see SetOrigin()
*/
wxHelpEvent::Origin GetOrigin() const;
/**
Set the help event origin, only used internally by wxWidgets normally.
-
+
@see GetOrigin()
*/
void SetOrigin(wxHelpEvent::Origin origin);
the update mode is initially wxIDLE_PROCESS_ALL. You can change the mode
to only send idle events to windows with the wxWS_EX_PROCESS_IDLE extra window
style set.
-
+
@see SetMode()
*/
static bool CanSend(wxWindow* window);
/**
Returns @true if the OnIdle function processing this event requested more
processing time.
-
+
@see RequestMore()
*/
bool MoreRequested() const;
during OnIdle, then the application will remain in a passive event loop (not
calling OnIdle) until a
new event is posted to the application by the windowing system.
-
+
@see MoreRequested()
*/
void RequestMore(bool needMore = true);
/**
This function posts an event to be processed later.
-
+
@param event
Event to add to process queue.
-
+
@remarks The difference between sending an event (using the ProcessEvent
method) and posting it is that in the first case the
event is processed before the function returns, while
type. This
is an alternative to the use of static event tables. See the 'event' or the old
'dynamic' sample for usage.
-
+
@param id
The identifier (or first of the identifier range) to be
associated with the event handler function. For the version not taking this
added
using the Connect() method. There is no way
to disconnect functions connected using the (static) event tables.
-
+
@param id
The identifier (or first of the identifier range) associated with the event
handler function.
/**
Gets user-supplied client data.
-
+
@remarks Normally, any extra data the programmer wishes to associate with
the object should be made available by deriving a new
class with new data members.
-
+
@see SetClientData()
*/
void* GetClientData();
/**
Get a pointer to the user-supplied client data object.
-
+
@see SetClientObject(), wxClientData
*/
wxClientData* GetClientObject() const;
/**
Returns @true if the event handler is enabled, @false otherwise.
-
+
@see SetEvtHandlerEnabled()
*/
bool GetEvtHandlerEnabled();
/**
Gets the pointer to the next handler in the chain.
-
+
@see SetNextHandler(), GetPreviousHandler(),
SetPreviousHandler(), wxWindow::PushEventHandler,
wxWindow::PopEventHandler
/**
Gets the pointer to the previous handler in the chain.
-
+
@see SetPreviousHandler(), GetNextHandler(),
SetNextHandler(), wxWindow::PushEventHandler,
wxWindow::PopEventHandler
/**
Processes an event, searching event tables and calling zero or more suitable
event handler function(s).
-
+
@param event
Event to process.
-
+
@returns @true if a suitable event handler function was found and
executed, and the function did not call wxEvent::Skip.
-
+
@remarks Normally, your application would not call this function: it is
called in the wxWidgets implementation to dispatch
incoming user interface events to the framework (and
application).
-
+
@see SearchEventTable()
*/
virtual bool ProcessEvent(wxEvent& event);
and handles any exceptions that occur in the process. If an exception is
thrown in event handler, wxApp::OnExceptionInMainLoop
is called.
-
+
@param event
Event to process.
-
+
@returns @true if the event was processed, @false if no handler was found
or an exception was thrown.
-
+
@see wxWindow::HandleWindowEvent
*/
bool SafelyProcessEvent(wxEvent& event);
Searches the event table, executing an event handler function if an appropriate
one
is found.
-
+
@param table
Event table to be searched.
@param event
Event to be matched against an event table entry.
-
+
@returns @true if a suitable event handler function was found and
executed, and the function did not call wxEvent::Skip.
-
+
@remarks This function looks through the object's event table and tries
to find an entry that will match the event.
-
+
@see ProcessEvent()
*/
virtual bool SearchEventTable(wxEventTable& table,
/**
Sets user-supplied client data.
-
+
@param data
Data to be associated with the event handler.
-
+
@remarks Normally, any extra data the programmer wishes to associate with
the object should be made available by deriving a new
class with new data members. You must not call this
method and SetClientObject on the same class - only one
of them.
-
+
@see GetClientData()
*/
void SetClientData(void* data);
/**
Set the client data object. Any previous object will be deleted.
-
+
@see GetClientObject(), wxClientData
*/
void SetClientObject(wxClientData* data);
/**
Enables or disables the event handler.
-
+
@param enabled
@true if the event handler is to be enabled, @false if it is to be disabled.
-
+
@remarks You can use this function to avoid having to remove the event
handler from the chain, for example when implementing a
dialog editor and changing from edit to test mode.
-
+
@see GetEvtHandlerEnabled()
*/
void SetEvtHandlerEnabled(bool enabled);
/**
Sets the pointer to the next handler.
-
+
@param handler
Event handler to be set as the next handler.
-
+
@see GetNextHandler(), SetPreviousHandler(),
GetPreviousHandler(), wxWindow::PushEventHandler,
wxWindow::PopEventHandler
/**
Sets the pointer to the previous handler.
-
+
@param handler
Event handler to be set as the previous handler.
*/
/**
Returns @true if the cursor specified by this event is a valid cursor.
-
+
@remarks You cannot specify wxNullCursor with this event, as it is not
considered a valid cursor.
*/
//@{
/**
Opens a file with the given file pointer, which has already been opened.
-
+
@param filename
The filename.
@param mode
read.
Also note that this method may only be called for opened files and may crash if
the file is not opened.
-
+
@see IsOpened()
*/
bool Eof() const;
@c ferror() function.
Please note that this method may only be called for opened files and may crash
if the file is not opened.
-
+
@see IsOpened()
*/
/**
Opens the file, returning @true if successful.
-
+
@param filename
The filename.
@param mode
/**
Reads the specified number of bytes into a buffer, returning the actual number
read.
-
+
@param buffer
A buffer to receive the data.
@param count
The number of bytes to read.
-
+
@returns The number of bytes read.
*/
size_t Read(void* buffer, size_t count);
/**
)
Reads the entire contents of the file into a string.
-
+
@param str
String to read data into.
@param conv
Conversion object to use in Unicode build; by default supposes
that file contents is encoded in UTF-8.
-
+
@returns @true if file was read successfully, @false otherwise.
*/
bool ReadAll(wxString* str);
/**
Seeks to the specified position and returns @true on success.
-
+
@param ofs
Offset to seek to.
@param mode
Moves the file pointer to the specified number of bytes before the end of the
file
and returns @true on success.
-
+
@param ofs
Number of bytes before the end of the file.
*/
/**
Associates the file with the given file descriptor, which has already been
opened.
-
+
@param filename
The filename.
@param mode
/**
Opens the file, returning @true if successful.
-
+
@param filename
The filename.
@param mode
/**
Seeks to the specified position.
-
+
@param ofs
Offset to seek to.
@param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
-
+
@returns The actual offset position achieved, or wxInvalidOffset on
failure.
*/
Moves the file pointer to the specified number of bytes relative to the end of
the file. For example, @c SeekEnd(-5) would position the pointer 5
bytes before the end.
-
+
@param ofs
Number of bytes before the end of the file.
-
+
@returns The actual offset position achieved, or wxInvalidOffset on
failure.
*/
)
Read the config data from the specified stream instead of the associated file,
as usual.
-
+
@see Save()
*/
wxFileConfig(wxInputStream& is);
after saving it successfully, the dirty flag is reset so no changes will be
written back to the file this object is associated with until you change its
contents again.
-
+
@see wxConfigBase::Flush
*/
bool Save(wxOutputStream& os);
some sensitive information, such as passwords), you could use
@c SetUmask(0077).
This function doesn't do anything on non-Unix platforms.
-
+
@see wxCHANGE_UMASK()
*/
void SetUmask(int mode);
Initial size.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
function should only be used with the controls having the @c wxFC_MULTIPLE
style,
use GetFilename() for the others.
-
+
@remarks filenames is emptied first.
*/
void GetFilenames(wxArrayString& filenames) const;
Fills the array @a paths with the full paths of the files chosen. This
function should be used with the controls having the @c wxFC_MULTIPLE style,
use GetPath() otherwise.
-
+
@remarks paths is emptied first.
*/
void GetPaths(wxArrayString& paths) const;
/**
Sets(changes) the current directory displayed in the control.
-
+
@returns Returns @true on success, @false otherwise.
*/
bool SetDirectory(const wxString& directory);
/**
Selects a certain file.
-
+
@returns Returns @true on success, @false otherwise
*/
bool SetFilename(const wxString& filename);
public:
/**
Constructor. Use ShowModal() to show the dialog.
-
+
@param parent
Parent window.
@param message
/**
Makes this object refer to the current working directory on the specified
volume (or current volume if @a volume is empty).
-
+
@see GetCwd()
*/
static void AssignCwd(const wxString& volume = wxEmptyString);
/**
Removes the extension from the file name resulting in a
file name with no trailing dot.
-
+
@see SetExt(), SetEmptyExt()
*/
void SetClearExt();
If @a fileTemp is @NULL, the file is only created, but not opened.
Under Unix, the temporary file will have read and write permissions for the
owner only to minimize the security problems.
-
+
@param prefix
Prefix to use for the temporary file name construction
@param fileTemp
The file to open or @NULL to just get the name
-
+
@returns The full temporary file name or an empty string on error.
*/
static wxString CreateTempFileName(const wxString& prefix,
These functions allow to examine and modify the individual directories of the
path:
AppendDir()
-
+
InsertDir()
-
+
GetDirCount()
PrependDir()
-
+
RemoveDir()
-
+
RemoveLastDir()
To change the components of the file name individually you can use the
following functions:
GetExt()
-
+
GetName()
-
+
GetVolume()
-
+
HasExt()
-
+
HasName()
-
+
HasVolume()
-
+
SetExt()
-
+
ClearExt()
-
+
SetEmptyExt()
-
+
SetName()
-
+
SetVolume()
*/
/**
You can initialize a wxFileName instance using one of the following functions:
@ref wxfilename() "wxFileName constructors"
-
+
Assign()
-
+
AssignCwd()
-
+
AssignDir()
-
+
AssignHomeDir()
-
+
@ref assigntempfilename() AssignHomeTempFileName
-
+
DirName()
-
+
FileName()
-
+
@ref operatorassign() "operator ="
*/
or @ref operatorequal() "operator ==".
For testing basic access modes, you can use:
IsDirWritable()
-
+
IsDirReadable()
-
+
IsFileWritable()
-
+
IsFileReadable()
-
+
IsFileExecutable()
*/
//@{
/**
Returns @true if the file with this name exists.
-
+
@see DirExists()
*/
bool FileExists();
Retrieves the value of the current working directory on the specified volume. If
the volume is empty, the program's current working directory is returned for the
current volume.
-
+
@returns The string containing the current working directory or an empty
string on error.
-
+
@see AssignCwd()
*/
static wxString GetCwd(const wxString& volume = "");
/**
Returns the name part of the filename (without extension).
-
+
@see GetFullName()
*/
wxString GetName() const;
/**
Returns the path part of the filename (without the name or extension). The
possible flags values are:
-
+
@b wxPATH_GET_VOLUME
-
+
Return the path with the volume (does
nothing for the filename formats without volumes), otherwise the path without
volume part is returned.
-
+
@b wxPATH_GET_SEPARATOR
-
+
Return the path with the trailing
separator, if this flag is not given there will be no separator at the end of
the path.
@c wxPATH_DOS there is only one path separator anyhow, but for DOS there
are two of them and the native one, i.e. the backslash is returned by this
method.
-
+
@see GetPathSeparators()
*/
static wxChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE);
formats but @c wxPATH_DOS this string contains only one character but for
DOS and Windows both @c '/' and @c '\' may be used as
separators.
-
+
@see GetPathSeparator()
*/
static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE);
file specified by GetFullPath().
Any of the pointers may be @NULL if the corresponding time is not
needed.
-
+
@returns @true on success, @false if we failed to retrieve the times.
*/
bool GetTimes(wxDateTime* dtAccess, wxDateTime* dtMod,
Make the file name absolute. This is a shortcut for
@c wxFileName::Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE |
wxPATH_NORM_TILDE, cwd, format).
-
+
@see MakeRelativeTo(), Normalize(), IsAbsolute()
*/
bool MakeAbsolute(const wxString& cwd = wxEmptyString,
/**
This function tries to put this file name in a form relative to
-
+
@param pathBase.
In other words, it returns the file name which should be used to access this
file if the current directory were pathBase.
-
+
pathBase
the directory to use as root, current directory is used by
default
@param format
the file name format, native by default
-
+
@returns @true if the file name has been changed, @false if we failed to do
anything with it (currently this only happens if the
file name is on a volume different from the volume
specified by pathBase).
-
+
@see Normalize()
*/
bool MakeRelativeTo(const wxString& pathBase = wxEmptyString,
if the flags contain wxPATH_MKDIR_FULL flag,
try to create each directory in the path and also don't return an error
if the target directory already exists.
-
+
@returns Returns @true if the directory was successfully created, @false
otherwise.
*/
Normalize the path. With the default flags value, the path will be
made absolute, without any ".." and "." and all environment
variables will be expanded in it.
-
+
@param flags
The kind of normalization to do with the file name. It can be
any or-combination of the following constants:
-
-
-
-
-
-
+
+
+
+
+
+
wxPATH_NORM_ENV_VARS
-
-
-
-
+
+
+
+
replace env vars with their values
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_DOTS
-
-
-
-
+
+
+
+
squeeze all .. and . when possible; if there are too many .. and thus they
cannot be all removed, @false will be returned
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_CASE
-
-
-
-
+
+
+
+
if filesystem is case insensitive, transform to lower case
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_ABSOLUTE
-
-
-
-
+
+
+
+
make the path absolute prepending cwd
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_LONG
-
-
-
-
+
+
+
+
make the path the long form
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_SHORTCUT
-
-
-
-
+
+
+
+
resolve if it is a shortcut (Windows only)
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_TILDE
-
-
-
-
+
+
+
+
replace ~ and ~user (Unix only)
-
-
-
-
-
+
+
+
+
+
wxPATH_NORM_ALL
-
-
-
-
+
+
+
+
all of previous flags except wxPATH_NORM_CASE
@param cwd
If not empty, this directory will be used instead of current
working directory in normalization (see wxPATH_NORM_ABSOLUTE).
@param format
The file name format to use when processing the paths, native by default.
-
+
@returns @true if normalization was successfully or @false otherwise.
*/
bool Normalize(int flags = wxPATH_NORM_ALL,
one day (so it is really the access date and not time). The access time may be
updated when the file is executed or not depending on the platform.
GetModificationTime()
-
+
GetTimes()
-
+
SetTimes()
-
+
Touch()
Other file system operations functions are:
Mkdir()
-
+
Rmdir()
*/
/**
Removes the specified directory component from the path.
-
+
@see GetDirCount()
*/
void RemoveDir(size_t pos);
Sets the extension of the file name to be an empty extension.
This is different from having no extension at all as the file
name will have a trailing dot after a call to this method.
-
+
@see SetExt(), ClearExt()
*/
void SetEmptyExt();
as the extension will remove the extension resulting in a file
name without a trailing dot, unlike a call to
SetEmptyExt().
-
+
@see SetEmptyExt(), ClearExt()
*/
void SetExt(const wxString& ext);
/**
Sets the name part (without extension).
-
+
@see SetFullName()
*/
void SetName(const wxString& name);
/**
Splits the given @a fullpath into the volume part (which may be empty) and
the pure path part, not containing any volume.
-
+
@see SplitPath()
*/
static void SplitVolume(const wxString& fullpath,
Validator which can be used for additional date checks.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
Validator which can be used for additional date checks.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
@b Caution! Unless @a is_dir is @true the @a location parameter
is not the directory name but the name of the file in this directory. All these
commands change the path to "dir/subdir/":
-
+
@param location
the new location. Its meaning depends on the value of is_dir
@param is_dir
/**
Converts filename into URL.
-
+
@see URLToFileName(), wxFileName
*/
static wxString FileNameToURL(wxFileName filename);
@e path. If the file is found in any directory, returns @true and the full
path of the file in @e str, otherwise returns @false and doesn't modify
@e str.
-
+
@param str
Receives the full path of the file, must not be @NULL
@param path
absolute path. Note that the user is responsible for deleting the returned
wxFSFile.
@a flags can be one or more of the following bit values ored together:
-
+
A stream opened with just the default @e wxFS_READ flag may
or may not be seekable depending on the underlying source.
Passing @e wxFS_READ | wxFS_SEEKABLE for @a flags will
public:
/**
Constructor. You probably won't use it. See Notes for details.
-
+
@param stream
The input stream that will be used to access data
@param location
/**
Returns anchor (if present). The term of @b anchor can be easily
explained using few examples:
-
+
Usually an anchor is presented only if the MIME type is 'text/html'.
But it may have some meaning with other files;
for example myanim.avi#200 may refer to position in animation
Returns @true if the handler is able to open this file. This function doesn't
check whether the file exists or not, it only checks if it knows the protocol.
Example:
-
+
Must be overridden in derived handlers.
*/
virtual bool CanOpen(const wxString& location);
/**
Opens the file and returns wxFSFile pointer or @NULL if failed.
Must be overridden in derived handlers.
-
+
@param fs
Parent FS (the FS from that OpenFile was called). See ZIP handler
for details of how to use it.
//@{
/**
Creates a font object with the specified attributes.
-
+
@param pointSize
Size in points.
@param pixelSize
@param family
Font family, a generic way of referring to fonts without specifying actual
facename. One of:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxFONTFAMILY_DEFAULT
-
-
-
-
+
+
+
+
Chooses a default font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_DECORATIVE
-
-
-
-
+
+
+
+
A decorative font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_ROMAN
-
-
-
-
+
+
+
+
A formal, serif font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_SCRIPT
-
-
-
-
+
+
+
+
A handwriting font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_SWISS
-
-
-
-
+
+
+
+
A sans-serif font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_MODERN
-
-
-
-
+
+
+
+
A fixed pitch font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_TELETYPE
-
-
-
-
+
+
+
+
A teletype font.
@param style
One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC.
@param weight
Font weight, sometimes also referred to as font boldness. One of:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxFONTWEIGHT_NORMAL
-
-
-
-
+
+
+
+
Normal font.
-
-
-
-
-
+
+
+
+
+
wxFONTWEIGHT_LIGHT
-
-
-
-
+
+
+
+
Light font.
-
-
-
-
-
+
+
+
+
+
wxFONTWEIGHT_BOLD
-
-
-
-
+
+
+
+
Bold font.
@param underline
The value can be @true or @false. At present this has an effect on Windows
a default typeface will be chosen based on the family.
@param encoding
An encoding which may be one of
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxFONTENCODING_SYSTEM
-
-
-
-
+
+
+
+
Default system encoding.
-
-
-
-
-
+
+
+
+
+
wxFONTENCODING_DEFAULT
-
-
-
-
+
+
+
+
Default application encoding: this
is the encoding set by calls to
SetDefaultEncoding and which may be set to,
say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the
default application encoding is the same as default system encoding.
-
-
-
-
-
+
+
+
+
+
wxFONTENCODING_ISO8859_1...15
-
-
-
-
+
+
+
+
ISO8859 encodings.
-
-
-
-
-
+
+
+
+
+
wxFONTENCODING_KOI8
-
-
-
-
+
+
+
+
The standard Russian encoding for Internet.
-
-
-
-
-
+
+
+
+
+
wxFONTENCODING_CP1250...1252
-
-
-
-
+
+
+
+
Windows encodings similar to ISO8859 (but not identical).
-
-
-
-
-
+
+
+
+
+
If the specified encoding isn't available, no font is created
(see also font encoding overview).
-
+
@remarks If the desired font does not exist, the closest match will be
chosen. Under Windows, only scalable TrueType fonts are
used.
Destructor.
See @ref overview_refcountdestruct "reference-counted object destruction" for
more info.
-
+
@remarks Although all remaining fonts are deleted when the application
exits, the application should try to clean up all fonts
itself. This is because wxWidgets cannot know if a
/**
Returns the current application's default encoding.
-
+
@see @ref overview_wxfontencodingoverview, SetDefaultEncoding()
*/
static wxFontEncoding GetDefaultEncoding();
Returns the typeface name associated with the font, or the empty string if
there is no
typeface information.
-
+
@see SetFaceName()
*/
wxString GetFaceName() const;
/**
Gets the font family. See SetFamily() for a list of valid
family identifiers.
-
+
@see SetFamily()
*/
wxFontFamily GetFamily() const;
Note that the returned string is not meant to be shown or edited by the user: a
typical
use of this function is for serializing in string-form a wxFont object.
-
+
@see SetNativeFontInfo(),GetNativeFontInfoUserDesc()
*/
wxString GetNativeFontInfoDesc() const;
non-empty.
Some examples of the formats of returned strings (which are platform-dependent)
are in SetNativeFontInfoUserDesc().
-
+
@see GetNativeFontInfoDesc()
*/
wxString GetNativeFontInfoUserDesc();
/**
Gets the point size.
-
+
@see SetPointSize()
*/
int GetPointSize() const;
/**
Gets the font style. See wxFont() for a list of valid
styles.
-
+
@see SetStyle()
*/
int GetStyle() const;
/**
Returns @true if the font is underlined, @false otherwise.
-
+
@see SetUnderlined()
*/
bool GetUnderlined() const;
/**
Gets the font weight. See wxFont() for a list of valid
weight identifiers.
-
+
@see SetWeight()
*/
wxFontWeight GetWeight() const;
/**
Sets the default font encoding.
-
+
@see @ref overview_wxfontencodingoverview, GetDefaultEncoding()
*/
static void SetDefaultEncoding(wxFontEncoding encoding);
/**
Sets the facename for the font.
Returns @true if the given face name exists; @false otherwise.
-
+
@param faceName
A valid facename, which should be on the end-user's system.
-
+
@remarks To avoid portability problems, don't rely on a specific face,
but specify the font family instead or as well. A
suitable font will be found on the end-user's system.
If both the family and the facename are specified,
wxWidgets will first search for the specific face, and
then for a font belonging to the same family.
-
+
@see GetFaceName(), SetFamily()
*/
bool SetFaceName(const wxString& faceName);
/**
Sets the font family.
-
+
@param family
One of:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxFONTFAMILY_DEFAULT
-
-
-
-
+
+
+
+
Chooses a default font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_DECORATIVE
-
-
-
-
+
+
+
+
A decorative font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_ROMAN
-
-
-
-
+
+
+
+
A formal, serif font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_SCRIPT
-
-
-
-
+
+
+
+
A handwriting font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_SWISS
-
-
-
-
+
+
+
+
A sans-serif font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_MODERN
-
-
-
-
+
+
+
+
A fixed pitch font.
-
-
-
-
-
+
+
+
+
+
wxFONTFAMILY_TELETYPE
-
-
-
-
+
+
+
+
A teletype font.
-
+
@see GetFamily(), SetFaceName()
*/
void SetFamily(wxFontFamily family);
invalid, font is unchanged. This function is typically used for de-serializing
a wxFont
object previously saved in a string-form.
-
+
@see SetNativeFontInfoUserDesc()
*/
bool SetNativeFontInfo(const wxString& info);
Unlike SetNativeFontInfo(), this function accepts
strings which are user-friendly.
Examples of accepted string formats are:
-
+
Generic syntax
-
+
Example
-
+
on @b wxGTK2: @c [FACE-NAME] [bold] [oblique|italic] [POINTSIZE]
-
+
Monospace bold 10
-
+
on @b wxMSW: @c [light|bold] [italic] [FACE-NAME] [POINTSIZE] [ENCODING]
-
+
Tahoma 10 WINDOWS-1252
-
+
on @b wxMac: FIXME
-
+
FIXME
-
+
For more detailed information about the allowed syntaxes you can look at the
documentation of the native API used for font-rendering (e.g. pango_font_description_from_string).
-
+
@see SetNativeFontInfo()
*/
bool SetNativeFontInfoUserDesc(const wxString& info);
/**
Sets the point size.
-
+
@param pointSize
Size in points.
-
+
@see GetPointSize()
*/
void SetPointSize(int pointSize);
/**
Sets the font style.
-
+
@param style
One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC.
-
+
@see GetStyle()
*/
void SetStyle(int style);
/**
Sets underlining.
-
+
@param underlining
@true to underline, @false otherwise.
-
+
@see GetUnderlined()
*/
void SetUnderlined(const bool underlined);
/**
Sets the font weight.
-
+
@param weight
One of:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxFONTWEIGHT_NORMAL
-
-
-
-
+
+
+
+
Normal font.
-
-
-
-
-
+
+
+
+
+
wxFONTWEIGHT_LIGHT
-
-
-
-
+
+
+
+
Light font.
-
-
-
-
-
+
+
+
+
+
wxFONTWEIGHT_BOLD
-
-
-
-
+
+
+
+
Bold font.
-
+
@see GetWeight()
*/
void SetWeight(wxFontWeight weight);
/**
Get the current font mapper object. If there is no current object, creates
one.
-
+
@see Set()
*/
static wxFontMapper* Get();
/**
Return internal string identifier for the encoding (see also
wxFontMapper::GetEncodingDescription)
-
+
@see GetEncodingFromName()
*/
static wxString GetEncodingName(wxFontEncoding encoding);
Set the current font mapper object and return previous one (may be @NULL).
This method is only useful if you want to plug-in an alternative font mapper
into wxWidgets.
-
+
@see Get()
*/
static wxFontMapper* Set(wxFontMapper* mapper);
Validator which can be used for additional date checks.
@param name
Control name.
-
+
@returns @true if the control was successfully created or @false if
creation failed.
*/
//@{
/**
Constructor, creating the window.
-
+
@param parent
The window parent. This may be @NULL. If it is non-@NULL, the frame will
always be displayed on top of the parent window on Windows.
item,
allowing the application user to set Motif resource values for
individual windows.
-
+
@remarks For Motif, MWM (the Motif Window Manager) should be running for
any window styles to work (otherwise all styles take
effect).
-
+
@see Create()
*/
wxFrame();
/**
Centres the frame on the display.
-
+
@param direction
The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH.
*/
/**
Creates a status bar at the bottom of the frame.
-
+
@param number
The number of fields to create. Specify a
value greater than 1 to create a multi-field status bar.
wxWidgets.
@param name
The status bar window name.
-
+
@returns A pointer to the status bar if it was created successfully, @NULL
otherwise.
-
+
@remarks The width of the status bar is the whole width of the frame
(adjusted automatically when resizing), and the height
and text size are chosen by the host windowing system.
-
+
@see SetStatusText(), OnCreateStatusBar(), GetStatusBar()
*/
virtual wxStatusBar* CreateStatusBar(int number = 1,
/**
Creates a toolbar at the top or left of the frame.
-
+
@param style
The toolbar style. See wxToolBar for a list
of valid styles.
wxWidgets.
@param name
The toolbar window name.
-
+
@returns A pointer to the toolbar if it was created successfully, @NULL
otherwise.
-
+
@remarks By default, the toolbar is an instance of wxToolBar (which is
defined to be a suitable toolbar class on each
platform, such as wxToolBar95). To use a different
class, override OnCreateToolBar().
-
+
@see CreateStatusBar(), OnCreateToolBar(), SetToolBar(),
GetToolBar()
*/
/**
Returns a pointer to the menubar currently associated with the frame (if any).
-
+
@see SetMenuBar(), wxMenuBar, wxMenu
*/
wxMenuBar* GetMenuBar() const;
/**
Returns a pointer to the status bar currently associated with the frame (if
any).
-
+
@see CreateStatusBar(), wxStatusBar
*/
wxStatusBar* GetStatusBar() const;
/**
Returns the status bar pane used to display menu and toolbar help.
-
+
@see SetStatusBarPane()
*/
int GetStatusBarPane();
/**
Returns a pointer to the toolbar currently associated with the frame (if any).
-
+
@see CreateToolBar(), wxToolBar, SetToolBar()
*/
wxToolBar* GetToolBar() const;
/**
Virtual function called when a status bar is requested by CreateStatusBar().
-
+
@param number
The number of fields to create.
@param style
wxWidgets.
@param name
The window name.
-
+
@returns A status bar object.
-
+
@remarks An application can override this function to return a different
kind of status bar. The default implementation returns
an instance of wxStatusBar.
-
+
@see CreateStatusBar(), wxStatusBar.
*/
virtual wxStatusBar* OnCreateStatusBar(int number, long style,
/**
Virtual function called when a toolbar is requested by CreateToolBar().
-
+
@param style
The toolbar style. See wxToolBar for a list
of valid styles.
wxWidgets.
@param name
The toolbar window name.
-
+
@returns A toolbar object.
-
+
@remarks An application can override this function to return a different
kind of toolbar. The default implementation returns an
instance of wxToolBar.
-
+
@see CreateToolBar(), wxToolBar.
*/
virtual wxToolBar* OnCreateToolBar(long style, wxWindowID id,
/**
Simulate a menu command.
-
+
@param id
The identifier for a menu item.
*/
/**
Tells the frame to show the given menu bar.
-
+
@param menuBar
The menu bar to associate with the frame.
-
+
@remarks If the frame is destroyed, the menu bar and its menus will be
destroyed also, so do not delete the menu bar
explicitly (except by resetting the frame's menu bar to
another frame or @NULL).
-
+
@see GetMenuBar(), wxMenuBar, wxMenu.
*/
void SetMenuBar(wxMenuBar* menuBar);
/**
Associates a status bar with the frame.
-
+
@see CreateStatusBar(), wxStatusBar, GetStatusBar()
*/
void SetStatusBar(wxStatusBar* statusBar);
/**
Sets the status bar text and redraws the status bar.
-
+
@param text
The text for the status field.
@param number
The status field (starting from zero).
-
+
@remarks Use an empty string to clear the status bar.
-
+
@see CreateStatusBar(), wxStatusBar
*/
virtual void SetStatusText(const wxString& text, int number = 0);
/**
Sets the widths of the fields in the status bar.
-
+
@param n
The number of fields in the status bar. It must be the
same used in CreateStatusBar.
least one
field must be -1. You should delete this array after calling
SetStatusWidths.
-
+
@remarks The widths of the variable fields are calculated from the total
width of all fields, minus the sum of widths of the
non-variable fields, divided by the number of variable
Note that you must use a @a type value (aka image format)
that wxWidgets can save (e.g. JPG, PNG, see wxImage
documentation())!
-
+
@see AddFileWithMimeType()
*/
static void AddFile(const wxString& filename, wxImage& image,
Like AddFile(), but lets you explicitly
specify added file's MIME type. This version should be used whenever you know
the MIME type, because it makes accessing the files faster.
-
+
@wxsince{2.8.5}
-
+
@see AddFile()
*/
static void AddFileWithMimeType(const wxString& filename,
//@{
/**
Constructor, creating and showing a gauge.
-
+
@param parent
Window parent.
@param id
Gauge style. See wxGauge.
@param name
Window name.
-
+
@see Create()
*/
wxGauge();
/**
Returns the width of the 3D bezel face.
-
+
@remarks This method is not implemented (returns 0) for most platforms.
-
+
@see SetBezelFace()
*/
int GetBezelFace() const;
/**
Returns the maximum position of the gauge.
-
+
@see SetRange()
*/
int GetRange() const;
/**
Returns the 3D shadow margin width.
-
+
@remarks This method is not implemented (returns 0) for most platforms.
-
+
@see SetShadowWidth()
*/
int GetShadowWidth() const;
/**
Returns the current position of the gauge.
-
+
@see SetValue()
*/
int GetValue() const;
/**
Sets the 3D bezel face width.
-
+
@remarks This method is not implemented (doesn't do anything) for most
platforms.
-
+
@see GetBezelFace()
*/
void SetBezelFace(int width);
/**
Sets the range (maximum value) of the gauge.
This function makes the gauge switch to determinate mode, if it's not already.
-
+
@see GetRange()
*/
void SetRange(int range);
/**
Sets the 3D shadow width.
-
+
@remarks This method is not implemented (doesn't do anything) for most
platforms.
*/
range as returned by GetRange(), inclusive.
This function makes the gauge switch to determinate mode, if it was in
indeterminate mode before.
-
+
@param pos
Position for the gauge level.
-
+
@see GetValue()
*/
void SetValue(int pos);
public:
/**
Constructor.
-
+
@param win
The canvas that is used to initialize this context. This parameter is
needed only temporarily,
Creates a window with the given parameters. Notice that you need to create and
use a wxGLContext to output to this window.
If
-
+
@param attribList is not specified, double buffered RGBA mode is used.
-
+
parent
Pointer to a parent window.
@param id
/**
Determines if a canvas having the specified attributes is available.
Returns @true if attributes are supported.
-
+
@param attribList
See attribList for wxGLCanvas().
*/
public:
//@{
/**
-
+
*/
void AddArc(wxDouble x, wxDouble y, wxDouble r,
wxDouble startAngle,
//@{
/**
-
+
*/
void AddCurveToPoint(wxDouble cx1, wxDouble cy1, wxDouble cx2,
wxDouble cy2,
//@{
/**
-
+
*/
void AddLineToPoint(wxDouble x, wxDouble y);
void AddLineToPoint(const wxPoint2DDouble& p);
//@{
/**
Creates a wxGraphicsContext from a wxWindow.
-
+
@see wxGraphicsRenderer:: CreateContext
*/
wxGraphicsContext* Create(const wxWindowDC& dc);
Creates a wxGraphicsContext from a native context. This native context must be
eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a
cairo_t pointer for cairo.
-
+
Creates a wxGraphicsContext from a native window.
-
+
@see wxGraphicsRenderer:: CreateContextFromNativeContext
*/
wxGraphicsContext* CreateFromNative(void* context);
public:
//@{
/**
-
+
*/
void Concat(const wxGraphicsMatrix* t);
void Concat(const wxGraphicsMatrix& t);
{
public:
/**
-
+
*/
wxGridTableBase();
/**
-
+
*/
~wxGridTableBase();
/**
-
+
*/
bool AppendCols(size_t numCols = 1);
/**
-
+
*/
bool AppendRows(size_t numRows = 1);
/**
-
+
*/
bool CanGetValueAs(int row, int col, const wxString& typeName);
bool CanHaveAttributes();
/**
-
+
*/
bool CanSetValueAs(int row, int col, const wxString& typeName);
/**
-
+
*/
void Clear();
/**
-
+
*/
bool DeleteCols(size_t pos = 0, size_t numCols = 1);
/**
-
+
*/
bool DeleteRows(size_t pos = 0, size_t numRows = 1);
wxGridCellAttrProvider* GetAttrProvider() const;
/**
-
+
*/
wxString GetColLabelValue(int col);
/**
-
+
*/
int GetNumberCols();
int GetNumberRows();
/**
-
+
*/
wxString GetRowLabelValue(int row);
wxString GetTypeName(int row, int col);
/**
-
+
*/
wxString GetValue(int row, int col);
/**
-
+
*/
bool GetValueAsBool(int row, int col);
const wxString& typeName);
/**
-
+
*/
double GetValueAsDouble(int row, int col);
/**
-
+
*/
long GetValueAsLong(int row, int col);
/**
-
+
*/
wxGrid* GetView() const;
/**
-
+
*/
bool InsertCols(size_t pos = 0, size_t numCols = 1);
/**
-
+
*/
bool InsertRows(size_t pos = 0, size_t numRows = 1);
/**
-
+
*/
bool IsEmptyCell(int row, int col);
void SetAttrProvider(wxGridCellAttrProvider* attrProvider);
/**
-
+
*/
void SetColAttr(wxGridCellAttr* attr, int col);
void SetColLabelValue() const;
/**
-
+
*/
void SetRowAttr(wxGridCellAttr* attr, int row);
void SetRowLabelValue() const;
/**
-
+
*/
void SetValue(int row, int col, const wxString& value);
/**
-
+
*/
void SetValueAsBool(int row, int col, bool value);
/**
-
+
*/
void SetValueAsCustom(int row, int col, const wxString& typeName,
void* value);
/**
-
+
*/
void SetValueAsDouble(int row, int col, double value);
/**
-
+
*/
void SetValueAsLong(int row, int col, long value);
void SetView(wxGrid* grid);
/**
-
+
*/
void UpdateAttrCols(size_t pos, int numCols);
{
public:
/**
-
+
*/
wxGridCellEditor();
void HandleReturn(wxKeyEvent& event);
/**
-
+
*/
bool IsCreated();
public:
//@{
/**
-
+
*/
wxGridEditorCreatedEvent();
wxGridEditorCreatedEvent(int id, wxEventType type,
public:
//@{
/**
-
+
*/
wxGridRangeSelectEvent();
wxGridRangeSelectEvent(int id, wxEventType type,
{
public:
/**
-
+
*/
wxGridCellRenderer* Clone() const;
public:
//@{
/**
-
+
*/
wxGridSizeEvent();
wxGridSizeEvent(int id, wxEventType type, wxObject* obj,
wxGridCellAttr* Clone() const;
/**
-
+
*/
void DecRef();
void GetAlignment(int* hAlign, int* vAlign) const;
/**
-
+
*/
const wxColour GetBackgroundColour() const;
/**
-
+
*/
wxGridCellEditor* GetEditor(wxGrid* grid, int row, int col) const;
/**
-
+
*/
const wxFont GetFont() const;
/**
-
+
*/
wxGridCellRenderer* GetRenderer(wxGrid* grid, int row, int col) const;
/**
-
+
*/
const wxColour GetTextColour() const;
/**
-
+
*/
bool HasAlignment() const;
/**
-
+
*/
bool HasBackgroundColour() const;
/**
-
+
*/
bool HasEditor() const;
/**
-
+
*/
bool HasFont() const;
/**
-
+
*/
bool HasRenderer() const;
void IncRef();
/**
-
+
*/
bool IsReadOnly() const;
void SetBackgroundColour(const wxColour& colBack);
/**
-
+
*/
void SetDefAttr(wxGridCellAttr* defAttr);
/**
-
+
*/
void SetEditor(wxGridCellEditor* editor);
void SetFont(const wxFont& font);
/**
-
+
*/
void SetReadOnly(bool isReadOnly = true);
public:
//@{
/**
-
+
*/
wxGridEvent();
wxGridEvent(int id, wxEventType type, wxObject* obj,
/**
AutoSizeColumn()
-
+
AutoSizeRow()
-
+
AutoSizeColumns()
-
+
AutoSizeRows()
-
+
AutoSize()
-
+
SetColMinimalWidth()
-
+
SetRowMinimalHeight()
-
+
SetColMinimalAcceptableWidth()
-
+
SetRowMinimalAcceptableHeight()
-
+
GetColMinimalAcceptableWidth()
-
+
GetRowMinimalAcceptableHeight()
*/
EndBatch(). Code that does a lot of grid
modification can be enclosed between BeginBatch and EndBatch calls to avoid
screen flicker. The final EndBatch will cause the grid to be repainted.
-
+
@see wxGridUpdateLocker
*/
void BeginBatch();
/**
EnableDragRowSize()
-
+
EnableDragColSize()
-
+
CanDragRowSize()
-
+
CanDragColSize()
-
+
EnableDragColMove()
-
+
CanDragColMove()
-
+
EnableDragGridSize()
-
+
CanDragGridSize()
-
+
GetColAt()
-
+
SetColPos()
-
+
GetColPos()
-
+
EnableDragCell()
-
+
CanDragCell()
*/
/**
@ref ctor() wxGrid
-
+
@ref dtor() ~wxGrid
-
+
CreateGrid()
-
+
SetTable()
*/
/**
MoveCursorUp()
-
+
MoveCursorDown()
-
+
MoveCursorLeft()
-
+
MoveCursorRight()
-
+
MoveCursorPageUp()
-
+
MoveCursorPageDown()
-
+
MoveCursorUpBlock()
-
+
MoveCursorDownBlock()
-
+
MoveCursorLeftBlock()
-
+
MoveCursorRightBlock()
*/
EndBatch. Code that does a lot of grid modification can be enclosed between
BeginBatch and EndBatch calls to avoid screen flicker. The final EndBatch will
cause the grid to be repainted.
-
+
@see wxGridUpdateLocker
*/
void EndBatch();
grid cell at the specified location.
Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or
wxALIGN_RIGHT.
-
+
Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
*/
void GetCellAlignment(int row, int col, int* horiz, int* vert) const;
Sets the arguments to the current column label alignment values.
Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or
wxALIGN_RIGHT.
-
+
Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
*/
void GetColLabelAlignment(int* horiz, int* vert) const;
wxString GetColLabelValue(int col) const;
/**
-
+
*/
int GetColLeft(int col) const;
int GetColPos(int colID) const;
/**
-
+
*/
int GetColRight(int col) const;
values.
Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or
wxALIGN_RIGHT.
-
+
Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
*/
void GetDefaultCellAlignment(int* horiz, int* vert) const;
//@{
/**
-
+
*/
wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const;
const wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const;
//@}
/**
-
+
*/
wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const;
Returns the pen used for grid lines. This virtual function may be overridden in
derived classes in order to change the appearance of grid lines. Note that
currently the pen width must be 1.
-
+
@see GetColGridLinePen(), GetRowGridLinePen()
*/
wxPen GetDefaultGridLinePen();
wxGridCellRenderer* GetDefaultRenderer() const;
/**
-
+
*/
wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const;
/**
-
+
*/
wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const;
/**
Returns the colour used for grid lines.
-
+
@see GetDefaultGridLinePen()
*/
wxColour GetGridLineColour() const;
int GetNumberRows() const;
/**
-
+
*/
wxGridCellAttr* GetOrCreateCellAttr(int row, int col) const;
/**
Sets the arguments to the current row label alignment values.
Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT.
-
+
Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
*/
void GetRowLabelAlignment(int* horiz, int* vert) const;
int GetRowMinimalAcceptableHeight() const;
/**
-
+
*/
int GetRowMinimalHeight(int col) const;
/**
Returns the number of pixels per horizontal scroll increment. The default is 15.
-
+
@see GetScrollLineY(), SetScrollLineX(), SetScrollLineY()
*/
int GetScrollLineX() const;
/**
Returns the number of pixels per vertical scroll increment. The default is 15.
-
+
@see GetScrollLineX(), SetScrollLineX(), SetScrollLineY()
*/
int GetScrollLineY() const;
wxGridCellCoordsArray GetSelectionBlockTopLeft() const;
/**
-
+
*/
wxColour GetSelectionForeground() const;
/**
EnableGridLines()
-
+
GridLinesEnabled()
-
+
SetGridLineColour()
-
+
GetGridLineColour()
-
+
GetDefaultGridLinePen()
-
+
GetRowGridLinePen()
-
+
GetColGridLinePen()
*/
/**
SetRowLabelValue()
-
+
SetColLabelValue()
-
+
GetRowLabelValue()
-
+
GetColLabelValue()
-
+
SetUseNativeColLabels()
-
+
HideColLabels()
-
+
HideRowLabels()
-
+
SetRowLabelSize()
-
+
SetColLabelSize()
-
+
GetRowLabelSize()
-
+
GetColLabelSize()
-
+
AutoSizeRowLabelSize()
-
+
AutoSizeColLabelSize()
-
+
GetDefaultRowLabelSize()
-
+
GetDefaultColLabelSize()
-
+
SetRowLabelAlignment()
-
+
SetColLabelAlignment()
-
+
GetRowLabelAlignment()
-
+
GetColLabelAlignment()
-
+
SetLabelFont()
-
+
SetLabelTextColour()
-
+
SetLabelBackgroundColour()
-
+
GetLabelFont()
-
+
GetLabelBackgroundColour()
-
+
GetLabelTextColour()
-
+
SetColLabelTextOrientation()
-
+
GetColLabelTextOrientation()
*/
/**
ClearSelection()
-
+
IsSelection()
-
+
SelectAll()
-
+
SelectBlock()
-
+
SelectCol()
-
+
SelectRow()
*/
location.
Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or
wxALIGN_RIGHT.
-
+
Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or
wxALIGN_BOTTOM.
*/
//@}
/**
-
+
*/
void SetCellBackgroundColour(int row, int col,
const wxColour& colour);
int SetOrCalcColumnSizes(bool calcOnly, bool setAsMin = true);
/**
-
+
*/
int SetOrCalcRowSizes(bool calcOnly, bool setAsMin = true);
Sets the number of pixels per horizontal scroll increment. The default is 15.
Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
errors: setting this to 1 can help.
-
+
@see GetScrollLineX(), GetScrollLineY(), SetScrollLineY()
*/
void SetScrollLineX(int x);
Sets the number of pixels per vertical scroll increment. The default is 15.
Sometimes wxGrid has trouble setting the scrollbars correctly due to rounding
errors: setting this to 1 can help.
-
+
@see GetScrollLineX(), GetScrollLineY(), SetScrollLineX()
*/
void SetScrollLineY(int y);
/**
-
+
*/
void SetSelectionBackground(const wxColour& c);
/**
-
+
*/
void SetSelectionForeground(const wxColour& c);
/**
Set the selection behaviour of the grid.
-
+
@param wxGridSelectCells()
The default mode where individual cells are selected.
@param wxGridSelectRows()
@e WinHelp, MS HTML Help @a sectionNo is a context id.
@e External HTML help: wxExtHelpController implements @a sectionNo as an id in
a map file, which is of the form:
-
+
@e wxHtmlHelpController: @a sectionNo is an identifier as specified in the @c
.hhc file. See @ref overview_helpformat "Help files format".
See also the help sample for notes on how to specify section numbers for
wxHtmlHelpController returns the frame, size and position.
For all other help controllers, this function does nothing
and just returns @NULL.
-
+
@param viewer
This defaults to "netscape" for wxExtHelpController.
@param flags
wxVListBox::SetSelectionBackground allows to
change the selection background for all cells at once and doing anything more
fancy is probably going to look strangely.
-
+
@see GetSelectedTextColour()
*/
wxColour GetSelectedTextBgColour(const wxColour& colBg) const;
look inside selection. By default all original colours are completely ignored
and the standard, system-dependent, selection colour is used but the program
may wish to override this to achieve some custom appearance.
-
+
@see GetSelectedTextBgColour(),
wxVListBox::SetSelectionBackground, wxSystemSettings::GetColour
*/
/**
Called when the user clicks on hypertext link. Does nothing by default.
Overloading this method is deprecated; intercept the event instead.
-
+
@param n
Index of the item containing the link.
@param link
Description of the link.
-
+
@see See also wxHtmlLinkInfo.
*/
virtual void OnLinkClicked(size_t n, const wxHtmlLinkInfo& link);
public:
/**
Creates the hyperlink control.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
//@{
/**
Loads an icon from the specified location().
-
+
@param bits
Specifies an array of pixel values.
@param width
wxIconLocation.
@param type
May be one of the following:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Load a Windows icon file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO_RESOURCE
-
-
-
-
+
+
+
+
Load a Windows icon from the resource database.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_GIF
-
-
-
-
+
+
+
+
Load a GIF bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XBM
-
-
-
-
+
+
+
+
Load an X bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XPM
-
-
-
-
+
+
+
+
Load an XPM bitmap file.
-
-
-
-
-
+
+
+
+
+
The validity of these flags depends on the platform and wxWidgets
configuration.
If all possible wxWidgets settings are used, the Windows platform supports
XPM data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM
file.
-
+
@remarks The first form constructs an icon object with no data; an
assignment or another member function such as Create or
LoadFile must be called subsequently.
/**
Copies @a bmp bitmap to this icon. Under MS Windows the bitmap
must have mask colour set.
-
+
LoadFile()
-
+
Wx::Icon-new( width, height, depth = -1 )
Wx::Icon-new( name, type, desiredWidth = -1, desiredHeight = -1 )
Wx::Icon-newFromBits( bits, width, height, depth = 1 )
/**
Gets the width of the icon in pixels.
-
+
@see GetHeight()
*/
int GetWidth() const;
/**
Loads an icon from a file or resource.
-
+
@param name
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
@param type
One of the following values:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Load a Windows icon file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO_RESOURCE
-
-
-
-
+
+
+
+
Load a Windows icon from the resource database.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_GIF
-
-
-
-
+
+
+
+
Load a GIF bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XBM
-
-
-
-
+
+
+
+
Load an X bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XPM
-
-
-
-
+
+
+
+
Load an XPM bitmap file.
-
-
-
-
-
+
+
+
+
+
The validity of these flags depends on the platform and wxWidgets
configuration.
-
+
@returns @true if the operation succeeded, @false otherwise.
-
+
@see wxIcon()
*/
bool LoadFile(const wxString& name, wxBitmapType type);
/**
Sets the depth member (does not affect the icon data).
-
+
@param depth
Icon depth.
*/
/**
Sets the height member (does not affect the icon data).
-
+
@param height
Icon height in pixels.
*/
/**
Sets the width member (does not affect the icon data).
-
+
@param width
Icon width in pixels.
*/
/**
Assignment operator, using @ref overview_trefcount "reference counting".
-
+
@param icon
Icon to assign.
*/
If the image file contains more than one image and the image handler is capable
of retrieving these individually, this function will return the number of
available images.
-
+
@param stream
Opened input stream for reading image data. Currently, the stream must
support seeking.
-
+
@returns Number of available images. For most image handlers, this is 1
(exceptions are TIFF and ICO formats).
*/
more than one image and the image handler is capable of retrieving these
individually, @e index
indicates which image to read from the stream.
-
+
@param image
The image object which is to be affected by this operation.
@param stream
wxLogMessages.
@param index
The index of the image in the file (starting from zero).
-
+
@returns @true if the operation succeeded, @false otherwise.
-
+
@see wxImage::LoadFile, wxImage::SaveFile, SaveFile()
*/
bool LoadFile(wxImage* image, wxInputStream& stream,
/**
Saves a image in the output stream.
-
+
@param image
The image object which is to be affected by this operation.
@param stream
Opened output stream for writing the data.
-
+
@returns @true if the operation succeeded, @false otherwise.
-
+
@see wxImage::LoadFile, wxImage::SaveFile, LoadFile()
*/
bool SaveFile(wxImage* image, wxOutputStream& stream);
/**
Sets the handler extension.
-
+
@param extension
Handler extension.
*/
/**
Sets the handler MIME type.
-
+
@param mimename
Handler MIME type.
*/
/**
Sets the handler name.
-
+
@param name
Handler name.
*/
//@{
/**
Creates an image from XPM data.
-
+
@param width
Specifies the width of the image.
@param height
must support seeking.
@param type
May be one of the following:
-
-
-
-
-
-
+
+
+
+
+
+
wxBITMAP_TYPE_BMP
-
-
-
-
+
+
+
+
Load a Windows bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_GIF
-
-
-
-
+
+
+
+
Load a GIF bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_JPEG
-
-
-
-
+
+
+
+
Load a JPEG bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNG
-
-
-
-
+
+
+
+
Load a PNG bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PCX
-
-
-
-
+
+
+
+
Load a PCX bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNM
-
-
-
-
+
+
+
+
Load a PNM bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_TIF
-
-
-
-
+
+
+
+
Load a TIFF bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_TGA
-
-
-
-
+
+
+
+
Load a TGA bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XPM
-
-
-
-
+
+
+
+
Load a XPM bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Load a Windows icon file (ICO).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_CUR
-
-
-
-
+
+
+
+
Load a Windows cursor file (CUR).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ANI
-
-
-
-
+
+
+
+
Load a Windows animated cursor file (ANI).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ANY
-
-
-
-
+
+
+
+
Will try to autodetect the format.
@param mimetype
MIME type string (for example 'image/jpeg')
ICO handler.
@param xpmData
A pointer to XPM image data.
-
+
@remarks Depending on how wxWidgets has been configured, not all formats
may be available.
-
+
@see LoadFile()
*/
wxImage();
pixel
@e blurRadius. This should not be used when using a single mask colour
for transparency.
-
+
@see @ref horzblur() BlurHorizontal, @ref vertblur() BlurVertical
*/
wxImage Blur(int blurRadius);
/**
Blurs the image in the horizontal direction only. This should not be used
when using a single mask colour for transparency.
-
+
@see Blur(), @ref vertblur() BlurVertical
*/
wxImage BlurHorizontal(int blurRadius);
/**
Blurs the image in the vertical direction only. This should not be used
when using a single mask colour for transparency.
-
+
@see Blur(), @ref horzblur() BlurHorizontal
*/
wxImage BlurVertical(int blurRadius);
Computes the histogram of the image. @a histogram is a reference to
wxImageHistogram object. wxImageHistogram is a specialization of
wxHashMap "template" and is defined as follows:
-
+
@returns Returns number of colours in the histogram.
*/
unsigned long ComputeHistogram(wxImageHistogram& histogram) const;
FindFirstUnusedColour().
If the image image doesn't have alpha channel,
ConvertAlphaToMask does nothing.
-
+
@returns @false if FindFirstUnusedColour returns @false, @true otherwise.
*/
bool ConvertAlphaToMask(unsigned char threshold = 128);
Creates a fresh image. If @a clear is @true, the new image will be initialized
to black.
Otherwise, the image data will be uninitialized.
-
+
@param width
The width of the image in pixels.
@param height
The height of the image in pixels.
-
+
@returns @true if the call succeeded, @false otherwise.
*/
bool Create(int width, int height, bool clear = true);
@param startR,startG,startB
Initial values of the colour. Returned colour
will have RGB values equal to or greater than these.
-
+
@returns Returns @false if there is no unused colour left, @true on success.
*/
bool FindFirstUnusedColour(unsigned char* r, unsigned char* g,
//@{
/**
Finds the handler associated with the given MIME type.
-
+
@param name
The handler name.
@param extension
The image type, such as wxBITMAP_TYPE_BMP.
@param mimetype
MIME type.
-
+
@returns A pointer to the handler if found, @NULL otherwise.
-
+
@see wxImageHandler
*/
static wxImageHandler* FindHandler(const wxString& name);
/**
Returns the static list of image format handlers.
-
+
@see wxImageHandler
*/
static wxList GetHandlers();
If the image file contains more than one image and the image handler is capable
of retrieving these individually, this function will return the number of
available images.
-
+
@param name
Name of the file to query.
@param stream
seeking.
@param type
May be one of the following:
-
-
-
-
-
-
+
+
+
+
+
+
wxBITMAP_TYPE_BMP
-
-
-
-
+
+
+
+
Load a Windows bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_GIF
-
-
-
-
+
+
+
+
Load a GIF bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_JPEG
-
-
-
-
+
+
+
+
Load a JPEG bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNG
-
-
-
-
+
+
+
+
Load a PNG bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PCX
-
-
-
-
+
+
+
+
Load a PCX bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNM
-
-
-
-
+
+
+
+
Load a PNM bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_TIF
-
-
-
-
+
+
+
+
Load a TIFF bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XPM
-
-
-
-
+
+
+
+
Load a XPM bitmap file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Load a Windows icon file (ICO).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_CUR
-
-
-
-
+
+
+
+
Load a Windows cursor file (CUR).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ANI
-
-
-
-
+
+
+
+
Load a Windows animated cursor file (ANI).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ANY
-
-
-
-
+
+
+
+
Will try to autodetect the format.
-
+
@returns Number of available images. For most image handlers, this is 1
(exceptions are TIFF and ICO formats).
*/
Iterates all registered wxImageHandler objects, and returns a string containing
file extension masks
suitable for passing to file open/save dialog boxes.
-
+
@returns The format of the returned string is
"(*.ext1;*.ext2)|*.ext1;*.ext2".
-
+
@see wxImageHandler
*/
static wxString GetImageExtWildcard();
Gets a user-defined option. The function is case-insensitive to @e name.
For example, when saving as a JPEG file, the option @b quality is
used, which is a number between 0 and 100 (0 is terrible, 100 is very good).
-
+
@see SetOption(), GetOptionInt(), HasOption()
*/
wxString GetOption(const wxString& name) const;
HasOption() is 0 is a possibly valid value
for the option.
Options for wxPNGHandler
-
+
wxIMAGE_OPTION_PNG_FORMAT
-
+
Format for saving a PNG file.
-
+
wxIMAGE_OPTION_PNG_BITDEPTH
-
+
Bit depth for every channel (R/G/B/A).
-
+
Supported values for wxIMAGE_OPTION_PNG_FORMAT:
-
+
wxPNG_TYPE_COLOUR
-
+
Stores RGB image.
-
+
wxPNG_TYPE_GREY
-
+
Stores grey image, converts from RGB.
-
+
wxPNG_TYPE_GREY_RED
-
+
Stores grey image, uses red value as grey.
-
+
@see SetOption(), GetOption()
*/
int GetOptionInt(const wxString& name) const;
/**
Gets the width of the image in pixels.
-
+
@see GetHeight()
*/
int GetWidth() const;
/**
Returns @true if this image has alpha channel, @false otherwise.
-
+
@see GetAlpha(), SetAlpha()
*/
bool HasAlpha() const;
/**
Returns @true if the given option is present. The function is case-insensitive
to @e name.
-
+
@see SetOption(), GetOption(), GetOptionInt()
*/
bool HasOption(const wxString& name) const;
for the time being, which is used by wxBitmap.
This function is called by wxWidgets on startup, and shouldn't be called by
the user.
-
+
@see wxImageHandler, wxInitAllImageHandlers(), wxQuantize
*/
static void InitStandardHandlers();
/**
Adds a handler at the start of the static list of format handlers.
-
+
@param handler
A new image format handler object. There is usually only one instance
of a given handler class in an application session.
-
+
@see wxImageHandler
*/
static void InsertHandler(wxImageHandler* handler);
//@{
/**
Loads an image from an input stream.
-
+
@param name
Name of the file from which to load the image.
@param stream
must support seeking.
@param type
One of the following values:
-
-
-
-
-
-
+
+
+
+
+
+
wxBITMAP_TYPE_BMP
-
-
-
-
+
+
+
+
Load a Windows image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_GIF
-
-
-
-
+
+
+
+
Load a GIF image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_JPEG
-
-
-
-
+
+
+
+
Load a JPEG image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PCX
-
-
-
-
+
+
+
+
Load a PCX image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNG
-
-
-
-
+
+
+
+
Load a PNG image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNM
-
-
-
-
+
+
+
+
Load a PNM image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_TIF
-
-
-
-
+
+
+
+
Load a TIFF image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XPM
-
-
-
-
+
+
+
+
Load a XPM image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Load a Windows icon file (ICO).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_CUR
-
-
-
-
+
+
+
+
Load a Windows cursor file (CUR).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ANI
-
-
-
-
+
+
+
+
Load a Windows animated cursor file (ANI).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ANY
-
-
-
-
+
+
+
+
Will try to autodetect the format.
@param mimetype
MIME type string (for example 'image/jpeg')
by
the GIF and TIFF handler and as the largest and most colourful one by the
ICO handler.
-
+
@returns @true if the operation succeeded, @false otherwise. If the
optional index parameter is out of range, @false is
returned and a call to wxLogError() takes place.
-
+
@remarks Depending on how wxWidgets has been configured, not all formats
may be available.
-
+
@see SaveFile()
*/
bool LoadFile(const wxString& name,
/**
Finds the handler with the given name, and removes it. The handler
is not deleted.
-
+
@param name
The handler name.
-
+
@returns @true if the handler was found and removed, @false otherwise.
-
+
@see wxImageHandler
*/
static bool RemoveHandler(const wxString& name);
the image will have the given width and height.
For a description of the @a quality parameter, see the Scale() function.
Returns the (modified) image itself.
-
+
@see Scale()
*/
wxImage Rescale(int width, int height,
then use either the current mask colour if set or find, use, and set a
suitable mask colour for any newly exposed areas.
Returns the (modified) image itself.
-
+
@see Size()
*/
wxImage Resize(const wxSize& size, const wxPoint pos,
//@{
/**
Saves an image in the given stream.
-
+
@param name
Name of the file to save the image to.
@param stream
Opened output stream to save the image to.
@param type
Currently these types can be used:
-
-
-
-
-
-
+
+
+
+
+
+
wxBITMAP_TYPE_BMP
-
-
-
-
+
+
+
+
Save a BMP image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_JPEG
-
-
-
-
+
+
+
+
Save a JPEG image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNG
-
-
-
-
+
+
+
+
Save a PNG image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PCX
-
-
-
-
+
+
+
+
Save a PCX image file (tries to save as 8-bit if possible, falls back to
24-bit otherwise).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_PNM
-
-
-
-
+
+
+
+
Save a PNM image file (as raw RGB always).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_TIFF
-
-
-
-
+
+
+
+
Save a TIFF image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_XPM
-
-
-
-
+
+
+
+
Save a XPM image file.
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_ICO
-
-
-
-
+
+
+
+
Save a Windows icon file (ICO) (the size may be up to 255 wide by 127 high.
A single image is saved in 8 colors at the size supplied).
-
-
-
-
-
+
+
+
+
+
wxBITMAP_TYPE_CUR
-
-
-
-
+
+
+
+
Save a Windows cursor file (CUR).
@param mimetype
MIME type.
-
+
@returns @true if the operation succeeded, @false otherwise.
-
+
@remarks Depending on how wxWidgets has been configured, not all formats
may be available.
-
+
@see LoadFile()
*/
bool SaveFile(const wxString& name, int type) const;
image and will therefore remove the mask partially. Using the alpha channel
will work.
Example:
-
+
@param quality
Determines what method to use for resampling the image. Can be one of the
following:
-
-
-
-
-
-
+
+
+
+
+
+
wxIMAGE_QUALITY_NORMAL
-
-
-
-
+
+
+
+
Uses the normal default scaling method of pixel replication
-
-
-
-
-
+
+
+
+
+
wxIMAGE_QUALITY_HIGH
-
-
-
-
+
+
+
+
Uses bicubic and box averaging resampling methods for upsampling and
downsampling respectively
-
+
@see Rescale()
*/
wxImage Scale(int width, int height,
image.
@param mr,mg,mb
RGB value of pixels in mask that will be used to create the mask.
-
+
@returns Returns @false if mask does not have same dimensions as the image
or if there is no unused colour left. Returns @true if
the mask was successfully applied.
Sets a user-defined option. The function is case-insensitive to @e name.
For example, when saving as a JPEG file, the option @b quality is
used, which is a number between 0 and 100 (0 is terrible, 100 is very good).
-
+
@see GetOption(), GetOptionInt(), HasOption()
*/
void SetOption(const wxString& name, const wxString& value);
transparent by filling them with the image mask colour (which will be allocated
automatically if it isn't currently set). Otherwise, the areas will be filled
with the colour with the specified RGB components.
-
+
@see Resize()
*/
wxImage Size(const wxSize& size, const wxPoint pos, int red = -1,
/**
Assignment operator, using @ref overview_trefcount "reference counting".
-
+
@param image
Image to assign.
-
+
@returns Returns 'this' object.
*/
wxImage operator =(const wxImage& image);
/**
Constructor specifying the image size, whether image masks should be created,
and the initial size of the list.
-
+
@param width
Width of the images in the list.
@param height
@true if masks should be created for all images.
@param initialCount
The initial size of the list.
-
+
@see Create()
*/
wxImageList();
//@{
/**
Adds a new image using an icon.
-
+
@param bitmap
Bitmap representing the opaque areas of the image.
@param mask
Colour indicating which parts of the image are transparent.
@param icon
Icon to use as the image.
-
+
@returns The new zero-based image index.
-
+
@remarks The original bitmap or icon is not affected by the Add
operation, and can be deleted afterwards.
*/
/**
Draws a specified image onto a device context.
-
+
@param index
Image index, starting from zero.
@param dc
Y position on the device context.
@param flags
How to draw the image. A bitlist of a selection of the following:
-
-
-
-
-
-
+
+
+
+
+
+
wxIMAGELIST_DRAW_NORMAL
-
-
-
-
+
+
+
+
Draw the image normally.
-
-
-
-
-
+
+
+
+
+
wxIMAGELIST_DRAW_TRANSPARENT
-
-
-
-
+
+
+
+
Draw the image with transparency.
-
-
-
-
-
+
+
+
+
+
wxIMAGELIST_DRAW_SELECTED
-
-
-
-
+
+
+
+
Draw the image in selected state.
-
-
-
-
-
+
+
+
+
+
wxIMAGELIST_DRAW_FOCUSED
-
-
-
-
+
+
+
+
Draw the image in a focused state.
@param solidBackground
For optimisation - drawing can be faster if the function is told
/**
Retrieves the size of the images in the list. Currently, the @a index
parameter is ignored as all images in the list have the same size.
-
+
@param index
currently unused, should be 0
@param width
receives the width of the images in the list
@param height
receives the height of the images in the list
-
+
@returns @true if the function succeeded, @false if it failed (for example,
if the image list was not yet initialized).
*/
//@{
/**
Replaces the existing image with the new image.
-
+
@param bitmap
Bitmap representing the opaque areas of the image.
@param mask
Monochrome mask bitmap, representing the transparent areas of the image.
@param icon
Icon to use as the image.
-
+
@returns @true if the replacement was successful, @false otherwise.
-
+
@remarks The original bitmap or icon is not affected by the Replace
operation, and can be deleted afterwards.
*/
Returns the information for the given language or @NULL if this language
is unknown. Note that even if the returned pointer is valid, the caller should
@e not delete it.
-
+
@see GetLanguageInfo()
*/
static wxLanguageInfo* FindLanguageInfo(const wxString& locale);
See GNU gettext manual for additional information on plural forms handling.
This method is called by the wxGetTranslation()
function and _() macro.
-
+
@remarks Domains are searched in the last to first order, i.e. catalogs
added later override those added before.
*/
/**
The second form is deprecated, use the first one unless you know what you are
doing.
-
+
@param language
wxLanguage identifier of the locale.
wxLANGUAGE_DEFAULT has special meaning -- wxLocale will use system's
language (see GetSystemLanguage).
@param flags
Combination of the following:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxLOCALE_LOAD_DEFAULT
-
-
-
-
+
+
+
+
Load the message catalog
for the given locale containing the translations of standard wxWidgets
messages
automatically.
-
-
-
-
-
+
+
+
+
+
wxLOCALE_CONV_ENCODING
-
-
-
-
+
+
+
+
Automatically convert message
catalogs to platform's default encoding. Note that it will do only basic
conversion between well-known pair like iso8859-1 and windows-1252 or
FindLanguageInfo() to obtain its
wxLanguageInfo structure. See AddLanguage() for
the wxLanguageInfo description.
-
+
@wxsince{2.7.1}.
*/
static bool IsAvailable(int lang);
@c wxToupper_l()
We hope to provide many more functions (covering numbers, time and formatted
IO) in the near future.
-
+
@see wxLocale
*/
};
//@{
/**
Returns the state of the specified joystick button.
-
+
@param id
The button id to report, from 0 to GetNumberButtons() - 1
*/
//@{
/**
Returns the position of the specified joystick axis.
-
+
@param axis
The joystick axis to report, from 0 to GetNumberAxes() - 1.
*/
/**
Releases the capture set by @b SetCapture.
-
+
@returns @true if the capture release succeeded.
-
+
@see SetCapture(), wxJoystickEvent
*/
bool ReleaseCapture();
/**
Sets the capture to direct joystick events to @e win.
-
+
@param win
The window that will receive joystick events.
@param pollingFreq
If zero, movement events are sent when above the
threshold. If greater than zero, events are received every pollingFreq
milliseconds.
-
+
@returns @true if the capture succeeded.
-
+
@see ReleaseCapture(), wxJoystickEvent
*/
bool SetCapture(wxWindow* win, int pollingFreq = 0);
/**
Constructs a sash layout window, which can be a child of a frame, dialog or any
other non-control window.
-
+
@param parent
Pointer to a parent window.
@param id
/**
Initializes a sash layout window, which can be a child of a frame, dialog or
any other non-control window.
-
+
@param parent
Pointer to a parent window.
@param id
/**
This macro can be used in conjunction with the wxFORCE_LINK_MODULE() macro
to force the linker to include in its output a specific object file.
-
+
In particular, you should use this macro in the source file which you want
to force for inclusion. The @c moduleName needs to be a name not already in
use in other wxFORCE_LINK_THIS_MODULE() macros, but is not required to be
/**
This macro can be used in conjunction with the wxFORCE_LINK_THIS_MODULE()
macro to force the linker to include in its output a specific object file.
-
+
In particular, you should use this macro in a source file which you know
for sure is linked in the output (e.g. the source file containing the
@c main() of your app). The @c moduleName is the name of the module you
//@{
/**
Constructor, creating and showing a list box.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxListBox();
/**
Deselects an item in the list box.
-
+
@param n
The zero-based item to deselect.
-
+
@remarks This applies to multiple selection listboxes only.
*/
void Deselect(int n);
/**
Fill an array of ints with the positions of the currently selected items.
-
+
@param selections
A reference to an wxArrayInt instance that is used to store the result of
the query.
-
+
@returns The number of selections.
-
+
@remarks Use this with a multiple selection listbox.
-
+
@see wxControlWithItems::GetSelection, wxControlWithItems::GetStringSelection,
wxControlWithItems::SetSelection
*/
/**
Returns the item located at @e point, or @c wxNOT_FOUND if there
is no item located at @e point.
-
+
@wxsince{2.7.0}. It is currently implemented
for wxMSW, wxMac and wxGTK2
ports.
-
+
@param point
Point of item (in client coordinates) to obtain
-
+
@returns Item located at point, or wxNOT_FOUND if unimplemented or the
item does not exist.
*/
//@{
/**
Insert the given number of strings before the specified position.
-
+
@param nItems
Number of items in the array items
@param items
/**
Determines whether an item is selected.
-
+
@param n
The zero-based item index.
-
+
@returns @true if the given item is selected, @false otherwise.
*/
bool IsSelected(int n) const;
//@{
/**
Clears the list box and adds the given strings to it.
-
+
@param n
The number of strings to set.
@param choices
An array of strings to set.
@param clientData
Options array of client data pointers
-
+
@remarks You may free the array from the calling program after this
function has been called.
*/
//@{
/**
Set the specified item to be the first visible item.
-
+
@param n
The zero-based item index.
@param string
//@{
/**
Constructor, creating and showing a list control.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxListCtrl();
/**
Arranges the items in icon or small icon view. This only has effect on Win32.
@a flag is one of:
-
+
wxLIST_ALIGN_DEFAULT
-
+
Default alignment.
-
+
wxLIST_ALIGN_LEFT
-
+
Align to the left side of the control.
-
+
wxLIST_ALIGN_TOP
-
+
Align to the top side of the control.
-
+
wxLIST_ALIGN_SNAP_TO_GRID
-
+
Snap to grid.
*/
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
SetImageList, delete the list when destroyed). @a which is one of
wxIMAGE_LIST_NORMAL, wxIMAGE_LIST_SMALL, wxIMAGE_LIST_STATE (the last is
unimplemented).
-
+
@see SetImageList()
*/
void AssignImageList(wxImageList* imageList, int which);
/**
Find an item nearest this position in the specified direction, starting from
@a start or the beginning if @a start is -1.
-
-
+
+
@b FindItem( start, str, partial = @false )
-
-
+
+
@b FindItemData( start, data )
-
-
+
+
@b FindItemAtPos( start, point, direction )
*/
long FindItem(long start, const wxString& str,
/**
Returns the specified image list. @a which may be one of:
-
+
@b wxIMAGE_LIST_NORMAL
-
+
The normal (large icon) image list.
-
+
@b wxIMAGE_LIST_SMALL
-
+
The small icon image list.
-
+
@b wxIMAGE_LIST_STATE
-
+
The user-defined state image list (unimplemented).
*/
wxImageList* GetImageList(int which) const;
Returns the colour for this item. If the item has no specific colour, returns
an invalid colour (and not the default background control of the control
itself).
-
+
@see GetItemTextColour()
*/
wxColour GetItemBackgroundColour(long item) const;
Returns the first item with given state following @a item or -1 if
no such item found.
This function may be used to find all selected items in the control like this:
-
+
@a geometry can be one of:
-
+
wxLIST_NEXT_ABOVE
-
+
Searches for an item above the specified item.
-
+
wxLIST_NEXT_ALL
-
+
Searches for subsequent item by index.
-
+
wxLIST_NEXT_BELOW
-
+
Searches for an item below the specified item.
-
+
wxLIST_NEXT_LEFT
-
+
Searches for an item to the left of the specified item.
-
+
wxLIST_NEXT_RIGHT
-
+
Searches for an item to the right of the specified item.
-
+
@b NB: this parameter is only supported by wxMSW currently and ignored on
other platforms.
@a state can be a bitlist of the following:
-
+
wxLIST_STATE_DONTCARE
-
+
Don't care what the state is.
-
+
wxLIST_STATE_DROPHILITED
-
+
The item indicates it is a drop target.
-
+
wxLIST_STATE_FOCUSED
-
+
The item has the focus.
-
+
wxLIST_STATE_SELECTED
-
+
The item is selected.
-
+
wxLIST_STATE_CUT
-
+
The item is selected as part of a cut and paste operation.
*/
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL,
for GetItemRect().
@a code can be one of @c wxLIST_RECT_BOUNDS,
@c wxLIST_RECT_ICON or @c wxLIST_RECT_LABEL.
-
+
@wxsince{2.7.0}
*/
bool GetSubItemRect(long item, long subItem, wxRect& rect,
giving details in @e flags. Returns index of the item or @c wxNOT_FOUND
if no item is at the specified point.
@a flags will be a combination of the following flags:
-
+
wxLIST_HITTEST_ABOVE
-
+
Above the client area.
-
+
wxLIST_HITTEST_BELOW
-
+
Below the client area.
-
+
wxLIST_HITTEST_NOWHERE
-
+
In the client area but below the last item.
-
+
wxLIST_HITTEST_ONITEMICON
-
+
On the bitmap associated with an item.
-
+
wxLIST_HITTEST_ONITEMLABEL
-
+
On the label (string) associated with an item.
-
+
wxLIST_HITTEST_ONITEMRIGHT
-
+
In the area to the right of an item.
-
+
wxLIST_HITTEST_ONITEMSTATEICON
-
+
On the state icon for a tree view item that is in a user-defined state.
-
+
wxLIST_HITTEST_TOLEFT
-
+
To the right of the client area.
-
+
wxLIST_HITTEST_TORIGHT
-
+
To the left of the client area.
-
+
wxLIST_HITTEST_ONITEM
-
+
Combination of wxLIST_HITTEST_ONITEMICON, wxLIST_HITTEST_ONITEMLABEL,
wxLIST_HITTEST_ONITEMSTATEICON.
-
+
If @a ptrSubItem is not @NULL and the wxListCtrl is in the report
mode the subitem (or column) number will also be provided.
This feature is only available in version 2.7.0 or higher and is currently only
//@{
/**
Insert an image/string item.
-
+
@param info
wxListItem object
@param index
wxListCtrl will not delete the pointer or keep a reference of it. You can
return the same wxListItemAttr pointer for every OnGetItemAttr call.
The base class version always returns @NULL.
-
+
@see OnGetItemImage(), OnGetItemColumnImage(),
OnGetItemText()
*/
index for the given line and column.
The base class version always calls OnGetItemImage for the first column, else
it returns -1.
-
+
@see OnGetItemText(), OnGetItemImage(),
OnGetItemAttr()
*/
In a control with @c wxLC_REPORT style, OnGetItemImage only gets called for
the first column of each line.
The base class version always returns -1.
-
+
@see OnGetItemText(), OnGetItemColumnImage(),
OnGetItemAttr()
*/
This function @b must be overloaded in the derived class for a control with
@c wxLC_VIRTUAL style. It should return the string containing the text of
the given @a column for the specified @c item.
-
+
@see SetItemCount(), OnGetItemImage(),
OnGetItemColumnImage(), OnGetItemAttr()
*/
Redraws the given @e item. This is only useful for the virtual list controls
as without calling this function the displayed value of the item doesn't change
even when the underlying data does change.
-
+
@see RefreshItems()
*/
void RefreshItem(long item);
unimplemented).
This method does not take ownership of the image list, you have to
delete it yourself.
-
+
@see AssignImageList()
*/
void SetImageList(wxImageList* imageList, int which);
be either an integer or a pointer cast to the @c wxUIntPtr type which is
guaranteed to be large enough to be able to contain all integer types and
pointers.
-
+
@wxsince{2.8.4}
*/
bool SetItemPtrData(long item, wxUIntPtr data);
Call this function to sort the items in the list control. Sorting is done
using the specified @a fnSortCallBack function. This function must have the
following prototype:
-
+
It is called each time when the two items must be compared and should return 0
if the items are equal, negative value if the first item is less than the
second one and positive value if the first one is greater than the second one
(the same convention as used by @c qsort(3)).
-
+
@param item1
client data associated with the first item (NOT the index).
@param item2
public:
/**
Resets the column image -- after calling this function, no image will be shown.
-
+
@param col
the column to clear image for
-
+
@see SetColumnImage()
*/
void ClearColumnImage(int col);
Returns the first selected item in a (presumably) multiple selection control.
Together with GetNextSelected() it can be
used to iterate over all selected items in the control.
-
+
@returns The first selected item, if any, -1 otherwise.
*/
long GetFirstSelected() const;
/**
Returns the currently focused item or -1 if none.
-
+
@see IsSelected(), Focus()
*/
long GetFocusedItem() const;
/**
Used together with GetFirstSelected() to
iterate over all selected items in the control.
-
+
@returns Returns the next selected item or -1 if there are no more of
them.
*/
/**
Returns @true if the item with the given @a index is selected,
@false otherwise.
-
+
@see GetFirstSelected(), GetNextSelected()
*/
bool IsSelected(long index) const;
/**
Selects or unselects the given item.
-
+
@param n
the item to select or unselect
@param on
if @true (default), selects the item, otherwise unselects it
-
+
@see wxListCtrl::SetItemState
*/
void Select(bool on = true);
/**
Sets the column image for the specified column. To use the column images, the
control must have a valid image list with at least one image.
-
+
@param col
the column to set image for
@param image
/**
Returns a bit mask indicating which fields of the structure are valid;
can be any combination of the following values:
-
+
wxLIST_MASK_STATE
-
+
@b GetState is valid.
-
+
wxLIST_MASK_TEXT
-
+
@b GetText is valid.
-
+
wxLIST_MASK_IMAGE
-
+
@b GetImage is valid.
-
+
wxLIST_MASK_DATA
-
+
@b GetData is valid.
-
+
wxLIST_MASK_WIDTH
-
+
@b GetWidth is valid.
-
+
wxLIST_MASK_FORMAT
-
+
@b GetFormat is valid.
*/
long GetMask() const;
/**
Returns a bit field representing the state of the item. Can be any
combination of:
-
+
wxLIST_STATE_DONTCARE
-
+
Don't care what the state is. Win32 only.
-
+
wxLIST_STATE_DROPHILITED
-
+
The item is highlighted to receive a drop event. Win32 only.
-
+
wxLIST_STATE_FOCUSED
-
+
The item has the focus.
-
+
wxLIST_STATE_SELECTED
-
+
The item is selected.
-
+
wxLIST_STATE_CUT
-
+
The item is in the cut state. Win32 only.
*/
long GetState() const;
public:
/**
Creates the log frame window and starts collecting the messages in it.
-
+
@param parent
The parent window for the log frame, may be @NULL
@param title
exits).
Return @true from here to allow the frame to close, @false to
prevent this from happening.
-
+
@see OnFrameDelete()
*/
virtual bool OnFrameClose(wxFrame frame);
/**
Add the @a mask to the list of allowed masks for
wxLogTrace().
-
+
@see RemoveTraceMask(), GetTraceMasks()
*/
static void AddTraceMask(const wxString& mask);
/**
Removes all trace masks previously set with
AddTraceMask().
-
+
@see RemoveTraceMask()
*/
static void ClearTraceMasks();
current mask while a message using string mask will be logged simply if the
mask had been added before to the list of allowed ones.
For example,
-
+
will do something only if the current trace mask contains both
@c wxTraceRefCount and @c wxTraceOle, but
-
+
will log the message if it was preceded by
-
+
Using string masks is simpler and allows to easily add custom ones, so this is
the preferred way of working with trace messages. The integer trace mask is
kept for compatibility and for additional (but very rarely needed) flexibility
window on the corresponding error message. If you wish to enable it, please use
SetTimestamp() explicitly.
AddTraceMask()
-
+
RemoveTraceMask()
-
+
ClearTraceMasks()
-
+
GetTraceMasks()
-
+
IsAllowedTraceMask()
-
+
SetVerbose()
-
+
GetVerbose()
-
+
SetTimestamp()
-
+
GetTimestamp()
-
+
SetTraceMask()
-
+
GetTraceMask()
-
+
SetRepetitionCounting()
-
+
GetRepetitionCounting()
*/
/**
Flushes the current log target if any, does nothing if there is none.
-
+
@see Flush()
*/
static void FlushActive();
/**
Returns the currently allowed list of string trace masks.
-
+
@see AddTraceMask().
*/
static const wxArrayString GetTraceMasks();
only useful when the application is terminating and shouldn't be used in other
situations because it may easily lead to a loss of messages.
OnLog()
-
+
GetActiveTarget()
-
+
SetActiveTarget()
-
+
DontCreateOnDemand()
-
+
Suspend()
-
+
Resume()
*/
Flush() shows them all and clears the buffer contents.
This function doesn't do anything if the buffer is already empty.
Flush()
-
+
FlushActive()
*/
logging immediately without waiting for Flush() to be
called (the standard GUI log target only shows the log dialog when it is
flushed, so Suspend() works as expected with it).
-
+
@see Resume(), wxLogNull
*/
static void Suspend();
/**
Assignment operator from unsigned long long. The sign bit will be copied too.
-
+
@wxsince{2.7.0}
*/
wxLongLong& operator operator=(const wxULongLong& ll);
//@{
/**
Constructor, creating the window.
-
+
@param parent
The window parent.
@param style
The window style. Currently unused.
-
+
@remarks The second style of constructor is called within
wxMDIParentFrame::OnCreateClient.
-
+
@see wxMDIParentFrame::wxMDIParentFrame, wxMDIParentFrame::OnCreateClient
*/
wxMDIClientWindow();
//@{
/**
Constructor, creating the window.
-
+
@param parent
The window parent. This should be @NULL.
@param id
item,
allowing the application user to set Motif resource values for
individual windows.
-
+
@remarks During the construction of the frame, the client window will be
created. To use a different class from
wxMDIClientWindow, override
OnCreateClient().
-
+
@see Create(), OnCreateClient()
*/
wxMDIParentFrame();
/**
Activates the MDI child following the currently active one.
-
+
@see ActivatePrevious()
*/
void ActivateNext();
/**
Activates the MDI child preceding the currently active one.
-
+
@see ActivateNext()
*/
void ActivatePrevious();
/**
Arranges any iconized (minimized) MDI child windows.
-
+
@see Cascade(), Tile()
*/
void ArrangeIcons();
/**
Arranges the MDI child windows in a cascade.
-
+
@see Tile(), ArrangeIcons()
*/
void Cascade();
/**
This gets the size of the frame 'client area' in pixels.
-
+
@param width
Receives the client width in pixels.
@param height
Receives the client height in pixels.
-
+
@remarks The client area is the area which may be drawn on by the
programmer, excluding title bar, border, status bar,
and toolbar if present.
-
+
@see GetToolBar(), SetToolBar(),
wxMDIClientWindow
*/
/**
Returns a pointer to the client window.
-
+
@see OnCreateClient()
*/
wxMDIClientWindow* GetClientWindow() const;
/**
Returns the window being used as the toolbar for this frame.
-
+
@see SetToolBar()
*/
virtual wxWindow* GetToolBar() const;
called,
due to the way C++ treats virtual functions called from constructors. For
example:
-
+
@remarks You might wish to derive from wxMDIClientWindow in order to
implement different erase behaviour, for example, such
as painting a bitmap on the background.
-
+
@see GetClientWindow(), wxMDIClientWindow
*/
virtual wxMDIClientWindow* OnCreateClient();
Sets the window to be used as a toolbar for this
MDI parent window. It saves the application having to manage the positioning
of the toolbar MDI client window.
-
+
@param toolbar
Toolbar to manage.
-
+
@remarks When the frame is resized, the toolbar is resized to be the
width of the frame client area, and the toolbar height
is kept the same.
-
+
@see GetToolBar(), GetClientSize()
*/
virtual void SetToolBar(wxWindow* toolbar);
//@{
/**
Constructor, creating the window.
-
+
@param parent
The window parent. This should not be @NULL.
@param id
item,
allowing the application user to set Motif resource values for
individual windows.
-
+
@remarks None.
-
+
@see Create()
*/
wxMDIChildFrame();
/**
Activates this MDI child frame.
-
+
@see Maximize(), Restore()
*/
void Activate();
/**
Maximizes this MDI child frame.
-
+
@see Activate(), Restore()
*/
void Maximize(bool maximize);
/**
,
wxPoint&
-
+
@param pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidatorvalidator = wxDefaultValidator,
const wxString& name = wxPanelNameStr
)
-
+
Constructor that calls Create. You may prefer to call Create directly to check
to see if wxMediaCtrl is available on the system.
-
+
parent
parent of this control. Must not be @NULL.
@param id
name of the backend class to
Create().
The following are valid backend identifiers -
-
+
@b wxMEDIABACKEND_DIRECTSHOW
-
-
+
+
Use ActiveMovie/DirectShow. Uses the native ActiveMovie
(I.E. DirectShow) control. Default backend on Windows and
supported by nearly all Windows versions, even some
Windows CE versions. May display a windows media player
logo while inactive.
-
+
@b wxMEDIABACKEND_QUICKTIME
-
+
Use QuickTime. Mac Only.
WARNING: May not working correctly embedded in a wxNotebook.
-
+
@b wxMEDIABACKEND_GSTREAMER
-
+
Use GStreamer. Unix Only. Requires GStreamer 0.8 along
with at the very least the xvimagesink, xoverlay, and
gst-play modules of gstreamer to function. You need the correct
modules to play the relavant files, for example the mad module
to play mp3s, etc.
-
+
@b wxMEDIABACKEND_WMP10
-
+
Uses Windows Media Player 10 (Windows only) - works on mobile
machines with Windows Media Player 10 and desktop machines with
either Windows Media Player 9 or 10
-
+
Note that other backends such as wxMEDIABACKEND_MCI can now be
found at wxCode.
*/
/**
,
wxPoint&
-
+
@param pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidatorvalidator = wxDefaultValidator,
const wxString& name = wxPanelNameStr
)
-
+
Creates this control. Returns @false if it can't load the movie located at
fileName or it cannot load one of its native backends.
-
+
If you specify a file to open via fileName and you don't specify a backend to
use, wxMediaCtrl tries each of its backends until one that can render the path referred to by fileName can be found.
-
+
parent
parent of this control. Must not be @NULL.
@param id
/**
Obtains the state the playback of the media is in -
-
+
@b wxMEDIASTATE_STOPPED
-
+
The movie has stopped.
-
+
@b wxMEDIASTATE_PAUSED
-
+
The movie is paused.
-
+
@b wxMEDIASTATE_PLAYING
-
+
The movie is currently playing.
*/
wxMediaCtrlState GetState();
can choose to veto the event, preventing the stream from actually
stopping.
Example:
-
+
When wxMediaCtrl stops, either by the EVT_MEDIA_STOP not being
vetoed, or by manually calling
Stop(), where it actually
calling the function with default parameters tells wxMediaCtrl to use the
default controls provided by the toolkit. The function takes a
@c wxMediaCtrlPlayerControls enumeration as follows:
-
+
@b wxMEDIACTRLPLAYERCONTROLS_NONE
-
+
No controls. return wxMediaCtrl to it's default state.
-
+
@b wxMEDIACTRLPLAYERCONTROLS_STEP
-
+
Step controls like fastfoward, step one frame etc.
-
+
@b wxMEDIACTRLPLAYERCONTROLS_VOLUME
-
+
Volume controls like the speaker icon, volume slider, etc.
-
+
@b wxMEDIACTRLPLAYERCONTROLS_DEFAULT
-
+
Default controls for the toolkit. Currently a typedef for
wxMEDIACTRLPLAYERCONTROLS_STEP and wxMEDIACTRLPLAYERCONTROLS_VOLUME.
-
+
For more see @ref overview_playercontrolswxmediactrl "Player controls".
Currently
only implemented on the QuickTime and DirectShow backends. The function
/**
Checks the memory blocks for errors, starting from the currently set
checkpoint.
-
+
@returns Returns the number of errors, so a value of zero represents
success. Returns -1 if an error was detected that
prevents further checking.
Performs a memory dump from the currently set checkpoint, writing to the
current debug stream. Calls the @b Dump member function for each wxObject
derived instance.
-
+
@returns @true if the function succeeded, @false otherwise.
*/
bool Dump();
Returns @true if the memory allocator checks all previous memory blocks for
errors.
By default, this is @false since it slows down execution considerably.
-
+
@see SetCheckPrevious()
*/
bool GetCheckPrevious();
delete
operators store or use information about memory allocation. Otherwise,
a straight malloc and free will be performed by these operators.
-
+
@see SetDebugMode()
*/
bool GetDebugMode();
application
specify a value other than one.
This is obsolete, replaced by wxLog functionality.
-
+
@see SetLevel()
*/
int GetLevel();
/**
Returns the output stream associated with the debug context.
This is obsolete, replaced by wxLog functionality.
-
+
@see SetStream()
*/
ostream GetStream();
Returns @true if there is a stream currently associated
with the debug context.
This is obsolete, replaced by wxLog functionality.
-
+
@see SetStream(), GetStream()
*/
bool HasStream();
/**
Prints a list of the classes declared in this application, giving derivation
and whether instances of this class can be dynamically created.
-
+
@see PrintStatistics()
*/
bool PrintClasses();
Performs a statistics analysis from the currently set checkpoint, writing
to the current debug stream. The number of object and non-object
allocations is printed, together with the total size.
-
+
@param detailed
If @true, the function will also print how many
objects of each class have been allocated, and the space taken by
these class instances.
-
+
@see PrintStatistics()
*/
bool PrintStatistics(bool detailed = true);
/**
Tells the memory allocator to check all previous memory blocks for errors.
By default, this is @false since it slows down execution considerably.
-
+
@see GetCheckPrevious()
*/
void SetCheckPrevious(bool check);
Sets the current checkpoint: Dump and PrintStatistics operations will
be performed from this point on. This allows you to ignore allocations
that have been performed up to this point.
-
+
@param all
If @true, the checkpoint is reset to include all
memory allocations since the program started.
is deallocated with the same value of debug mode. Otherwise, the
delete operator might try to look for memory information that does not
exist.
-
+
@see GetDebugMode()
*/
void SetDebugMode(bool debug);
application
specify a value other than one.
This is obsolete, replaced by wxLog functionality.
-
+
@see GetLevel()
*/
void SetLevel(int level);
This operation flushes and deletes the existing stream (and stream buffer if
any).
This is obsolete, replaced by wxLog functionality.
-
+
@param stream
Stream to associate with the debug context. Do not set this to @NULL.
@param streamBuf
//@{
/**
Construct a menu bar from arrays of menus and titles.
-
+
@param n
The number of menus.
@param menus
/**
Adds the item to the end of the menu bar.
-
+
@param menu
The menu to add. Do not deallocate this menu after calling Append.
@param title
The title of the menu.
-
+
@returns @true on success, @false if an error occurred.
-
+
@see Insert()
*/
bool Append(wxMenu* menu, const wxString& title);
/**
Checks or unchecks a menu item.
-
+
@param id
The menu item identifier.
@param check
If @true, checks the menu item, otherwise the item is unchecked.
-
+
@remarks Only use this when the menu bar has been associated with a
frame; otherwise, use the wxMenu equivalent call.
*/
/**
Enables or disables (greys out) a menu item.
-
+
@param id
The menu item identifier.
@param enable
@true to enable the item, @false to disable it.
-
+
@remarks Only use this when the menu bar has been associated with a
frame; otherwise, use the wxMenu equivalent call.
*/
/**
Enables or disables a whole menu.
-
+
@param pos
The position of the menu, starting from zero.
@param enable
@true to enable the menu, @false to disable it.
-
+
@remarks Only use this when the menu bar has been associated with a frame.
*/
void EnableTop(int pos, const bool enable);
/**
Finds the menu item object associated with the given menu item identifier.
-
+
@param id
Menu item identifier.
@param menu
If not @NULL, menu will get set to the associated menu.
-
+
@returns The found menu item object, or @NULL if one was not found.
*/
wxMenuItem* FindItem(int id, wxMenu menu = NULL) const;
/**
Finds the menu item id for a menu name/menu item string pair.
-
+
@param menuString
Menu title to find.
@param itemString
Item to find.
-
+
@returns The menu item identifier, or wxNOT_FOUND if none was found.
-
+
@remarks Any special menu codes are stripped out of source and target
strings before matching.
*/
/**
Gets the help string associated with the menu item identifier.
-
+
@param id
The menu item identifier.
-
+
@returns The help string, or the empty string if there was no help string
or the menu item was not found.
-
+
@see SetHelpString()
*/
wxString GetHelpString(int id) const;
/**
Gets the label associated with a menu item.
-
+
@param id
The menu item identifier.
-
+
@returns The menu item label, or the empty string if the item was not
found.
-
+
@remarks Use only after the menubar has been associated with a frame.
*/
wxString GetLabel(int id) const;
Returns the label of a top-level menu. Note that the returned string does not
include the accelerator characters which could have been specified in the menu
title string during its construction.
-
+
@param pos
Position of the menu on the menu bar, starting from zero.
-
+
@returns The menu label, or the empty string if the menu was not found.
-
+
@remarks Use only after the menubar has been associated with a frame.
-
+
@see SetLabelTop()
*/
wxString GetLabelTop(int pos) const;
Returns the label of a top-level menu. Note that the returned string
includes the accelerator characters that have been specified in the menu
title string during its construction.
-
+
@param pos
Position of the menu on the menu bar, starting from zero.
-
+
@returns The menu label, or the empty string if the menu was not found.
-
+
@remarks Use only after the menubar has been associated with a frame.
-
+
@see GetMenuLabelText(), SetMenuLabel()
*/
wxString GetMenuLabel(int pos) const;
Returns the label of a top-level menu. Note that the returned string does not
include any accelerator characters that may have been specified in the menu
title string during its construction.
-
+
@param pos
Position of the menu on the menu bar, starting from zero.
-
+
@returns The menu label, or the empty string if the menu was not found.
-
+
@remarks Use only after the menubar has been associated with a frame.
-
+
@see GetMenuLabel(), SetMenuLabel()
*/
wxString GetMenuLabelText(int pos) const;
position 0 will insert it in the very beginning of it, inserting at position
GetMenuCount() is the same as calling
Append().
-
+
@param pos
The position of the new menu in the menu bar
@param menu
The menu to add. wxMenuBar owns the menu and will free it.
@param title
The title of the menu.
-
+
@returns @true on success, @false if an error occurred.
-
+
@see Append()
*/
bool Insert(size_t pos, wxMenu* menu, const wxString& title);
/**
Determines whether an item is checked.
-
+
@param id
The menu item identifier.
-
+
@returns @true if the item was found and is checked, @false otherwise.
*/
bool IsChecked(int id) const;
/**
Determines whether an item is enabled.
-
+
@param id
The menu item identifier.
-
+
@returns @true if the item was found and is enabled, @false otherwise.
*/
bool IsEnabled(int id) const;
responsible for deleting it. This function may be used together with
Insert() to change the menubar
dynamically.
-
+
@see Replace()
*/
wxMenu* Remove(size_t pos);
/**
Replaces the menu at the given position with another one.
-
+
@param pos
The position of the new menu in the menu bar
@param menu
The menu to add.
@param title
The title of the menu.
-
+
@returns The menu which was previously at position pos. The caller is
responsible for deleting it.
-
+
@see Insert(), Remove()
*/
wxMenu* Replace(size_t pos, wxMenu* menu, const wxString& title);
/**
Sets the help string associated with a menu item.
-
+
@param id
Menu item identifier.
@param helpString
Help string to associate with the menu item.
-
+
@see GetHelpString()
*/
void SetHelpString(int id, const wxString& helpString);
/**
Sets the label of a menu item.
-
+
@param id
Menu item identifier.
@param label
Menu item label.
-
+
@remarks Use only after the menubar has been associated with a frame.
-
+
@see GetLabel()
*/
void SetLabel(int id, const wxString& label);
/**
Sets the label of a top-level menu.
-
+
@param pos
The position of a menu on the menu bar, starting from zero.
@param label
The menu label.
-
+
@remarks Use only after the menubar has been associated with a frame.
-
+
@see GetLabelTop()
*/
void SetLabelTop(int pos, const wxString& label);
/**
Sets the label of a top-level menu.
-
+
@param pos
The position of a menu on the menu bar, starting from zero.
@param label
The menu label.
-
+
@remarks Use only after the menubar has been associated with a frame.
*/
void SetMenuLabel(int pos, const wxString& label);
//@{
/**
Constructs a wxMenu object.
-
+
@param style
If set to wxMENU_TEAROFF, the menu will be detachable (wxGTK only).
*/
because it may be used for both items (including separators) and submenus and
because you can also specify various extra properties of a menu item this way,
such as bitmaps and fonts.
-
+
@param id
The menu command identifier.
@param item
@param menuItem
A menuitem object. It will be owned by the wxMenu object after this function
is called, so do not delete it yourself.
-
+
@remarks This command can be used after the menu has been shown, as well
as on initial creation of a menu or menubar.
-
+
@see AppendSeparator(), AppendCheckItem(), AppendRadioItem(),
AppendSubMenu(), Insert(), SetLabel(),
GetHelpString(), SetHelpString(), wxMenuItem
/**
Adds a checkable item to the end of the menu.
-
+
@see Append(), InsertCheckItem()
*/
wxMenuItem* AppendCheckItem(int id, const wxString& item,
Adds a radio item to the end of the menu. All consequent radio items form a
group and when an item in the group is checked, all the others are
automatically unchecked.
-
+
@see Append(), InsertRadioItem()
*/
wxMenuItem* AppendRadioItem(int id, const wxString& item,
/**
Adds a separator to the end of the menu.
-
+
@see Append(), InsertSeparator()
*/
wxMenuItem* AppendSeparator();
/**
Checks or unchecks the menu item.
-
+
@param id
The menu item identifier.
@param check
If @true, the item will be checked, otherwise it will be unchecked.
-
+
@see IsChecked()
*/
void Check(int id, const bool check);
Deletes the menu item from the menu. If the item is a submenu, it will
@b not be deleted. Use Destroy() if you want to
delete a submenu.
-
+
@param id
Id of the menu item to be deleted.
@param item
Menu item to be deleted.
-
+
@see FindItem(), Destroy(), Remove()
*/
void Delete(int id);
Deletes the menu item from the menu. If the item is a submenu, it will
be deleted. Use Remove() if you want to keep the submenu
(for example, to reuse it later).
-
+
@param id
Id of the menu item to be deleted.
@param item
Menu item to be deleted.
-
+
@see FindItem(), Deletes(), Remove()
*/
void Destroy(int id);
/**
Enables or disables (greys out) a menu item.
-
+
@param id
The menu item identifier.
@param enable
@true to enable the menu item, @false to disable it.
-
+
@see IsEnabled()
*/
void Enable(int id, const bool enable);
/**
Finds the menu item object associated with the given menu item identifier and,
optionally, the (sub)menu it belongs to.
-
+
@param itemString
Menu item string to find.
@param id
@param menu
If the pointer is not @NULL, it will be filled with the item's
parent menu (if the item was found)
-
+
@returns First form: menu item identifier, or wxNOT_FOUND if none is
found.
-
+
@remarks Any special menu codes are stripped out of source and target
strings before matching.
*/
/**
Returns the help string associated with a menu item.
-
+
@param id
The menu item identifier.
-
+
@returns The help string, or the empty string if there is no help string
or the item was not found.
-
+
@see SetHelpString(), Append()
*/
wxString GetHelpString(int id) const;
/**
Returns a menu item label.
-
+
@param id
The menu item identifier.
-
+
@returns The item label, or the empty string if the item was not found.
-
+
@see GetLabelText(), SetLabel()
*/
wxString GetLabel(int id) const;
/**
Returns a menu item label, without any of the original mnemonics and
accelerators.
-
+
@param id
The menu item identifier.
-
+
@returns The item label, or the empty string if the item was not found.
-
+
@see GetLabel(), SetLabel()
*/
wxString GetLabelText(int id) const;
/**
Returns the title of the menu.
-
+
@remarks This is relevant only to popup menus, use
wxMenuBar::GetMenuLabel for the menus in the menubar.
-
+
@see SetTitle()
*/
wxString GetTitle() const;
Inserts the given @a item before the position @e pos. Inserting the item
at position GetMenuItemCount() is the same
as appending it.
-
+
@see Append(), Prepend()
*/
wxMenuItem* Insert(size_t pos, wxMenuItem* item);
/**
Inserts a checkable item at the given position.
-
+
@see Insert(), AppendCheckItem()
*/
wxMenuItem* InsertCheckItem(size_t pos, int id,
/**
Inserts a radio item at the given position.
-
+
@see Insert(), AppendRadioItem()
*/
wxMenuItem* InsertRadioItem(size_t pos, int id,
/**
Inserts a separator at the given position.
-
+
@see Insert(), AppendSeparator()
*/
wxMenuItem* InsertSeparator(size_t pos);
/**
Determines whether a menu item is checked.
-
+
@param id
The menu item identifier.
-
+
@returns @true if the menu item is checked, @false otherwise.
-
+
@see Check()
*/
bool IsChecked(int id) const;
/**
Determines whether a menu item is enabled.
-
+
@param id
The menu item identifier.
-
+
@returns @true if the menu item is enabled, @false otherwise.
-
+
@see Enable()
*/
bool IsEnabled(int id) const;
/**
Inserts the given @a item at position 0, i.e. before all the other
existing items.
-
+
@see Append(), Insert()
*/
wxMenuItem* Prepend(wxMenuItem* item);
/**
Inserts a checkable item at position 0.
-
+
@see Prepend(), AppendCheckItem()
*/
wxMenuItem* PrependCheckItem(int id, const wxString& item,
/**
Inserts a radio item at position 0.
-
+
@see Prepend(), AppendRadioItem()
*/
wxMenuItem* PrependRadioItem(int id, const wxString& item,
/**
Inserts a separator at position 0.
-
+
@see Prepend(), AppendSeparator()
*/
wxMenuItem* PrependSeparator();
Removes the menu item from the menu but doesn't delete the associated C++
object. This allows to reuse the same item later by adding it back to the menu
(especially useful with submenus).
-
+
@param id
The identifier of the menu item to remove.
@param item
The menu item to remove.
-
+
@returns The item which was detached from the menu.
*/
wxMenuItem* Remove(int id);
/**
Sets an item's help string.
-
+
@param id
The menu item identifier.
@param helpString
The help string to set.
-
+
@see GetHelpString()
*/
void SetHelpString(int id, const wxString& helpString);
/**
Sets the label of a menu item.
-
+
@param id
The menu item identifier.
@param label
The menu item label to set.
-
+
@see Append(), GetLabel()
*/
void SetLabel(int id, const wxString& label);
/**
Sets the title of the menu.
-
+
@param title
The title to set.
-
+
@remarks This is relevant only to popup menus, use
wxMenuBar::SetLabelTop for the menus in the menubar.
-
+
@see GetTitle()
*/
void SetTitle(const wxString& title);
the menu item is selected) in this parameter.
Finally note that you can e.g. use a stock menu label without using its stock
help string:
-
+
that is, stock properties are set independently one from the other.
-
+
@param parentMenu
Menu that the menu item belongs to.
@param id
/**
Returns the text associated with the menu item including any accelerator
characters that were passed to the constructor or SetItemLabel.
-
+
@see GetItemLabelText(), GetLabelText()
*/
wxString GetItemLabel() const;
/**
Returns the text associated with the menu item, without any accelerator
characters.
-
+
@see GetItemLabel(), GetLabelText()
*/
wxString GetItemLabelText() const;
Returns the text associated with the menu item without any accelerator
characters it might contain.
This function is deprecated in favour of GetItemLabelText().
-
+
@see GetText(), GetLabelFromText()
*/
wxString GetLabel() const;
/**
Strips all accelerator characters and mnemonics from the given @e text.
For example,
-
+
will return just @c "Hello".
This function is deprecated; please use GetLabelText() instead.
-
+
@see GetText(), GetLabel()
*/
static wxString GetLabelFromText(const wxString& text);
/**
Strips all accelerator characters and mnemonics from the given @e text.
For example,
-
+
will return just @c "Hello".
-
+
@see GetItemLabelText(), GetItemLabel()
*/
static wxString GetLabelText(const wxString& text);
Returns the text associated with the menu item, such as it was passed to the
wxMenuItem constructor, i.e. with any accelerator characters it may contain.
This function is deprecated in favour of GetItemLabel().
-
+
@see GetLabel(), GetLabelFromText()
*/
wxString GetText() const;
NB: You won't normally need to use more than one wxMimeTypesManager object in a
program.
@ref ctor() wxMimeTypesManager
-
+
@ref dtor() ~wxMimeTypesManager
*/
default ones which are loaded automatically) containing MIME
information in either mailcap(5) or mime.types(5) format.
ReadMailcap()
-
+
ReadMimeTypes()
-
+
AddFallbacks()
*/
If the function is successful, it returns a pointer to the wxFileType object
which @b must be deleted by the caller, otherwise @NULL will be returned.
GetFileTypeFromMimeType()
-
+
GetFileTypeFromExtension()
*/
usage but may be also used by the application directly if, for example, you want
to use some non-default command to open the file.
The function replaces all occurrences of
-
+
format specification
-
+
with
-
+
%s
-
+
the full file name
-
+
%t
-
+
the MIME type
-
+
%{param}
-
+
the value of the parameter @e param
-
+
using the MessageParameters object you pass to it.
If there is no '%s' in the command string (and the string is not empty), it is
assumed that the command reads the data on stdin and so the effect is the same
there are no other parameters. If you wish to supply additional parameters, you
must derive your own class from MessageParameters and override GetParamValue()
function, for example:
-
+
Now you only need to create an object of this class and pass it to, for example,
GetOpenCommand() like this:
-
+
@b Windows: As only the file name is used by the program associated with the
given extension anyhow (but no other message parameters), there is no need to
ever derive from MessageParameters class for a Windows-only program.
//@{
/**
Constructor, creating the window.
-
+
@param parent
The window parent. This may be @NULL. If it is non-@NULL, the frame will
always be displayed on top of the parent window on Windows.
item,
allowing the application user to set Motif resource values for
individual windows.
-
+
@remarks The frame behaves like a normal frame on non-Windows platforms.
-
+
@see Create()
*/
wxMiniFrame();
of the module needed by CLASSINFO(), however errors are
not detected until run-time, instead of compile-time, then.
Note that circular dependencies are detected and result in a fatal error.
-
+
@param dep
The class information object for the dependent module.
@param classname
public:
/**
Constructor. Use ShowModal() to show the dialog.
-
+
@param parent
Parent window.
@param message
The dialog caption.
@param style
A dialog style (bitlist) containing flags chosen from the following:
-
+
wxOK
-
+
Show an OK button.
-
+
wxCANCEL
-
+
Show a Cancel button.
-
+
wxYES_NO
-
+
Show Yes and No buttons.
-
+
wxYES_DEFAULT
-
+
Used with wxYES_NO, makes Yes button the default - which is the default
behaviour.
-
+
wxNO_DEFAULT
-
+
Used with wxYES_NO, makes No button the default.
-
+
wxICON_EXCLAMATION
-
+
Shows an exclamation mark icon.
-
+
wxICON_HAND
-
+
Shows an error icon.
-
+
wxICON_ERROR
-
+
Shows an error icon - the same as wxICON_HAND.
-
+
wxICON_QUESTION
-
+
Shows a question mark icon.
-
+
wxICON_INFORMATION
-
+
Shows an information (i) icon.
-
+
wxSTAY_ON_TOP
-
+
The message box stays on top of all other window, even those of the other
applications (Windows only).
@param pos
Constructs a notebook control.
Note that sometimes you can reduce flicker by passing the wxCLIP_CHILDREN
window style.
-
+
@param parent
The parent window. Must be non-@NULL.
@param id
/**
Adds a new page.
The call to this function may generate the page changing events.
-
+
@param page
Specifies the new page.
@param text
Specifies whether the page should be selected.
@param imageId
Specifies the optional image index for the new page.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks Do not delete the page, it will be deleted by the notebook.
-
+
@see InsertPage()
*/
bool AddPage(wxNotebookPage* page, const wxString& text,
/**
Sets the image list for the page control and takes ownership of
the list.
-
+
@see wxImageList, SetImageList()
*/
void AssignImageList(wxImageList* imageList);
/**
Returns the associated image list.
-
+
@see wxImageList, SetImageList()
*/
wxImageList* GetImageList() const;
Returns the index of the tab at the specified position or @c wxNOT_FOUND
if none. If @a flags parameter is non-@NULL, the position of the point
inside the tab is returned as well.
-
+
@param pt
Specifies the point for the hit test.
@param flags
Return value for detailed information. One of the following values:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxBK_HITTEST_NOWHERE
-
-
-
-
+
+
+
+
There was no tab under this point.
-
-
-
-
-
+
+
+
+
+
wxBK_HITTEST_ONICON
-
-
-
-
+
+
+
+
The point was over an icon (currently wxMSW only).
-
-
-
-
-
+
+
+
+
+
wxBK_HITTEST_ONLABEL
-
-
-
-
+
+
+
+
The point was over a label (currently wxMSW only).
-
-
-
-
-
+
+
+
+
+
wxBK_HITTEST_ONITEM
-
-
-
-
+
+
+
+
The point was over an item, but not on the label or icon.
-
-
-
-
-
+
+
+
+
+
wxBK_HITTEST_ONPAGE
-
-
-
-
+
+
+
+
The point was over a currently selected page, not over any tab. Note that
this flag is present only if wxNOT_FOUND is returned.
-
+
@returns Returns the zero-based tab index or wxNOT_FOUND if there is no
tab is at the specified position.
*/
/**
Inserts a new page at the specified position.
-
+
@param index
Specifies the position for the new page.
@param page
Specifies whether the page should be selected.
@param imageId
Specifies the optional image index for the new page.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks Do not delete the page, it will be deleted by the notebook.
-
+
@see AddPage()
*/
bool InsertPage(size_t index, wxNotebookPage* page,
/**
An event handler function, called when the page selection is changed.
-
+
@see wxNotebookEvent
*/
void OnSelChange(wxNotebookEvent& event);
/**
Sets the image list for the page control. It does not take
ownership of the image list, you must delete it yourself.
-
+
@see wxImageList, AssignImageList()
*/
void SetImageList(wxImageList* imageList);
The call to this function generates the page changing events.
This function is deprecated and should not be used in new code. Please use the
ChangeSelection() function instead.
-
+
@see GetSelection()
*/
int SetSelection(size_t page);
memory states.
This function is only defined in debug build and doesn't exist at all if
@c __WXDEBUG__ is not defined.
-
+
@param stream
Stream on which to output dump information.
-
+
@remarks Currently wxWidgets does not define Dump for derived classes,
but programmers may wish to use it for their own
applications. Be sure to call the Dump member of the
/**
Returns the @b m_refData pointer.
-
+
@see Ref(), UnRef(), wxObject::m_refData, SetRefData(),
wxObjectRefData
*/
/**
Determines whether this class is a subclass of (or the same class as)
the given class.
-
+
@param info
A pointer to a class information object, which may be obtained
by using the CLASSINFO macro.
-
+
@returns @true if the class represented by info is the same class as this
one or is derived from it.
*/
/**
Makes this object refer to the data in @e clone.
-
+
@param clone
The object to 'clone'.
-
+
@remarks First this function calls UnRef() on itself to decrement
(and perhaps free) the data it is currently referring
to.
-
+
@see UnRef(), wxObject::m_refData, SetRefData(),
GetRefData(), wxObjectRefData
*/
/**
Sets the @b m_refData pointer.
-
+
@see Ref(), UnRef(), wxObject::m_refData, GetRefData(),
wxObjectRefData
*/
Decrements the reference count in the associated data, and if it is zero,
deletes the data.
The @b m_refData member is set to @NULL.
-
+
@see Ref(), wxObject::m_refData, SetRefData(),
GetRefData(), wxObjectRefData
*/
/**
wxObjectRefData* m_refData
Pointer to an object which is the object's reference-counted data.
-
+
@see Ref(), UnRef(), SetRefData(),
GetRefData(), wxObjectRefData
*/
//@{
/**
Constructor, creating and showing a owner-drawn combobox.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxOwnerDrawnComboBox();
The base class version implements a reasonable default behaviour which consists
in drawing the selected item with the standard background colour and drawing a
border around the item if it is either selected or current.
-
+
@remarks flags has the same meaning as with OnDrawItem.
*/
void OnDrawBackground(wxDC& dc, const wxRect& rect, int item,
The derived class may implement this function to actually draw the item
with the given index on the provided DC. If function is not implemented,
the item text is simply drawn, as if the control was a normal combobox.
-
+
@param dc
The device context to use for drawing
@param rect
/**
Creates a palette from arrays of size @e n, one for each
red, blue or green component.
-
+
@param palette
A pointer or reference to the palette to copy.
@param n
An array of green values.
@param blue
An array of blue values.
-
+
@see Create()
*/
wxPalette();
/**
Creates a palette from arrays of size @e n, one for each
red, blue or green component.
-
+
@param n
The number of indices in the palette.
@param red
An array of green values.
@param blue
An array of blue values.
-
+
@returns @true if the creation was successful, @false otherwise.
-
+
@see wxPalette()
*/
bool Create(int n, const unsigned char* red,
/**
Returns a pixel value (index into the palette) for the given RGB values.
-
+
@param red
Red value.
@param green
Green value.
@param blue
Blue value.
-
+
@returns The nearest palette index or wxNOT_FOUND for unexpected errors.
-
+
@see GetRGB()
*/
int GetPixel(unsigned char red, unsigned char green,
/**
Returns RGB values for a given palette index.
-
+
@param pixel
The palette index.
@param red
Receives the green value.
@param blue
Receives the blue value.
-
+
@returns @true if the operation was successful.
-
+
@see GetPixel()
*/
bool GetRGB(int pixel, const unsigned char* red,
//@{
/**
Constructor.
-
+
@param parent
The parent window.
@param id
Used to associate a name with the window,
allowing the application user to set Motif resource values for
individual dialog boxes.
-
+
@see Create()
*/
wxPanel();
/**
Sends a wxInitDialogEvent, which
in turn transfers data to the dialog via validators.
-
+
@see wxInitDialogEvent
*/
void InitDialog();
/**
The default handler for wxEVT_SYS_COLOUR_CHANGED.
-
+
@param event
The colour change event.
-
+
@remarks Changes the panel's colour to conform to the current settings
(Windows only). Add an event table entry for your panel
class if you wish the behaviour to be different (such
as keeping a user-defined background colour). If you do
override this function, call wxEvent::Skip to propagate
the notification to child windows and controls.
-
+
@see wxSysColourChangedEvent
*/
void OnSysColourChanged(wxSysColourChangedEvent& event);
the focus and TAB logic for controls which usually have child controls.
In practice, if you call this method and the control has at least
one child window, the focus will be given to the child window.
-
+
@see wxFocusEvent, wxWindow::SetFocus
*/
virtual void SetFocus();
/**
Returns @true if the OS version is at least @c major.minor.
-
+
@see GetOSMajorVersion(), GetOSMinorVersion(),
CheckToolkitVersion()
*/
/**
Returns @true if the toolkit version is at least @c major.minor.
-
+
@see GetToolkitMajorVersion(),
GetToolkitMinorVersion(), CheckOSVersion()
*/
Returns the run-time major version of the OS associated with this
wxPlatformInfo instance.
See wxGetOsVersion() for more info.
-
+
@see CheckOSVersion()
*/
int GetOSMajorVersion() const;
Returns the run-time minor version of the OS associated with this
wxPlatformInfo instance.
See wxGetOsVersion() for more info.
-
+
@see CheckOSVersion()
*/
int GetOSMinorVersion() const;
Note that if GetPortId() returns wxPORT_BASE, then this value is zero (unless
externally modified with wxPlatformInfo::SetToolkitVersion); that is, no native toolkit is in use.
See wxAppTraits::GetToolkitVersion for more info.
-
+
@see CheckToolkitVersion()
*/
int GetToolkitMajorVersion() const;
Note that if GetPortId() returns wxPORT_BASE, then this value is zero (unless
externally modified with wxPlatformInfo::SetToolkitVersion); that is, no native toolkit is in use.
See wxAppTraits::GetToolkitVersion for more info.
-
+
@see CheckToolkitVersion()
*/
int GetToolkitMinorVersion() const;
//@{
/**
-
+
*/
bool operator ==(const wxPosition& p) const;
const bool operator !=(const wxPosition& p) const;
Constructor.
The buttons parameter may be a combination of the following, using the bitwise
'or' operator.
-
+
wxPREVIEW_PRINT
-
+
Create a print button.
-
+
wxPREVIEW_NEXT
-
+
Create a next page button.
-
+
wxPREVIEW_PREVIOUS
-
+
Create a previous page button.
-
+
wxPREVIEW_ZOOM
-
+
Create a zoom control.
-
+
wxPREVIEW_DEFAULT
-
+
Equivalent to a combination of wxPREVIEW_PREVIOUS, wxPREVIEW_NEXT and
wxPREVIEW_ZOOM.
*/
/**
Constructor. Pass an optional pointer to a block of print
dialog data, which will be copied to the printer object's local data.
-
+
@see wxPrintDialogData, wxPrintData
*/
wxPrinter(wxPrintDialogData* data = NULL);
wxPrintPreview::Print. These functions
set last error to @b wxPRINTER_NO_ERROR if no error happened.
Returned value is one of the following:
-
+
@b wxPRINTER_NO_ERROR
-
+
No error happened.
-
+
@b wxPRINTER_CANCELLED
-
+
The user cancelled printing.
-
+
@b wxPRINTER_ERROR
-
+
There was an error during printing.
*/
static wxPrinterError GetLastError();
/**
Constructor. Pass a parent window, and optionally a pointer to a block of print
data, which will be copied to the print dialog's print data.
-
+
@see wxPrintDialogData
*/
wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
value of @c wxPROCESS_DEFAULT or @c wxPROCESS_REDIRECT. Specifying the
former value has no particular effect while using the latter one is equivalent
to calling Redirect().
-
+
@param parent
The event handler parent.
@param id
/**
Returns @true if the given process exists in the system.
-
+
@see Kill(), @ref overview_sampleexec "Exec sample"
*/
static bool Exists(int pid);
/**
Returns @true if there is data to be read on the child process standard
error stream.
-
+
@see IsInputAvailable()
*/
bool IsErrorAvailable() const;
polling-based code waiting for a better mechanism in future wxWidgets versions.
See the @ref overview_sampleexec "exec sample" for an example of using this
function.
-
+
@see IsInputOpened()
*/
bool IsInputAvailable() const;
/**
Send the specified signal to the given process. Possible signal values are:
-
+
@c wxSIGNONE, @c wxSIGKILL and @c wxSIGTERM have the same meaning
under both Unix and Windows but all the other signals are equivalent to
@c wxSIGTERM under Windows.
process will be killed too. Note that under Unix, for wxKILL_CHILDREN
to work you should have created the process passing wxEXEC_MAKE_GROUP_LEADER.
Returns the element of @c wxKillError enum:
-
+
@see Exists(), wxKill(), @ref overview_sampleexec "Exec sample"
*/
static wxKillError Kill(int pid, wxSignal signal = wxSIGNONE,
/**
It is called when the process with the pid
-
+
@param pid finishes.
It raises a wxWidgets event when it isn't overridden.
-
+
pid
The pid of the process which has just terminated.
@param status
object will be destroyed automatically when the child process terminates. This
does mean that the child process should be told to quit before the main program
exits to avoid memory leaks.
-
+
@param cmd
The command to execute, including optional arguments.
@param flags
The flags to pass to wxExecute.
NOTE: wxEXEC_SYNC should not be used.
-
+
@returns A pointer to new wxProcess object or @NULL on error.
-
+
@see wxExecute()
*/
static wxProcess* Open(const wxString& cmd,
Constructor. Creates the dialog, displays it and disables user input
for other windows, or, if wxPD_APP_MODAL flag is not given, for its parent
window only.
-
+
@param title
Dialog title to show in titlebar.
@param message
dialog
or ask the user for the confirmation and if the abort is not confirmed the
dialog may be resumed with Resume() function.
-
+
@param value
The new value of the progress meter. It should be less than or
equal to the maximum value given to the constructor and the dialog is
You can customize the look and feel of the dialog by setting the sheet style.
It is
a bit list of the following values:
-
+
wxPROPSHEET_DEFAULT
-
+
Uses the default look and feel for the controller window,
normally a notebook except on Smartphone where a choice control is used.
-
+
wxPROPSHEET_NOTEBOOK
-
+
Uses a notebook for the controller window.
-
+
wxPROPSHEET_TOOLBOOK
-
+
Uses a toolbook for the controller window.
-
+
wxPROPSHEET_CHOICEBOOK
-
+
Uses a choicebook for the controller window.
-
+
wxPROPSHEET_LISTBOOK
-
+
Uses a listbook for the controller window.
-
+
wxPROPSHEET_TREEBOOK
-
+
Uses a treebook for the controller window.
-
+
wxPROPSHEET_SHRINKTOFIT
-
+
Shrinks the dialog window to fit the currently selected page (common behaviour
for
property sheets on Mac OS X).
//@{
/**
Constructor, creating and showing a radiobox.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxRadioBox();
//@{
/**
Enables or disables an individual button in the radiobox.
-
+
@param enable
@true to enable, @false to disable.
@param n
The zero-based button to enable or disable.
-
+
@see wxWindow::Enable
*/
virtual bool Enable(bool enable = true);
/**
Finds a button matching the given string, returning the position if found, or
-1 if not found.
-
+
@param string
The string to find.
*/
/**
Returns a radio box item under the point, a zero-based item index, or @c
wxNOT_FOUND if no item is under the point.
-
+
@param pt
Point in client coordinates.
*/
/**
Returns the helptext associated with the specified @a item if any or @c
wxEmptyString.
-
+
@param item
The zero-based item index.
-
+
@see SetItemHelpText()
*/
wxString GetItemHelpText(unsigned int item) const;
/**
Returns the tooltip associated with the specified @a item if any or @NULL.
-
+
@see SetItemToolTip(), wxWindow::GetToolTip
*/
wxToolTip* GetItemToolTip(unsigned int item) const;
/**
Returns the radiobox label.
-
+
@param n
The zero-based button index.
-
+
@see SetLabel()
*/
wxString GetLabel() const;
/**
Returns the label for the button at the given position.
-
+
@param n
The zero-based button position.
*/
@ref enable() "Enable(n, @false)".
@b Platform note: Currently only implemented in wxMSW, wxGTK and wxUniversal
and always returns @true in the other ports.
-
+
@param n
The zero-based button position.
*/
if the entire radiobox is not currently shown.
@b Platform note: Currently only implemented in wxMSW, wxGTK and wxUniversal
and always returns @true in the other ports.
-
+
@param n
The zero-based button position.
*/
/**
Sets the helptext for an item. Empty string erases any existing helptext.
-
+
@param item
The zero-based item index.
@param helptext
The help text to set for the item.
-
+
@see GetItemHelpText()
*/
void SetItemHelpText(unsigned int item, const wxString& helptext);
Sets the tooltip text for the specified item in the radio group.
@b Platform note: Currently only implemented in wxMSW and wxGTK2 and does
nothing in the other ports.
-
+
@param item
Index of the item the tooltip will be shown for.
@param text
Tooltip text for the item, the tooltip is removed if empty.
-
+
@see GetItemToolTip(), wxWindow::SetToolTip
*/
void SetItemToolTip(unsigned int item, const wxString& text);
/**
Sets the radiobox label.
-
+
@param label
The label to set.
@param n
/**
Sets a button by passing the desired string position. This does not cause
a wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted.
-
+
@param n
The zero-based button position.
*/
Sets the selection to a button by passing the desired string. This does not
cause
a wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted.
-
+
@param string
The label of the button to select.
*/
//@{
/**
Constructor, creating and showing a radio button.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxRadioButton();
/**
Sets the radio button to selected or deselected status. This does not cause a
wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted.
-
+
@param value
@true to select, @false to deselect.
*/
/**
Replace all occurrences: this is actually a synonym for
Replace().
-
+
@see ReplaceFirst()
*/
int ReplaceAll(wxString* text, const wxString& replacement) const;
/**
Returns a value indicating whether the given rectangle is contained within the
region.
-
+
@returns The return value is one of wxOutRegion, wxPartRegion and
wxInRegion.
*/
//@{
/**
Finds the intersection of this region and another region.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks Creates the intersection of the two regions, that is, the parts
which are in both regions. The result is stored in this
region.
/**
Moves the region by the specified offsets in horizontal and vertical
directions.
-
+
@returns @true if successful, @false otherwise (the region is unchanged
then).
*/
//@{
/**
Subtracts a region from this region.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks This operation combines the parts of 'this' region that are not
part of the second region. The result is stored in this
region.
bitmap. Colour to be treated as transparent is specified in the
@a transColour argument, along with an
optional colour tolerance value.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks This operation creates a region that combines all of this region
and the second region. The result is stored in this
region.
//@{
/**
Finds the Xor of this region and another region.
-
+
@returns @true if successful, @false otherwise.
-
+
@remarks This operation creates a region that combines all of this region
and the second region, except for any overlapping
areas. The result is stored in this region.
/**
Constructs a sash window, which can be a child of a frame, dialog or any other
non-control window.
-
+
@param parent
Pointer to a parent window.
@param id
/**
Returns @true if a sash is visible on the given edge, @false otherwise.
-
+
@param edge
Edge. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
-
+
@see SetSashVisible()
*/
bool GetSashVisible(wxSashEdgePosition edge) const;
/**
Returns @true if the sash has a border, @false otherwise.
This function is obsolete since the sash border property is unused.
-
+
@param edge
Edge. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
-
+
@see SetSashBorder()
*/
bool HasBorder(wxSashEdgePosition edge) const;
/**
Call this function to give the sash a border, or remove the border.
This function is obsolete since the sash border property is unused.
-
+
@param edge
Edge to change. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
@param hasBorder
/**
Call this function to make a sash visible or invisible on a particular edge.
-
+
@param edge
Edge to change. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
@param visible
@true to make the sash visible, @false to make it invisible.
-
+
@see GetSashVisible()
*/
void SetSashVisible(wxSashEdgePosition edge, bool visible);
//@{
/**
Constructor, creating and showing a scrollbar.
-
+
@param parent
Parent window. Must be non-@NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxScrollBar();
Returns the page size of the scrollbar. This is the number of scroll units
that will be scrolled when the user pages up or down. Often it is the
same as the thumb size.
-
+
@see SetScrollbar()
*/
int GetPageSize() const;
/**
Returns the length of the scrollbar.
-
+
@see SetScrollbar()
*/
int GetRange() const;
/**
Returns the current position of the scrollbar thumb.
-
+
@see SetThumbPosition()
*/
int GetThumbPosition() const;
/**
Returns the thumb or 'view' size.
-
+
@see SetScrollbar()
*/
int GetThumbSize() const;
/**
Sets the scrollbar properties.
-
+
@param position
The position of the scrollbar in scroll units.
@param thumbSize
the thumb size.
@param refresh
@true to redraw the scrollbar, @false otherwise.
-
+
@remarks Let's say you wish to display 50 lines of text, using the same
font. The window is sized so that you can only see 16
lines at a time.
/**
Sets the position of the scrollbar.
-
+
@param viewStart
The position of the scrollbar thumb.
-
+
@see GetThumbPosition()
*/
void SetThumbPosition(int viewStart);
//@{
/**
Constructor.
-
+
@param parent
Parent window.
@param id
Window style. See wxScrolledWindow.
@param name
Window name.
-
+
@remarks The window is initially created without visible scrollbars. Call
SetScrollbars() to specify how big the
virtual window size should be.
0)
(as always), but the logical coordinates are (0, 10) and so the call to
CalcScrolledPosition(0, 10, xx, yy) will return 0 in yy.
-
+
@see CalcUnscrolledPosition()
*/
void CalcScrolledPosition(int x, int y, int* xx, int* yy) const;
0)
(as always), but the logical coordinates are (0, 10) and so the call to
CalcUnscrolledPosition(0, 0, xx, yy) will return 10 in yy.
-
+
@see CalcScrolledPosition()
*/
void CalcUnscrolledPosition(int x, int y, int* xx, int* yy) const;
scrolling will not work, and you should switch it off. Note that you
will have to reposition child windows yourself, if physical scrolling
is disabled.
-
+
@param xScrolling
If @true, enables physical scrolling in the x direction.
@param yScrolling
If @true, enables physical scrolling in the y direction.
-
+
@remarks Physical scrolling may not be available on all platforms. Where
it is available, it is enabled by default.
*/
Get the number of pixels per scroll unit (line), in each direction, as set
by SetScrollbars(). A value of zero indicates no
scrolling in that direction.
-
+
@param xUnit
Receives the number of pixels per horizontal unit.
@param yUnit
Receives the number of pixels per vertical unit.
-
+
@see SetScrollbars(), GetVirtualSize()
*/
void GetScrollPixelsPerUnit(int* xUnit, int* yUnit) const;
/**
Get the position at which the visible portion of the window starts.
-
+
@param x
Receives the first visible x position in scroll units.
@param y
Receives the first visible y position in scroll units.
-
+
@remarks If either of the scrollbars is not at the home position, x
and/or y will be greater than zero. Combined with
wxWindow::GetClientSize, the application can use this
units, not pixels, so to convert to pixels you will
have to multiply by the number of pixels per scroll
increment.
-
+
@see SetScrollbars()
*/
void GetViewStart(int* x, int* y) const;
Gets the size in device units of the scrollable window area (as
opposed to the client size, which is the area of the window currently
visible).
-
+
@param x
Receives the length of the scrollable window, in pixels.
@param y
Receives the height of the scrollable window, in pixels.
-
+
@remarks Use wxDC::DeviceToLogicalX and wxDC::DeviceToLogicalY to
translate these units to logical units.
-
+
@see SetScrollbars(), GetScrollPixelsPerUnit()
*/
void GetVirtualSize(int* x, int* y) const;
/**
Scrolls a window so the view start is at the given point.
-
+
@param x
The x position to scroll to, in scroll units.
@param y
The y position to scroll to, in scroll units.
-
+
@remarks The positions are in scroll units, not pixels, so to convert to
pixels you will have to multiply by the number of
pixels per scroll increment. If either parameter is -1,
that position will be ignored (no change in that
direction).
-
+
@see SetScrollbars(), GetScrollPixelsPerUnit()
*/
void Scroll(int x, int y);
/**
Sets up vertical and/or horizontal scrollbars.
-
+
@param pixelsPerUnitX
Pixels per scroll unit in the horizontal direction.
@param pixelsPerUnitY
units.
@param noRefresh
Will not refresh window if @true.
-
+
@remarks The first pair of parameters give the number of pixels per
'scroll step', i.e. amount moved when the up or down
scroll arrows are pressed. The second pair gives the
length of scrollbar in scroll steps, which sets the
size of the virtual window.
-
+
@see wxWindow::SetVirtualSize
*/
void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
/**
Returns a system colour.
@a index can be one of:
-
+
@b wxSYS_COLOUR_SCROLLBAR
-
+
The scrollbar grey area.
-
+
@b wxSYS_COLOUR_BACKGROUND
-
+
The desktop colour.
-
+
@b wxSYS_COLOUR_ACTIVECAPTION
-
+
Active window caption.
-
+
@b wxSYS_COLOUR_INACTIVECAPTION
-
+
Inactive window caption.
-
+
@b wxSYS_COLOUR_MENU
-
+
Menu background.
-
+
@b wxSYS_COLOUR_WINDOW
-
+
Window background.
-
+
@b wxSYS_COLOUR_WINDOWFRAME
-
+
Window frame.
-
+
@b wxSYS_COLOUR_MENUTEXT
-
+
Menu text.
-
+
@b wxSYS_COLOUR_WINDOWTEXT
-
+
Text in windows.
-
+
@b wxSYS_COLOUR_CAPTIONTEXT
-
+
Text in caption, size box and scrollbar arrow box.
-
+
@b wxSYS_COLOUR_ACTIVEBORDER
-
+
Active window border.
-
+
@b wxSYS_COLOUR_INACTIVEBORDER
-
+
Inactive window border.
-
+
@b wxSYS_COLOUR_APPWORKSPACE
-
+
Background colour MDI applications.
-
+
@b wxSYS_COLOUR_HIGHLIGHT
-
+
Item(s) selected in a control.
-
+
@b wxSYS_COLOUR_HIGHLIGHTTEXT
-
+
Text of item(s) selected in a control.
-
+
@b wxSYS_COLOUR_BTNFACE
-
+
Face shading on push buttons.
-
+
@b wxSYS_COLOUR_BTNSHADOW
-
+
Edge shading on push buttons.
-
+
@b wxSYS_COLOUR_GRAYTEXT
-
+
Greyed (disabled) text.
-
+
@b wxSYS_COLOUR_BTNTEXT
-
+
Text on push buttons.
-
+
@b wxSYS_COLOUR_INACTIVECAPTIONTEXT
-
+
Colour of text in active captions.
-
+
@b wxSYS_COLOUR_BTNHIGHLIGHT
-
+
Highlight colour for buttons (same as wxSYS_COLOUR_3DHILIGHT).
-
+
@b wxSYS_COLOUR_3DDKSHADOW
-
+
Dark shadow for three-dimensional display elements.
-
+
@b wxSYS_COLOUR_3DLIGHT
-
+
Light colour for three-dimensional display elements.
-
+
@b wxSYS_COLOUR_INFOTEXT
-
+
Text colour for tooltip controls.
-
+
@b wxSYS_COLOUR_INFOBK
-
+
Background colour for tooltip controls.
-
+
@b wxSYS_COLOUR_DESKTOP
-
+
Same as wxSYS_COLOUR_BACKGROUND.
-
+
@b wxSYS_COLOUR_3DFACE
-
+
Same as wxSYS_COLOUR_BTNFACE.
-
+
@b wxSYS_COLOUR_3DSHADOW
-
+
Same as wxSYS_COLOUR_BTNSHADOW.
-
+
@b wxSYS_COLOUR_3DHIGHLIGHT
-
+
Same as wxSYS_COLOUR_BTNHIGHLIGHT.
-
+
@b wxSYS_COLOUR_3DHILIGHT
-
+
Same as wxSYS_COLOUR_BTNHIGHLIGHT.
-
+
@b wxSYS_COLOUR_BTNHILIGHT
-
+
Same as wxSYS_COLOUR_BTNHIGHLIGHT.
*/
static wxColour GetColour(wxSystemColour index);
/**
Returns a system font.
@a index can be one of:
-
+
@b wxSYS_OEM_FIXED_FONT
-
+
Original equipment manufacturer dependent fixed-pitch font.
-
+
@b wxSYS_ANSI_FIXED_FONT
-
+
Windows fixed-pitch font.
-
+
@b wxSYS_ANSI_VAR_FONT
-
+
Windows variable-pitch (proportional) font.
-
+
@b wxSYS_SYSTEM_FONT
-
+
System font.
-
+
@b wxSYS_DEVICE_DEFAULT_FONT
-
+
Device-dependent font (Windows NT only).
-
+
@b wxSYS_DEFAULT_GUI_FONT
-
+
Default font for user interface
objects such as menus and dialog boxes. Note that with modern GUIs nothing
guarantees that the same font is used for all GUI elements, so some controls
metric as possible (e.g a wxTopLevelWindow in case of the wxSYS_CAPTION_Y
metric).
@a index can be one of:
-
+
@b wxSYS_MOUSE_BUTTONS
-
+
Number of buttons on mouse, or zero if no mouse was installed.
-
+
@b wxSYS_BORDER_X
-
+
Width of single border.
-
+
@b wxSYS_BORDER_Y
-
+
Height of single border.
-
+
@b wxSYS_CURSOR_X
-
+
Width of cursor.
-
+
@b wxSYS_CURSOR_Y
-
+
Height of cursor.
-
+
@b wxSYS_DCLICK_X
-
+
Width in pixels of rectangle within which two successive mouse
clicks must fall to generate a double-click.
-
+
@b wxSYS_DCLICK_Y
-
+
Height in pixels of rectangle within which two successive mouse
clicks must fall to generate a double-click.
-
+
@b wxSYS_DCLICK_MSEC
-
+
Maximal time, in milliseconds, which may
pass between subsequent clicks for a double click to be generated.
-
+
@b wxSYS_DRAG_X
-
+
Width in pixels of a rectangle centered on a drag point
to allow for limited movement of the mouse pointer before a drag operation
begins.
-
+
@b wxSYS_DRAG_Y
-
+
Height in pixels of a rectangle centered on a drag point
to allow for limited movement of the mouse pointer before a drag operation
begins.
-
+
@b wxSYS_EDGE_X
-
+
Width of a 3D border, in pixels.
-
+
@b wxSYS_EDGE_Y
-
+
Height of a 3D border, in pixels.
-
+
@b wxSYS_HSCROLL_ARROW_X
-
+
Width of arrow bitmap on horizontal scrollbar.
-
+
@b wxSYS_HSCROLL_ARROW_Y
-
+
Height of arrow bitmap on horizontal scrollbar.
-
+
@b wxSYS_HTHUMB_X
-
+
Width of horizontal scrollbar thumb.
-
+
@b wxSYS_ICON_X
-
+
The default width of an icon.
-
+
@b wxSYS_ICON_Y
-
+
The default height of an icon.
-
+
@b wxSYS_ICONSPACING_X
-
+
Width of a grid cell for items in large icon view,
in pixels. Each item fits into a rectangle of this size when arranged.
-
+
@b wxSYS_ICONSPACING_Y
-
+
Height of a grid cell for items in large icon view,
in pixels. Each item fits into a rectangle of this size when arranged.
-
+
@b wxSYS_WINDOWMIN_X
-
+
Minimum width of a window.
-
+
@b wxSYS_WINDOWMIN_Y
-
+
Minimum height of a window.
-
+
@b wxSYS_SCREEN_X
-
+
Width of the screen in pixels.
-
+
@b wxSYS_SCREEN_Y
-
+
Height of the screen in pixels.
-
+
@b wxSYS_FRAMESIZE_X
-
+
Width of the window frame for a wxTHICK_FRAME window.
-
+
@b wxSYS_FRAMESIZE_Y
-
+
Height of the window frame for a wxTHICK_FRAME window.
-
+
@b wxSYS_SMALLICON_X
-
+
Recommended width of a small icon (in window captions, and small icon view).
-
+
@b wxSYS_SMALLICON_Y
-
+
Recommended height of a small icon (in window captions, and small icon view).
-
+
@b wxSYS_HSCROLL_Y
-
+
Height of horizontal scrollbar in pixels.
-
+
@b wxSYS_VSCROLL_X
-
+
Width of vertical scrollbar in pixels.
-
+
@b wxSYS_VSCROLL_ARROW_X
-
+
Width of arrow bitmap on a vertical scrollbar.
-
+
@b wxSYS_VSCROLL_ARROW_Y
-
+
Height of arrow bitmap on a vertical scrollbar.
-
+
@b wxSYS_VTHUMB_Y
-
+
Height of vertical scrollbar thumb.
-
+
@b wxSYS_CAPTION_Y
-
+
Height of normal caption area.
-
+
@b wxSYS_MENU_Y
-
+
Height of single-line menu bar.
-
+
@b wxSYS_NETWORK_PRESENT
-
+
1 if there is a network present, 0 otherwise.
-
+
@b wxSYS_PENWINDOWS_PRESENT
-
+
1 if PenWindows is installed, 0 otherwise.
-
+
@b wxSYS_SHOW_SOUNDS
-
+
Non-zero if the user requires an application to present information visually in
situations
where it would otherwise present the information only in audible form; zero
otherwise.
-
+
@b wxSYS_SWAP_BUTTONS
-
+
Non-zero if the meanings of the left and right mouse buttons are swapped; zero
otherwise.
-
+
@a win is a pointer to the window for which the metric is requested.
Specifying the @a win parameter is encouraged, because some metrics on some
ports are not supported without one,
/**
Returns the screen type. The return value is one of:
-
+
@b wxSYS_SCREEN_NONE
-
+
Undefined screen type
-
+
@b wxSYS_SCREEN_TINY
-
+
Tiny screen, less than 320x240
-
+
@b wxSYS_SCREEN_PDA
-
+
PDA screen, 320x240 or more but less than 640x480
-
+
@b wxSYS_SCREEN_SMALL
-
+
Small screen, 640x480 or more but less than 800x600
-
+
@b wxSYS_SCREEN_DESKTOP
-
+
Desktop screen, 800x600 or more
*/
static wxSystemScreenType GetScreenType();
void SetId(int id);
/**
-
+
*/
void SetInitSize(int x, int y);
Sets the alignment of this wxSizerFlags to @e align.
Note that if this method is not called, the wxSizerFlags has no specified
alignment.
-
+
@see Top(), Left(), Right(),
Bottom(), Centre()
*/
/**
Aligns the object to the bottom, shortcut for @c Align(wxALIGN_BOTTOM)
-
+
@see Align()
*/
wxSizerFlags Bottom();
/**
Aligns the object to the left, shortcut for @c Align(wxALIGN_LEFT)
-
+
@see Align()
*/
wxSizerFlags Left();
/**
Aligns the object to the right, shortcut for @c Align(wxALIGN_RIGHT)
-
+
@see Align()
*/
wxSizerFlags Right();
/**
Aligns the object to the top, shortcut for @c Align(wxALIGN_TOP)
-
+
@see Align()
*/
wxSizerFlags Top();
/**
Returns a wxOrientation value that specifies whether the sizer flexibly
resizes its columns, rows, or both (default).
-
+
@returns One of the following values:
-
+
@see SetFlexibleDirection()
*/
int GetFlexibleDirection() const;
/**
Returns the value that specifies how the sizer grows in the "non-flexible"
direction if there is one.
-
+
@returns One of the following values:
-
+
@see SetFlexibleDirection(),
SetNonFlexibleGrowMode()
*/
equivalent in the derived classes that you will instantiate to use it so they
are described
here:
-
+
@param window
The window to be added to the sizer. Its initial size (either set
explicitly by the
border will be added. The other flags determine how the sizer item
behaves when the space allotted to the sizer changes, and is somewhat
dependent on the specific kind of sizer used.
-
-
-
-
-
-
+
+
+
+
+
+
wxTOP
-
+
wxBOTTOM
-
+
wxLEFT
-
+
wxRIGHT
-
+
wxALL
-
-
-
-
+
+
+
+
These flags are used to specify which side(s) of
the sizer item the border width will apply to.
-
-
-
-
-
+
+
+
+
+
wxEXPAND
-
-
-
-
+
+
+
+
The item will be expanded to fill
the space assigned to the item.
-
-
-
-
-
+
+
+
+
+
wxSHAPED
-
-
-
-
+
+
+
+
The item will be expanded as much
as possible while also maintaining its aspect ratio
-
-
-
-
-
+
+
+
+
+
wxFIXED_MINSIZE
-
-
-
-
+
+
+
+
Normally wxSizers will use
GetAdjustedBestSize to
determine what the minimal size of window items should be, and will
adjust when an item changes and its best size becomes
different. If you would rather have a window item stay the size it
started with then use wxFIXED_MINSIZE.
-
-
-
-
-
+
+
+
+
+
wxALIGN_CENTER wxALIGN_CENTRE
-
+
wxALIGN_LEFT
-
+
wxALIGN_RIGHT
-
+
wxALIGN_TOP
-
+
wxALIGN_BOTTOM
-
+
wxALIGN_CENTER_VERTICAL wxALIGN_CENTRE_VERTICAL
-
+
wxALIGN_CENTER_HORIZONTAL wxALIGN_CENTRE_HORIZONTAL
-
-
-
-
+
+
+
+
The wxALIGN flags allow you to
specify the alignment of the item within the space allotted to it by
the sizer, adjusted for the border if any.
cause any layout or resizing to take place, call Layout()
to update the layout "on screen" after detaching a child from the sizer.
Returns @true if the child item was found and detached, @false otherwise.
-
+
@see Remove()
*/
bool Detach(wxWindow* window);
This is commonly done in the constructor of the window
itself, see sample in the description
of wxBoxSizer. Returns the new window size.
-
+
@see ComputeFittingClientSize(), ComputeFittingWindowSize()
*/
wxSize Fit(wxWindow* window);
the addition/removal/alteration of scrollbars required to view the virtual area
in
windows which manage it.
-
+
@see wxScrolledWindow::SetScrollbars, SetVirtualSizeHints()
*/
void FitInside(wxWindow* window);
To make a sizer item disappear, use Hide() followed by Layout().
Use parameter @a recursive to hide elements found in subsizers.
Returns @true if the child item was found, @false otherwise.
-
+
@see IsShown(), Show()
*/
bool Hide(wxWindow* window, bool recursive = false);
//@{
/**
Insert a child into the sizer before any existing item at
-
+
See Add() for the meaning of the other parameters.
-
+
@param index.
-
+
index
The position this child should assume in the sizer.
*/
//@{
/**
Returns @true if the @e window, @e sizer, or item at @a index is shown.
-
+
@see Hide(), Show()
*/
bool IsShown(wxWindow* window) const;
The detached child is removed @b only if it is a sizer or a spacer
(because windows are owned by their parent window, not the sizer).
Use parameter @a recursive to search the given element recursively in subsizers.
-
+
This method does not cause any layout or resizing to take place, call
Layout() to update the layout "on screen" after replacing a
child from the sizer.
the sizer's
minimal size. For windows with managed scrollbars this will set them
appropriately.
-
+
@see wxScrolledWindow::SetScrollbars
*/
void SetVirtualSizeHints(wxWindow* window);
To make a sizer item disappear or reappear, use Show() followed by Layout().
Use parameter @a recursive to show or hide elements found in subsizers.
Returns @true if the child item was found, @false otherwise.
-
+
@see Hide(), IsShown()
*/
bool Show(wxWindow* window, bool show = true,
//@{
/**
Constructor, creating and showing a slider.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxSlider();
/**
Clears the selection, for a slider with the @b wxSL_SELRANGE style.
-
+
@remarks Windows 95 only.
*/
void ClearSel();
/**
Clears the ticks.
-
+
@remarks Windows 95 only.
*/
void ClearTicks();
/**
Returns the line size.
-
+
@see SetLineSize()
*/
int GetLineSize() const;
/**
Gets the maximum slider value.
-
+
@see GetMin(), SetRange()
*/
int GetMax() const;
/**
Gets the minimum slider value.
-
+
@see GetMin(), SetRange()
*/
int GetMin() const;
/**
Returns the page size.
-
+
@see SetPageSize()
*/
int GetPageSize() const;
/**
Returns the selection end point.
-
+
@remarks Windows 95 only.
-
+
@see GetSelStart(), SetSelection()
*/
int GetSelEnd() const;
/**
Returns the selection start point.
-
+
@remarks Windows 95 only.
-
+
@see GetSelEnd(), SetSelection()
*/
int GetSelStart() const;
/**
Returns the thumb length.
-
+
@remarks Windows 95 only.
-
+
@see SetThumbLength()
*/
int GetThumbLength() const;
/**
Returns the tick frequency.
-
+
@remarks Windows 95 only.
-
+
@see SetTickFreq()
*/
int GetTickFreq() const;
/**
Gets the current slider value.
-
+
@see GetMin(), GetMax(), SetValue()
*/
int GetValue() const;
/**
Sets the line size for the slider.
-
+
@param lineSize
The number of steps the slider moves when the user moves it up or down a
line.
-
+
@see GetLineSize()
*/
void SetLineSize(int lineSize);
/**
Sets the page size for the slider.
-
+
@param pageSize
The number of steps the slider moves when the user pages up or down.
-
+
@see GetPageSize()
*/
void SetPageSize(int pageSize);
/**
Sets the minimum and maximum slider values.
-
+
@see GetMin(), GetMax()
*/
void SetRange(int minValue, int maxValue);
/**
Sets the selection.
-
+
@param startPos
The selection start position.
@param endPos
The selection end position.
-
+
@remarks Windows 95 only.
-
+
@see GetSelStart(), GetSelEnd()
*/
void SetSelection(int startPos, int endPos);
/**
Sets the slider thumb length.
-
+
@param len
The thumb length.
-
+
@remarks Windows 95 only.
-
+
@see GetThumbLength()
*/
void SetThumbLength(int len);
/**
Sets a tick position.
-
+
@param tickPos
The tick position.
-
+
@remarks Windows 95 only.
-
+
@see SetTickFreq()
*/
void SetTick(int tickPos);
/**
Sets the tick mark frequency and position.
-
+
@param n
Frequency. For example, if the frequency is set to two, a tick mark is
displayed for
every other increment in the slider's range.
@param pos
Position. Must be greater than zero. TODO: what is this for?
-
+
@remarks Windows 95 only.
-
+
@see GetTickFreq()
*/
void SetTickFreq(int n, int pos);
/**
Sets the slider position.
-
+
@param value
The slider position.
*/
Note that you can't call Create() more than once, so calling it if the
@ref wxsingleinstancechecker() "non default ctor"
had been used is an error.
-
+
@param name
must be given and be as unique as possible. It is used as the
mutex name under Win32 and the lock file name under Unix.
is optional and is ignored under Win32 and used as the directory to
create the lock file in under Unix (default is
wxGetHomeDir())
-
+
@returns Returns @false if initialization failed, it doesn't mean that
another instance is running - use IsAnotherRunning()
to check for it.
as this correctly handles multi-homed hosts and avoids other small
problems. Internally, this is the same as setting the IP address
to @b INADDR_ANY.
-
+
@returns Returns @true on success, @false if something went wrong.
*/
bool AnyAddress();
Constructs a new server and tries to bind to the specified @e address.
Before trying to accept new connections, test whether it succeeded with
@ref wxSocketBase::isok wxSocketBase:IsOk.
-
+
@param address
Specifies the local address for the server (e.g. port number).
@param flags
incoming connections with WaitForAccept()
or catch @b wxSOCKET_CONNECTION events, then call Accept once you know
that there is an incoming connection waiting to be accepted.
-
+
@returns Returns an opened socket connection, or @NULL if an error
occurred or if the wait parameter was @false and there
were no pending connections.
-
+
@see WaitForAccept(), wxSocketBase::SetNotify,
wxSocketBase::Notify, AcceptWith()
*/
/**
Accept an incoming connection using the specified socket object.
-
+
@param socket
Socket to be initialized
-
+
@returns Returns @true on success, or @false if an error occurred or if the
wait parameter was @false and there were no pending
connections.
Accept() or AcceptWith()
with @e wait set to @false, to detect when an incoming connection is waiting
to be accepted.
-
+
@param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
@param millisecond
Number of milliseconds to wait.
-
+
@returns Returns @true if an incoming connection arrived, @false if the
timeout elapsed.
*/
to @b INADDR_ANY.
On IPV4 implementations, 0.0.0.0
On IPV6 implementations, ::
-
+
@returns Returns @true on success, @false if something went wrong.
*/
virtual bool AnyAddress();
Internally, this is the same as setting the IP address
to @b INADDR_BROADCAST.
On IPV4 implementations, 255.255.255.255
-
+
@returns Returns @true on success, @false if something went wrong.
*/
virtual bool BroadcastAddress();
Set address to localhost.
On IPV4 implementations, 127.0.0.1
On IPV6 implementations, ::1
-
+
@returns Returns @true on success, @false if something went wrong.
*/
virtual bool LocalHost();
public:
/**
Constructor.
-
+
@param flags
Socket flags (See wxSocketBase::SetFlags)
*/
To detect this, use WaitOnConnect(),
or catch @b wxSOCKET_CONNECTION events (for successful establishment)
and @b wxSOCKET_LOST events (for connection failure).
-
+
@param address
Address of the server.
@param local
and then using the 2-parameter Connect method.
@param wait
If @true, waits for the connection to complete.
-
+
@returns Returns @true if the connection is established and no error
occurs.
-
+
@see WaitOnConnect(), wxSocketBase::SetNotify,
wxSocketBase::Notify
*/
Wait until a connection request completes, or until the specified timeout
elapses. Use this function after issuing a call
to Connect() with @e wait set to @false.
-
+
@param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
@param millisecond
Number of milliseconds to wait.
-
+
@returns WaitOnConnect returns @true if the connection request completes.
This does not necessarily mean that the connection was
successfully established; it might also happen that the
/**
Functions that perform basic IO functionality.
Close()
-
+
Discard()
-
+
Peek()
-
+
Read()
-
+
ReadMsg()
-
+
Unread()
-
+
Write()
-
+
WriteMsg()
Functions that perform a timed wait on a certain IO condition.
InterruptWait()
-
+
Wait()
-
+
WaitForLost()
-
+
WaitForRead()
-
+
WaitForWrite()
-
+
and also:
wxSocketServer::WaitForAccept
-
+
wxSocketClient::WaitOnConnect
Functions that allow applications to customize socket IO as needed.
GetFlags()
-
+
SetFlags()
-
+
SetTimeout()
-
+
SetLocal()
*/
/**
@ref construct() wxSocketBase
-
+
@ref destruct() ~wxSocketBase
-
+
Destroy()
*/
events have been processed. For the same reason, you should avoid creating
socket objects in the stack.
Destroy calls Close() automatically.
-
+
@returns Always @true.
*/
bool Destroy();
This function returns the local address field of the socket. The local
address field contains the complete local address of the socket (local
address, local port, ...).
-
+
@returns @true if no error happened, @false otherwise.
*/
bool GetLocal(wxSockAddress& addr) const;
This function returns the peer address field of the socket. The peer
address field contains the complete peer host address of the socket
(address, port, ...).
-
+
@returns @true if no error happened, @false otherwise.
*/
bool GetPeer(wxSockAddress& addr) const;
/**
Functions that allow applications to receive socket events.
Notify()
-
+
SetNotify()
-
+
GetClientData()
-
+
SetClientData()
-
+
SetEventHandler()
*/
Peeking a buffer doesn't delete it from the socket input queue.
Use LastCount() to verify the number of bytes actually peeked.
Use Error() to determine if the operation succeeded.
-
+
@param buffer
Buffer where to put peeked data.
@param nbytes
Number of bytes.
-
+
@returns Returns a reference to the current object.
-
+
@see Error(), LastError(), LastCount(),
SetFlags()
*/
This function reads a buffer of @a nbytes bytes from the socket.
Use LastCount() to verify the number of bytes actually read.
Use Error() to determine if the operation succeeded.
-
+
@param buffer
Buffer where to put read data.
@param nbytes
Number of bytes.
-
+
@returns Returns a reference to the current object.
-
+
@see Error(), LastError(), LastCount(),
SetFlags()
*/
buffer to be entirely filled, unless an error occurs.
Use LastCount() to verify the number of bytes actually read.
Use Error() to determine if the operation succeeded.
-
+
@param buffer
Buffer where to put read data.
@param nbytes
Size of the buffer.
-
+
@returns Returns a reference to the current object.
-
+
@see Error(), LastError(), LastCount(),
SetFlags(), WriteMsg()
*/
This function restores the previous state of the socket, as saved
with SaveState()
Calls to SaveState and RestoreState can be nested.
-
+
@see SaveState()
*/
void RestoreState();
Notify(), user data, as set with
SetClientData().
Calls to SaveState and RestoreState can be nested.
-
+
@see RestoreState()
*/
void SaveState();
handler will be called for those events for which notification is
enabled with SetNotify() and
Notify().
-
+
@param handler
Specifies the event handler you want to use.
@param id
The id of socket event.
-
+
@see SetNotify(), Notify(), wxSocketEvent, wxEvtHandler
*/
void SetEventHandler(wxEvtHandler& handler, int id = -1);
Use SetFlags to customize IO operation for this socket.
The @a flags parameter may be a combination of flags ORed together.
The following flags can be used:
-
+
@b wxSOCKET_NONE
-
+
Normal functionality.
-
+
@b wxSOCKET_NOWAIT
-
+
Read/write as much data as possible and return immediately.
-
+
@b wxSOCKET_WAITALL
-
+
Wait for all required data to be read/written unless an error occurs.
-
+
@b wxSOCKET_BLOCK
-
+
Block the GUI (do not yield) while reading/writing data.
-
+
@b wxSOCKET_REUSEADDR
-
+
Allows the use of an in-use port (wxServerSocket only)
-
+
@b wxSOCKET_BROADCAST
-
+
Switches the socket to broadcast mode
-
+
@b wxSOCKET_NOBIND
-
+
Stops the socket from being bound to a specific adapter (normally used in
conjunction with @b wxSOCKET_BROADCAST)
-
+
A brief overview on how to use these flags follows.
If no flag is specified (this is the same as @b wxSOCKET_NONE),
IO calls will return after some data has been read or written, even
SetNotify specifies which socket events are to be sent to the event handler.
The @a flags parameter may be combination of flags ORed together. The
following flags can be used:
-
+
@b wxSOCKET_INPUT_FLAG
-
+
to receive wxSOCKET_INPUT
-
+
@b wxSOCKET_OUTPUT_FLAG
-
+
to receive wxSOCKET_OUTPUT
-
+
@b wxSOCKET_CONNECTION_FLAG
-
+
to receive wxSOCKET_CONNECTION
-
+
@b wxSOCKET_LOST_FLAG
-
+
to receive wxSOCKET_LOST
-
+
For example:
-
+
In this example, the user will be notified about incoming socket data and
whenever the connection is closed.
For more information on socket events see @ref overview_wxsocketbase "wxSocket
/**
Functions to retrieve current state and miscellaneous info.
Error()
-
+
GetLocal()
-
+
GetPeer()
IsConnected()
-
+
IsData()
-
+
IsDisconnected()
-
+
LastCount()
-
+
LastError()
-
+
IsOk()
-
+
SaveState()
-
+
RestoreState()
*/
in the incoming queue. This function is not affected by wxSocket flags.
If you use LastCount(), it will always return @e nbytes.
If you use Error(), it will always return @false.
-
+
@param buffer
Buffer to be unread.
@param nbytes
Number of bytes.
-
+
@returns Returns a reference to the current object.
-
+
@see Error(), LastCount(), LastError()
*/
wxSocketBase Unread(const void* buffer, wxUint32 nbytes);
/**
This function waits until any of the following conditions is @true:
-
+
The socket becomes readable.
The socket becomes writable.
An ongoing connection request has completed (wxSocketClient only)
The connection has been closed.
Note that it is recommended to use the individual Wait functions
to wait for the required condition, instead of this one.
-
+
@param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
@param millisecond
Number of milliseconds to wait.
-
+
@returns Returns @true when any of the above conditions is satisfied,
@false if the timeout was reached.
-
+
@see InterruptWait(), wxSocketServer::WaitForAccept,
WaitForLost(), WaitForRead(),
WaitForWrite(), wxSocketClient::WaitOnConnect
/**
This function waits until the connection is lost. This may happen if
the peer gracefully closes the connection or if the connection breaks.
-
+
@param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
@param millisecond
Number of milliseconds to wait.
-
+
@returns Returns @true if the connection was lost, @false if the timeout
was reached.
-
+
@see InterruptWait(), Wait()
*/
bool Wait(long seconds = -1, long millisecond = 0);
the connection has been closed, so that a read operation will complete
immediately without blocking (unless the @b wxSOCKET_WAITALL flag
is set, in which case the operation might still block).
-
+
@param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
@param millisecond
Number of milliseconds to wait.
-
+
@returns Returns @true if the socket becomes readable, @false on timeout.
-
+
@see InterruptWait(), Wait()
*/
bool WaitForRead(long seconds = -1, long millisecond = 0);
connection has been closed, so that a write operation is guaranteed to
complete immediately (unless the @b wxSOCKET_WAITALL flag is set,
in which case the operation might still block).
-
+
@param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
@param millisecond
Number of milliseconds to wait.
-
+
@returns Returns @true if the socket becomes writable, @false on timeout.
-
+
@see InterruptWait(), Wait()
*/
bool WaitForWrite(long seconds = -1, long millisecond = 0);
This function writes a buffer of @a nbytes bytes to the socket.
Use LastCount() to verify the number of bytes actually written.
Use Error() to determine if the operation succeeded.
-
+
@param buffer
Buffer with the data to be sent.
@param nbytes
Number of bytes.
-
+
@returns Returns a reference to the current object.
-
+
@see Error(), LastError(), LastCount(),
SetFlags()
*/
buffer to be sent, unless an error occurs.
Use LastCount() to verify the number of bytes actually written.
Use Error() to determine if the operation succeeded.
-
+
@param buffer
Buffer with the data to be sent.
@param nbytes
Number of bytes to send.
-
+
@returns Returns a reference to the current object.
*/
wxSocketBase WriteMsg(const void* buffer, wxUint32 nbytes);
public:
/**
Constructor.
-
+
@param flags
Socket flags (See wxSocketBase::SetFlags)
*/
This function reads a buffer of @a nbytes bytes from the socket.
Use wxSocketBase::LastCount to verify the number of bytes actually read.
Use wxSocketBase::Error to determine if the operation succeeded.
-
+
@param address
Any address - will be overwritten with the address of the peer that sent
that data.
Buffer where to put read data.
@param nbytes
Number of bytes.
-
+
@returns Returns a reference to the current object, and the address of
the peer that sent the data on address param.
-
+
@see wxSocketBase::Error, wxSocketBase::LastError, wxSocketBase::LastCount,
wxSocketBase::SetFlags,
*/
This function writes a buffer of @a nbytes bytes to the socket.
Use wxSocketBase::LastCount to verify the number of bytes actually wrote.
Use wxSocketBase::Error to determine if the operation succeeded.
-
+
@param address
The address of the destination peer for this data.
@param buffer
Buffer where read data is.
@param nbytes
Number of bytes.
-
+
@returns Returns a reference to the current object.
*/
wxDatagramSocket SendTo(const wxSockAddress& address,
Constructs a wave object from a file or, under Windows, from a Windows
resource. Call IsOk() to determine whether this
succeeded.
-
+
@param fileName
The filename or Windows resource.
@param isResource
/**
Constructs a wave object from a file or resource.
-
+
@param fileName
The filename or Windows resource.
@param isResource
@true if fileName is a resource, @false if it is a filename.
-
+
@returns @true if the call was successful, @false otherwise.
*/
bool Create(const wxString& fileName, bool isResource = false);
calling this function and the sound would continue playing, however this
currently doesn't work under Windows for sound objects loaded from memory data.
The possible values for @a flags are:
-
+
wxSOUND_SYNC
-
+
@c Play will block and wait until the sound is
replayed.
-
+
wxSOUND_ASYNC
-
+
Sound is played asynchronously,
@c Play returns immediately
-
+
wxSOUND_ASYNC | wxSOUND_LOOP
-
+
Sound is played asynchronously
and loops until another sound is played,
Stop() is called or the program terminates.
-
+
The static form is shorthand for this code:
*/
bool Play(unsigned flags = wxSOUND_ASYNC);
//@{
/**
Constructor, creating and showing a spin button.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window style. See wxSpinButton.
@param name
Window name.
-
+
@see Create()
*/
wxSpinButton();
/**
Returns the maximum permissible value.
-
+
@see SetRange()
*/
int GetMax() const;
/**
Returns the minimum permissible value.
-
+
@see SetRange()
*/
int GetMin() const;
/**
Returns the current spin button value.
-
+
@see SetValue()
*/
int GetValue() const;
/**
Sets the range of the spin button.
-
+
@param min
The minimum value for the spin button.
@param max
The maximum value for the spin button.
-
+
@see GetMin(), GetMax()
*/
void SetRange(int min, int max);
/**
Sets the value of the spin button.
-
+
@param value
The value for the spin button.
*/
/**
)
Constructor, creating and showing a spin control.
-
+
@param parent
Parent window. Must not be @NULL.
@param value
Initial value.
@param name
Window name.
-
+
@see Create()
*/
wxSpinCtrl();
//@{
/**
Constructor for creating the window.
-
+
@param parent
The parent of the splitter window.
@param id
The window style. See wxSplitterWindow.
@param name
The window name.
-
+
@remarks After using this constructor, you must create either one or two
subwindows with the splitter window as parent, and then
call one of Initialize(),
SplitVertically() and
SplitHorizontally() in order to set the
pane(s).
-
+
@see Initialize(), SplitVertically(),
SplitHorizontally(), Create()
*/
/**
Returns the current minimum pane size (defaults to zero).
-
+
@see SetMinimumPaneSize()
*/
int GetMinimumPaneSize() const;
/**
Returns the current sash gravity.
-
+
@see SetSashGravity()
*/
double GetSashGravity();
/**
Returns the current sash position.
-
+
@see SetSashPosition()
*/
int GetSashPosition();
/**
Gets the split mode.
-
+
@see SetSplitMode(), SplitVertically(),
SplitHorizontally().
*/
/**
Initializes the splitter window to have one pane. The child window is
shown if it is currently hidden.
-
+
@param window
The pane for the unsplit window.
-
+
@remarks This should be called if you wish to initially view only a
single pane in the splitter window.
-
+
@see SplitVertically(), SplitHorizontally()
*/
void Initialize(wxWindow* window);
/**
Application-overridable function called when the sash is double-clicked with
the left mouse button.
-
+
@param x
The x position of the mouse cursor.
@param y
The y position of the mouse cursor.
-
+
@remarks The default implementation of this function calls Unsplit if the
minimum pane size is zero.
-
+
@see Unsplit()
*/
virtual void OnDoubleClickSash(int x, int y);
/**
Application-overridable function called when the sash position is changed by
user. It may return @false to prevent the change or @true to allow it.
-
+
@param newSashPosition
The new sash position (always positive or zero)
-
+
@remarks The default implementation of this function verifies that the
sizes of both panes of the splitter are greater than
minimum pane size.
/**
Application-overridable function called when the window is unsplit, either
programmatically or using the wxSplitterWindow user interface.
-
+
@param removed
The window being removed.
-
+
@remarks The default implementation of this function simply hides
removed. You may wish to delete the window.
*/
couldn't be replaced, @false is returned. Otherwise the function will return
@true, but please notice that it will not delete the replaced window and you
may wish to do it yourself.
-
+
@see GetMinimumPaneSize()
*/
bool ReplaceWindow(wxWindow* winOld, wxWindow* winNew);
/**
Sets the minimum pane size.
-
+
@param paneSize
Minimum pane size in pixels.
-
+
@remarks The default minimum pane size is zero, which means that either
pane can be reduced to zero by dragging the sash, thus
removing one of the panes. To prevent this behaviour
size, for example 20 pixels. If the wxSP_PERMIT_UNSPLIT
style is used when a splitter window is created, the
window may be unsplit even if minimum size is non-zero.
-
+
@see GetMinimumPaneSize()
*/
void SetMinimumPaneSize(int paneSize);
/**
Sets the sash gravity.
-
+
@param gravity
The sash gravity. Value between 0.0 and 1.0.
-
+
@see GetSashGravity()
*/
void SetSashGravity(double gravity);
/**
Sets the sash position.
-
+
@param position
The sash position in pixels.
@param redraw
If @true, resizes the panes and redraws the sash and border.
-
+
@remarks Does not currently check for an out-of-range value.
-
+
@see GetSashPosition()
*/
void SetSashPosition(int position, const bool redraw = true);
/**
Sets the split mode.
-
+
@param mode
Can be wxSPLIT_VERTICAL or wxSPLIT_HORIZONTAL.
-
+
@remarks Only sets the internal variable; does not update the display.
-
+
@see GetSplitMode(), SplitVertically(),
SplitHorizontally().
*/
/**
Initializes the top and bottom panes of the splitter window. The
child windows are shown if they are currently hidden.
-
+
@param window1
The top pane.
@param window2
absolute value gives the size of the lower pane. Finally, specify 0
(default)
to choose the default position (half of the total window height).
-
+
@returns @true if successful, @false otherwise (the window was already
split).
-
+
@remarks This should be called if you wish to initially view two panes.
It can also be called at any subsequent time, but the
application should check that the window is not
currently split using IsSplit.
-
+
@see SplitVertically(), IsSplit(),
Unsplit()
*/
/**
Initializes the left and right panes of the splitter window. The
child windows are shown if they are currently hidden.
-
+
@param window1
The left pane.
@param window2
absolute value gives the size of the right pane. Finally, specify 0
(default)
to choose the default position (half of the total window width).
-
+
@returns @true if successful, @false otherwise (the window was already
split).
-
+
@remarks This should be called if you wish to initially view two panes.
It can also be called at any subsequent time, but the
application should check that the window is not
currently split using IsSplit.
-
+
@see SplitHorizontally(), IsSplit(),
Unsplit().
*/
/**
Unsplits the window.
-
+
@param toRemove
The pane to remove, or @NULL to remove the right or bottom pane.
-
+
@returns @true if successful, @false otherwise (the window was not split).
-
+
@remarks This call will not actually delete the pane being removed; it
calls OnUnsplit which can be overridden for the desired
behaviour. By default, the pane being removed is hidden.
-
+
@see SplitHorizontally(), SplitVertically(),
IsSplit(), OnUnsplit()
*/
May only be called while processing
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING and
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events.
-
+
@param pos
New sash position.
*/
//@{
/**
Constructor, creating and showing a text control.
-
+
@param parent
Parent window. Should not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see wxTextCtrl::Create, wxValidator
*/
wxSearchCtrl();
Sets the search control's menu object. If there is already a menu associated
with
the search control it is deleted.
-
+
@param menu
Menu to attach to the search control.
*/
/**
Return the line number of this frame, 0 if unavailable.
-
+
@see GetFileName()
*/
size_t GetLine() const;
//@{
/**
Constructor, creating and showing a static bitmap control.
-
+
@param parent
Parent window. Should not be @NULL.
@param id
Window style. See wxStaticBitmap.
@param name
Window name.
-
+
@see Create()
*/
wxStaticBitmap();
/**
Returns the bitmap currently used in the control. Notice that this method can
be called even if SetIcon() had been used.
-
+
@see SetBitmap()
*/
wxBitmap GetBitmap() const;
only be called if SetIcon() had been used: an icon
can't be retrieved from the control if a bitmap had been set (using
wxStaticBitmap::SetBitmap).
-
+
@see SetIcon()
*/
wxIcon GetIcon() const;
/**
Sets the bitmap label.
-
+
@param label
The new bitmap.
-
+
@see GetBitmap()
*/
virtual void SetBitmap(const wxBitmap& label);
/**
Sets the label to the given icon.
-
+
@param label
The new icon.
*/
//@{
/**
Constructor, creating and showing a static box.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window style. See wxStaticBox.
@param name
Window name.
-
+
@see Create()
*/
wxStaticBox();
//@{
/**
Constructor, creating and showing a static line.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window style (either wxLI_HORIZONTAL or wxLI_VERTICAL).
@param name
Window name.
-
+
@see Create()
*/
wxStaticLine();
//@{
/**
Constructor, creating and showing a text control.
-
+
@param parent
Parent window. Should not be @NULL.
@param id
Window style. See wxStaticText.
@param name
Window name.
-
+
@see Create()
*/
wxStaticText();
support it (currently only GTK+ 2). For the other platforms, the markup is
ignored.
The supported tags are:
-
+
b
-
+
bold text
-
+
big
-
+
bigger text
-
+
i
-
+
italic text
-
+
s
-
+
strike-through text
-
+
sub
-
+
subscript text
-
+
sup
-
+
superscript text
-
+
small
-
+
smaller text
-
+
tt
-
+
monospaced text
-
+
u
-
+
underlined text
-
+
span
-
+
generic formatter tag; see Pango Markup for more information.
-
+
Note that the string must be well-formed (e.g. all tags must be correctly
closed)
otherwise it can be not shown correctly or at all.
Also note that you need to escape the following special characters:
-
+
@b Special character
-
+
@b Escape as
-
+
@c
-
+
@c amp; or as @c
-
+
@c '
-
+
@c apos;
-
+
@c "
-
+
@c quot;
-
+
@c
-
+
@c lt;
-
+
@c
-
+
@c gt;
-
+
The non-escaped ampersand @c characters are interpreted as
mnemonics; see wxControl::SetLabel.
-
+
Example:
-
+
@param label
The new label to set. It may contain newline characters and the markup tags
described above.
most @a width pixels wide if possible (the lines are broken at words
boundaries so it might not be the case if words are too long). If @e width
is negative, no wrapping is done.
-
+
@wxsince{2.6.2}
*/
void Wrap(int width);
//@{
/**
Constructor, creating the window.
-
+
@param parent
The window parent, usually a frame.
@param id
item,
allowing the application user to set Motif resource values for
individual windows.
-
+
@see Create()
*/
wxStatusBar();
/**
Returns the size and position of a field's internal bounding rectangle.
-
+
@param i
The field in question.
@param rect
The rectangle values are placed in this variable.
-
+
@returns @true if the field index is valid, @false otherwise.
-
+
@see wxRect
*/
virtual bool GetFieldRect(int i, wxRect& rect) const;
/**
Returns the string associated with a status bar field.
-
+
@param i
The number of the status field to retrieve, starting from zero.
-
+
@returns The status field string if the field is valid, otherwise the
empty string.
-
+
@see SetStatusText()
*/
virtual wxString GetStatusText(int i = 0) const;
/**
Sets the field text to the top of the stack, and pops the stack of saved
strings.
-
+
@see PushStatusText()
*/
void PopStatusText(int field = 0);
/**
Sets the number of fields, and optionally the field widths.
-
+
@param number
The number of fields.
@param widths
Sets the styles of the fields in the status line which can make fields appear
flat
or raised instead of the standard sunken 3D border.
-
+
@param n
The number of fields in the status bar. Must be equal to the
number passed to SetFieldsCount the last
@param styles
Contains an array of n integers with the styles for each field. There
are three possible styles:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxSB_NORMAL
-
-
-
-
+
+
+
+
(default) The field appears sunken with a standard 3D border.
-
-
-
-
-
+
+
+
+
+
wxSB_FLAT
-
-
-
-
+
+
+
+
No border is painted around the field so that it appears flat.
-
-
-
-
-
+
+
+
+
+
wxSB_RAISED
-
-
-
-
+
+
+
+
A raised 3D border is painted around the field.
*/
virtual void SetStatusStyles(int n, int* styles);
/**
Sets the text for one field.
-
+
@param text
The text to be set. Use an empty string ("") to clear the field.
@param i
The field to set, starting from zero.
-
+
@see GetStatusText(), wxFrame::SetStatusText
*/
virtual void SetStatusText(const wxString& text, int i = 0);
For example, to create one fixed width field of width 100 in the right part of
the status bar and two more fields which get 66% and 33% of the remaining
space correspondingly, you should use an array containing -2, -1 and 100.
-
+
@param n
The number of fields in the status bar. Must be equal to the
number passed to SetFieldsCount the last
Contains an array of n integers, each of which is
either an absolute status field width in pixels if positive or indicates a
variable width field if negative.
-
+
@remarks The widths of the variable fields are calculated from the total
width of all fields, minus the sum of widths of the
non-variable fields, divided by the number of variable
fields.
-
+
@see SetFieldsCount(), wxFrame::SetStatusWidths
*/
virtual void SetStatusWidths(int n, int* widths);
Unix: @c /etc
Windows: @c C:\Documents and Settings\All Users\Application Data
Mac: @c /Library/Preferences
-
+
@see wxFileConfig
*/
wxString GetConfigDir() const;
Unix: @c @e prefix/share/@e appname
Windows: the directory where the executable file is located
Mac: @c @e appname.app/Contents/SharedSupport bundle subdirectory
-
+
@see GetLocalDataDir()
*/
wxString GetDataDir() const;
Unix: @c ~ (the home directory)
Windows: @c C:\Documents and Settings\@e username\Documents
Mac: @c ~/Documents
-
+
@wxsince{2.7.0}
*/
wxString GetDocumentsDir() const;
@c @e lang.lproj under Mac OS X) but is something quite
different for message catalog category under Unix where it returns the standard
@c @e prefix/share/locale/@e lang/LC_MESSAGES directory.
-
+
@wxsince{2.7.0}
*/
wxString GetLocalizedResourcesDir(const wxString& lang,
Unix: @c @e prefix/lib/@e appname
Windows: the directory of the executable file
Mac: @c @e appname.app/Contents/PlugIns bundle subdirectory
-
+
@see wxDynamicLibrary
*/
wxString GetPluginsDir() const;
Unix: @c @e prefix/share/@e appname
Windows: the directory where the executable file is located
Mac: @c @e appname.app/Contents/Resources bundle subdirectory
-
+
@wxsince{2.7.0}
-
+
@see GetLocalizedResourcesDir()
*/
wxString GetResourcesDir() const;
files,
it is best to use wxFileName::CreateTempFileName for correct behaviour when
multiple processes are attempting to create temporary files.
-
+
@wxsince{2.7.2}
*/
wxString GetTempDir() const;
available to use. Returns @false if ISO 8859-1 will be used instead.
Note this does not mean that a given string will be correctly converted.
A malformed string may still make conversion functions return @c wxCONV_FAILED.
-
+
@wxsince{2.8.2}
*/
bool IsOk() const;
size, i.e. the returned value does not include the trailing @c NUL. But
when the function is called with a non-@NULL @a out buffer, the @a outLen
parameter should be one more to allow to properly @c NUL-terminate the string.
-
+
@param out
The output buffer, may be @NULL if the caller is only
interested in the length of the resulting string
@param outLen
The length of the output buffer but including
NUL, ignored if out is @NULL
-
+
@returns The length of the converted string excluding the trailing NUL.
*/
virtual size_t MB2WC(wchar_t* out, const char* in,
buffer continues to be used, trying to call functions in the (destroyed)
stream. It is advised to use this feature only in very local area of the
program.
-
+
@see @ref setbufferio() wxStreamBuffer:SetBufferIO
*/
wxStreamBuffer(wxStreamBase& stream, BufMode mode);
@e flushable. This flag allows (when it has the @false value) or forbids
(when it has the @true value) the stream buffer to resize dynamically the IO
buffer.
-
+
@see SetBufferIO()
*/
void Fixed(bool fixed);
/**
Gets a single char from the stream buffer. It acts like the Read call.
-
+
@see Read()
*/
char GetChar();
/**
Puts a single char to the stream buffer.
-
+
@see Read()
*/
void PutChar(char c);
Copies data to @e buffer. The function returns when @a buffer is full or when
there isn't
any more data in the current buffer.
-
+
@see Write()
*/
size_t Read(void* buffer, size_t size);
/**
Changes the current position.
@a mode may be one of the following:
-
+
@b wxFromStart
-
+
The position is counted from the start of the stream.
-
+
@b wxFromCurrent
-
+
The position is counted from the current position of the stream.
-
+
@b wxFromEnd
-
+
The position is counted from the end of the stream.
-
+
@returns Upon successful completion, it returns the new offset as
measured in bytes from the beginning of the stream.
Otherwise, it returns wxInvalidOffset.
/**
Destroys or invalidates the previous IO buffer and allocates a new one of the
specified size.
-
+
@see Fixed(), Flushable()
*/
void SetBufferIO(char* buffer_start, char* buffer_end);
the @e real position in the stream and from the internal buffer position: so
it gives you the position in the @e real stream counted from the start of
the stream.
-
+
@returns Returns the current position in the stream if possible,
wxInvalidOffset in the other case.
*/
/**
Changes the stream current position.
-
+
@param pos
Offset to seek to.
@param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
-
+
@returns The new stream position or wxInvalidOffset on error.
*/
off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart);
/**
GetFirst and GetNext can be used to enumerate the available factories.
For example, to list them:
-
+
GetFirst()/GetNext() return a pointer to a factory or @NULL if no more
are available. They do not give away ownership of the factory.
*/
/**
Reads data from the input queue and stores it in the specified output stream.
The data is read until an error is raised by one of the two streams.
-
+
@returns This function returns a reference on the current object, so the
user can test any states of the stream right away.
*/
/**
Changes the stream current position.
-
+
@param pos
Offset to seek to.
@param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
-
+
@returns The new stream position or wxInvalidOffset on error.
*/
off_t SeekI(off_t pos, wxSeekMode mode = wxFromStart);
/**
This function returns the last error.
-
+
@b wxSTREAM_NO_ERROR
-
+
No error occurred.
-
+
@b wxSTREAM_EOF
-
+
An End-Of-File occurred.
-
+
@b wxSTREAM_WRITE_ERROR
-
+
A generic error occurred on the last write call.
-
+
@b wxSTREAM_READ_ERROR
-
+
A generic error occurred on the last read call.
*/
wxStreamError GetLastError() const;
Returns the length of the stream in bytes. If the length cannot be determined
(this is always the case for socket streams for example), returns
@c wxInvalidOffset.
-
+
@wxsince{2.5.4}
*/
wxFileOffset GetLength() const;
/**
Returns @true if no error occurred on the stream.
-
+
@see GetLastError()
*/
virtual bool IsOk() const;
wxMBConv::MB2WC method is called to
convert @a psz to wide string (the default converter uses current locale's
charset). It is ignored in ANSI build.
-
+
@see @ref overview_mbconvclasses "wxMBConv classes", @ref mbstr()
mb_str, @ref wcstr() wc_str
*/
Preallocate enough space for wxString to store @a nLen characters. This function
may be used to increase speed when the string is constructed by repeated
concatenation as in
-
+
because it will avoid the need to reallocate string memory many times (in case
of long strings). Note that it does not set the maximal length of a string - it
will still expand if more than @a nLen characters are stored in it. Also, it
return a new string which contains the original text converted to the upper or
lower case and leave the original string unchanged.
MakeUpper()
-
+
Upper()
-
+
MakeLower()
-
+
Lower()
*/
see overview() for the cases where it is necessary to
use it.
GetChar()
-
+
GetWritableChar()
-
+
SetChar()
-
+
Last()
-
+
@ref operatorbracket() "operator []"
-
+
@ref cstr() c_str
-
+
@ref mbstr() mb_str
-
+
@ref wcstr() wc_str
-
+
@ref fnstr() fn_str
-
+
@ref operatorconstcharpt() "operator const char*"
*/
doing direct string comparison as you would also have to precalculate the
length of the prefix then.
Cmp()
-
+
CmpNoCase()
-
+
IsSameAs()
-
+
Matches()
-
+
StartsWith()
-
+
EndsWith()
*/
//@{
/**
-
+
*/
bool operator ==(const wxString& x, const wxString& y);
bool operator ==(const wxString& x, const wxChar* t);
append something to a C string (including literal constants), so to do this it
should be converted to a wxString first.
@ref operatorout() "operator "
-
+
@ref plusequal() "operator +="
-
+
@ref operatorplus() "operator +"
-
+
Append()
-
+
Prepend()
*/
default which creates an empty string) there is also a corresponding assignment
operator.
@ref construct() wxString
-
+
@ref operatorassign() "operator ="
-
+
@ref destruct() ~wxString
*/
put the numeric value in and return @true if the @b entire string could be
converted to a number.
ToLong()
-
+
ToLongLong()
-
+
ToULong()
-
+
ToULongLong()
-
+
ToDouble()
*/
/**
This static function returns the string containing the result of calling
Printf() with the passed parameters on it.
-
+
@see FormatV(), Printf()
*/
static wxString Format(const wxChar format, ...);
/**
This static function returns the string containing the result of calling
PrintfV() with the passed parameters on it.
-
+
@see Format(), PrintfV()
*/
static wxString FormatV(const wxChar format, va_list argptr);
build, the string is interpreted as being in ISO-8859-1 encoding. The version
without @a len parameter takes NUL-terminated data.
This is a convenience method useful when storing binary data in wxString.
-
+
@wxsince{2.8.4}
-
+
@see wxString::To8BitData
*/
static wxString From8BitData(const char* buf, size_t len);
useful when working with some external API which requires the caller to provide
a writable buffer.
Alloc()
-
+
Shrink()
-
+
wxStringBuffer
-
+
wxStringBufferLength
*/
/**
Other string functions.
Trim()
-
+
Truncate()
-
+
Pad()
*/
characters written, or an integer less than zero on error.
Note that if @c wxUSE_PRINTF_POS_PARAMS is set to 1, then this function supports
Unix98-style positional parameters:
-
+
@b NB: This function will use a safe version of @e vsprintf() (usually called
@e vsnprintf()) whenever available to always allocate the buffer of correct
size. Unfortunately, this function is not available on all platforms and the
These functions replace the standard @e strchr() and @e strstr()
functions.
Find()
-
+
Replace()
*/
These functions return the string length and check whether the string is empty
or empty it.
Len()
-
+
IsEmpty()
-
+
@ref operatornot() operator!
-
+
Empty()
-
+
Clear()
*/
modify the original string and return a new string containing the extracted
substring.
Mid()
-
+
@ref operatorparenth() operator
-
+
Left()
-
+
Right()
-
+
BeforeFirst()
-
+
BeforeLast()
-
+
AfterFirst()
-
+
AfterLast()
-
+
StartsWith()
-
+
EndsWith()
*/
Converts the string to an 8-bit string in ISO-8859-1 encoding in the form of
a wxCharBuffer (Unicode builds only).
This is a convenience method useful when storing binary data in wxString.
-
+
@wxsince{2.8.4}
-
+
@see wxString::From8BitData
*/
const char* To8BitData() const;
success (the number is stored in the location pointed to by @e val) or @false
if the string does not represent such number (the value of @a val is not
modified in this case).
-
+
@see ToLong(), ToULong()
*/
bool ToDouble(double val) const;
that you may not want to specify the base 0 if you are parsing the numbers
which may have leading zeroes as they can yield unexpected (to the user not
familiar with C) results.
-
+
@see ToDouble(), ToULong()
*/
bool ToLong(long val, int base = 10) const;
Notice that currently it doesn't work (always returns @false) if parsing of 64
bit numbers is not supported by the underlying C run-time library. Compilers
with C99 support and Microsoft Visual C++ version 7 and higher do support this.
-
+
@see ToLong(), ToULongLong()
*/
bool ToLongLong(wxLongLong_t val, int base = 10) const;
(e.g. -1 is returned as @c ULONG_MAX).
See ToLong() for the more detailed
description of the @a base parameter.
-
+
@see ToDouble(), ToLong()
*/
bool ToULong(unsigned long val, int base = 10) const;
insertion operators exist (for basic types only). Additionally, the
Format() function allows to use simply append
formatted value to a string:
-
+
Format()
-
+
FormatV()
-
+
Printf()
-
+
PrintfV()
-
+
@ref operatorout() "operator "
*/
@c wchar_t*, use @ref charstr() char_str or
@ref wcharstr() wchar_string if you need to pass string value
to a function expecting non-const pointer.
-
+
@see @ref mbstr() mb_str, @ref wcstr() wc_str, @ref
fnstr() fn_str, @ref charstr() char_str, @ref
wcharstr() wchar_string
this function is only usable for passing strings to legacy libraries that
don't have const-correct API. Use wxStringBuffer if
you want to modify the string.
-
+
@see @ref mbstr() mb_str, @ref wcstr() wc_str, @ref
fnstr() fn_str, @ref cstr() c_str, @ref
wcharstr() wchar_str
In Unicode build, returned value can be either wide character string
or C string in charset matching the @c wxConvFileName object, depending on
the OS.
-
+
@see wxMBConv, @ref wcstr() wc_str, @ref wcstr() mb_str
*/
const wchar_t* fn_str() const;
method and returns wxCharBuffer. In ANSI build, this function is same
as @ref cstr() c_str.
The macro wxWX2MBbuf is defined as the correct return type (without const).
-
+
@see wxMBConv, @ref cstr() c_str, @ref wcstr() wc_str, @ref
fnstr() fn_str, @ref charstr() char_str
*/
method and returns wxWCharBuffer. In Unicode build, this function is same
as @ref cstr() c_str.
The macro wxWX2WCbuf is defined as the correct return type (without const).
-
+
@see wxMBConv, @ref cstr() c_str, @ref wcstr() mb_str, @ref
fnstr() fn_str, @ref wcharstr() wchar_str
*/
not be lost (depending on the build) and so this function is only usable for
passing strings to legacy libraries that don't have const-correct API. Use
wxStringBuffer if you want to modify the string.
-
+
@see @ref mbstr() mb_str, @ref wcstr() wc_str, @ref
fnstr() fn_str, @ref cstr() c_str, @ref
charstr() char_str
These functions are deprecated, please consider using new wxWidgets 2.0
functions instead of them (or, even better, std::string compatible variants).
CompareTo()
-
+
Contains()
-
+
First()
-
+
Freq()
-
+
Index()
-
+
IsAscii()
-
+
IsNull()
-
+
IsNumber()
-
+
IsWord()
-
+
Last()
-
+
Length()
-
+
LowerCase()
-
+
Remove()
-
+
Strip()
-
+
SubString()
-
+
UpperCase()
*/
};
/**
Gets an option. The function is case-insensitive to @e name.
Returns empty string if the option hasn't been set.
-
+
@see SetOption(), GetOptionInt(),
HasOption()
*/
/**
Gets an option as an integer. The function is case-insensitive to @e name.
If the option hasn't been set, this function returns 0.
-
+
@see SetOption(), GetOption(),
HasOption()
*/
/**
Returns @true if the given option is present. The function is
case-insensitive to @e name.
-
+
@see SetOption(), GetOption(),
GetOptionInt()
*/
//@{
/**
Returns the type of the entry. It should be one of the following:
-
+
When creating archives use just these values. When reading archives
any other values should be treated as @e wxTAR_REGTYPE.
*/
/**
Sets the paragraph alignment. These are the possible values for @e alignment:
-
+
Of these, wxTEXT_ALIGNMENT_JUSTIFIED is unimplemented. In future justification
may be supported
when printing or previewing, only.
/**
Sets the bullet style. The following styles can be passed:
-
+
Currently wxTEXT_ATTR_BULLET_STYLE_BITMAP is not supported.
*/
void SetBulletStyle(int style);
/**
Sets the text effects, a bit list of styles.
The following styles can be passed:
-
+
Of these, only wxTEXT_ATTR_EFFECT_CAPITALS and wxTEXT_ATTR_EFFECT_STRIKETHROUGH
are implemented.
wxTEXT_ATTR_EFFECT_CAPITALS capitalises text when displayed (leaving the case
//@{
/**
Constructor, creating and showing a text control.
-
+
@param parent
Parent window. Should not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@remarks The horizontal scrollbar (wxHSCROLL style flag) will only be
created for multi-line text controls. Without a
horizontal scrollbar, text lines that don't fit in the
character is inserted). Single line controls don't have
a horizontal scrollbar, the text is automatically
scrolled so that the insertion point is always visible.
-
+
@see Create(), wxValidator
*/
wxTextCtrl();
/**
Appends the text to the end of the text control.
-
+
@param text
Text to write to the text control.
-
+
@remarks After the text is appended, the insertion point will be at the
end of the text control. If this behaviour is not
desired, the programmer should use GetInsertionPoint
and SetInsertionPoint.
-
+
@see WriteText()
*/
void AppendText(const wxString& text);
text control using the given @e choices.
Notice that currently this function is only implemented in wxGTK2 and wxMSW
ports and does nothing under the other platforms.
-
+
@wxsince{2.9.0}
-
+
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
not supported by the current platform.
-
+
@see AutoCompleteFileNames()
*/
bool AutoComplete(const wxArrayString& choices);
text control using all valid file system paths.
Notice that currently this function is only implemented in wxGTK2 port and does
nothing under the other platforms.
-
+
@wxsince{2.9.0}
-
+
@returns @true if the auto-completion was enabled or @false if the
operation failed, typically because auto-completion is
not supported by the current platform.
-
+
@see AutoComplete()
*/
bool AutoCompleteFileNames();
event.
This is the only difference with SetValue().
See @ref overview_progevent "this topic" for more information.
-
+
@wxsince{2.7.1}
-
+
@param value
The new value to set. It may contain newline characters if the text control
is multi-line.
handler previously by wxWidgets.
Please note that this function doesn't currently work correctly for all keys
under any platform but MSW.
-
+
@returns @true if the event resulted in a change to the control, @false
otherwise.
*/
/**
Returns the style currently used for the new text.
-
+
@see SetDefaultStyle()
*/
const wxTextAttr GetDefaultStyle() const;
/**
Gets the length of the specified line, not including any trailing newline
character(s).
-
+
@param lineNo
Line number (starting from zero).
-
+
@returns The length of the line, or -1 if lineNo was invalid.
*/
int GetLineLength(long lineNo) const;
/**
Returns the contents of a given line in the text control, not including
any trailing newline character(s).
-
+
@param lineNo
The line number, starting from zero.
-
+
@returns The contents of the line.
*/
wxString GetLineText(long lineNo) const;
/**
Returns the number of lines in the text control buffer.
-
+
@remarks Note that even empty text controls have one line (where the
insertion point is), so GetNumberOfLines() never
returns 0.
under Windows (at least,) you should use
GetStringSelection() to get the selected
text.
-
+
@param from
The returned first position.
@param to
/**
Returns the style at this position in the text control. Not all platforms
support this function.
-
+
@returns @true on success, @false if an error occurred - it may also mean
that the styles are not supported under this platform.
-
+
@see SetStyle(), wxTextAttr
*/
bool GetStyle(long position, wxTextAttr& style);
@a row parameters (unless the pointers are @NULL which is allowed).
Please note that this function is currently only implemented in wxUniv,
wxMSW and wxGTK2 ports.
-
+
@see PositionToXY(), XYToPosition()
*/
wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
Returns @true if the control is currently empty. This is the same as
@c GetValue().empty() but can be much more efficient for the multiline
controls containing big amounts of text.
-
+
@wxsince{2.7.1}
*/
bool IsEmpty() const;
/**
Returns @true if the text has been modified by user. Note that calling
SetValue() doesn't make the control modified.
-
+
@see MarkDirty()
*/
bool IsModified() const;
/**
Returns @true if this is a multi line edit control and @false
otherwise.
-
+
@see IsSingleLine()
*/
bool IsMultiLine() const;
/**
Returns @true if this is a single line edit control and @false
otherwise.
-
+
@see @ref issingleline() IsMultiLine
*/
bool IsSingleLine() const;
/**
Loads and displays the named file, if it exists.
-
+
@param filename
The filename of the file to load.
@param fileType
The type of file to load. This is currently ignored in wxTextCtrl.
-
+
@returns @true if successful, @false otherwise.
*/
bool LoadFile(const wxString& filename,
/**
Mark text as modified (dirty).
-
+
@see IsModified()
*/
void MarkDirty();
/**
This event handler function implements default drag and drop behaviour, which
is to load the first dropped file into the control.
-
+
@param event
The drop files event.
-
+
@remarks This is not implemented on non-Windows platforms.
-
+
@see wxDropFilesEvent
*/
void OnDropFiles(wxDropFilesEvent& event);
/**
Converts given position to a zero-based column, line number pair.
-
+
@param pos
Position.
@param x
Receives zero based column number.
@param y
Receives zero based line number.
-
+
@returns @true on success, @false on failure (most likely due to a too
large position parameter).
-
+
@see XYToPosition()
*/
bool PositionToXY(long pos, long* x, long* y) const;
/**
Removes the text starting at the first given position up to (but not including)
the character at the last position.
-
+
@param from
The first position.
@param to
/**
Replaces the text starting at the first position up to (but not including)
the character at the last position with the given text.
-
+
@param from
The first position.
@param to
/**
Saves the contents of the control in a text file.
-
+
@param filename
The name of the file in which to save the text.
@param fileType
The type of file to save. This is currently ignored in wxTextCtrl.
-
+
@returns @true if the operation was successful, @false otherwise.
*/
bool SaveFile(const wxString& filename,
However if the @a style parameter is the default wxTextAttr, then the
default style is just reset (instead of being combined with the new style which
wouldn't change it at all).
-
+
@param style
The style for the new text.
-
+
@returns @true on success, @false if an error occurred - may also mean that
the styles are not supported under this platform.
-
+
@see GetDefaultStyle()
*/
bool SetDefaultStyle(const wxTextAttr& style);
/**
Makes the text item editable or read-only, overriding the @b wxTE_READONLY flag.
-
+
@param editable
If @true, the control is editable. If @false, the control is read-only.
-
+
@see IsEditable()
*/
virtual void SetEditable(const bool editable);
/**
Sets the insertion point at the given position.
-
+
@param pos
Position to set.
*/
/**
Marks the control as being modified by the user or not.
-
+
@see MarkDirty(), DiscardEdits()
*/
void SetModified(bool modified);
Selects the text starting at the first position up to (but not including) the
character at the last position. If both parameters are equal to -1 all text
in the control is selected.
-
+
@param from
The first position.
@param to
/**
Changes the style of the given range. If any attribute within @a style is
not set, the corresponding attribute from GetDefaultStyle() is used.
-
+
@param start
The start of the range to change.
@param end
The end of the range to change.
@param style
The new style for the range.
-
+
@returns @true on success, @false if an error occurred - it may also mean
that the styles are not supported under this platform.
-
+
@see GetStyle(), wxTextAttr
*/
bool SetStyle(long start, long end, const wxTextAttr& style);
event.
This function is deprecated and should not be used in new code. Please use the
ChangeValue() function instead.
-
+
@param value
The new value to set. It may contain newline characters if the text control
is multi-line.
/**
Makes the line containing the given position visible.
-
+
@param pos
The position that should be visible.
*/
/**
Writes the text into the text control at the current insertion position.
-
+
@param text
Text to write to the text control.
-
+
@remarks Newlines in the text string are the only control characters
allowed, and they will cause appropriate line breaks.
See () and AppendText() for more
/**
Converts the given zero based column and line number to a position.
-
+
@param x
The column number.
@param y
The line number.
-
+
@returns The position value, or -1 if x or y was invalid.
*/
long XYToPosition(long x, long y);
/**
The constructor starts redirecting output sent to @a ostr or @e cout for
the default parameter value to the text control @e text.
-
+
@param text
The text control to append output too, must be non-@NULL
@param ostr
public:
/**
Constructor. Use ShowModal() to show the dialog.
-
+
@param parent
Parent window.
@param message
/**
Gets the state of the toggle button.
-
+
@returns Returns @true if it is pressed, @false otherwise.
*/
bool GetValue() const;
/**
Sets the toggle button to the given state. This does not cause a
@c EVT_TOGGLEBUTTON event to be emitted.
-
+
@param state
If @true, the button is pressed.
*/
//@{
/**
Constructor, creating and showing a toggle button.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxToggleButton();
/**
Gets the state of the toggle button.
-
+
@returns Returns @true if it is pressed, @false otherwise.
*/
bool GetValue() const;
/**
Sets the toggle button to the given state. This does not cause a
@c EVT_TOGGLEBUTTON event to be emitted.
-
+
@param state
If @true, the button is pressed.
*/
Broadcasts to all waiting threads, waking all of them up. Note that this method
may be called whether the mutex associated with this condition is locked or
not.
-
+
@see Signal()
*/
void Broadcast();
signalled again to wake up any thread which may start waiting on it later.
Note that this method may be called whether the mutex associated with this
condition is locked or not.
-
+
@see Broadcast()
*/
void Signal();
Wait without waking up any thread, the thread would still wait for another one
and so it is important to ensure that the condition will be signalled after
Wait or the thread may sleep forever.
-
+
@returns Returns wxCOND_NO_ERROR on success, another value if an error
occurred.
-
+
@see WaitTimeout()
*/
wxCondError Wait();
This method is identical to Wait() except that it
returns, with the return code of @c wxCOND_TIMEOUT as soon as the given
timeout expires.
-
+
@param milliseconds
Timeout in milliseconds
*/
should call @ref wxThread::run GetThread()-Run to start running
it. You may optionally specify the stack size to be allocated to it (Ignored on
platforms that don't support setting it explicitly, eg. Unix).
-
+
@returns One of:
*/
wxThreadError Create(unsigned int stackSize = 0);
does not create or start execution of the real thread -- for this you should
use the Create() and Run() methods.
The possible values for @a kind parameters are:
-
+
@b wxTHREAD_DETACHED
-
+
Creates a detached thread.
-
+
@b wxTHREAD_JOINABLE
-
+
Creates a joinable thread.
*/
wxThread(wxThreadKind kind = wxTHREAD_DETACHED);
use a lot of threads (say several hundred), virtual adress space can get tight
unless you explicitly specify a smaller amount of thread stack space for each
thread.
-
+
@returns One of:
*/
wxThreadError Create(unsigned int stackSize = 0);
/**
Returns the number of system CPUs or -1 if the value is unknown.
-
+
@see SetConcurrency()
*/
static int GetCPUCount();
/**
Gets the priority of the thread, between zero and 100.
The following priorities are defined:
-
+
@b WXTHREAD_MIN_PRIORITY
-
+
0
-
+
@b WXTHREAD_DEFAULT_PRIORITY
-
+
50
-
+
@b WXTHREAD_MAX_PRIORITY
-
+
100
*/
int GetPriority() const;
after calling Create() but before calling
Run().
The following priorities are already defined:
-
+
@b WXTHREAD_MIN_PRIORITY
-
+
0
-
+
@b WXTHREAD_DEFAULT_PRIORITY
-
+
50
-
+
@b WXTHREAD_MAX_PRIORITY
-
+
100
*/
void SetPriority(int priority);
Increments the semaphore count and signals one of the waiting
threads in an atomic way. Returns wxSEMA_OVERFLOW if the count
would increase the counter past the maximum.
-
+
@returns One of:
*/
wxSemaError Post();
/**
Same as Wait(), but returns immediately.
-
+
@returns One of:
*/
wxSemaError TryWait();
/**
Wait indefinitely until the semaphore count becomes strictly positive
and then decrement it and return.
-
+
@returns One of:
*/
wxSemaError Wait();
/**
Locks the mutex object. This is equivalent to
LockTimeout() with infinite timeout.
-
+
@returns One of:
*/
wxMutexError Lock();
/**
Try to lock the mutex object during the specified time interval.
-
+
@returns One of:
*/
wxMutexError LockTimeout(unsigned long msec);
/**
Tries to lock the mutex object. If it can't, returns immediately with an error.
-
+
@returns One of:
*/
wxMutexError TryLock();
/**
Unlocks the mutex object.
-
+
@returns One of:
*/
wxMutexError Unlock();
function will be called repeatedly until the timer is stopped. If @true,
it will be called only once and the timer will stop automatically. To make your
code more readable you may also use the following symbolic constants:
-
+
wxTIMER_CONTINUOUS
-
+
Start a normal, continuously running, timer
-
+
wxTIMER_ONE_SHOT
-
+
Start a one shot timer
-
+
If the timer was already running, it will be stopped by this method before
restarting it.
*/
public:
/**
Constructor.
-
+
@param currentTip
The starting tip index.
*/
public:
/**
Constructor. The tip is shown immediately after the window is constructed.
-
+
@param parent
The parent window, must be non-@NULL
@param text
Additionally, if a non-empty @a rectBound is provided, the tip window will
also automatically close if the mouse leaves this area. This is useful to
dismiss the tip mouse when the mouse leaves the object it is associated with.
-
+
@param rectBound
The bounding rectangle for the mouse in the screen coordinates
*/
GetNextToken() or @c NUL if
there had been no calls to this function yet or if it returned the trailing
empty token in @c wxTOKEN_RET_EMPTY_ALL mode.
-
+
@wxsince{2.7.0}
*/
wxChar GetLastDelimiter();
//@{
/**
Constructs a toolbar.
-
+
@param parent
Pointer to a parent window.
@param id
Window style. See wxToolBar for details.
@param name
Window name.
-
+
@remarks After a toolbar is created, you use AddTool() and
perhaps AddSeparator(), and then you must call
Realize() to construct and display the toolbar
/**
Adds a new check (or toggle) tool to the toolbar. The parameters are the same
as in AddTool().
-
+
@see AddTool()
*/
wxToolBarToolBase* AddCheckTool(int toolId,
/**
Adds any control to the toolbar, typically e.g. a combobox.
-
+
@param control
The control to be added.
@param label
Text to be displayed near the control.
-
+
@remarks wxMSW: the label is only displayed if there is enough space
available below the embedded control.
*/
only one element as it would be impossible for the user to use such button.
By default, the first button in the radio group is initially pressed, the
others are not.
-
+
@see AddTool()
*/
wxToolBarToolBase* AddRadioTool(int toolId,
/**
Adds a separator for spacing groups of tools.
-
+
@see AddTool(), SetToolSeparation()
*/
void AddSeparator();
has fewer parameters than the full version at the price of not being able to
specify some of the more rarely used button features. The last version allows
you to add an existing tool.
-
+
@param toolId
An integer by which
the tool may be identified in subsequent operations.
retrieved later using GetToolClientData().
@param tool
The tool to be added.
-
+
@remarks After you have added tools to a toolbar, you must call
Realize() in order to have the tools appear.
-
+
@see AddSeparator(), AddCheckTool(), AddRadioTool(),
InsertTool(), DeleteTool(), Realize()
*/
Note that it is unnecessary to call Realize() for the
change to take place, it will happen immediately.
Returns @true if the tool was deleted, @false otherwise.
-
+
@see DeleteToolByPos()
*/
bool DeleteTool(int toolId);
/**
Enables or disables the tool.
-
+
@param toolId
Tool to enable or disable.
@param enable
If @true, enables the tool, otherwise disables it.
-
+
@remarks Some implementations will change the visible state of the tool
to indicate that it is disabled.
-
+
@see GetToolEnabled(), ToggleTool()
*/
void EnableTool(int toolId, bool enable);
/**
Finds a tool for the given mouse position.
-
+
@param x
X position.
@param y
Y position.
-
+
@returns A pointer to a tool if a tool is found, or @NULL otherwise.
-
+
@remarks Currently not implemented in wxGTK (always returns @NULL there).
*/
wxToolBarToolBase* FindToolForPosition(wxCoord x, wxCoord y) const;
/**
Returns the left/right and top/bottom margins, which are also used for
inter-toolspacing.
-
+
@see SetMargins()
*/
wxSize GetMargins() const;
/**
Returns the size of bitmap that the toolbar expects to have. The default bitmap
size is 16 by 15 pixels.
-
+
@remarks Note that this is the size of the bitmap you pass to
AddTool(), and not the eventual size of the
tool button.
-
+
@see SetToolBitmapSize(), GetToolSize()
*/
wxSize GetToolBitmapSize();
/**
Get any client data associated with the tool.
-
+
@param toolId
Id of the tool, as passed to AddTool().
-
+
@returns Client data, or @NULL if there is none.
*/
wxObject* GetToolClientData(int toolId) const;
/**
Called to determine whether a tool is enabled (responds to user input).
-
+
@param toolId
Id of the tool in question.
-
+
@returns @true if the tool is enabled, @false otherwise.
-
+
@see EnableTool()
*/
bool GetToolEnabled(int toolId) const;
/**
Returns the long help for the given tool.
-
+
@param toolId
The tool in question.
-
+
@see SetToolLongHelp(), SetToolShortHelp()
*/
wxString GetToolLongHelp(int toolId) const;
/**
Returns the value used for packing tools.
-
+
@see SetToolPacking()
*/
int GetToolPacking() const;
/**
Returns the default separator size.
-
+
@see SetToolSeparation()
*/
int GetToolSeparation() const;
/**
Returns the short help for the given tool.
-
+
@param toolId
The tool in question.
-
+
@see GetToolLongHelp(), SetToolShortHelp()
*/
wxString GetToolShortHelp(int toolId) const;
Returns the size of a whole button, which is usually larger than a tool bitmap
because
of added 3D effects.
-
+
@see SetToolBitmapSize(), GetToolBitmapSize()
*/
wxSize GetToolSize();
/**
Gets the on/off state of a toggle tool.
-
+
@param toolId
The tool in question.
-
+
@returns @true if the tool is toggled on, @false otherwise.
-
+
@see ToggleTool()
*/
bool GetToolState(int toolId) const;
/**
Inserts the control into the toolbar at the given position.
You must call Realize() for the change to take place.
-
+
@see AddControl(), InsertTool()
*/
wxToolBarToolBase* InsertControl(size_t pos, wxControl* control);
/**
Inserts the separator into the toolbar at the given position.
You must call Realize() for the change to take place.
-
+
@see AddSeparator(), InsertTool()
*/
wxToolBarToolBase* InsertSeparator(size_t pos);
Inserts the tool with the specified attributes into the toolbar at the given
position.
You must call Realize() for the change to take place.
-
+
@see AddTool(), InsertControl(), InsertSeparator()
*/
wxToolBarToolBase* InsertTool(size_t pos, int toolId,
Called when the user clicks on a tool with the left mouse button.
This is the old way of detecting tool clicks; although it will still work,
you should use the EVT_MENU or EVT_TOOL macro instead.
-
+
@param toolId
The identifier passed to AddTool().
@param toggleDown
@true if the tool is a toggle and the toggle is down, otherwise is @false.
-
+
@returns If the tool is a toggle and this function returns @false, the
toggle toggle state (internal and visual) will not be
changed. This provides a way of specifying that toggle
operations are not permitted in some circumstances.
-
+
@see OnMouseEnter(), OnRightClick()
*/
bool OnLeftClick(int toolId, bool toggleDown);
This is the old way of detecting mouse enter events; although it will still
work,
you should use the EVT_TOOL_ENTER macro instead.
-
+
@param toolId
Greater than -1 if the mouse cursor has moved into the tool,
or -1 if the mouse cursor has moved. The
programmer can override this to provide extra information about the tool,
such as a short description on the status line.
-
+
@remarks With some derived toolbar classes, if the mouse moves quickly
out of the toolbar, wxWidgets may not be able to detect
it. Therefore this function may not always be called
programmer should override this function to detect right tool clicks.
This is the old way of detecting tool right clicks; although it will still work,
you should use the EVT_TOOL_RCLICKED macro instead.
-
+
@param toolId
The identifier passed to AddTool().
@param x
The x position of the mouse cursor.
@param y
The y position of the mouse cursor.
-
+
@remarks A typical use of this member might be to pop up a menu.
-
+
@see OnMouseEnter(), OnLeftClick()
*/
void OnRightClick(int toolId, float x, float y);
insert/add this tool back to this (or another) toolbar later.
Note that it is unnecessary to call Realize() for the
change to take place, it will happen immediately.
-
+
@see DeleteTool()
*/
wxToolBarToolBase* RemoveTool(int id);
//@{
/**
Set the values to be used as margins for the toolbar.
-
+
@param size
Margin size.
@param x
Left margin, right margin and inter-tool separation value.
@param y
Top margin, bottom margin and inter-tool separation value.
-
+
@remarks This must be called before the tools are added if absolute
positioning is to be used, and the default (zero-size)
margins are to be overridden.
-
+
@see GetMargins(), wxSize
*/
void SetMargins(const wxSize& size);
/**
Sets the default size of each tool bitmap. The default bitmap size is 16 by 15
pixels.
-
+
@param size
The size of the bitmaps in the toolbar.
-
+
@remarks This should be called to tell the toolbar what the tool bitmap
size is. Call it before you add tools.
-
+
@see GetToolBitmapSize(), GetToolSize()
*/
void SetToolBitmapSize(const wxSize& size);
/**
Sets the long help for the given tool.
-
+
@param toolId
The tool in question.
@param helpString
A string for the long help.
-
+
@remarks You might use the long help for displaying the tool purpose on
the status line.
-
+
@see GetToolLongHelp(), SetToolShortHelp(),
*/
void SetToolLongHelp(int toolId, const wxString& helpString);
/**
Sets the value used for spacing tools. The default value is 1.
-
+
@param packing
The value for packing.
-
+
@remarks The packing is used for spacing in the vertical direction if the
toolbar is horizontal, and for spacing in the
horizontal direction if the toolbar is vertical.
-
+
@see GetToolPacking()
*/
void SetToolPacking(int packing);
/**
Sets the default separator size. The default value is 5.
-
+
@param separation
The separator size.
-
+
@see AddSeparator()
*/
void SetToolSeparation(int separation);
/**
Sets the short help for the given tool.
-
+
@param toolId
The tool in question.
@param helpString
The string for the short help.
-
+
@remarks An application might use short help for identifying the tool
purpose in a tooltip.
-
+
@see GetToolShortHelp(), SetToolLongHelp()
*/
void SetToolShortHelp(int toolId, const wxString& helpString);
/**
Toggles a tool on or off. This does not cause any event to get emitted.
-
+
@param toolId
Tool in question.
@param toggle
If @true, toggles the tool on, otherwise toggles it off.
-
+
@remarks Only applies to a tool that has been specified as a toggle tool.
*/
void ToggleTool(int toolId, bool toggle);
public:
/**
Returns @true if the platform supports making the window translucent.
-
+
@see SetTransparent()
*/
virtual bool CanSetTransparent();
/**
Centres the window on screen.
-
+
@param direction
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH.
-
+
@see wxWindow::CentreOnParent
*/
void CentreOnScreen(int direction = wxBOTH);
/**
Returns the standard icon of the window. The icon will be invalid if it hadn't
been previously set by SetIcon().
-
+
@see GetIcons()
*/
const wxIcon GetIcon() const;
SetIcons() had been called before.
Use GetIcon() to get the main icon of the
window.
-
+
@see wxIconBundle
*/
const wxIconBundle GetIcons() const;
/**
Gets a string containing the window title.
-
+
@see SetTitle()
*/
wxString GetTitle() const;
/**
Iconizes or restores the window.
-
+
@param iconize
If @true, iconizes the window; if @false, shows and restores it.
-
+
@see IsIconized(), Maximize().
*/
void Iconize(bool iconize);
/**
Returns @true if the window is in fullscreen mode.
-
+
@see ShowFullScreen()
*/
bool IsFullScreen();
@b @c This method is specific to wxUniversal port
Returns @true if this window is using native decorations, @false if we draw
them ourselves.
-
+
@see UseNativeDecorations(),
UseNativeDecorationsByDefault()
*/
/**
Maximizes or restores the window.
-
+
@param maximize
If @true, maximizes the window, otherwise it restores it.
-
+
@see Iconize()
*/
void Maximize(bool maximize);
/**
Changes the default item for the panel, usually @a win is a button.
-
+
@see GetDefaultItem()
*/
void SetDefaultItem(wxWindow win);
/**
Sets the icon for this window.
-
+
@param icon
The icon to associate with this window.
-
+
@remarks The window takes a 'copy' of icon, but since it uses reference
counting, the copy is very quick. It is safe to delete
icon after calling this function.
different icons for different situations (e.g. task switching bar, taskbar,
window title bar) instead of scaling, with possibly bad looking results, the
only icon set by SetIcon().
-
+
@param icons
The icons to associate with this window.
-
+
@see wxIconBundle.
*/
void SetIcons(const wxIconBundle& icons);
Sets action or menu activated by pressing left hardware button on the smart
phones.
Unavailable on full keyboard machines.
-
+
@param id
Identifier for this button.
@param label
Text to be displayed on the screen area dedicated to this hardware button.
@param subMenu
The menu to be opened after pressing this hardware button.
-
+
@see SetRightMenu().
*/
void SetLeftMenu(int id = wxID_ANY,
Sets action or menu activated by pressing right hardware button on the smart
phones.
Unavailable on full keyboard machines.
-
+
@param id
Identifier for this button.
@param label
Text to be displayed on the screen area dedicated to this hardware button.
@param subMenu
The menu to be opened after pressing this hardware button.
-
+
@see SetLeftMenu().
*/
void SetRightMenu(int id = wxID_ANY,
Allows specification of minimum and maximum window sizes, and window size
increments.
If a pair of values is not set (or set to -1), no constraints will be used.
-
+
@param incW
Specifies the increment for sizing the width (GTK/Motif/Xt only).
@param incH
@param incSize
Increment size (only taken into account under X11-based
ports such as wxGTK/wxMotif/wxX11).
-
+
@remarks Notice that this function not only prevents the user from
resizing the window outside the given bounds but it
also prevents the program itself from doing it using
/**
Sets the window title.
-
+
@param title
The window title.
-
+
@see GetTitle()
*/
virtual void SetTitle(const wxString& title);
/**
If the platform supports it will set the window to be translucent
-
+
@param alpha
Determines how opaque or transparent the window will
be, if the platform supports the opreration. A value of 0 sets the
This function has not been tested with MDI frames.
Note that showing a window full screen also actually
@ref wxWindow::show Show()s if it hadn't been shown yet.
-
+
@see IsFullScreen()
*/
bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
Use native or custom-drawn decorations for this window only. Notice that to
have any effect this method must be called before really creating the window,
i.e. two step creation must be used:
-
+
@see UseNativeDecorationsByDefault(),
IsUsingNativeDecorations()
*/
//@{
/**
Creates an empty TreeBook control.
-
+
@param parent
The parent window. Must be non-@NULL.
@param id
/**
Sets the image list for the page control and takes ownership of the list.
-
+
@see wxImageList, SetImageList()
*/
void AssignImageList(wxImageList* imageList);
/**
Sets the image list for the page control. It does not take ownership of the
image list, you must delete it yourself.
-
+
@see wxImageList, AssignImageList()
*/
void SetImageList(wxImageList* imageList);
The call to this function generates the page changing events.
This function is deprecated and should not be used in new code. Please use the
ChangeSelection() function instead.
-
+
@see GetSelection()
*/
int SetSelection(size_t n);
public:
/**
Default constructor.
-
+
In addition, the following methods are added in wxPython for accessing
the object:
-
+
@b GetData()
-
+
Returns a reference to the Python Object
-
+
@b SetData(obj)
-
+
Associates a new Python Object with the
wxTreeItemData
*/
//@{
/**
Constructor, creating and showing a tree control.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
Window validator.
@param name
Window name.
-
+
@see Create(), wxValidator
*/
wxTreeCtrl();
/**
Collapses the root item.
-
+
@see ExpandAll()
*/
void CollapseAll();
/**
Collapses this item and all of its children, recursively.
-
+
@see ExpandAllChildren()
*/
void CollapseAllChildren(const wxTreeItemId& item);
If the user changed the label (i.e. s/he does not press ESC or leave
the text control without changes, a EVT_TREE_END_LABEL_EDIT event
will be sent which can be vetoed as well.
-
+
@see EndEditLabel(), wxTreeEvent
*/
void EditLabel(const wxTreeItemId& item);
/**
Ends label editing. If @a cancelEdit is @true, the edit will be cancelled.
This function is currently supported under Windows only.
-
+
@see EditLabel()
*/
void EndEditLabel(bool cancelEdit);
GetFirstChild and GetNextChild should be the same variable.
Returns an invalid tree item (i.e. IsOk() returns @false) if there are no
further children.
-
+
@see GetNextChild(), GetNextSibling()
*/
wxTreeItemId GetFirstChild(const wxTreeItemId& item,
/**
Returns the last child of the item (or an invalid tree item if this item has no
children).
-
+
@see GetFirstChild(), GetNextSibling(),
GetLastChild()
*/
enumeration on one and the same object simultaneously). The cookie passed to
GetFirstChild and GetNextChild should be the same.
Returns an invalid tree item if there are no further children.
-
+
@see GetFirstChild()
*/
wxTreeItemId GetNextChild(const wxTreeItemId& item,
Returns the next sibling of the specified item; call GetPrevSibling() for the
previous sibling.
Returns an invalid tree item if there are no further siblings.
-
+
@see GetPrevSibling()
*/
wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
Returns the previous sibling of the specified item; call GetNextSibling() for
the next sibling.
Returns an invalid tree item if there are no further children.
-
+
@see GetNextSibling()
*/
wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
/**
Returns @true if the control will use a quick calculation for the best size,
looking only at the first and last items. The default is @false.
-
+
@see SetQuickBestSize()
*/
bool GetQuickBestSize() const;
Calculates which (if any) item is under the given point, returning the tree item
id at this point plus extra information @e flags. @a flags is a bitlist of the
following:
-
+
wxTREE_HITTEST_ABOVE
-
+
Above the client area.
-
+
wxTREE_HITTEST_BELOW
-
+
Below the client area.
-
+
wxTREE_HITTEST_NOWHERE
-
+
In the client area but below the last item.
-
+
wxTREE_HITTEST_ONITEMBUTTON
-
+
On the button associated with an item.
-
+
wxTREE_HITTEST_ONITEMICON
-
+
On the bitmap associated with an item.
-
+
wxTREE_HITTEST_ONITEMINDENT
-
+
In the indentation associated with an item.
-
+
wxTREE_HITTEST_ONITEMLABEL
-
+
On the label (string) associated with an item.
-
+
wxTREE_HITTEST_ONITEMRIGHT
-
+
In the area to the right of an item.
-
+
wxTREE_HITTEST_ONITEMSTATEICON
-
+
On the state icon for a tree view item that is in a user-defined state.
-
+
wxTREE_HITTEST_TOLEFT
-
+
To the right of the client area.
-
+
wxTREE_HITTEST_TORIGHT
-
+
To the left of the client area.
*/
wxTreeItemId HitTest(const wxPoint& point, int& flags) const;
Sets the item's font. All items in the tree should have the same height to avoid
text clipping, so the fonts height should be the same for all of them,
although font attributes may vary.
-
+
@see SetItemBold()
*/
void SetItemFont(const wxTreeItemId& item, const wxFont& font);
the best size,
looking only at the first and last items. Otherwise, it will look at all items.
The default is @false.
-
+
@see GetQuickBestSize()
*/
void SetQuickBestSize(bool quickBestSize);
OnCompareItems() method of wxTreeCtrl. You
should override that method to change the sort order (the default is ascending
case-sensitive alphabetical order).
-
+
@see wxTreeItemData, OnCompareItems()
*/
void SortChildren(const wxTreeItemId& item);
/**
)
Constructs a text stream associated to the given input stream.
-
+
@param stream
The underlying input stream.
@param sep
/**
Reads a word (a sequence of characters until the next separator) from the
input stream.
-
+
@see SetStringSeparators()
*/
wxString ReadWord();
/**
)
Constructs a text stream object associated to the given output stream.
-
+
@param stream
The output stream.
@param mode
//@{
/**
Copies this URI from another URI.
-
+
@param uri
URI (Uniform Resource Identifier) to initialize with
*/
/**
Creates this URI from the string
-
+
@param uri.
-
+
Returns the position at which parsing stopped (there
is no such thing as an "invalid" wxURI).
-
+
uri
string to initialize from
*/
/**
Obtains the host type of this URI, which is of type
HostType():
-
+
@b wxURI_REGNAME
-
+
Server is a host name, or the Server component itself is undefined.
-
+
@b wxURI_IPV4ADDRESS
-
+
Server is a IP version 4 address (XXX.XXX.XXX.XXX)
-
+
@b wxURI_IPV6ADDRESS
-
+
Server is a IP version 6 address ((XXX:)XXX::(XXX)XXX:XXX
-
+
@b wxURI_IPVFUTURE
-
+
Server is an IP address, but not versions 4 or 6
*/
const HostType GetHostType() const;
To obtain individual components you can use
one of the following methods
GetScheme()
-
+
GetUserInfo()
-
+
GetServer()
-
+
GetPort()
-
+
GetPath()
-
+
GetQuery()
-
+
GetFragment()
However, you should check HasXXX before
calling a get method, which determines whether or not the component referred
to by the method is defined according to RFC 2396.
Consider an undefined component equivalent to a
@NULL C string.
-
+
HasScheme()
-
+
HasUserInfo()
-
+
HasServer()
-
+
@ref hasserver() HasPort
-
+
HasPath()
-
+
HasQuery()
-
+
HasFragment()
Example:
*/
of this URI is not absolute (does not begin with '/'), the path
of the base's is merged with this URI's path, resulting in the URI
"http://mysite.com/john/mydir".
-
+
@param base
Base URI to inherit from. Must be a full URI and not a reference
@param flags
This is the preferred over deprecated wxURL::ConvertFromURI.
If you want to unescape an entire wxURI, use BuildUnescapedURI() instead,
as it performs some optimizations over this method.
-
+
@param uri
string with escaped characters to convert
*/
/**
Compares this URI to another URI, and returns @true if
this URI equals
-
+
@param uricomp, otherwise it returns @false.
-
+
uricomp
URI to compare to
*/
It is valid to leave out the hostname but slashes must remain in place -
i.e. a file URL without a hostname must contain three consecutive slashes
(e.g. @c file:///somepath/myfile).
-
+
@param url
Url string to parse.
*/
/**
Returns the last error. This error refers to the URL parsing or to the protocol.
It can be one of these errors:
-
+
@b wxURL_NOERR
-
+
No error.
-
+
@b wxURL_SNTXERR
-
+
Syntax error in the URL string.
-
+
@b wxURL_NOPROTO
-
+
Found no protocol which can get this URL.
-
+
@b wxURL_NOHOST
-
+
A host name is required for this protocol.
-
+
@b wxURL_NOPATH
-
+
A path is required for this protocol.
-
+
@b wxURL_CONNERR
-
+
Connection error.
-
+
@b wxURL_PROTOERR
-
+
An error occurred during negotiation.
*/
wxURLError GetError() const;
Note that this method is somewhat deprecated, all future wxWidgets applications
should really use wxFileSystem instead.
Example:
-
+
@returns Returns the initialized stream. You will have to delete it
yourself.
-
+
@see wxInputStream
*/
wxInputStream* GetInputStream();
/**
Sets the default proxy server to use to get the URL. The string specifies
the proxy like this: hostname:port number.
-
+
@param url_proxy
Specifies the proxy to use
-
+
@see SetProxy()
*/
static void SetDefaultProxy(const wxString& url_proxy);
/**
Sets the proxy to use for this URL.
-
+
@see SetDefaultProxy()
*/
void SetProxy(const wxString& url_proxy);
/**
Constructor taking a wxDateTime pointer. This will be
used for wxDatePickerCtrl.
-
+
@param validator
Validator to copy.
@param valPtr
//@{
/**
Constructor, taking a style and optional pointer to a wxString variable.
-
+
@param style
A bitlist of flags, which can be:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
wxFILTER_NONE
-
-
-
-
+
+
+
+
No filtering takes place.
-
-
-
-
-
+
+
+
+
+
wxFILTER_ASCII
-
-
-
-
+
+
+
+
Non-ASCII characters are filtered out.
-
-
-
-
-
+
+
+
+
+
wxFILTER_ALPHA
-
-
-
-
+
+
+
+
Non-alpha characters are filtered out.
-
-
-
-
-
+
+
+
+
+
wxFILTER_ALPHANUMERIC
-
-
-
-
+
+
+
+
Non-alphanumeric characters are filtered out.
-
-
-
-
-
+
+
+
+
+
wxFILTER_NUMERIC
-
-
-
-
+
+
+
+
Non-numeric characters are filtered out.
-
-
-
-
-
+
+
+
+
+
wxFILTER_INCLUDE_LIST
-
-
-
-
+
+
+
+
Use an include list. The validator
checks if the user input is on the list, complaining if not. See
SetIncludes().
-
-
-
-
-
+
+
+
+
+
wxFILTER_EXCLUDE_LIST
-
-
-
-
+
+
+
+
Use an exclude list. The validator
checks if the user input is on the list, complaining if it is. See
SetExcludes().
-
-
-
-
-
+
+
+
+
+
wxFILTER_INCLUDE_CHAR_LIST
-
-
-
-
+
+
+
+
Use an include list. The validator
checks if each input character is in the list (one character per list
element), complaining if not.
See SetIncludes().
-
-
-
-
-
+
+
+
+
+
wxFILTER_EXCLUDE_CHAR_LIST
-
-
-
-
+
+
+
+
Use an include list. The validator
checks if each input character is in the list (one character per list
element), complaining if it is.
//@}
/**
-
+
*/
size_type capacity() const;
/**
This is a macro which evaluates to @true if the current wxWidgets version
is at least major.minor.release.
-
+
For example, to test if the program is compiled with wxWidgets 2.2 or
higher, the following can be done:
-
+
@code
wxString s;
#if wxCHECK_VERSION(2, 2, 0)
Returns @true if any items were changed, i.e. if there had been any
selected items before, or @false if all the items were already deselected.
This method is only valid for multi selection listboxes.
-
+
@see SelectAll(), Select()
*/
bool DeselectAll();
calls to GetNextSelected(). It is needed in
order to allow parallel iterations over the selected items.
Here is a typical example of using these functions:
-
+
This method is only valid for multi selection listboxes.
*/
int GetFirstSelected(unsigned long& cookie) const;
/**
Get the number of items in the control.
-
+
@see SetItemCount()
*/
size_t GetItemCount() const;
/**
Returns the margins used by the control. The @c x field of the returned
point is the horizontal margin and the @c y field is the vertical one.
-
+
@see SetMargins()
*/
wxPoint GetMargins() const;
Returns the index of the next selected item or @c wxNOT_FOUND if there are
no more.
This method is only valid for multi selection listboxes.
-
+
@see GetFirstSelected()
*/
int GetNextSelected(unsigned long& cookie) const;
Returns the number of the items currently selected.
It is valid for both single and multi selection controls. In the former case it
may only return 0 or 1 however.
-
+
@see IsSelected(), GetFirstSelected(),
GetNextSelected()
*/
/**
Returns the background colour used for the selected cells. By default the
standard system colour is used.
-
+
@see wxSystemSettings::GetColour, SetSelectionBackground()
*/
const wxColour GetSelectionBackground() const;
/**
The derived class must implement this function to actually draw the item
with the given index on the provided DC.
-
+
@param dc
The device context to use for drawing
@param rect
passed to it may be modified, typically to deflate it a bit before passing to
OnDrawItem().
The base class version of this method doesn't do anything.
-
+
@param dc
The device context to use for drawing
@param rect
Returns @true if any items were changed, i.e. if there had been any
unselected items before, or @false if all the items were already selected.
This method is only valid for multi selection listboxes.
-
+
@see DeselectAll(), Select()
*/
bool SelectAll();
Return @true if the items selection status has changed or @false
otherwise.
This method is only valid for multi selection listboxes.
-
+
@see SelectAll(), Select()
*/
bool SelectRange(size_t from, size_t to);
Notice that using non-default background colour may result in control having
appearance different from the similar native controls and so should in general
be avoided.
-
+
@see GetSelectionBackground()
*/
void SetSelectionBackground(const wxColour& col);
/**
Returns the number of columns the target window contains.
-
+
@see SetColumnCount()
*/
size_t GetColumnCount() const;
/**
Returns the number of rows the target window contains.
-
+
@see SetRowCount()
*/
size_t GetRowCount() const;
represents 10 device units (which may not be the case since this class allows
for variable scroll unit sizes), a call to this function with a coordinate of
15 will return -85.
-
+
@see CalcUnscrolledPosition()
*/
int CalcScrolledPosition(int coord) const;
unit represents 10 device units (which may not be the case since this class
allows for variable scroll unit sizes), a call to this function with a
coordinate of 15 will return 115.
-
+
@see CalcScrolledPosition()
*/
int CalcUnscrolledPosition(int coord) const;
This function needs to be overridden in the in the derived class to return the
window size with respect to the opposing orientation. If this is a vertical
scrolled window, it should return the height.
-
+
@see GetOrientationTargetSize()
*/
virtual int GetNonOrientationTargetSize() const;
This function needs to be overridden in the in the derived class to return the
window size with respect to the orientation this helper is working with. If
this is a vertical scrolled window, it should return the width.
-
+
@see GetNonOrientationTargetSize()
*/
virtual int GetOrientationTargetSize() const;
/**
This function will return the target window this helper class is currently
scrolling.
-
+
@see SetTargetWindow()
*/
wxWindow* GetTargetWindow() const;
want it to scroll (part of) another window (e.g. a child of it in order to
scroll only a portion the area between the scrollbars like a spreadsheet where
only the cell area will move).
-
+
@see GetTargetWindow()
*/
void SetTargetWindow(wxWindow* target);
one.
Note that @c wxVSCROLL is always automatically added to our style, there is
no need to specify it explicitly.
-
+
@param parent
The parent window, must not be @NULL
@param id
You are encouraged to update any existing code using these function to use
the new replacements mentioned below, and avoid using these functions for
any new code as they are deprecated.
-
+
Deprecated for wxVarVScrollHelper::SetRowCount.
*/
size_t GetFirstVisibleLine();
one.
Note that @c wxHSCROLL and @c wxVSCROLL are always automatically added
to our styles, there is no need to specify it explicitly.
-
+
@param parent
The parent window, must not be @NULL
@param id
window (pixels) are actually moved. When this is @false, you are
responsible for repainting any invalidated areas of the window yourself to
account for the new scroll position.
-
+
@param vscrolling
Specifies if physical scrolling should be turned on when scrolling
vertically.
/**
Returns the number of columns and rows the target window contains.
-
+
@see SetRowColumnCount()
*/
wxSize GetRowColumnCount() const;
one.
Note that @c wxHSCROLL is always automatically added to our style, there is
no need to specify it explicitly.
-
+
@param parent
The parent window, must not be @NULL
@param id
/**
Constructs a window, which can be a child of a frame, dialog or any other
non-control window.
-
+
@param parent
Pointer to a parent window.
@param id
the @b delete operator explicitly, you should normally
use Destroy() so that wxWidgets
can delete a window only when it is safe to do so, in idle time.
-
+
@see @ref overview_windowdeletionoverview "Window deletion overview",
Destroy(), wxCloseEvent
*/
This method may be overridden in the derived classes to return @false to
indicate that this control doesn't accept input at all (i.e. behaves like e.g.
wxStaticText) and so doesn't need focus.
-
+
@see AcceptsFocusFromKeyboard()
*/
bool AcceptsFocus() const;
functions so should not be required by the application programmer.
Notice that this function is mostly internal to wxWidgets and shouldn't be
called by the user code.
-
+
@param child
Child window to add.
*/
/**
Call this function to force one or both scrollbars to be always shown, even if
the window is big enough to show its entire contents without scrolling.
-
+
@wxsince{2.9.0}
-
+
@param hflag
Whether the horizontal scroll bar should always be visible.
@param vflag
Whether the vertical scroll bar should always be visible.
-
+
@remarks This function is currently only implemented under Mac/Carbon.
*/
void AlwaysShowScrollbars(bool hflag, bool vflag);
must handle wxMouseCaptureLostEvent
and cancel this operation when it receives the event. The event handler must
not recapture mouse.
-
+
@see ReleaseMouse(), wxMouseCaptureLostEvent
*/
virtual void CaptureMouse();
/**
Centres the window.
-
+
@param direction
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH. It may also include wxCENTRE_ON_SCREEN flag
if you want to center the window on the entire screen and not on its
parent window.
-
+
@remarks If the window is a top level one (i.e. doesn't have a parent),
it will be centered relative to the screen anyhow.
-
+
@see Center()
*/
void Centre(int direction = wxBOTH);
/**
Centres the window on its parent. This is a more readable synonym for
Centre().
-
+
@param direction
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH.
-
+
@remarks This methods provides for a way to center top level windows over
their parents instead of the entire screen. If there
is no parent or if the window is not a top level
window, then behaviour is the same as Centre().
-
+
@see wxTopLevelWindow::CentreOnScreen
*/
void CentreOnParent(int direction = wxBOTH);
//@{
/**
Converts to screen coordinates from coordinates relative to this window.
-
+
@param x
A pointer to a integer value for the x coordinate. Pass the client
coordinate in, and
Converts window size @a size to corresponding client area size. In
other words, the returned value is what would GetClientSize() return if
this window had given window size. Components with wxDefaultCoord value
- are left unchanged.
+ are left unchanged.
Note that the conversion is not always exact, it assumes that
non-client area doesn't change and so doesn't take into account things
@param force
@false if the window's close handler should be able to veto the destruction
of this window, @true if it cannot.
-
+
@remarks Close calls the close handler for the window, providing an
opportunity for the window to choose whether to destroy
the window. Usually it is only used with the top level
windows (wxFrame and wxDialog classes) as the others
are not supposed to have any special OnClose() logic.
-
+
@see @ref overview_windowdeletionoverview "Window deletion overview",
Destroy(), wxCloseEvent
*/
For the y dimension, the dialog units are multiplied by the average character
height
and then divided by 8.
-
+
@remarks Dialog units are used for maintaining a dialog's proportions
even if the font changes.
-
+
@see ConvertPixelsToDialog()
*/
wxPoint ConvertDialogToPixels(const wxPoint& pt);
For the y dimension, the pixels are multiplied by 8 and then divided by the
average
character height.
-
+
@remarks Dialog units are used for maintaining a dialog's proportions
even if the font changes.
-
+
@see ConvertDialogToPixels()
*/
wxPoint ConvertPixelsToDialog(const wxPoint& pt);
have been processed. This prevents problems with events being sent to
non-existent
windows.
-
+
@returns @true if the window has either been successfully deleted, or it
has been added to the list of windows pending real
deletion.
/**
Disables the window, same as @ref enable() Enable(@false).
-
+
@returns Returns @true if the window has been disabled, @false if it had
been already disabled before the call to this function.
*/
/**
Enables or disables eligibility for drop file events (OnDropFiles).
-
+
@param accept
If @true, the window is eligible for drop file events. If @false, the window
will not accept drop file events.
-
+
@remarks Windows only.
*/
virtual void DragAcceptFiles(bool accept);
Enable or disable the window for user input. Note that when a parent window is
disabled, all of its children are disabled as well and they are reenabled again
when the parent is.
-
+
@param enable
If @true, enables the window for input. If @false, disables the window.
-
+
@returns Returns @true if the window has been enabled or disabled, @false
if nothing was done, i.e. if the window had already
been in the specified state.
-
+
@see IsEnabled(), Disable(), wxRadioBox::Enable
*/
virtual bool Enable(bool enable = true);
/**
Finds the window or control which currently has the keyboard focus.
-
+
@remarks Note that this is a static function, so it can be called without
needing a wxWindow pointer.
-
+
@see SetFocus(), HasFocus()
*/
static wxWindow* FindFocus();
frames and dialog boxes; if non-@NULL, the search will be limited to the given
window hierarchy.
The search is recursive in both cases.
-
+
@see FindWindow()
*/
static wxWindow* FindWindowById(long id, wxWindow* parent = NULL);
frames and dialog boxes; if non-@NULL, the search will be limited to the given
window hierarchy.
The search is recursive in both cases.
-
+
@see FindWindow()
*/
static wxWindow* FindWindowByLabel(const wxString& label,
The search is recursive in both cases.
If no window with such name is found,
FindWindowByLabel() is called.
-
+
@see FindWindow()
*/
static wxWindow* FindWindowByName(const wxString& name,
sizers are used for the subwindows layout. Also, if the window has exactly one
subwindow it is better (faster and the result is more precise as Fit adds some
margin to account for fuzziness of its calculations) to call
-
+
instead of calling Fit.
*/
virtual void Fit();
a wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all
controls so it is mostly just a hint to wxWidgets and not a mandatory
directive.
-
+
@see wxWindowUpdateLocker
*/
virtual void Freeze();
/**
Returns the background colour of the window.
-
+
@see SetBackgroundColour(), SetForegroundColour(),
GetForegroundColour()
*/
/**
Returns the background style of the window. The background style can be one of:
-
+
wxBG_STYLE_SYSTEM
-
+
Use the default background, as determined by
the system or the current theme.
-
+
wxBG_STYLE_COLOUR
-
+
Use a solid colour for the background, this
style is set automatically if you call
SetBackgroundColour() so you only need to
set it explicitly if you had changed the background style to something else
before.
-
+
wxBG_STYLE_CUSTOM
-
+
Don't draw the background at all, it's
supposed that it is drawn by the user-defined erase background event handler.
This style should be used to avoid flicker when the background is entirely
custom-drawn.
-
+
wxBG_STYLE_TRANSPARET
-
+
The background is (partially) transparent,
this style is automatically set if you call
SetTransparent() which is used to set the
transparency level.
-
+
@see SetBackgroundColour(), GetForegroundColour(),
SetBackgroundStyle(), SetTransparent()
*/
/**
Returns the currently captured window.
-
+
@see HasCapture(), CaptureMouse(), ReleaseMouse(),
wxMouseCaptureLostEvent, wxMouseCaptureChangedEvent
*/
if it was not possible to determine the default control appearance or,
especially for the background colour, if the field doesn't make sense as is
the case for @c colBg for the controls with themed background.
-
+
@see InheritAttributes()
*/
static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
scrollbars, etc.
Note that if this window is a top-level one and it is currently minimized, the
return size is empty (both width and height are 0).
-
+
@param width
Receives the client width in pixels.
@param height
Receives the client height in pixels.
-
+
@see GetSize(), GetVirtualSize()
*/
void GetClientSize(int* width, int* height) const;
/**
Return the cursor associated with this window.
-
+
@see SetCursor()
*/
const wxCursor GetCursor() const;
/**
Returns the associated drop target, which may be @NULL.
-
+
@see SetDropTarget(), @ref overview_wxdndoverview
*/
wxDropTarget* GetDropTarget() const;
Merges the window's best size into the min size and returns the
result. This is the value used by sizers to determine the appropriate
ammount of space to allocate for the widget.
-
+
@see GetBestSize(), SetInitialSize()
*/
wxSize GetEffectiveMinSize() const;
/**
Returns the event handler for this window. By default, the window is its
own event handler.
-
+
@see SetEventHandler(), PushEventHandler(),
PopEventHandler(), wxEvtHandler::ProcessEvent, wxEvtHandler
*/
/**
Returns the font for this window.
-
+
@see SetFont()
*/
wxFont GetFont() const;
/**
Returns the foreground colour of the window.
-
+
@remarks The interpretation of foreground colour is open to
interpretation according to the window class; it may be
the text colour or other colour, or it may not be used
at all.
-
+
@see SetForegroundColour(), SetBackgroundColour(),
GetBackgroundColour()
*/
Note that the text is actually stored by the current wxHelpProvider
implementation,
and not in the window object itself.
-
+
@see SetHelpText(), GetHelpTextAtPoint(), wxHelpProvider
*/
virtual wxString GetHelpText() const;
Gets the help text to be used as context-sensitive help for this window. This
method should be overridden if the help message depends on the position inside
the window, otherwise GetHelpText() can be used.
-
+
@param point
Coordinates of the mouse at the moment of help event emission.
@param origin
/**
Returns the identifier of the window.
-
+
@remarks Each window has an integer identifier. If the application has
not provided one (or the default wxID_ANY) an unique
identifier with a negative value will be generated.
-
+
@see SetId(), @ref overview_windowids "Window identifiers"
*/
int GetId() const;
/**
Generic way of getting a label from any window, for
identification purposes.
-
+
@remarks The interpretation of this function differs from class to class.
For frames and dialogs, the value returned is the
title. For buttons or static text controls, it is the
This is an indication to the sizer layout mechanism that this is the maximum
possible size as well as the upper bound on window's size settable using
SetClientSize().
-
+
@see GetMaxSize()
*/
wxSize GetMaxClientSize() const;
Returns the maximum size of the window. This is an indication to the sizer
layout mechanism that this is the maximum possible size as well as the upper
bound on window's size settable using SetSize().
-
+
@see GetMaxClientSize()
*/
wxSize GetMaxSize() const;
normally just returns the value set by
SetMinClientSize(), but it can be overridden
to do the calculation on demand.
-
+
@see GetMinSize()
*/
virtual wxSize GetMinClientSize() const;
that this is the minimum required size. It normally just returns the value set
by SetMinSize(), but it can be overridden to do the
calculation on demand.
-
+
@see GetMinClientSize()
*/
virtual wxSize GetMinSize() const;
/**
Returns the window's name.
-
+
@remarks This name is not guaranteed to be unique; it is up to the
programmer to supply an appropriate name in the window
constructor or via SetName().
-
+
@see SetName()
*/
virtual wxString GetName() const;
/**
Returns the next window after this one among the parent children or @NULL if
this window is the last child.
-
+
@wxsince{2.8.8}
-
+
@see GetPrevSibling()
*/
wxWindow* GetNextSibling() const;
returns the selected id. It can be more convenient than the general purpose
PopupMenu() function for simple menus proposing a
choice in a list of strings to the user.
-
+
@param menu
The menu to show
@param pos
The horizontal position of the menu
@param y
The vertical position of the menu
-
+
@returns The selected menu item id or wxID_NONE if none selected or an
error occurred.
*/
This gets the position of the window in pixels, relative to the parent window
for the child windows or relative to the display origin for the top level
windows.
-
+
@param x
Receives the x position of the window if non-@NULL.
@param y
Receives the y position of the window if non-@NULL.
-
+
@see GetScreenPosition()
*/
virtual void GetPosition(int* x, int* y) const;
Returns the previous window before this one among the parent children or @c
@NULL if
this window is the first child.
-
+
@wxsince{2.8.8}
-
+
@see GetNextSibling()
*/
wxWindow* GetPrevSibling() const;
/**
Returns the position and size of the window as a wxRect object.
-
+
@see GetScreenRect()
*/
virtual wxRect GetRect() const;
/**
Returns the window position in screen coordinates, whether the window is a
child window or a top level one.
-
+
@param x
Receives the x position of the window on the screen if non-@NULL.
@param y
Receives the y position of the window on the screen if non-@NULL.
-
+
@see GetPosition()
*/
virtual void GetScreenPosition(int* x, int* y) const;
/**
Returns the position and size of the window on the screen as a
wxRect object.
-
+
@see GetRect()
*/
virtual wxRect GetScreenRect() const;
/**
Returns the built-in scrollbar position.
-
+
@see See SetScrollbar()
*/
virtual int GetScrollPos(int orientation);
/**
Returns the built-in scrollbar range.
-
+
@see SetScrollbar()
*/
virtual int GetScrollRange(int orientation);
/**
Returns the built-in scrollbar thumb size.
-
+
@see SetScrollbar()
*/
virtual int GetScrollThumb(int orientation);
scrollbars, etc.
Note that if this window is a top-level one and it is currently minimized, the
returned size is the restored window size, not the size of the window icon.
-
+
@param width
Receives the window width.
@param height
Receives the window height.
-
+
@see GetClientSize(), GetVirtualSize()
*/
void GetSize(int* width, int* height) const;
window with the currently selected font.
The text extent is returned in @a w and @a h pointers (first form) or as a
wxSize object (second form).
-
+
@param string
String whose extent is to be measured.
@param w
Returns the region specifying which parts of the window have been damaged.
Should
only be called within an wxPaintEvent handler.
-
+
@see wxRegion, wxRegionIterator
*/
virtual wxRegion GetUpdateRegion() const;
returns the client size of the window, but after a call to
SetVirtualSize() it will return
that size.
-
+
@param width
Receives the window virtual width.
@param height
This function will generate the appropriate call to
Navigate() if the key event is one normally used for
keyboard navigation and return @true in this case.
-
+
@returns Returns @true if the key pressed was for navigation and was
handled, @false otherwise.
-
+
@see Navigate()
*/
bool HandleAsNavigationKey(const wxKeyEvent& event);
/**
Returns @true if this window has the current mouse capture.
-
+
@see CaptureMouse(), ReleaseMouse(), wxMouseCaptureLostEvent,
wxMouseCaptureChangedEvent
*/
/**
Returns @true if the window has the given @a exFlag bit set in its
extra styles.
-
+
@see SetExtraStyle()
*/
bool HasExtraStyle(int exFlag) const;
/**
Returns @true if the window (or in case of composite controls, its main
child window) has focus.
-
+
@see FindFocus()
*/
virtual bool HasFocus() const;
/**
Returns @true if this window has a scroll bar for this orientation.
-
+
@param orient
Orientation to check, either wxHORIZONTAL or wxVERTICAL.
*/
The parameters of this function are the same as for
ShowWithEffect(), please see their
description there.
-
+
@wxsince{2.9.0}
*/
virtual bool HideWithEffect(wxShowEffect effect,
Returns @true if the window contents is double-buffered by the system, i.e. if
any drawing done on the window is really done on a temporary backing surface
and transferred to the screen all at once later.
-
+
@see wxBufferedDC
*/
virtual bool IsDoubleBuffered() const;
been explicitly disabled when one of its parent windows is disabled. To get the
intrinsic status of this window, use
IsThisEnabled()
-
+
@see Enable()
*/
virtual bool IsEnabled() const;
/**
Returns @true if the window is currently frozen by a call to
Freeze().
-
+
@see Thaw()
*/
virtual bool IsFrozen() const;
/**
Returns @true if the window is retained, @false otherwise.
-
+
@remarks Retained windows are only available on X platforms.
*/
virtual bool IsRetained() const;
/**
Return whether a scrollbar is always shown.
-
+
@param orient
Orientation to check, either wxHORIZONTAL or wxVERTICAL.
-
+
@see AlwaysShowScrollbars()
*/
bool IsScrollbarAlwaysShown(int orient);
/**
Returns @true if the window is shown, @false if it has been hidden.
-
+
@see IsShownOnScreen()
*/
virtual bool IsShown() const;
/**
Returns @true if the window is physically visible on the screen, i.e. it
is shown and all its parents up to the toplevel window are shown as well.
-
+
@see IsShown()
*/
virtual bool IsShownOnScreen() const;
/**
Lowers the window to the bottom of the window hierarchy (Z-order).
-
+
@see Raise()
*/
void Lower();
/**
Disables all other windows in the application so that
the user can only interact with this window.
-
+
@param flag
If @true, this call disables all other windows in the application so that
the user can only interact with this window. If @false, the effect is
//@{
/**
Moves the window to the given position.
-
+
@param x
Required x position.
@param y
Required y position.
@param pt
wxPoint object representing the position.
-
+
@remarks Implementations of SetSize can also implicitly implement the
Move() function, which is defined in the base
wxWindow class as the call:
-
+
@see SetSize()
*/
void Move(int x, int y);
Default tab order is the same as creation order, this function and
MoveBeforeInTabOrder() allow to change
it after creating all the windows.
-
+
@param win
A sibling of this window which should precede it in tab order,
must not be @NULL
Performs a keyboard navigation action starting from this window. This method is
equivalent to calling NavigateIn() method on the
parent window.
-
+
@param flags
A combination of wxNavigationKeyEvent::IsForward and
wxNavigationKeyEvent::WinChange.
-
+
@returns Returns @true if the focus was moved to another window or @false
if nothing changed.
-
+
@remarks You may wish to call this from a text control custom keypress
handler to do the default navigation behaviour for the
tab key, since the standard default behaviour for a
IDs will be reserved until assigned to a wxWindowIDRef()
or unreserved with UnreserveControlId().
See @ref overview_windowidsoverview "Window IDs overview" for more information.
-
+
@param count
The number of sequential IDs to reserve.
-
+
@returns Returns the ID or the first ID of the range, or wxID_NONE if the
specified number of identifiers couldn't be allocated.
-
+
@see UnreserveControlId(), wxIdManager, @ref overview_windowidsoverview
"Window IDs overview"
*/
/**
Removes and returns the top-most event handler on the event handler stack.
-
+
@param deleteHandler
If this is @true, the handler will be deleted after it is removed. The
default value is @false.
-
+
@see SetEventHandler(), GetEventHandler(),
PushEventHandler(), wxEvtHandler::ProcessEvent, wxEvtHandler
*/
menu item is selected, the corresponding menu event is generated and will be
processed as usually. If the coordinates are not specified, current mouse
cursor position is used.
-
+
@param menu
Menu to pop up.
@param pos
Required x position for the menu to appear.
@param y
Required y position for the menu to appear.
-
+
@remarks Just before the menu is popped up, wxMenu::UpdateUI is called to
ensure that the menu items are in the correct state.
The menu does not get deleted by the window.
-
+
@see wxMenu
*/
bool PopupMenu(wxMenu* menu,
/**
Pushes this event handler onto the event stack for the window.
-
+
@param handler
Specifies the handler to be pushed.
-
+
@remarks An event handler is an object that is capable of processing the
events sent to a window. By default, the window is its
own event handler, but an application may wish to
substitute another, for example to allow central
implementation of event-handling for a variety of
different window classes.
-
+
@see SetEventHandler(), GetEventHandler(),
PopEventHandler(), wxEvtHandler::ProcessEvent, wxEvtHandler
*/
/**
Raises the window to the top of the window hierarchy (Z-order).
In current version of wxWidgets this works both for managed and child windows.
-
+
@see Lower()
*/
void Raise();
happen immediately but only during the next event loop iteration, if you need
to update the window immediately you should use Update()
instead.
-
+
@param eraseBackground
If @true, the background will be
erased.
@param rect
If non-@NULL, only the given rectangle will
be treated as damaged.
-
+
@see RefreshRect()
*/
virtual void Refresh(bool eraseBackground = true,
is in the background
and does not have the input focus because the user is working with some other
application.
-
+
@param hotkeyId
Numeric identifier of the hotkey. For applications this must be between 0
and 0xBFFF. If
with the key.
@param virtualKeyCode
The virtual key code of the hotkey.
-
+
@returns @true if the hotkey was registered successfully. @false if some
other application already registered a hotkey with this
modifier/virtualKeyCode combination.
-
+
@remarks Use EVT_HOTKEY(hotkeyId, fnc) in the event table to capture the
event. This function is currently only implemented
under Windows. It is used in the Windows CE port for
detecting hardware button presses.
-
+
@see UnregisterHotKey()
*/
bool RegisterHotKey(int hotkeyId, int modifiers,
/**
Releases mouse input captured with CaptureMouse().
-
+
@see CaptureMouse(), HasCapture(), ReleaseMouse(),
wxMouseCaptureLostEvent, wxMouseCaptureChangedEvent
*/
functions so should not be required by the application programmer.
Notice that this function is mostly internal to wxWidgets and shouldn't be
called by the user code.
-
+
@param child
Child window to remove.
*/
/**
Find the given @a handler in the windows event handler chain and remove (but
not delete) it from it.
-
+
@param handler
The event handler to remove, must be non-@NULL and
must be present in this windows event handlers chain
-
+
@returns Returns @true if it was found and @false otherwise (this also
results in an assert failure so this function should
only be called when the handler is supposed to be
there).
-
+
@see PushEventHandler(), PopEventHandler()
*/
bool RemoveEventHandler(wxEvtHandler* handler);
Reparents the window, i.e the window will be removed from its
current parent window (e.g. a non-standard toolbar in a wxFrame)
and then re-inserted into another.
-
+
@param newParent
New parent.
*/
//@{
/**
Converts from screen to client window coordinates.
-
+
@param x
Stores the screen x coordinate and receives the client x coordinate.
@param y
/**
Scrolls the window by the given number of lines down (if @a lines is
positive) or up.
-
+
@returns Returns @true if the window was scrolled, @false if it was already
on top/bottom and nothing was done.
-
+
@remarks This function is currently only implemented under MSW and
wxTextCtrl under wxGTK (it also works for
wxScrolledWindow derived classes under all platforms).
-
+
@see ScrollPages()
*/
virtual bool ScrollLines(int lines);
/**
Scrolls the window by the given number of pages down (if @a pages is
positive) or up.
-
+
@returns Returns @true if the window was scrolled, @false if it was already
on top/bottom and nothing was done.
-
+
@remarks This function is currently only implemented under MSW and wxGTK.
-
+
@see ScrollLines()
*/
virtual bool ScrollPages(int pages);
/**
Physically scrolls the pixels in the window and move child windows accordingly.
-
+
@param dx
Amount to scroll horizontally.
@param dy
Rectangle to scroll, if it is @NULL, the whole window is
scrolled (this is always the case under wxGTK which doesn't support this
parameter)
-
+
@remarks Note that you can often use wxScrolledWindow instead of using
this function directly.
*/
SetConstraints() you should call it
manually or otherwise the window layout won't be correctly updated when its
size changes.
-
+
@param autoLayout
Set this to @true if you wish the Layout function to be
called automatically when the window is resized.
-
+
@see SetConstraints()
*/
void SetAutoLayout(bool autoLayout);
Please see InheritAttributes() for
explanation of the difference between this method and
SetOwnBackgroundColour().
-
+
@param colour
The colour to be used as the background colour, pass
wxNullColour to reset to the default colour.
-
+
@remarks The background colour is usually painted by the default
wxEraseEvent event handler function under Windows and
automatically under GTK.
-
+
@see GetBackgroundColour(), SetForegroundColour(),
GetForegroundColour(), ClearBackground(),
Refresh(), wxEraseEvent
Sets the background style of the window. see
GetBackgroundStyle() for the description
of the possible style values.
-
+
@see SetBackgroundColour(), GetForegroundColour(),
SetTransparent()
*/
doing TAB traversal. A call to this does not disable or change
the effect of programmatically calling
SetFocus().
-
+
@see wxFocusEvent, wxPanel::SetFocus, wxPanel::SetFocusIgnoringChildren
*/
virtual void SetCanFocus(bool canFocus);
worry about what dimensions the border or title bar have when trying to fit the
window
around panel items, for example.
-
+
@param width
The required client area width.
@param height
will then own the object, and will take care of its deletion.
If an existing layout constraints object is already owned by the
window, it will be deleted.
-
+
@param constraints
The constraints to set. Pass @NULL to disassociate and delete the window's
constraints.
-
+
@remarks You must call SetAutoLayout() to tell a window to use
the constraints automatically in OnSize; otherwise, you
must override OnSize and call Layout() explicitly. When
children of the window implicitly.
The @a cursor may be @c wxNullCursor in which case the window cursor will
be reset back to default.
-
+
@param cursor
Specifies the cursor that the window should normally display.
-
+
@see ::wxSetCursor, wxCursor
*/
virtual void SetCursor(const wxCursor& cursor);
/**
Associates a drop target with this window.
If the window already has a drop target, it is deleted.
-
+
@see GetDropTarget(), @ref overview_wxdndoverview
*/
void SetDropTarget(wxDropTarget* target);
/**
Sets the event handler for this window.
-
+
@param handler
Specifies the handler to be set.
-
+
@remarks An event handler is an object that is capable of processing the
events sent to a window. By default, the window is its
own event handler, but an application may wish to
substitute another, for example to allow central
implementation of event-handling for a variety of
different window classes.
-
+
@see GetEventHandler(), PushEventHandler(),
PopEventHandler(), wxEvtHandler::ProcessEvent, wxEvtHandler
*/
/**
Sets the extra style bits for the window. The currently defined extra style
bits are:
-
+
@b wxWS_EX_VALIDATE_RECURSIVELY
-
+
TransferDataTo/FromWindow()
and Validate() methods will recursively descend into all children of the
window if it has this style flag set.
-
+
@b wxWS_EX_BLOCK_EVENTS
-
+
Normally, the command
events are propagated upwards to the window parent recursively until a handler
for them is found. Using this style allows to prevent them from being
propagated beyond this window. Notice that wxDialog has this style on by
default for the reasons explained in the
@ref overview_eventprocessing "event processing overview".
-
+
@b wxWS_EX_TRANSIENT
-
+
This can be used to prevent a
window from being used as an implicit parent for the dialogs which were
created without a parent. It is useful for the windows which can disappear at
any moment as creating children of such windows results in fatal problems.
-
+
@b wxWS_EX_CONTEXTHELP
-
+
Under Windows, puts a query
button on the caption. When pressed, Windows will go into a context-sensitive
help mode and wxWidgets will send a wxEVT_HELP event if the user clicked on an
application window.
This style cannot be used together with wxMAXIMIZE_BOX or wxMINIMIZE_BOX, so
these two styles are automatically turned of if this one is used.
-
+
@b wxWS_EX_PROCESS_IDLE
-
+
This window should always process idle events, even
if the mode set by wxIdleEvent::SetMode is wxIDLE_PROCESS_SPECIFIED.
-
+
@b wxWS_EX_PROCESS_UI_UPDATES
-
+
This window should always process UI update events,
even if the mode set by wxUpdateUIEvent::SetMode is
wxUPDATE_UI_PROCESS_SPECIFIED.
/**
This sets the window to receive keyboard input.
-
+
@see HasFocus(), wxFocusEvent, wxPanel::SetFocus,
wxPanel::SetFocusIgnoringChildren
*/
call wxDC::SetFont too. However this font is used by
any standard controls for drawing their text as well as by
GetTextExtent().
-
+
@param font
Font to associate with this window, pass
wxNullFont to reset to the default font.
-
+
@returns @true if the want was really changed, @false if it was already set
to this font and so nothing was done.
-
+
@see GetFont(), InheritAttributes()
*/
bool SetFont(const wxFont& font);
Please see InheritAttributes() for
explanation of the difference between this method and
SetOwnForegroundColour().
-
+
@param colour
The colour to be used as the foreground colour, pass
wxNullColour to reset to the default colour.
-
+
@remarks The interpretation of foreground colour is open to
interpretation according to the window class; it may be
the text colour or other colour, or it may not be used
at all.
-
+
@see GetForegroundColour(), SetBackgroundColour(),
GetBackgroundColour(), ShouldInheritColours()
*/
Note that the text is actually stored by the current wxHelpProvider
implementation,
and not in the window object itself.
-
+
@see GetHelpText(), wxHelpProvider
*/
virtual void SetHelpText(const wxString& helpText);
/**
Sets the identifier of the window.
-
+
@remarks Each window has an integer identifier. If the application has
not provided one, an identifier will be generated.
Normally, the identifier should be provided on creation
and should not be modified subsequently.
-
+
@see GetId(), @ref overview_windowids "Window identifiers"
*/
void SetId(int id);
needs of the window for layout.
Most controls will use this to set their initial size, and their min
size to the passed in value (if any.)
-
+
@see SetSize(), GetBestSize(), GetEffectiveMinSize()
*/
void SetInitialSize(const wxSize& size = wxDefaultSize);
/**
Sets the window's label.
-
+
@param label
The window label.
-
+
@see GetLabel()
*/
virtual void SetLabel(const wxString& label);
/**
Sets the maximum client size of the window, to indicate to the sizer
layout mechanism that this is the maximum possible size of its client area.
-
+
@see SetMaxSize()
*/
void SetMaxClientSize(const wxSize& size);
/**
Sets the maximum size of the window, to indicate to the sizer layout mechanism
that this is the maximum possible size.
-
+
@see SetMaxClientSize()
*/
void SetMaxSize(const wxSize& size);
layout mechanism that this is the minimum required size of window's client
area. You may need to call this if you change the window size after
construction and before adding to its parent sizer.
-
+
@see SetMinSize()
*/
void SetMinClientSize(const wxSize& size);
that this is the minimum required size. You may need to call this
if you change the window size after construction and before adding
to its parent sizer.
-
+
@see SetMinClientSize()
*/
void SetMinSize(const wxSize& size);
/**
Sets the window's name.
-
+
@param name
A name to set for the window.
-
+
@see GetName()
*/
virtual void SetName(const wxString& name);
/**
Sets the background colour of the window but prevents it from being inherited
by the children of this window.
-
+
@see SetBackgroundColour(), InheritAttributes()
*/
void SetOwnBackgroundColour(const wxColour& colour);
/**
Sets the font of the window but prevents it from being inherited by the
children of this window.
-
+
@see SetFont(), InheritAttributes()
*/
void SetOwnFont(const wxFont& font);
/**
Sets the foreground colour of the window but prevents it from being inherited
by the children of this window.
-
+
@see SetForegroundColour(), InheritAttributes()
*/
void SetOwnForegroundColour(const wxColour& colour);
/**
Sets the position of one of the built-in scrollbars.
-
+
@param orientation
Determines the scrollbar whose position is to be set. May be wxHORIZONTAL
or wxVERTICAL.
Position in scroll units.
@param refresh
@true to redraw the scrollbar, @false otherwise.
-
+
@remarks This function does not directly affect the contents of the
window: it is up to the application to take note of
scrollbar attributes and redraw contents accordingly.
-
+
@see SetScrollbar(), GetScrollPos(), GetScrollThumb(),
wxScrollBar, wxScrolledWindow
*/
/**
Sets the scrollbar properties of a built-in scrollbar.
-
+
@param orientation
Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL
or wxVERTICAL.
The maximum position of the scrollbar.
@param refresh
@true to redraw the scrollbar, @false otherwise.
-
+
@remarks Let's say you wish to display 50 lines of text, using the same
font. The window is sized so that you can only see 16
lines at a time.
-
+
@see @ref overview_scrollingoverview "Scrolling overview", wxScrollBar,
wxScrolledWindow, wxScrollWinEvent
*/
//@{
/**
Sets the size of the window in pixels.
-
+
@param x
Required x position in pixels, or wxDefaultCoord to indicate that the
existing
following:
wxSIZE_AUTO_WIDTH: a wxDefaultCoord width value is taken to indicate
a wxWidgets-supplied default width.
-
+
wxSIZE_AUTO_HEIGHT: a wxDefaultCoord height value is taken to indicate
a wxWidgets-supplied default height.
-
+
wxSIZE_AUTO: wxDefaultCoord size values are taken to indicate
a wxWidgets-supplied default size.
-
+
wxSIZE_USE_EXISTING: existing dimensions should be used
if wxDefaultCoord values are supplied.
-
+
wxSIZE_ALLOW_MINUS_ONE: allow negative dimensions (i.e. value of
wxDefaultCoord) to be interpreted
as real dimensions, not default values.
this flag a window resize may be forced even in this case (supported in wx
2.6.2 and later and only implemented for MSW and ignored elsewhere
currently)
-
+
@remarks The second form is a convenience for calling the first form with
default x and y parameters, and must be used with
non-default width and height values.
-
+
@see Move()
*/
virtual void SetSize(int x, int y, int width, int height,
(such as wxDialog or wxFrame) is discouraged. Please use
SetMinSize() and SetMaxSize()
instead.
-
+
@see wxTopLevelWindow::SetSizeHints.
*/
Note that this function will also call
SetAutoLayout() implicitly with @true
parameter if the @a sizer is non-@NULL and @false otherwise.
-
+
@param sizer
The sizer to set. Pass @NULL to disassociate and conditionally delete
the window's sizer. See below.
@param deleteOld
If @true (the default), this will delete any pre-existing sizer.
Pass @false if you wish to handle deleting the old sizer yourself.
-
+
@remarks SetSizer now enables and disables Layout automatically, but
prior to wxWidgets 2.3.3 the following applied:
*/
Allows specification of minimum and maximum virtual window sizes.
If a pair of values is not set (or set to -1), the default values
will be used.
-
+
@param minW
Specifies the minimum width allowable.
@param minH
Minimum size.
@param maxSize
Maximum size.
-
+
@remarks If this function is called, the user will not be able to size
the virtual area of the window outside the given bounds.
*/
need to be be called after changing the others for the change to take place
immediately.
See @ref overview_windowstyles "Window styles" for more information about flags.
-
+
@see GetWindowStyleFlag()
*/
virtual void SetWindowStyleFlag(long style);
Mac OS X 10.3+ currently. Under this system, each of the standard control can
exist in several sizes which correspond to the elements of wxWindowVariant
enum:
-
+
By default the controls use the normal size, of course, but this function can
be used to change this.
*/
Shows or hides the window. You may need to call Raise()
for a top level window if you want to bring it to top, although this is not
needed if Show() is called immediately after the frame creation.
-
+
@param show
If @true displays the window. Otherwise, hides it.
-
+
@returns @true if the window has been shown or hidden or @false if nothing
was done because it already was in the requested state.
-
+
@see IsShown(), Hide(), wxRadioBox::Show
*/
virtual bool Show(bool show = true);
This function shows a window, like Show(), but using a
special visual effect if possible.
Possible values for @a effect are:
-
+
wxSHOW_EFFECT_ROLL
-
+
Roll window effect
-
+
wxSHOW_EFFECT_SLIDE
-
+
Sliding window effect
-
+
wxSHOW_EFFECT_BLEND
-
+
Fade in or out effect
-
+
wxSHOW_EFFECT_EXPAND
-
+
Expanding or collapsing effect
-
+
For the roll and slide effects the @a dir parameter specifies the animation
direction: it can be one of @c wxTOP, @c wxBOTTOM, @c wxLEFT
or @c wxRIGHT. For the other effects, this parameter is unused.
for the current platform is used.
Currently this function is only implemented in wxMSW and does the same thing as
Show() in the other ports.
-
+
@wxsince{2.9.0}
-
+
@see HideWithEffect()
*/
virtual bool ShowWithEffect(wxShowEffect effect,
Reenables window updating after a previous call to
Freeze(). To really thaw the control, it must be called
exactly the same number of times as Freeze().
-
+
@see wxWindowUpdateLocker
*/
virtual void Thaw();
the case for default flags).
Also, please notice that not all styles can be changed after the control
creation.
-
+
@returns Returns @true if the style was turned on by this function, @false
if it was switched off.
-
+
@see SetWindowStyleFlag(), HasFlag()
*/
bool ToggleWindowStyle(int flag);
@false if a transfer failed.
If the window has @c wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call TransferDataFromWindow() of all child windows.
-
+
@see TransferDataToWindow(), wxValidator, Validate()
*/
virtual bool TransferDataFromWindow();
validators.
If the window has @c wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call TransferDataToWindow() of all child windows.
-
+
@returns Returns @false if a transfer failed.
-
+
@see TransferDataFromWindow(), wxValidator, Validate()
*/
virtual bool TransferDataToWindow();
/**
Unregisters a system wide hotkey.
-
+
@param hotkeyId
Numeric identifier of the hotkey. Must be the same id that was passed to
RegisterHotKey.
-
+
@returns @true if the hotkey was unregistered successfully, @false if the
id was invalid.
-
+
@remarks This function is currently only implemented under MSW.
-
+
@see RegisterHotKey()
*/
bool UnregisterHotKey(int hotkeyId);
/**
Unreserve an ID or range of IDs that was reserved by NewControlId().
See @ref overview_windowidsoverview "Window IDs overview" for more information.
-
+
@param id
The starting ID of the range of IDs to unreserve.
@param count
The number of sequential IDs to unreserve.
-
+
@see NewControlId(), wxIdManager, @ref overview_windowidsoverview
"Window IDs overview"
*/
limit the overhead that wxWidgets incurs by sending update UI events in idle
time.
@a flags should be a bitlist of one or more of the following values.
-
+
If you are calling this function from an OnInternalIdle or OnIdle
function, make sure you pass the wxUPDATE_UI_FROMIDLE flag, since
this tells the window to only update the UI elements that need
only when necessary, for example when a menu is about to be shown.
The following is an example of how to call UpdateWindowUI from
an idle function.
-
+
@see wxUpdateUIEvent, DoUpdateWindowUI(), OnInternalIdle()
*/
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
Validates the current values of the child controls using their validators.
If the window has @c wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call Validate() of all child windows.
-
+
@returns Returns @false if any of the validations failed.
-
+
@see TransferDataFromWindow(), TransferDataToWindow(),
wxValidator
*/
Moves the pointer to the given position on the window.
@b NB: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
-
+
@param x
The new x position for the cursor.
@param y
or unreserved with UnreserveControlId().
Only ID values that are not assigned to a wxWindowIDRef()
need to be unreserved.
-
+
@param count
The number of sequential IDs to reserve.
-
+
@returns The value of the first ID in the sequence, or wxID_NONE.
*/
static wxWindowID ReserveControlId(int count = 1);
instead of the default one for this wizard (note that all bitmaps used should
be of the same size). Notice that no other parameters are needed because the
wizard will resize and reposition the page anyhow.
-
+
@param parent
The parent wizard
@param bitmap
button: if @NULL is returned, this button will be disabled. The last
page of the wizard will usually return @NULL from here, but the others
will not.
-
+
@see GetPrev()
*/
wxWizardPage* GetNext() const;
button: if @NULL is returned, this button will be disabled. The first
page of the wizard will usually return @NULL from here, but the others
will not.
-
+
@see GetNext()
*/
wxWizardPage* GetPrev() const;
parameter in the wxWizard constructor because the wizard will have a predefined
default size by default. If you want to change this, you should use the
GetPageAreaSizer() function.
-
+
@param parent
The parent window, may be @NULL.
@param id
parameter in the wxWizard constructor because the wizard will have a predefined
default size by default. If you want to change this, you should use the
GetPageAreaSizer() function.
-
+
@param parent
The parent window, may be @NULL.
@param id
class version implements this by calling
@ref wxWizardPage::getnext page-GetNext but this could be undesirable if,
for example, the pages are created on demand only.
-
+
@see HasPrevPage()
*/
virtual bool HasNextPage(wxWizardPage* page);
class version implements this by calling
@ref wxWizardPage::getprev page-GetPrev but this could be undesirable if,
for example, the pages are created on demand only.
-
+
@see HasNextPage()
*/
virtual bool HasPrevPage(wxWizardPage* page);
page height. By default, placement is 0 (no expansion is done). @a placement is
a bitlist with the
following possible values:
-
+
@b wxWIZARD_VALIGN_TOP
-
+
Aligns the bitmap at the top.
-
+
@b wxWIZARD_VALIGN_CENTRE
-
+
Centres the bitmap vertically.
-
+
@b wxWIZARD_VALIGN_BOTTOM
-
+
Aligns the bitmap at the bottom.
-
+
@b wxWIZARD_HALIGN_LEFT
-
+
Left-aligns the bitmap.
-
+
@b wxWIZARD_HALIGN_CENTRE
-
+
Centres the bitmap horizontally.
-
+
@b wxWIZARD_HALIGN_RIGHT
-
+
Right-aligns the bitmap.
-
+
@b wxWIZARD_TILE
-
-
+
+
See also SetMinimumBitmapWidth().
*/
void SetBitmapPlacement(int placement);
high 16 bits are unix mode bits.
The following other accessors access these bits:
@ref wxArchiveEntry::isreadonly IsReadOnly/SetIsReadOnly
-
+
@ref wxArchiveEntry::isdir IsDir/SetIsDir
-
+
@ref mode() Get/SetMode
*/
wxUint32 GetExternalAttributes();
within the archive. If the third parameter is provided, the bool pointed
to is set to indicate whether the name looks like a directory name
(i.e. has a trailing path separator).
-
+
@see @ref overview_wxarcbyname "Looking up an archive entry by name"
*/
wxString GetInternalName();
Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an zip in a pipeline (i.e. between
non-seekable streams).
-
+
@see @ref overview_wxarcnoseek "Archives on non-seekable streams", wxZipNotifier
*/
void SetNotifier(wxZipNotifier& notifier);