adjusted indentation with astyle; added Id keyword

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-08 14:43:31 +00:00
parent aa6ec1d787
commit 7c913512a4
269 changed files with 9052 additions and 9058 deletions

View File

@@ -9,20 +9,20 @@
/** /**
@class wxAboutDialogInfo @class wxAboutDialogInfo
@wxheader{aboutdlg.h} @wxheader{aboutdlg.h}
wxAboutDialogInfo contains information shown in the standard @e About wxAboutDialogInfo contains information shown in the standard @e About
dialog displayed by the wxAboutBox function. dialog displayed by the wxAboutBox function.
This class contains the general information about the program, such as its This class contains the general information about the program, such as its
name, version, copyright and so on, as well as lists of the program developers, name, version, copyright and so on, as well as lists of the program developers,
documentation writers, artists and translators. The simple properties from the documentation writers, artists and translators. The simple properties from the
former group are represented as a string with the exception of the program icon former group are represented as a string with the exception of the program icon
and the program web site, while the lists from the latter group are stored as and the program web site, while the lists from the latter group are stored as
wxArrayString and can be either set entirely at once wxArrayString and can be either set entirely at once
using wxAboutDialogInfo::SetDevelopers and similar using wxAboutDialogInfo::SetDevelopers and similar
functions or built one by one using wxAboutDialogInfo::AddDeveloper functions or built one by one using wxAboutDialogInfo::AddDeveloper
etc. etc.
Please also notice that while all the main platforms have the native Please also notice that while all the main platforms have the native
implementation of the about dialog, they are often more limited than the implementation of the about dialog, they are often more limited than the
generic version provided by wxWidgets and so the generic version is used if generic version provided by wxWidgets and so the generic version is used if
@@ -32,21 +32,19 @@
either of those is used, wxAboutBox will automatically either of those is used, wxAboutBox will automatically
use the generic version so you should avoid specifying these fields to achieve use the generic version so you should avoid specifying these fields to achieve
more native look and feel. more native look and feel.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxAboutDialogInfo::SetArtists wxAboutDialogInfo::SetArtists
*/ */
class wxAboutDialogInfo class wxAboutDialogInfo
{ {
public: public:
/** /**
Default constructor leaves all fields are initially uninitialized, in general Default constructor leaves all fields are initially uninitialized, in general
you should call at least SetVersion(), you should call at least SetVersion(), SetCopyright() and SetDescription().
SetCopyright() and
SetDescription().
*/ */
wxAboutDialogInfo(); wxAboutDialogInfo();
@@ -73,10 +71,10 @@ public:
/** /**
Adds a translator name to be shown in the program credits. Notice that if no Adds a translator name to be shown in the program credits. Notice that if no
translator names are specified explicitely, wxAboutBox translator names are specified explicitely, wxAboutBox will try to use the
will try to use the translation of the string @c translator-credits from translation of the string @c translator-credits from the currently used message
the currently used message catalog -- this can be used to show just the name of catalog -- this can be used to show just the name of the translator of the
the translator of the program in the current language. program in the current language.
@sa SetTranslators() @sa SetTranslators()
*/ */
@@ -90,8 +88,8 @@ public:
void SetArtists(const wxArrayString& artists); void SetArtists(const wxArrayString& artists);
/** /**
Set the short string containing the program copyright information. Notice that Set the short string containing the program copyright information. Notice
any occurrences of @c "(C)" in @e copyright will be replaced by the that any occurrences of @c "(C)" in @e copyright will be replaced by the
copyright symbol (circled C) automatically, which means that you can avoid copyright symbol (circled C) automatically, which means that you can avoid
using this symbol in the program source code which can be problematic, using this symbol in the program source code which can be problematic,
*/ */
@@ -131,7 +129,7 @@ public:
Only GTK+ version supports showing the licence text in the native about dialog Only GTK+ version supports showing the licence text in the native about dialog
currently so the generic version will be used under all the other platforms if currently so the generic version will be used under all the other platforms if
this method is called. To preserve the native look and feel it is advised that this method is called. To preserve the native look and feel it is advised that
you do not call this method but provide a separate menu item in the you do not call this method but provide a separate menu item in the
@c "Help" menu for displaying the text of your program licence. @c "Help" menu for displaying the text of your program licence.
*/ */
void SetLicence(const wxString& licence); void SetLicence(const wxString& licence);
@@ -148,16 +146,14 @@ public:
void SetName(const wxString& name); void SetName(const wxString& name);
/** /**
Set the list of translators. Please see Set the list of translators. Please see AddTranslator() for additional
AddTranslator() for additional
discussion. discussion.
*/ */
void SetTranslators(const wxArrayString& translators); void SetTranslators(const wxArrayString& translators);
/** /**
Set the version of the program. The version is in free format, i.e. not Set the version of the program. The version is in free format, i.e. not
necessarily in the @c x.y.z form but it shouldn't contain the "version" necessarily in the @c x.y.z form but it shouldn't contain the "version" word.
word.
*/ */
void SetVersion(const wxString& version); void SetVersion(const wxString& version);
@@ -184,9 +180,9 @@ public:
which is capable of showing all the fields in @e info, the native dialog is which is capable of showing all the fields in @e info, the native dialog is
used, otherwise the function falls back to the generic wxWidgets version of the used, otherwise the function falls back to the generic wxWidgets version of the
dialog, i.e. does the same thing as wxGenericAboutBox. dialog, i.e. does the same thing as wxGenericAboutBox.
Here is an example of how this function may be used: Here is an example of how this function may be used:
@code @code
void MyFrame::ShowSimpleAboutDialog(wxCommandEvent& WXUNUSED(event)) void MyFrame::ShowSimpleAboutDialog(wxCommandEvent& WXUNUSED(event))
{ {
@@ -195,11 +191,11 @@ public:
info.SetVersion(_("1.2.3 Beta")); info.SetVersion(_("1.2.3 Beta"));
info.SetDescription(_("This program does something great.")); info.SetDescription(_("This program does something great."));
info.SetCopyright(_T("(C) 2007 Me my@email.addre.ss")); info.SetCopyright(_T("(C) 2007 Me my@email.addre.ss"));
wxAboutBox(info); wxAboutBox(info);
} }
@endcode @endcode
Please see the @ref overview_sampledialogs "dialogs sample" for more examples of Please see the @ref overview_sampledialogs "dialogs sample" for more examples of
using this function and wxAboutDialogInfo for the using this function and wxAboutDialogInfo for the
description of the information which can be shown in the about dialog. description of the information which can be shown in the about dialog.
@@ -212,11 +208,10 @@ void wxAboutBox(const wxAboutDialogInfo& info);
native one. This is mainly useful if you need to customize the dialog by e.g. native one. This is mainly useful if you need to customize the dialog by e.g.
adding custom controls to it (customizing the native dialog is not currently adding custom controls to it (customizing the native dialog is not currently
supported). supported).
See the @ref overview_sampledialogs "dialogs sample" for an example of about See the @ref overview_sampledialogs "dialogs sample" for an example of about
dialog dialog customization.
customization.
@sa wxAboutDialogInfo @sa wxAboutDialogInfo
*/ */
void wxGenericAboutBox(const wxAboutDialogInfo& info); void wxGenericAboutBox(const wxAboutDialogInfo& info);

View File

@@ -9,35 +9,35 @@
/** /**
@class wxAcceleratorEntry @class wxAcceleratorEntry
@wxheader{accel.h} @wxheader{accel.h}
An object used by an application wishing to create an @ref An object used by an application wishing to create an @ref
overview_wxacceleratortable "accelerator table". overview_wxacceleratortable "accelerator table".
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxAcceleratorTable, wxWindow::SetAcceleratorTable wxAcceleratorTable, wxWindow::SetAcceleratorTable
*/ */
class wxAcceleratorEntry class wxAcceleratorEntry
{ {
public: public:
//@{ //@{
/** /**
Constructor. Constructor.
@param flags @param flags
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates
which modifier key is held down. which modifier key is held down.
@param keyCode @param keyCode
The keycode to be detected. See Keycodes for a full list of keycodes. The keycode to be detected. See Keycodes for a full list of keycodes.
@param cmd @param cmd
The menu or control command identifier. The menu or control command identifier.
*/ */
wxAcceleratorEntry(); wxAcceleratorEntry();
wxAcceleratorEntry(int flags, int keyCode, int cmd); wxAcceleratorEntry(int flags, int keyCode, int cmd);
//@} //@}
/** /**
@@ -58,14 +58,14 @@ public:
/** /**
Sets the accelerator entry parameters. Sets the accelerator entry parameters.
@param flags @param flags
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates
which modifier key is held down. which modifier key is held down.
@param keyCode @param keyCode
The keycode to be detected. See Keycodes for a full list of keycodes. The keycode to be detected. See Keycodes for a full list of keycodes.
@param cmd @param cmd
The menu or control command identifier. The menu or control command identifier.
*/ */
#define void Set(int flags, int keyCode, int cmd) /* implementation is private */ #define void Set(int flags, int keyCode, int cmd) /* implementation is private */
@@ -75,24 +75,24 @@ public:
/** /**
@class wxAcceleratorTable @class wxAcceleratorTable
@wxheader{accel.h} @wxheader{accel.h}
An accelerator table allows the application to specify a table of keyboard An accelerator table allows the application to specify a table of keyboard
shortcuts for shortcuts for
menus or other commands. On Windows and Mac OS X, menu or button commands are menus or other commands. On Windows and Mac OS X, menu or button commands are
supported; on GTK, supported; on GTK,
only menu commands are supported. only menu commands are supported.
The object @b wxNullAcceleratorTable is defined to be a table with no data, and The object @b wxNullAcceleratorTable is defined to be a table with no data, and
is the is the
initial accelerator table for a window. initial accelerator table for a window.
@library{wxcore} @library{wxcore}
@category{misc} @category{misc}
@stdobjects @stdobjects
Objects: Objects:
wxNullAcceleratorTable wxNullAcceleratorTable
@seealso @seealso
wxAcceleratorEntry, wxWindow::SetAcceleratorTable wxAcceleratorEntry, wxWindow::SetAcceleratorTable
*/ */
@@ -103,19 +103,19 @@ public:
/** /**
Loads the accelerator table from a Windows resource (Windows only). Loads the accelerator table from a Windows resource (Windows only).
@param n @param n
Number of accelerator entries. Number of accelerator entries.
@param entries @param entries
The array of entries. The array of entries.
@param resource @param resource
Name of a Windows accelerator. Name of a Windows accelerator.
*/ */
wxAcceleratorTable(); wxAcceleratorTable();
wxAcceleratorTable(const wxAcceleratorTable& bitmap); wxAcceleratorTable(const wxAcceleratorTable& bitmap);
wxAcceleratorTable(int n, wxAcceleratorEntry entries[]); wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
wxAcceleratorTable(const wxString& resource); wxAcceleratorTable(const wxString& resource);
//@} //@}
/** /**
@@ -133,7 +133,7 @@ public:
/** /**
Assignment operator, using @ref overview_trefcount "reference counting". Assignment operator, using @ref overview_trefcount "reference counting".
@param accel @param accel
Accelerator table to assign. Accelerator table to assign.
*/ */
wxAcceleratorTable operator =(const wxAcceleratorTable& accel); wxAcceleratorTable operator =(const wxAcceleratorTable& accel);

View File

@@ -9,37 +9,37 @@
/** /**
@class wxAccessible @class wxAccessible
@wxheader{access.h} @wxheader{access.h}
The wxAccessible class allows wxWidgets applications, and The wxAccessible class allows wxWidgets applications, and
wxWidgets itself, to return extended information about user interface elements wxWidgets itself, to return extended information about user interface elements
to client applications such as screen readers. This is the to client applications such as screen readers. This is the
main way in which wxWidgets implements accessibility features. main way in which wxWidgets implements accessibility features.
At present, only Microsoft Active Accessibility is supported At present, only Microsoft Active Accessibility is supported
by this class. by this class.
To use this class, derive from wxAccessible, implement appropriate To use this class, derive from wxAccessible, implement appropriate
functions, and associate an object of the class with a functions, and associate an object of the class with a
window using wxWindow::SetAccessible. window using wxWindow::SetAccessible.
All functions return an indication of success, failure, or not implemented All functions return an indication of success, failure, or not implemented
using values of the wxAccStatus enum type. using values of the wxAccStatus enum type.
If you return wxACC_NOT_IMPLEMENTED from any function, the system will try to If you return wxACC_NOT_IMPLEMENTED from any function, the system will try to
implement the appropriate functionality. However this will not work with implement the appropriate functionality. However this will not work with
all functions. all functions.
Most functions work with an @e object id, which can be zero to refer to Most functions work with an @e object id, which can be zero to refer to
'this' UI element, or greater than zero to refer to the nth child element. 'this' UI element, or greater than zero to refer to the nth child element.
This allows you to specify elements that don't have a corresponding wxWindow or This allows you to specify elements that don't have a corresponding wxWindow or
wxAccessible; for example, the sash of a splitter window. wxAccessible; for example, the sash of a splitter window.
For details on the semantics of functions and types, please refer to the For details on the semantics of functions and types, please refer to the
Microsoft Active Accessibility 1.2 documentation. Microsoft Active Accessibility 1.2 documentation.
This class is compiled into wxWidgets only if the wxUSE_ACCESSIBILITY setup This class is compiled into wxWidgets only if the wxUSE_ACCESSIBILITY setup
symbol is set to 1. symbol is set to 1.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
*/ */

View File

@@ -9,16 +9,16 @@
/** /**
@class wxAnimationCtrl @class wxAnimationCtrl
@wxheader{animate.h} @wxheader{animate.h}
This is a static control which displays an animation. This is a static control which displays an animation.
wxAnimationCtrl API is simple as possible and won't give you full control on the wxAnimationCtrl API is simple as possible and won't give you full control on the
animation; if you need it then use wxMediaCtrl. animation; if you need it then use wxMediaCtrl.
This control is useful to display a (small) animation while doing a long task This control is useful to display a (small) animation while doing a long task
(e.g. a "throbber"). (e.g. a "throbber").
It is only available if @c wxUSE_ANIMATIONCTRL is set to 1 (the default). It is only available if @c wxUSE_ANIMATIONCTRL is set to 1 (the default).
@beginStyleTable @beginStyleTable
@style{wxAC_DEFAULT_STYLE}: @style{wxAC_DEFAULT_STYLE}:
The default style: wxBORDER_NONE. The default style: wxBORDER_NONE.
@@ -27,11 +27,11 @@
size of the animation when SetAnimation is called. If this style size of the animation when SetAnimation is called. If this style
flag is given, the control will not change its size flag is given, the control will not change its size
@endStyleTable @endStyleTable
@library{wxadv} @library{wxadv}
@category{ctrl} @category{ctrl}
@appearance{animationctrl.png} @appearance{animationctrl.png}
@seealso @seealso
wxAnimation wxAnimation
*/ */
@@ -55,25 +55,25 @@ public:
frame frame
of the animation is displayed. of the animation is displayed.
@param parent @param parent
Parent window, must be non-@NULL. Parent window, must be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param anim @param anim
The initial animation shown in the control. The initial animation shown in the control.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param style @param style
The window style, see wxAC_* flags. The window style, see wxAC_* flags.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
@@ -162,18 +162,18 @@ public:
/** /**
@class wxAnimation @class wxAnimation
@wxheader{animate.h} @wxheader{animate.h}
This class encapsulates the concept of a platform-dependent animation. This class encapsulates the concept of a platform-dependent animation.
An animation is a sequence of frames of the same size. An animation is a sequence of frames of the same size.
Sound is not supported by wxAnimation. Sound is not supported by wxAnimation.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
@stdobjects @stdobjects
Objects: Objects:
wxNullAnimation wxNullAnimation
@seealso @seealso
wxAnimationCtrl wxAnimationCtrl
*/ */
@@ -184,16 +184,16 @@ public:
/** /**
Loads an animation from a file. Loads an animation from a file.
@param name @param name
The name of the file to load. The name of the file to load.
@param type @param type
See LoadFile for more info. See LoadFile for more info.
*/ */
wxAnimation(); wxAnimation();
wxAnimation(const wxAnimation& anim); wxAnimation(const wxAnimation& anim);
wxAnimation(const wxString& name, wxAnimation(const wxString& name,
wxAnimationType type = wxANIMATION_TYPE_ANY); wxAnimationType type = wxANIMATION_TYPE_ANY);
//@} //@}
/** /**
@@ -232,10 +232,10 @@ public:
/** /**
Loads an animation from the given stream. Loads an animation from the given stream.
@param stream @param stream
The stream to use to load the animation. The stream to use to load the animation.
@param type @param type
One of the following values: One of the following values:
@@ -262,10 +262,10 @@ public:
/** /**
Loads an animation from a file. Loads an animation from a file.
@param name @param name
A filename. A filename.
@param type @param type
One of the following values: One of the following values:

View File

@@ -9,27 +9,27 @@
/** /**
@class wxApp @class wxApp
@wxheader{app.h} @wxheader{app.h}
The @b wxApp class represents the application itself. It is used The @b wxApp class represents the application itself. It is used
to: to:
set and get application-wide properties; set and get application-wide properties;
implement the windowing system message or event loop; implement the windowing system message or event loop;
initiate application processing via wxApp::OnInit; initiate application processing via wxApp::OnInit;
allow default processing of events not handled by other allow default processing of events not handled by other
objects in the application. objects in the application.
You should use the macro IMPLEMENT_APP(appClass) in your application You should use the macro IMPLEMENT_APP(appClass) in your application
implementation implementation
file to tell wxWidgets how to create an instance of your application class. file to tell wxWidgets how to create an instance of your application class.
Use DECLARE_APP(appClass) in a header file if you want the wxGetApp function Use DECLARE_APP(appClass) in a header file if you want the wxGetApp function
(which returns (which returns
a reference to your application object) to be visible to other files. a reference to your application object) to be visible to other files.
@library{wxbase} @library{wxbase}
@category{appmanagement} @category{appmanagement}
@seealso @seealso
@ref overview_wxappoverview "wxApp overview" @ref overview_wxappoverview "wxApp overview"
*/ */
@@ -198,8 +198,8 @@ public:
/** /**
Returns @true if the application is active, i.e. if one of its windows is 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 currently in the foreground. If this function returns @false and you need to
attract users attention to the application, you may use attract users attention to the application, you may use
wxTopLevelWindow::RequestUserAttention wxTopLevelWindow::RequestUserAttention
to do it. to do it.
*/ */
bool IsActive(); bool IsActive();
@@ -221,7 +221,7 @@ public:
void MacNewFile(); void MacNewFile();
/** /**
Mac specific. Called in response of an "open-document" Apple event. You need to Mac specific. Called in response of an "open-document" Apple event. You need to
override this method in order to open a document file after the override this method in order to open a document file after the
user double clicked on it or if the document file was dropped user double clicked on it or if the document file was dropped
on either the running application or the application icon in on either the running application or the application icon in
@@ -262,23 +262,23 @@ public:
The base class version shows the default assert failure dialog box proposing to 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. the user to stop the program, continue or ignore all subsequent asserts.
@param file @param file
the name of the source file where the assert occurred the name of the source file where the assert occurred
@param line @param line
the line number in this file where the assert occurred the line number in this file where the assert occurred
@param func @param func
the name of the function where the assert occurred, may be the name of the function where the assert occurred, may be
empty if the compiler doesn't support C99 __FUNCTION__ empty if the compiler doesn't support C99 __FUNCTION__
@param cond @param cond
the condition of the failed assert in text form the condition of the failed assert in text form
@param msg @param msg
the message specified as argument to the message specified as argument to
wxASSERT_MSG or wxFAIL_MSG, will wxASSERT_MSG or wxFAIL_MSG, will
be @NULL if just wxASSERT or wxFAIL be @NULL if just wxASSERT or wxFAIL
was used was used
*/ */
void OnAssertFailure(const wxChar file, int line, void OnAssertFailure(const wxChar file, int line,
@@ -291,7 +291,7 @@ public:
was specified by the user). The default behaviour is to show the program usage was specified by the user). The default behaviour is to show the program usage
text and abort the program. text and abort the program.
Return @true to continue normal execution or @false to return Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program. @false from OnInit() thus terminating the program.
@sa OnInitCmdLine() @sa OnInitCmdLine()
@@ -302,7 +302,7 @@ public:
Called when the help option (@c --help) was specified on the command line. Called when the help option (@c --help) was specified on the command line.
The default behaviour is to show the program usage text and abort the program. The default behaviour is to show the program usage text and abort the program.
Return @true to continue normal execution or @false to return Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program. @false from OnInit() thus terminating the program.
@sa OnInitCmdLine() @sa OnInitCmdLine()
@@ -317,7 +317,7 @@ public:
Don't forget to call the base class version unless you want to suppress Don't forget to call the base class version unless you want to suppress
processing of the standard command line options. processing of the standard command line options.
Return @true to continue normal execution or @false to return Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program. @false from OnInit() thus terminating the program.
@sa OnInitCmdLine() @sa OnInitCmdLine()
@@ -336,7 +336,7 @@ public:
the different options. You may override this function in your class to do the different options. You may override this function in your class to do
something more appropriate. something more appropriate.
Finally note that if the exception is rethrown from here, it can be caught in Finally note that if the exception is rethrown from here, it can be caught in
OnUnhandledException(). OnUnhandledException().
*/ */
virtual bool OnExceptionInMainLoop(); virtual bool OnExceptionInMainLoop();
@@ -345,7 +345,7 @@ public:
Override this member function for any processing which needs to be Override this member function for any processing which needs to be
done as the application is about to exit. OnExit is called after done as the application is about to exit. OnExit is called after
destroying all application windows and controls, but before destroying all application windows and controls, but before
wxWidgets cleanup. Note that it is not called at all if wxWidgets cleanup. Note that it is not called at all if
OnInit() failed. OnInit() failed.
The return value of this function is currently ignored, return the same value The return value of this function is currently ignored, return the same value
@@ -356,7 +356,7 @@ public:
/** /**
This function may be called if something fatal happens: an unhandled This function may be called if something fatal happens: an unhandled
exception under Win32 or a a fatal signal under Unix, for example. However, exception under Win32 or a a fatal signal under Unix, for example. However,
this will not happen by default: you have to explicitly call this will not happen by default: you have to explicitly call
wxHandleFatalExceptions to enable this. wxHandleFatalExceptions to enable this.
Generally speaking, this function should only show a message to the user and Generally speaking, this function should only show a message to the user and
@@ -369,8 +369,8 @@ public:
/** /**
This must be provided by the application, and will usually create the This must be provided by the application, and will usually create the
application's main window, optionally calling application's main window, optionally calling
SetTopWindow(). You may use SetTopWindow(). You may use
OnExit() to clean up anything initialized here, provided OnExit() to clean up anything initialized here, provided
that the function returns @true. that the function returns @true.
@@ -393,9 +393,9 @@ public:
/** /**
This virtual function is where the execution of a program written in wxWidgets This virtual function is where the execution of a program written in wxWidgets
starts. The default implementation just enters the main loop and starts starts. The default implementation just enters the main loop and starts
handling the events until it terminates, either because handling the events until it terminates, either because
ExitMainLoop() has been explicitly called or because ExitMainLoop() has been explicitly called or because
the last frame has been deleted and the last frame has been deleted and
GetExitOnFrameDelete() flag is @true (this GetExitOnFrameDelete() flag is @true (this
is the default). is the default).
@@ -405,7 +405,7 @@ public:
virtual int OnRun(); virtual int OnRun();
/** /**
This function is called when an unhandled C++ exception occurs inside This function is called when an unhandled C++ exception occurs inside
OnRun() (the exceptions which occur during the program OnRun() (the exceptions which occur during the program
startup and shutdown might not be caught at all). Notice that by now the main startup and shutdown might not be caught at all). Notice that by now the main
event loop has been terminated and the program will exit, if you want to event loop has been terminated and the program will exit, if you want to
@@ -460,7 +460,7 @@ public:
/** /**
Sets the name of the application. This name should be used for file names, Sets the name of the application. This name should be used for file names,
configuration file entries and other internal strings. For the user-visible configuration file entries and other internal strings. For the user-visible
strings, such as the window titles, the application display name set by strings, such as the window titles, the application display name set by
SetAppDisplayName() is used instead. SetAppDisplayName() is used instead.
By default the application name is set to the name of its executable file. By default the application name is set to the name of its executable file.
@@ -481,7 +481,7 @@ public:
Allows the programmer to specify whether the application will exit when the Allows the programmer to specify whether the application will exit when the
top-level frame is deleted. top-level frame is deleted.
@param flag @param flag
If @true (the default), the application will exit when the top-level frame is If @true (the default), the application will exit when the top-level frame is
deleted. If @false, the application will continue to run. deleted. If @false, the application will continue to run.
@@ -494,7 +494,7 @@ public:
Allows external code to modify global @c wxTheApp, but you should really Allows external code to modify global @c wxTheApp, but you should really
know what you're doing if you call it. know what you're doing if you call it.
@param app @param app
Replacement for the global application object. Replacement for the global application object.
@sa GetInstance() @sa GetInstance()
@@ -507,7 +507,7 @@ public:
Return @true if theme was successfully changed. Return @true if theme was successfully changed.
@param theme @param theme
The name of the new theme or an absolute path to a gtkrc-theme-file The name of the new theme or an absolute path to a gtkrc-theme-file
*/ */
bool SetNativeTheme(); bool SetNativeTheme();
@@ -524,7 +524,7 @@ public:
when it when it
needs to use the top window. needs to use the top window.
@param window @param window
The new top window. The new top window.
@sa GetTopWindow(), OnInit() @sa GetTopWindow(), OnInit()
@@ -543,12 +543,12 @@ public:
If @e forceTrueColour is @true then the application will try to force If @e forceTrueColour is @true then the application will try to force
using a TrueColour visual and abort the app if none is found. using a TrueColour visual and abort the app if none is found.
Note that this function has to be called in the constructor of the @c wxApp Note that this function has to be called in the constructor of the @c wxApp
instance and won't have any effect when called later on. instance and won't have any effect when called later on.
This function currently only has effect under GTK. This function currently only has effect under GTK.
@param flag @param flag
If @true, the app will use the best visual. If @true, the app will use the best visual.
*/ */
void SetUseBestVisual(bool flag, bool forceTrueColour = @false); void SetUseBestVisual(bool flag, bool forceTrueColour = @false);
@@ -589,7 +589,7 @@ public:
iteration), call wxLog::FlushActive. iteration), call wxLog::FlushActive.
Calling Yield() recursively is normally an error and an assert failure is Calling Yield() recursively is normally an error and an assert failure is
raised in debug build if such situation is detected. However if the raised in debug build if such situation is detected. However if the
@e onlyIfNeeded parameter is @true, the method will just silently @e onlyIfNeeded parameter is @true, the method will just silently
return @false instead. return @false instead.
*/ */
@@ -627,7 +627,7 @@ public:
default (but it can be changed). default (but it can be changed).
*/ */
void wxLogMessage(const char * formatString, ... ); void wxLogMessage(const char * formatString, ... );
void wxVLogMessage(const char * formatString, va_list argPtr); void wxVLogMessage(const char * formatString, va_list argPtr);
//@} //@}
//@{ //@{
@@ -638,7 +638,7 @@ void wxLogMessage(const char * formatString, ... );
wxLogInfo). wxLogInfo).
*/ */
void wxLogVerbose(const char * formatString, ... ); void wxLogVerbose(const char * formatString, ... );
void wxVLogVerbose(const char * formatString, va_list argPtr); void wxVLogVerbose(const char * formatString, va_list argPtr);
//@} //@}
/** /**
@@ -646,7 +646,7 @@ void wxLogVerbose(const char * formatString, ... );
wxGetApp function implemented by wxGetApp function implemented by
wxIMPLEMENT_APP. It creates the declaration wxIMPLEMENT_APP. It creates the declaration
@c className wxGetApp(void). @c className wxGetApp(void).
Example: Example:
@code @code
wxDECLARE_APP(MyApp) wxDECLARE_APP(MyApp)
@@ -668,7 +668,7 @@ void wxExit();
the program work. the program work.
*/ */
void wxLogWarning(const char * formatString, ... ); void wxLogWarning(const char * formatString, ... );
void wxVLogWarning(const char * formatString, va_list argPtr); void wxVLogWarning(const char * formatString, va_list argPtr);
//@} //@}
//@{ //@{
@@ -678,8 +678,8 @@ void wxLogWarning(const char * formatString, ... );
function also terminates the program with this exit code. function also terminates the program with this exit code.
*/ */
void wxLogFatalError(const char * formatString, ... ); void wxLogFatalError(const char * formatString, ... );
void wxVLogFatalError(const char * formatString, void wxVLogFatalError(const char * formatString,
va_list argPtr); va_list argPtr);
//@} //@}
/** /**
@@ -690,8 +690,8 @@ void wxLogFatalError(const char * formatString, ... );
normal way which usually just means that the application will be terminated. normal way which usually just means that the application will be terminated.
Calling wxHandleFatalExceptions() with @e doIt equal to @false will restore Calling wxHandleFatalExceptions() with @e doIt equal to @false will restore
this default behaviour. this default behaviour.
Notice that this function is only available if Notice that this function is only available if
@c wxUSE_ON_FATAL_EXCEPTION is 1 and under Windows platform this @c wxUSE_ON_FATAL_EXCEPTION is 1 and under Windows platform this
requires a compiler with support for SEH (structured exception handling) which requires a compiler with support for SEH (structured exception handling) which
currently means only Microsoft Visual C++ or a recent Borland C++ version. currently means only Microsoft Visual C++ or a recent Borland C++ version.
@@ -702,17 +702,17 @@ bool wxHandleFatalExceptions(bool doIt = @true);
This is used in the application class implementation file to make the This is used in the application class implementation file to make the
application class known to application class known to
wxWidgets for dynamic construction. You use this instead of wxWidgets for dynamic construction. You use this instead of
Old form: Old form:
@code @code
MyApp myApp; MyApp myApp;
@endcode @endcode
New form: New form:
@code @code
IMPLEMENT_APP(MyApp) IMPLEMENT_APP(MyApp)
@endcode @endcode
See also DECLARE_APP. See also DECLARE_APP.
*/ */
#define IMPLEMENT_APP() /* implementation is private */ #define IMPLEMENT_APP() /* implementation is private */
@@ -720,7 +720,7 @@ bool wxHandleFatalExceptions(bool doIt = @true);
/** /**
Returns the error code from the last system call. This function uses Returns the error code from the last system call. This function uses
@c errno on Unix platforms and @c GetLastError under Win32. @c errno on Unix platforms and @c GetLastError under Win32.
@sa wxSysErrorMsg, wxLogSysError @sa wxSysErrorMsg, wxLogSysError
*/ */
unsigned long wxSysErrorCode(); unsigned long wxSysErrorCode();
@@ -741,7 +741,7 @@ void wxPostEvent(wxEvtHandler * dest, wxEvent& event);
user about it. user about it.
*/ */
void wxLogError(const char * formatString, ... ); void wxLogError(const char * formatString, ... );
void wxVLogError(const char * formatString, va_list argPtr); void wxVLogError(const char * formatString, va_list argPtr);
//@} //@}
//@{ //@{
@@ -750,26 +750,26 @@ void wxLogError(const char * formatString, ... );
expand to nothing in the release one. The reason for making expand to nothing in the release one. The reason for making
it a separate function from it is that usually there are a lot of trace it a separate function from it is that usually there are a lot of trace
messages, so it might make sense to separate them from other debug messages. messages, so it might make sense to separate them from other debug messages.
The trace messages also usually can be separated into different categories and The trace messages also usually can be separated into different categories and
the second and third versions of this function only log the message if the the second and third versions of this function only log the message if the
@e mask which it has is currently enabled in wxLog. This @e mask which it has is currently enabled in wxLog. This
allows to selectively trace only some operations and not others by changing allows to selectively trace only some operations and not others by changing
the value of the trace mask (possible during the run-time). the value of the trace mask (possible during the run-time).
For the second function (taking a string mask), the message is logged only if For the second function (taking a string mask), the message is logged only if
the mask has been previously enabled by the call to the mask has been previously enabled by the call to
wxLog::AddTraceMask or by setting wxLog::AddTraceMask or by setting
@ref overview_envvars "@c WXTRACE environment variable". @ref overview_envvars "@c WXTRACE environment variable".
The predefined string trace masks The predefined string trace masks
used by wxWidgets are: used by wxWidgets are:
wxTRACE_MemAlloc: trace memory allocation (new/delete) wxTRACE_MemAlloc: trace memory allocation (new/delete)
wxTRACE_Messages: trace window messages/X callbacks wxTRACE_Messages: trace window messages/X callbacks
wxTRACE_ResAlloc: trace GDI resource allocation wxTRACE_ResAlloc: trace GDI resource allocation
wxTRACE_RefCount: trace various ref counting operations wxTRACE_RefCount: trace various ref counting operations
wxTRACE_OleCalls: trace OLE method calls (Win32 only) wxTRACE_OleCalls: trace OLE method calls (Win32 only)
@b Caveats: since both the mask and the format string are strings, @b Caveats: since both the mask and the format string are strings,
this might lead to function signature confusion in some cases: this might lead to function signature confusion in some cases:
if you intend to call the format string only version of wxLogTrace, if you intend to call the format string only version of wxLogTrace,
@@ -777,14 +777,14 @@ void wxLogError(const char * formatString, ... );
for that %s, the string mask version of wxLogTrace will erroneously get called instead, since you are supplying two string parameters to the function. for that %s, the string mask version of wxLogTrace will erroneously get called instead, since you are supplying two string parameters to the function.
In this case you'll unfortunately have to avoid having two leading In this case you'll unfortunately have to avoid having two leading
string parameters, e.g. by adding a bogus integer (with its %d format string). string parameters, e.g. by adding a bogus integer (with its %d format string).
The third version of the function only logs the message if all the bits The third version of the function only logs the message if all the bits
corresponding to the @e mask are set in the wxLog trace mask which can be corresponding to the @e mask are set in the wxLog trace mask which can be
set by wxLog::SetTraceMask. This version is less set by wxLog::SetTraceMask. This version is less
flexible than the previous one because it doesn't allow defining the user flexible than the previous one because it doesn't allow defining the user
trace masks easily - this is why it is deprecated in favour of using string trace masks easily - this is why it is deprecated in favour of using string
trace masks. trace masks.
wxTraceMemAlloc: trace memory allocation (new/delete) wxTraceMemAlloc: trace memory allocation (new/delete)
wxTraceMessages: trace window messages/X callbacks wxTraceMessages: trace window messages/X callbacks
wxTraceResAlloc: trace GDI resource allocation wxTraceResAlloc: trace GDI resource allocation
@@ -792,23 +792,23 @@ void wxLogError(const char * formatString, ... );
wxTraceOleCalls: trace OLE method calls (Win32 only) wxTraceOleCalls: trace OLE method calls (Win32 only)
*/ */
void wxLogTrace(const char * formatString, ... ); void wxLogTrace(const char * formatString, ... );
void wxVLogTrace(const char * formatString, va_list argPtr); void wxVLogTrace(const char * formatString, va_list argPtr);
void wxLogTrace(const char * mask, const char * formatString, void wxLogTrace(const char * mask, const char * formatString,
... ); ... );
void wxVLogTrace(const char * mask, void wxVLogTrace(const char * mask,
const char * formatString, const char * formatString,
va_list argPtr); va_list argPtr);
void wxLogTrace(wxTraceMask mask, const char * formatString, void wxLogTrace(wxTraceMask mask, const char * formatString,
... ); ... );
void wxVLogTrace(wxTraceMask mask, const char * formatString, void wxVLogTrace(wxTraceMask mask, const char * formatString,
va_list argPtr); va_list argPtr);
//@} //@}
/** /**
Returns the error message corresponding to the given system error code. If Returns the error message corresponding to the given system error code. If
@e errCode is 0 (default), the last error code (as returned by @e errCode is 0 (default), the last error code (as returned by
wxSysErrorCode) is used. wxSysErrorCode) is used.
@sa wxSysErrorCode, wxLogSysError @sa wxSysErrorCode, wxLogSysError
*/ */
const wxChar * wxSysErrorMsg(unsigned long errCode = 0); const wxChar * wxSysErrorMsg(unsigned long errCode = 0);
@@ -826,7 +826,7 @@ void wxUninitialize();
nothing in release mode (otherwise). nothing in release mode (otherwise).
*/ */
void wxLogDebug(const char * formatString, ... ); void wxLogDebug(const char * formatString, ... );
void wxVLogDebug(const char * formatString, va_list argPtr); void wxVLogDebug(const char * formatString, va_list argPtr);
//@} //@}
/** /**
@@ -834,7 +834,7 @@ void wxLogDebug(const char * formatString, ... );
the IMPLEMENT_APP macro. Thus, before using it the IMPLEMENT_APP macro. Thus, before using it
anywhere but in the same module where this macro is used, you must make it anywhere but in the same module where this macro is used, you must make it
available using DECLARE_APP. available using DECLARE_APP.
The advantage of using this function compared to directly using the global The advantage of using this function compared to directly using the global
wxTheApp pointer is that the latter is of type @c wxApp * and so wouldn't wxTheApp pointer is that the latter is of type @c wxApp * and so wouldn't
allow you to access the functions specific to your application class but not allow you to access the functions specific to your application class but not
@@ -847,26 +847,26 @@ wxAppDerivedClass wxGetApp();
Messages logged by these functions will appear in the statusbar of the @e frame Messages logged by these functions will appear in the statusbar of the @e frame
or of the top level application window by default (i.e. when using or of the top level application window by default (i.e. when using
the second version of the functions). the second version of the functions).
If the target frame doesn't have a statusbar, the message will be lost. If the target frame doesn't have a statusbar, the message will be lost.
*/ */
void wxLogStatus(wxFrame * frame, const char * formatString, void wxLogStatus(wxFrame * frame, const char * formatString,
... ); ... );
void wxVLogStatus(wxFrame * frame, const char * formatString, void wxVLogStatus(wxFrame * frame, const char * formatString,
va_list argPtr); va_list argPtr);
void wxLogStatus(const char * formatString, ... ); void wxLogStatus(const char * formatString, ... );
void wxVLogStatus(const char * formatString, va_list argPtr); void wxVLogStatus(const char * formatString, va_list argPtr);
//@} //@}
/** /**
This function is used in wxBase only and only if you don't create This function is used in wxBase only and only if you don't create
wxApp object at all. In this case you must call it from your wxApp object at all. In this case you must call it from your
@c main() function before calling any other wxWidgets functions. @c main() function before calling any other wxWidgets functions.
If the function returns @false the initialization could not be performed, If the function returns @false the initialization could not be performed,
in this case the library cannot be used and in this case the library cannot be used and
wxUninitialize shouldn't be called neither. wxUninitialize shouldn't be called neither.
This function may be called several times but This function may be called several times but
wxUninitialize must be called for each successful wxUninitialize must be called for each successful
call to this function. call to this function.
@@ -878,7 +878,7 @@ bool wxInitialize();
wxGetApp function implemented by wxGetApp function implemented by
IMPLEMENT_APP. It creates the declaration IMPLEMENT_APP. It creates the declaration
@c className wxGetApp(void). @c className wxGetApp(void).
Example: Example:
@code @code
DECLARE_APP(MyApp) DECLARE_APP(MyApp)
@@ -888,7 +888,7 @@ bool wxInitialize();
/** /**
Calls wxApp::Yield. Calls wxApp::Yield.
This function is kept only for backwards compatibility. Please use This function is kept only for backwards compatibility. Please use
the wxApp::Yield method instead in any new code. the wxApp::Yield method instead in any new code.
*/ */
@@ -901,12 +901,12 @@ bool wxYield();
as the last system error code (@e errno or @e ::GetLastError() depending as the last system error code (@e errno or @e ::GetLastError() depending
on the platform) and the corresponding error message. The second form on the platform) and the corresponding error message. The second form
of this function takes the error code explicitly as the first argument. of this function takes the error code explicitly as the first argument.
@sa wxSysErrorCode, wxSysErrorMsg @sa wxSysErrorCode, wxSysErrorMsg
*/ */
void wxLogSysError(const char * formatString, ... ); void wxLogSysError(const char * formatString, ... );
void wxVLogSysError(const char * formatString, void wxVLogSysError(const char * formatString,
va_list argPtr); va_list argPtr);
//@} //@}
//@{ //@{
@@ -915,23 +915,23 @@ void wxLogSysError(const char * formatString, ... );
using the default wxWidgets entry code (e.g. main or WinMain). For example, you using the default wxWidgets entry code (e.g. main or WinMain). For example, you
can initialize wxWidgets from an Microsoft Foundation Classes application using can initialize wxWidgets from an Microsoft Foundation Classes application using
this function. this function.
The following overload of wxEntry is available under all platforms: The following overload of wxEntry is available under all platforms:
(notice that under Windows CE platform, and only there, the type of (notice that under Windows CE platform, and only there, the type of
@e pCmdLine is @c wchar_t *, otherwise it is @c char *, even in @e pCmdLine is @c wchar_t *, otherwise it is @c char *, even in
Unicode build). Unicode build).
@remarks To clean up wxWidgets, call wxApp::OnExit followed by the static @remarks To clean up wxWidgets, call wxApp::OnExit followed by the static
function wxApp::CleanUp. For example, if exiting from function wxApp::CleanUp. For example, if exiting from
an MFC application that also uses wxWidgets: an MFC application that also uses wxWidgets:
@sa wxEntryStart @sa wxEntryStart
*/ */
int wxEntry(int& argc, wxChar ** argv); int wxEntry(int& argc, wxChar ** argv);
int wxEntry(HINSTANCE hInstance, int wxEntry(HINSTANCE hInstance,
HINSTANCE hPrevInstance = @NULL, HINSTANCE hPrevInstance = @NULL,
char * pCmdLine = @NULL, char * pCmdLine = @NULL,
int nCmdShow = SW_SHOWNORMAL); int nCmdShow = SW_SHOWNORMAL);
//@} //@}

View File

@@ -9,34 +9,34 @@
/** /**
@class wxAppTraits @class wxAppTraits
@wxheader{apptrait.h} @wxheader{apptrait.h}
The @b wxAppTraits class defines various configurable aspects of a wxApp. The @b wxAppTraits class defines various configurable aspects of a wxApp.
You can access it using wxApp::GetTraits function and you can You can access it using wxApp::GetTraits function and you can
create your own wxAppTraits overriding the create your own wxAppTraits overriding the
wxApp::CreateTraits function. wxApp::CreateTraits function.
By default, wxWidgets creates a @c wxConsoleAppTraits object for console By default, wxWidgets creates a @c wxConsoleAppTraits object for console
applications applications
(i.e. those applications linked against wxBase library only - see the (i.e. those applications linked against wxBase library only - see the
@ref overview_librarieslist "Libraries list" page) and a @c wxGUIAppTraits @ref overview_librarieslist "Libraries list" page) and a @c wxGUIAppTraits
object for GUI object for GUI
applications. applications.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxappoverview "wxApp overview", wxApp @ref overview_wxappoverview "wxApp overview", wxApp
*/ */
class wxAppTraits class wxAppTraits
{ {
public: public:
/** /**
Called by wxWidgets to create the default configuration object for the Called by wxWidgets to create the default configuration object for the
application. The default version creates a registry-based application. The default version creates a registry-based
wxRegConfig class under MSW and wxRegConfig class under MSW and
wxFileConfig under all other platforms. The wxFileConfig under all other platforms. The
wxApp wxApp::GetAppName and wxApp wxApp::GetAppName and
wxApp::GetVendorName methods are used to determine the wxApp::GetVendorName methods are used to determine the
registry key or file name. registry key or file name.
*/ */

View File

@@ -9,20 +9,20 @@
/** /**
@class wxArchiveInputStream @class wxArchiveInputStream
@wxheader{archive.h} @wxheader{archive.h}
An abstract base class which serves as a common interface to An abstract base class which serves as a common interface to
archive input streams such as wxZipInputStream. archive input streams such as wxZipInputStream.
wxArchiveInputStream::GetNextEntry returns an wxArchiveInputStream::GetNextEntry returns an
wxArchiveEntry object containing the meta-data wxArchiveEntry object containing the meta-data
for the next entry in the archive (and gives away ownership). Reading from for the next entry in the archive (and gives away ownership). Reading from
the wxArchiveInputStream then returns the entry's data. Eof() becomes @true the wxArchiveInputStream then returns the entry's data. Eof() becomes @true
after an attempt has been made to read past the end of the entry's data. after an attempt has been made to read past the end of the entry's data.
When there are no more entries, GetNextEntry() returns @NULL and sets Eof(). When there are no more entries, GetNextEntry() returns @NULL and sets Eof().
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxarc "Archive formats such as zip", wxArchiveEntry, @ref overview_wxarc "Archive formats such as zip", wxArchiveEntry,
wxArchiveOutputStream wxArchiveOutputStream
@@ -59,18 +59,18 @@ public:
/** /**
@class wxArchiveOutputStream @class wxArchiveOutputStream
@wxheader{archive.h} @wxheader{archive.h}
An abstract base class which serves as a common interface to An abstract base class which serves as a common interface to
archive output streams such as wxZipOutputStream. archive output streams such as wxZipOutputStream.
wxArchiveOutputStream::PutNextEntry is used wxArchiveOutputStream::PutNextEntry is used
to create a new entry in the output archive, then the entry's data is to create a new entry in the output archive, then the entry's data is
written to the wxArchiveOutputStream. Another call to PutNextEntry() written to the wxArchiveOutputStream. Another call to PutNextEntry()
closes the current entry and begins the next. closes the current entry and begins the next.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxarc "Archive formats such as zip", wxArchiveEntry, @ref overview_wxarc "Archive formats such as zip", wxArchiveEntry,
wxArchiveInputStream wxArchiveInputStream
@@ -154,7 +154,7 @@ public:
data can then be written by writing to this wxArchiveOutputStream. data can then be written by writing to this wxArchiveOutputStream.
*/ */
bool PutNextEntry(wxArchiveEntry* entry); bool PutNextEntry(wxArchiveEntry* entry);
bool PutNextEntry(const wxString& name); bool PutNextEntry(const wxString& name);
//@} //@}
}; };
@@ -162,15 +162,15 @@ public:
/** /**
@class wxArchiveEntry @class wxArchiveEntry
@wxheader{archive.h} @wxheader{archive.h}
An abstract base class which serves as a common interface to An abstract base class which serves as a common interface to
archive entry classes such as wxZipEntry. archive entry classes such as wxZipEntry.
These hold the meta-data (filename, timestamp, etc.), for entries These hold the meta-data (filename, timestamp, etc.), for entries
in archive files such as zips and tars. in archive files such as zips and tars.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric @ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric
"Generic archive programming", wxArchiveInputStream, wxArchiveOutputStream, wxArchiveNotifier "Generic archive programming", wxArchiveInputStream, wxArchiveOutputStream, wxArchiveNotifier
@@ -188,7 +188,7 @@ public:
The entry's timestamp. The entry's timestamp.
*/ */
wxDateTime GetDateTime(); wxDateTime GetDateTime();
void SetDateTime(const wxDateTime& dt); void SetDateTime(const wxDateTime& dt);
//@} //@}
//@{ //@{
@@ -202,8 +202,8 @@ public:
Similarly, setting a name with a trailing path separator sets IsDir(). Similarly, setting a name with a trailing path separator sets IsDir().
*/ */
wxString GetName(wxPathFormat format = wxPATH_NATIVE); wxString GetName(wxPathFormat format = wxPATH_NATIVE);
void SetName(const wxString& name, void SetName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
//@} //@}
//@{ //@{
@@ -211,7 +211,7 @@ public:
The size of the entry's data in bytes. The size of the entry's data in bytes.
*/ */
off_t GetSize(); off_t GetSize();
void SetSize(off_t size); void SetSize(off_t size);
//@} //@}
/** /**
@@ -250,7 +250,7 @@ public:
restore files, even if the archive contains no explicit directory entries. restore files, even if the archive contains no explicit directory entries.
*/ */
bool IsDir(); bool IsDir();
void SetIsDir(bool isDir = @true); void SetIsDir(bool isDir = @true);
//@} //@}
//@{ //@{
@@ -258,7 +258,7 @@ public:
True if the entry is a read-only file. True if the entry is a read-only file.
*/ */
bool IsReadOnly(); bool IsReadOnly();
void SetIsReadOnly(bool isReadOnly = @true); void SetIsReadOnly(bool isReadOnly = @true);
//@} //@}
//@{ //@{
@@ -274,7 +274,7 @@ public:
non-seekable streams). non-seekable streams).
*/ */
void SetNotifier(wxArchiveNotifier& notifier); void SetNotifier(wxArchiveNotifier& notifier);
void UnsetNotifier(); void UnsetNotifier();
//@} //@}
}; };
@@ -282,27 +282,27 @@ public:
/** /**
@class wxArchiveClassFactory @class wxArchiveClassFactory
@wxheader{archive.h} @wxheader{archive.h}
Allows the creation of streams to handle archive formats such Allows the creation of streams to handle archive formats such
as zip and tar. as zip and tar.
For example, given a filename you can search for a factory that will For example, given a filename you can search for a factory that will
handle it and create a stream to read it: handle it and create a stream to read it:
@code @code
factory = wxArchiveClassFactory::Find(filename, wxSTREAM_FILEEXT); factory = wxArchiveClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (factory) if (factory)
stream = factory-NewStream(new wxFFileInputStream(filename)); stream = factory-NewStream(new wxFFileInputStream(filename));
@endcode @endcode
wxArchiveClassFactory::Find can also search wxArchiveClassFactory::Find can also search
for a factory by MIME type or wxFileSystem protocol. for a factory by MIME type or wxFileSystem protocol.
The available factories can be enumerated The available factories can be enumerated
using @ref wxArchiveClassFactory::getfirst "GetFirst() and GetNext". using @ref wxArchiveClassFactory::getfirst "GetFirst() and GetNext".
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric @ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric
"Generic archive programming", wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream, wxFilterClassFactory "Generic archive programming", wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream, wxFilterClassFactory
@@ -329,7 +329,7 @@ public:
can be a complete filename rather than just an extension. can be a complete filename rather than just an extension.
*/ */
static const wxArchiveClassFactory* Find(const wxChar* protocol, static const wxArchiveClassFactory* Find(const wxChar* protocol,
wxStreamProtocolType type = wxSTREAM_PROTOCOL); wxStreamProtocolType type = wxSTREAM_PROTOCOL);
//@{ //@{
/** /**
@@ -338,7 +338,7 @@ public:
constructor, is wxConvLocal. constructor, is wxConvLocal.
*/ */
wxMBConv GetConv(); wxMBConv GetConv();
void SetConv(wxMBConv& conv); void SetConv(wxMBConv& conv);
//@} //@}
//@{ //@{
@@ -350,7 +350,7 @@ public:
are available. They do not give away ownership of the factory. are available. They do not give away ownership of the factory.
*/ */
static const wxArchiveClassFactory* GetFirst(); static const wxArchiveClassFactory* GetFirst();
const wxArchiveClassFactory* GetNext(); const wxArchiveClassFactory* GetNext();
//@} //@}
/** /**
@@ -390,9 +390,9 @@ public:
takes ownership of it. If it is passed by reference then it does not. takes ownership of it. If it is passed by reference then it does not.
*/ */
wxArchiveInputStream* NewStream(wxInputStream& stream); wxArchiveInputStream* NewStream(wxInputStream& stream);
wxArchiveOutputStream* NewStream(wxOutputStream& stream); wxArchiveOutputStream* NewStream(wxOutputStream& stream);
wxArchiveInputStream* NewStream(wxInputStream* stream); wxArchiveInputStream* NewStream(wxInputStream* stream);
wxArchiveOutputStream* NewStream(wxOutputStream* stream); wxArchiveOutputStream* NewStream(wxOutputStream* stream);
//@} //@}
/** /**
@@ -400,7 +400,7 @@ public:
by @ref getfirst() GetFirst()/GetNext. by @ref getfirst() GetFirst()/GetNext.
It is not necessary to do this to use the archive streams. It is usually It is not necessary to do this to use the archive streams. It is usually
used when implementing streams, typically the implementation will used when implementing streams, typically the implementation will
add a static instance of its factory class. add a static instance of its factory class.
It can also be used to change the order of a factory already in the list, It can also be used to change the order of a factory already in the list,
@@ -427,7 +427,7 @@ public:
/** /**
@class wxArchiveNotifier @class wxArchiveNotifier
@wxheader{archive.h} @wxheader{archive.h}
If you need to know when a If you need to know when a
wxArchiveInputStream updates a wxArchiveInputStream updates a
wxArchiveEntry object, you can create wxArchiveEntry object, you can create
@@ -437,20 +437,20 @@ public:
using wxArchiveEntry::SetNotifier. using wxArchiveEntry::SetNotifier.
Your OnEntryUpdated() method will then be invoked whenever the input Your OnEntryUpdated() method will then be invoked whenever the input
stream updates the entry. stream updates the entry.
Setting a notifier is not usually necessary. It is used to handle Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an archive in a pipeline (i.e. between certain cases when modifying an archive in a pipeline (i.e. between
non-seekable streams). non-seekable streams).
See @ref overview_wxarcnoseek "Archives on non-seekable streams". See @ref overview_wxarcnoseek "Archives on non-seekable streams".
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxarcnoseek "Archives on non-seekable streams", wxArchiveEntry, @ref overview_wxarcnoseek "Archives on non-seekable streams", wxArchiveEntry,
wxArchiveInputStream, wxArchiveOutputStream wxArchiveInputStream, wxArchiveOutputStream
*/ */
class wxArchiveNotifier class wxArchiveNotifier
{ {
public: public:
/** /**
@@ -463,127 +463,127 @@ public:
/** /**
@class wxArchiveIterator @class wxArchiveIterator
@wxheader{archive.h} @wxheader{archive.h}
An input iterator template class that can be used to transfer an archive's An input iterator template class that can be used to transfer an archive's
catalogue to a container. It is only available if wxUSE_STL is set to 1 catalogue to a container. It is only available if wxUSE_STL is set to 1
in setup.h, and the uses for it outlined below require a compiler which in setup.h, and the uses for it outlined below require a compiler which
supports member templates. supports member templates.
@code @code
template class Arc, class T = typename Arc::entry_type* template class Arc, class T = typename Arc::entry_type*
class wxArchiveIterator class wxArchiveIterator
{ {
// this constructor creates an 'end of sequence' object // this constructor creates an 'end of sequence' object
wxArchiveIterator(); wxArchiveIterator();
// template parameter 'Arc' should be the type of an archive input stream // template parameter 'Arc' should be the type of an archive input stream
wxArchiveIterator(Arc& arc) { wxArchiveIterator(Arc& arc) {
/* ... */ /* ... */
}; };
@endcode @endcode
The first template parameter should be the type of archive input stream The first template parameter should be the type of archive input stream
(e.g. wxArchiveInputStream) and the (e.g. wxArchiveInputStream) and the
second can either be a pointer to an entry second can either be a pointer to an entry
(e.g. wxArchiveEntry*), or a string/pointer pair (e.g. wxArchiveEntry*), or a string/pointer pair
(e.g. std::pairwxString, wxArchiveEntry*). (e.g. std::pairwxString, wxArchiveEntry*).
The @c wx/archive.h header defines the following typedefs: The @c wx/archive.h header defines the following typedefs:
@code @code
typedef wxArchiveIteratorwxArchiveInputStream wxArchiveIter; typedef wxArchiveIteratorwxArchiveInputStream wxArchiveIter;
typedef wxArchiveIteratorwxArchiveInputStream, typedef wxArchiveIteratorwxArchiveInputStream,
std::pairwxString, wxArchiveEntry* wxArchivePairIter; std::pairwxString, wxArchiveEntry* wxArchivePairIter;
@endcode @endcode
The header for any implementation of this interface should define similar The header for any implementation of this interface should define similar
typedefs for its types, for example in @c wx/zipstrm.h there is: typedefs for its types, for example in @c wx/zipstrm.h there is:
@code @code
typedef wxArchiveIteratorwxZipInputStream wxZipIter; typedef wxArchiveIteratorwxZipInputStream wxZipIter;
typedef wxArchiveIteratorwxZipInputStream, typedef wxArchiveIteratorwxZipInputStream,
std::pairwxString, wxZipEntry* wxZipPairIter; std::pairwxString, wxZipEntry* wxZipPairIter;
@endcode @endcode
Transferring the catalogue of an archive @e arc to a vector @e cat, Transferring the catalogue of an archive @e arc to a vector @e cat,
can then be done something like this: can then be done something like this:
@code @code
std::vectorwxArchiveEntry* cat((wxArchiveIter)arc, wxArchiveIter()); std::vectorwxArchiveEntry* cat((wxArchiveIter)arc, wxArchiveIter());
@endcode @endcode
When the iterator is dereferenced, it gives away ownership of an entry When the iterator is dereferenced, it gives away ownership of an entry
object. So in the above example, when you have finished with @e cat object. So in the above example, when you have finished with @e cat
you must delete the pointers it contains. you must delete the pointers it contains.
If you have smart pointers with normal copy semantics (i.e. not auto_ptr If you have smart pointers with normal copy semantics (i.e. not auto_ptr
or wxScopedPtr), then you can create an iterator or wxScopedPtr), then you can create an iterator
which uses them instead. For example, with a smart pointer class for which uses them instead. For example, with a smart pointer class for
zip entries @e ZipEntryPtr: zip entries @e ZipEntryPtr:
@code @code
typedef std::vectorZipEntryPtr ZipCatalog; typedef std::vectorZipEntryPtr ZipCatalog;
typedef wxArchiveIteratorwxZipInputStream, ZipEntryPtr ZipIter; typedef wxArchiveIteratorwxZipInputStream, ZipEntryPtr ZipIter;
ZipCatalog cat((ZipIter)zip, ZipIter()); ZipCatalog cat((ZipIter)zip, ZipIter());
@endcode @endcode
Iterators that return std::pair objects can be used to Iterators that return std::pair objects can be used to
populate a std::multimap, to allow entries to be looked populate a std::multimap, to allow entries to be looked
up by name. The string is initialised using the wxArchiveEntry object's up by name. The string is initialised using the wxArchiveEntry object's
wxArchiveEntry::GetInternalName function. wxArchiveEntry::GetInternalName function.
@code @code
typedef std::multimapwxString, wxZipEntry* ZipCatalog; typedef std::multimapwxString, wxZipEntry* ZipCatalog;
ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter()); ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter());
@endcode @endcode
Note that this iterator also gives away ownership of an entry Note that this iterator also gives away ownership of an entry
object each time it is dereferenced. So in the above example, when object each time it is dereferenced. So in the above example, when
you have finished with @e cat you must delete the pointers it contains. you have finished with @e cat you must delete the pointers it contains.
Or if you have them, a pair containing a smart pointer can be used Or if you have them, a pair containing a smart pointer can be used
(again @e ZipEntryPtr), no worries about ownership: (again @e ZipEntryPtr), no worries about ownership:
@code @code
typedef std::multimapwxString, ZipEntryPtr ZipCatalog; typedef std::multimapwxString, ZipEntryPtr ZipCatalog;
typedef wxArchiveIteratorwxZipInputStream, typedef wxArchiveIteratorwxZipInputStream,
std::pairwxString, ZipEntryPtr ZipPairIter; std::pairwxString, ZipEntryPtr ZipPairIter;
ZipCatalog cat((ZipPairIter)zip, ZipPairIter()); ZipCatalog cat((ZipPairIter)zip, ZipPairIter());
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream
*/ */
class wxArchiveIterator class wxArchiveIterator
{ {
public: public:
//@{ //@{
/** /**
Construct iterator that returns all the entries in the archive input Construct iterator that returns all the entries in the archive input
stream @e arc. stream @e arc.
*/ */
wxArchiveIterator(); wxArchiveIterator();
wxArchiveIterator(Arc& arc); wxArchiveIterator(Arc& arc);
//@} //@}
/** /**
Returns an entry object from the archive input stream, giving away Returns an entry object from the archive input stream, giving away
ownership. ownership.
*/ */
const T operator*(); const T operator*();
//@{ //@{
/** /**
Position the input iterator at the next entry in the archive input stream. Position the input iterator at the next entry in the archive input stream.
*/ */
wxArchiveIterator operator++(); wxArchiveIterator operator++();
wxArchiveIterator operator++(int ); wxArchiveIterator operator++(int );
//@} //@}
}; };

View File

@@ -9,49 +9,49 @@
/** /**
@class wxArrayString @class wxArrayString
@wxheader{arrstr.h} @wxheader{arrstr.h}
wxArrayString is an efficient container for storing wxArrayString is an efficient container for storing
wxString objects. It has the same features as all wxString objects. It has the same features as all
wxArray classes, i.e. it dynamically expands when new items wxArray classes, i.e. it dynamically expands when new items
are added to it (so it is as easy to use as a linked list), but the access are added to it (so it is as easy to use as a linked list), but the access
time to the elements is constant, instead of being linear in number of time to the elements is constant, instead of being linear in number of
elements as in the case of linked lists. It is also very size efficient and elements as in the case of linked lists. It is also very size efficient and
doesn't take more space than a C array @e wxString[] type (wxArrayString doesn't take more space than a C array @e wxString[] type (wxArrayString
uses its knowledge of internals of wxString class to achieve this). uses its knowledge of internals of wxString class to achieve this).
This class is used in the same way as other dynamic arrays, This class is used in the same way as other dynamic arrays,
except that no @e WX_DEFINE_ARRAY declaration is needed for it. When a except that no @e WX_DEFINE_ARRAY declaration is needed for it. When a
string is added or inserted in the array, a copy of the string is created, so string is added or inserted in the array, a copy of the string is created, so
the original string may be safely deleted (e.g. if it was a @e wxChar * the original string may be safely deleted (e.g. if it was a @e wxChar *
pointer the memory it was using can be freed immediately after this). In pointer the memory it was using can be freed immediately after this). In
general, there is no need to worry about string memory deallocation when using general, there is no need to worry about string memory deallocation when using
this class - it will always free the memory it uses itself. this class - it will always free the memory it uses itself.
The references returned by wxArrayString::Item, The references returned by wxArrayString::Item,
wxArrayString::Last or wxArrayString::Last or
@ref wxArrayString::operatorindex operator[] are not constant, so the @ref wxArrayString::operatorindex operator[] are not constant, so the
array elements may be modified in place like this array elements may be modified in place like this
@code @code
array.Last().MakeUpper(); array.Last().MakeUpper();
@endcode @endcode
There is also a variant of wxArrayString called wxSortedArrayString which has There is also a variant of wxArrayString called wxSortedArrayString which has
exactly the same methods as wxArrayString, but which always keeps the string exactly the same methods as wxArrayString, but which always keeps the string
in it in (alphabetical) order. wxSortedArrayString uses binary search in its in it in (alphabetical) order. wxSortedArrayString uses binary search in its
wxArrayString::Index function (instead of linear search for wxArrayString::Index function (instead of linear search for
wxArrayString::Index) which makes it much more efficient if you add strings to wxArrayString::Index) which makes it much more efficient if you add strings to
the array rarely (because, of course, you have to pay for Index() efficiency the array rarely (because, of course, you have to pay for Index() efficiency
by having Add() be slower) but search for them often. Several methods should by having Add() be slower) but search for them often. Several methods should
not be used with sorted array (basically, all which break the order of items) not be used with sorted array (basically, all which break the order of items)
which is mentioned in their description. which is mentioned in their description.
Final word: none of the methods of wxArrayString is virtual including its Final word: none of the methods of wxArrayString is virtual including its
destructor, so this class should not be used as a base class. destructor, so this class should not be used as a base class.
@library{wxbase} @library{wxbase}
@category{containers} @category{containers}
@seealso @seealso
wxArray, wxString, @ref overview_wxstringoverview "wxString overview" wxArray, wxString, @ref overview_wxstringoverview "wxString overview"
*/ */
@@ -63,10 +63,10 @@ public:
Constructor from a wxString array. Pass a size @e sz and array @e arr. Constructor from a wxString array. Pass a size @e sz and array @e arr.
*/ */
wxArrayString(); wxArrayString();
wxArrayString(const wxArrayString& array); wxArrayString(const wxArrayString& array);
wxArrayString(size_t sz, const char** arr); wxArrayString(size_t sz, const char** arr);
wxArrayString(size_t sz, const wchar_t** arr); wxArrayString(size_t sz, const wchar_t** arr);
wxArrayString(size_t sz, const wxString* arr); wxArrayString(size_t sz, const wxString* arr);
//@} //@}
/** /**
@@ -105,7 +105,7 @@ public:
void Clear(); void Clear();
/** /**
Empties the array: after a call to this function Empties the array: after a call to this function
GetCount() will return 0. However, this GetCount() will return 0. However, this
function does not free the memory used by the array and so should be used when 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 the array is going to be reused for storing other strings. Otherwise, you
@@ -125,7 +125,7 @@ public:
case sensitive (default), otherwise the case is ignored. case sensitive (default), otherwise the case is ignored.
This function uses linear search for wxArrayString and binary search for This function uses linear search for wxArrayString and binary search for
wxSortedArrayString, but it ignores the @e bCase and @e bFromEnd wxSortedArrayString, but it ignores the @e bCase and @e bFromEnd
parameters in the latter case. parameters in the latter case.
Returns index of the first item matched or @c wxNOT_FOUND if there is no match. Returns index of the first item matched or @c wxNOT_FOUND if there is no match.
@@ -137,11 +137,11 @@ public:
Insert the given number of @e copies of the new element in the array before the Insert the given number of @e copies of the new element in the array before the
position @e nIndex. Thus, for position @e nIndex. Thus, for
example, to insert the string in the beginning of the array you would write example, to insert the string in the beginning of the array you would write
If @e nIndex is equal to @e GetCount() this function behaves as If @e nIndex is equal to @e GetCount() this function behaves as
Add(). Add().
@b Warning: this function should not be used with sorted arrays because it @b Warning: this function should not be used with sorted arrays because it
could break the order of items and, for example, subsequent calls to could break the order of items and, for example, subsequent calls to
Index() would then not work! Index() would then not work!
*/ */
void Insert(const wxString& str, size_t nIndex, void Insert(const wxString& str, size_t nIndex,
@@ -201,7 +201,8 @@ public:
second one. second one.
*/ */
void Sort(bool reverseOrder = @false); void Sort(bool reverseOrder = @false);
Warning: void Sort(CompareFunction compareFunction); Warning:
void Sort(CompareFunction compareFunction);
//@} //@}
/** /**
@@ -239,25 +240,25 @@ public:
/** /**
Splits the given wxString object using the separator @e sep and returns the Splits the given wxString object using the separator @e sep and returns the
result as a wxArrayString. result as a wxArrayString.
If the @e escape character is non-@NULL, then the occurrences of @e sep If the @e escape character is non-@NULL, then the occurrences of @e sep
immediately prefixed immediately prefixed
with @e escape are not considered as separators. with @e escape are not considered as separators.
Note that empty tokens will be generated if there are two or more adjacent Note that empty tokens will be generated if there are two or more adjacent
separators. separators.
@sa wxJoin @sa wxJoin
*/ */
wxArrayString wxSplit(const wxString& str, const wxChar sep, wxArrayString wxSplit(const wxString& str, const wxChar sep,
const wxChar escape = ' const wxChar escape = '
'); ');
/** /**
Concatenate all lines of the given wxArrayString object using the separator @e Concatenate all lines of the given wxArrayString object using the separator @e
sep and returns sep and returns
the result as a wxString. the result as a wxString.
If the @e escape character is non-@NULL, then it's used as prefix for each If the @e escape character is non-@NULL, then it's used as prefix for each
occurrence of @e sep occurrence of @e sep
in the strings contained in @e arr before joining them which is necessary in the strings contained in @e arr before joining them which is necessary

View File

@@ -9,7 +9,7 @@
/** /**
@class wxArtProvider @class wxArtProvider
@wxheader{artprov.h} @wxheader{artprov.h}
wxArtProvider class is used to customize the look of wxWidgets application. wxArtProvider class is used to customize the look of wxWidgets application.
When wxWidgets needs to display an icon or a bitmap (e.g. in the standard file When wxWidgets needs to display an icon or a bitmap (e.g. in the standard file
dialog), it does not use a hard-coded resource but asks wxArtProvider for it dialog), it does not use a hard-coded resource but asks wxArtProvider for it
@@ -20,15 +20,15 @@
wxArtProvider::CreateIconBundle methods wxArtProvider::CreateIconBundle methods
and register the provider with and register the provider with
wxArtProvider::Push: wxArtProvider::Push:
@code @code
class MyProvider : public wxArtProvider class MyProvider : public wxArtProvider
{ {
protected: protected:
wxBitmap CreateBitmap(const wxArtID& id, wxBitmap CreateBitmap(const wxArtID& id,
const wxArtClient& client, const wxArtClient& client,
const wxSize size) const wxSize size)
// optionally override this one as well // optionally override this one as well
wxIconBundle CreateIconBundle(const wxArtID& id, wxIconBundle CreateIconBundle(const wxArtID& id,
const wxArtClient& client) const wxArtClient& client)
@@ -37,20 +37,20 @@
... ...
wxArtProvider::Push(new MyProvider); wxArtProvider::Push(new MyProvider);
@endcode @endcode
If you need bitmap images (of the same artwork) that should be displayed at If you need bitmap images (of the same artwork) that should be displayed at
different sizes different sizes
you should probably consider overriding wxArtProvider::CreateIconBundle you should probably consider overriding wxArtProvider::CreateIconBundle
and supplying icon bundles that contain different bitmap sizes. and supplying icon bundles that contain different bitmap sizes.
There's another way of taking advantage of this class: you can use it in your There's another way of taking advantage of this class: you can use it in your
code and use code and use
platform native icons as provided by wxArtProvider::GetBitmap or platform native icons as provided by wxArtProvider::GetBitmap or
wxArtProvider::GetIcon (NB: this is not yet really wxArtProvider::GetIcon (NB: this is not yet really
possible as of wxWidgets 2.3.3, the set of wxArtProvider bitmaps is too possible as of wxWidgets 2.3.3, the set of wxArtProvider bitmaps is too
small). small).
wxArtProvider::~wxArtProvider wxArtProvider::~wxArtProvider
wxArtProvider::CreateBitmap wxArtProvider::CreateBitmap
wxArtProvider::CreateIconBundle wxArtProvider::CreateIconBundle
@@ -62,16 +62,16 @@
wxArtProvider::Pop wxArtProvider::Pop
wxArtProvider::Push wxArtProvider::Push
wxArtProvider::Remove wxArtProvider::Remove
Identifying art resources Identifying art resources
Every bitmap and icon bundle are known to wxArtProvider under an unique ID that Every bitmap and icon bundle are known to wxArtProvider under an unique ID that
is used when is used when
requesting a resource from it. The ID is represented by wxArtID type and can requesting a resource from it. The ID is represented by wxArtID type and can
have one of these predefined values (you can see bitmaps represented by these have one of these predefined values (you can see bitmaps represented by these
constants in the artprov sample): constants in the artprov sample):
wxART_ERROR wxART_ERROR
wxART_QUESTION wxART_QUESTION
wxART_WARNING wxART_WARNING
@@ -120,14 +120,14 @@
wxART_FLOPPY wxART_FLOPPY
wxART_CDROM wxART_CDROM
wxART_REMOVABLE wxART_REMOVABLE
Additionally, any string recognized by custom art providers registered using Additionally, any string recognized by custom art providers registered using
wxArtProvider::Push may be used. wxArtProvider::Push may be used.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
See the artprov sample for an example of wxArtProvider usage. See the artprov sample for an example of wxArtProvider usage.
*/ */
@@ -142,7 +142,7 @@ public:
/** /**
Client is the entity that calls wxArtProvider's GetBitmap or GetIcon Client is the entity that calls wxArtProvider's GetBitmap or GetIcon
function. It is represented by wxClientID type and can have one of these function. It is represented by wxClientID type and can have one of these
values: values:
wxART_TOOLBAR wxART_TOOLBAR
@@ -160,7 +160,7 @@ public:
slightly different icons in menus and toolbars even though they represent the slightly different icons in menus and toolbars even though they represent the
same action (e.g. @c wx_ART_FILE_OPEN). Remember that this is really same action (e.g. @c wx_ART_FILE_OPEN). Remember that this is really
only a hint for wxArtProvider -- it is common that only a hint for wxArtProvider -- it is common that
GetBitmap() GetBitmap()
returns identical bitmap for different @e client values! returns identical bitmap for different @e client values!
@sa See the artprov sample for an example of wxArtProvider usage. @sa See the artprov sample for an example of wxArtProvider usage.
@@ -173,14 +173,14 @@ public:
therefore not necessary to optimize CreateBitmap() for speed (e.g. you may therefore not necessary to optimize CreateBitmap() for speed (e.g. you may
create wxBitmap objects from XPMs here). create wxBitmap objects from XPMs here).
@param id @param id
wxArtID unique identifier of the bitmap. wxArtID unique identifier of the bitmap.
@param client @param client
wxArtClient identifier of the client (i.e. who is asking for the bitmap). wxArtClient identifier of the client (i.e. who is asking for the bitmap).
This only servers as a hint. This only servers as a hint.
@param size @param size
Preferred size of the bitmap. The function may return a bitmap of different Preferred size of the bitmap. The function may return a bitmap of different
dimensions, it will be automatically rescaled to meet client's request. dimensions, it will be automatically rescaled to meet client's request.
@@ -205,13 +205,13 @@ public:
/** /**
Query registered providers for bitmap with given ID. Query registered providers for bitmap with given ID.
@param id @param id
wxArtID unique identifier of the bitmap. wxArtID unique identifier of the bitmap.
@param client @param client
wxArtClient identifier of the client (i.e. who is asking for the bitmap). wxArtClient identifier of the client (i.e. who is asking for the bitmap).
@param size @param size
Size of the returned bitmap or wxDefaultSize if size doesn't matter. Size of the returned bitmap or wxDefaultSize if size doesn't matter.
@returns The bitmap if one of registered providers recognizes the ID or @returns The bitmap if one of registered providers recognizes the ID or
@@ -223,27 +223,27 @@ public:
//@{ //@{
/** /**
Returns a suitable size hint for the given @e wxArtClient. If Returns a suitable size hint for the given @e wxArtClient. If
@e platform_default is @true, return a size based on the current platform, @e platform_default is @true, return a size based on the current platform,
otherwise return the size from the topmost wxArtProvider. @e wxDefaultSize may otherwise return the size from the topmost wxArtProvider. @e wxDefaultSize may
be be
returned if the client doesn't have a specified size, like wxART_OTHER for returned if the client doesn't have a specified size, like wxART_OTHER for
example. example.
*/ */
static wxIcon GetIcon(const wxArtID& id, static wxIcon GetIcon(const wxArtID& id,
const wxArtClient& client = wxART_OTHER, const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize); const wxSize& size = wxDefaultSize);
static wxSize GetSizeHint(const wxArtClient& client, static wxSize GetSizeHint(const wxArtClient& client,
bool platform_default = @false); bool platform_default = @false);
//@} //@}
/** /**
Query registered providers for icon bundle with given ID. Query registered providers for icon bundle with given ID.
@param id @param id
wxArtID unique identifier of the icon bundle. wxArtID unique identifier of the icon bundle.
@param client @param client
wxArtClient identifier of the client (i.e. who is asking for the icon bundle). 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 @returns The icon bundle if one of registered providers recognizes the ID
@@ -308,7 +308,7 @@ public:
wxART_CDROM wxART_CDROM
wxART_REMOVABLE wxART_REMOVABLE
Additionally, any string recognized by custom art providers registered using Additionally, any string recognized by custom art providers registered using
Push() may be used. Push() may be used.
*/ */
@@ -335,7 +335,7 @@ public:
static void Push(wxArtProvider* provider); static void Push(wxArtProvider* provider);
/** /**
Remove a provider from the stack if it is on it. The provider is not Remove a provider from the stack if it is on it. The provider is not
deleted, unlike when using Delete(). deleted, unlike when using Delete().
*/ */
static bool Remove(wxArtProvider* provider); static bool Remove(wxArtProvider* provider);

View File

@@ -1,15 +1,14 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: atomic.h // Name: atomic.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** /**
This function increments @e value in an atomic manner. This function increments @e value in an atomic manner.
*/ */
void wxAtomicInc(wxAtomicInt& value); void wxAtomicInc(wxAtomicInt& value);

View File

@@ -9,11 +9,11 @@
/** /**
@class wxAuiManager @class wxAuiManager
@headerfile aui.h wx/aui/aui.h @headerfile aui.h wx/aui/aui.h
wxAuiManager is the central class of the wxAUI class framework. wxAuiManager is the central class of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview". See also @ref overview_wxauioverview "wxAUI overview".
wxAuiManager manages the panes associated with it wxAuiManager manages the panes associated with it
for a particular wxFrame, using a pane's wxAuiPaneInfo information to for a particular wxFrame, using a pane's wxAuiPaneInfo information to
determine each pane's docking and floating behavior. wxAuiManager determine each pane's docking and floating behavior. wxAuiManager
@@ -21,16 +21,16 @@
uses a replaceable dock art class to do all drawing, so all drawing is uses a replaceable dock art class to do all drawing, so all drawing is
localized in one area, and may be customized depending on an localized in one area, and may be customized depending on an
application's specific needs. application's specific needs.
wxAuiManager works as follows: the programmer adds panes to the class, wxAuiManager works as follows: the programmer adds panes to the class,
or makes changes to existing pane properties (dock position, floating or makes changes to existing pane properties (dock position, floating
state, show state, etc.). To apply these changes, wxAuiManager's state, show state, etc.). To apply these changes, wxAuiManager's
Update() function is called. This batch processing can be used to avoid Update() function is called. This batch processing can be used to avoid
flicker, by modifying more than one pane at a time, and then "committing" flicker, by modifying more than one pane at a time, and then "committing"
all of the changes at once by calling Update(). all of the changes at once by calling Update().
Panes can be added quite easily: Panes can be added quite easily:
@code @code
wxTextCtrl* text1 = new wxTextCtrl(this, -1); wxTextCtrl* text1 = new wxTextCtrl(this, -1);
wxTextCtrl* text2 = new wxTextCtrl(this, -1); wxTextCtrl* text2 = new wxTextCtrl(this, -1);
@@ -38,17 +38,17 @@
m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption")); m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption"));
m_mgr.Update(); m_mgr.Update();
@endcode @endcode
Later on, the positions can be modified easily. The following will float Later on, the positions can be modified easily. The following will float
an existing pane in a tool window: an existing pane in a tool window:
@code @code
m_mgr.GetPane(text1).Float(); m_mgr.GetPane(text1).Float();
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{aui} @category{aui}
@seealso @seealso
wxAuiPaneInfo, wxAuiDockArt wxAuiPaneInfo, wxAuiDockArt
*/ */
@@ -74,11 +74,11 @@ public:
several versions of this function. The first version allows the full spectrum of pane parameter possibilities. The second version is used for simpler user interfaces which do not require as much configuration. The last version allows a drop position to be specified, which will determine where the pane will be added. several versions of this function. The first version allows the full spectrum of pane parameter possibilities. The second version is used for simpler user interfaces which do not require as much configuration. The last version allows a drop position to be specified, which will determine where the pane will be added.
*/ */
bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info); bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info);
bool AddPane(wxWindow* window, int direction = wxLEFT, bool AddPane(wxWindow* window, int direction = wxLEFT,
const wxString& caption = wxEmptyString); const wxString& caption = wxEmptyString);
bool AddPane(wxWindow* window, bool AddPane(wxWindow* window,
const wxAuiPaneInfo& pane_info, const wxAuiPaneInfo& pane_info,
const wxPoint& drop_pos); const wxPoint& drop_pos);
//@} //@}
/** /**
@@ -141,7 +141,7 @@ public:
returned wxAuiPaneInfo's IsOk() method will return @false. returned wxAuiPaneInfo's IsOk() method will return @false.
*/ */
wxAuiPaneInfo GetPane(wxWindow* window); wxAuiPaneInfo GetPane(wxWindow* window);
wxAuiPaneInfo GetPane(const wxString& name); wxAuiPaneInfo GetPane(const wxString& name);
//@} //@}
/** /**
@@ -151,13 +151,13 @@ public:
/** /**
This method is used to insert either a previously unmanaged pane window This method is used to insert either a previously unmanaged pane window
into the frame manager, or to insert a currently managed pane somewhere into the frame manager, or to insert a currently managed pane somewhere
else. @e InsertPane will push all panes, rows, or docks aside and else. @e InsertPane will push all panes, rows, or docks aside and
insert the window into the position specified by @e insert_location. insert the window into the position specified by @e insert_location.
Because @e insert_location can specify either a pane, dock row, or dock Because @e insert_location can specify either a pane, dock row, or dock
layer, the @e insert_level parameter is used to disambiguate this. The layer, the @e insert_level parameter is used to disambiguate this. The
parameter @e insert_level can take a value of wxAUI_INSERT_PANE, parameter @e insert_level can take a value of wxAUI_INSERT_PANE,
wxAUI_INSERT_ROW wxAUI_INSERT_ROW
or wxAUI_INSERT_DOCK. or wxAUI_INSERT_DOCK.
*/ */
bool InsertPane(wxWindow* window, bool InsertPane(wxWindow* window,
@@ -230,7 +230,7 @@ public:
void SetFlags(unsigned int flags); void SetFlags(unsigned int flags);
/** /**
Called to specify the frame or window which is to be managed by wxAuiManager. Called to specify the frame or window which is to be managed by wxAuiManager.
Frame management is not restricted to just frames. Child windows or custom controls are also allowed. Frame management is not restricted to just frames. Child windows or custom controls are also allowed.
*/ */
void SetManagedWindow(wxWindow* managed_wnd); void SetManagedWindow(wxWindow* managed_wnd);
@@ -263,24 +263,24 @@ public:
/** /**
@class wxAuiPaneInfo @class wxAuiPaneInfo
@headerfile aui.h wx/aui/aui.h @headerfile aui.h wx/aui/aui.h
wxAuiPaneInfo is part of the wxAUI class framework. wxAuiPaneInfo is part of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview". See also @ref overview_wxauioverview "wxAUI overview".
wxAuiPaneInfo specifies all the parameters for a pane. wxAuiPaneInfo specifies all the parameters for a pane.
These parameters specify where the pane is on the These parameters specify where the pane is on the
screen, whether it is docked or floating, or hidden. screen, whether it is docked or floating, or hidden.
In addition, these parameters specify the pane's In addition, these parameters specify the pane's
docked position, floating position, preferred size, docked position, floating position, preferred size,
minimum size, caption text among many other parameters. minimum size, caption text among many other parameters.
@library{wxbase} @library{wxbase}
@category{aui} @category{aui}
@seealso @seealso
wxAuiManager, wxAuiDockArt wxAuiManager, wxAuiDockArt
*/ */
class wxAuiPaneInfo class wxAuiPaneInfo
{ {
public: public:
//@{ //@{
@@ -288,7 +288,7 @@ public:
Copy constructor. Copy constructor.
*/ */
wxAuiPaneInfo(); wxAuiPaneInfo();
wxAuiPaneInfo(const wxAuiPaneInfo& c); wxAuiPaneInfo(const wxAuiPaneInfo& c);
//@} //@}
//@{ //@{
@@ -297,7 +297,7 @@ public:
to use this size as much as possible when docking or floating the pane. to use this size as much as possible when docking or floating the pane.
*/ */
wxAuiPaneInfo BestSize(const wxSize& size); wxAuiPaneInfo BestSize(const wxSize& size);
wxAuiPaneInfo BestSize(int x, int y); wxAuiPaneInfo BestSize(int x, int y);
//@} //@}
/** /**
@@ -332,7 +332,7 @@ public:
This is the same thing as calling Direction(wxAUI_DOCK_CENTRE). This is the same thing as calling Direction(wxAUI_DOCK_CENTRE).
*/ */
wxAuiPaneInfo Centre(); wxAuiPaneInfo Centre();
wxAuiPaneInfo Center(); wxAuiPaneInfo Center();
//@} //@}
//@{ //@{
@@ -341,7 +341,7 @@ public:
settings. Centre panes usually do not have caption bars. This function provides an easy way of preparing a pane to be displayed in the center dock position. settings. Centre panes usually do not have caption bars. This function provides an easy way of preparing a pane to be displayed in the center dock position.
*/ */
wxAuiPaneInfo CentrePane(); wxAuiPaneInfo CentrePane();
wxAuiPaneInfo CenterPane(); wxAuiPaneInfo CenterPane();
//@} //@}
/** /**
@@ -405,7 +405,7 @@ public:
FloatingPosition() sets the position of the floating pane. FloatingPosition() sets the position of the floating pane.
*/ */
wxAuiPaneInfo FloatingPosition(const wxPoint& pos); wxAuiPaneInfo FloatingPosition(const wxPoint& pos);
wxAuiPaneInfo FloatingPosition(int x, int y); wxAuiPaneInfo FloatingPosition(int x, int y);
//@} //@}
//@{ //@{
@@ -413,7 +413,7 @@ public:
FloatingSize() sets the size of the floating pane. FloatingSize() sets the size of the floating pane.
*/ */
wxAuiPaneInfo FloatingSize(const wxSize& size); wxAuiPaneInfo FloatingSize(const wxSize& size);
wxAuiPaneInfo FloatingSize(int x, int y); wxAuiPaneInfo FloatingSize(int x, int y);
//@} //@}
/** /**
@@ -573,7 +573,7 @@ public:
MaxSize() sets the maximum size of the pane. MaxSize() sets the maximum size of the pane.
*/ */
wxAuiPaneInfo MaxSize(const wxSize& size); wxAuiPaneInfo MaxSize(const wxSize& size);
wxAuiPaneInfo MaxSize(int x, int y); wxAuiPaneInfo MaxSize(int x, int y);
//@} //@}
/** /**
@@ -587,7 +587,7 @@ public:
partially supported as of this writing. partially supported as of this writing.
*/ */
wxAuiPaneInfo MinSize(const wxSize& size); wxAuiPaneInfo MinSize(const wxSize& size);
wxAuiPaneInfo MinSize(int x, int y); wxAuiPaneInfo MinSize(int x, int y);
//@} //@}
/** /**

View File

@@ -9,10 +9,10 @@
/** /**
@class wxAuiNotebook @class wxAuiNotebook
@headerfile auibook.h wx/aui/auibook.h @headerfile auibook.h wx/aui/auibook.h
wxAuiNotebook is part of the wxAUI class framework. wxAuiNotebook is part of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview". See also @ref overview_wxauioverview "wxAUI overview".
wxAuiNotebook is a notebook control which implements many features common in wxAuiNotebook is a notebook control which implements many features common in
applications with dockable panes. applications with dockable panes.
Specifically, wxAuiNotebook implements functionality which allows the user to Specifically, wxAuiNotebook implements functionality which allows the user to
@@ -20,14 +20,14 @@
split the tab window into many different splitter configurations, and toggle split the tab window into many different splitter configurations, and toggle
through different themes to customize through different themes to customize
the control's look and feel. the control's look and feel.
An effort has been made to try to maintain an API as similar to that of An effort has been made to try to maintain an API as similar to that of
wxNotebook. wxNotebook.
The default theme that is used is wxAuiDefaultTabArt, which provides a modern, The default theme that is used is wxAuiDefaultTabArt, which provides a modern,
glossy look and feel. glossy look and feel.
The theme can be changed by calling wxAuiNotebook::SetArtProvider. The theme can be changed by calling wxAuiNotebook::SetArtProvider.
@beginStyleTable @beginStyleTable
@style{wxAUI_NB_DEFAULT_STYLE}: @style{wxAUI_NB_DEFAULT_STYLE}:
Defined as wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | Defined as wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE |
@@ -55,7 +55,7 @@
@style{wxAUI_NB_BOTTOM}: @style{wxAUI_NB_BOTTOM}:
With this style, tabs are drawn along the bottom of the notebook. With this style, tabs are drawn along the bottom of the notebook.
@endStyleTable @endStyleTable
@library{wxaui} @library{wxaui}
@category{aui} @category{aui}
*/ */
@@ -67,10 +67,10 @@ public:
Constructor. Creates a wxAuiNotebok control. Constructor. Creates a wxAuiNotebok control.
*/ */
wxAuiNotebook(); wxAuiNotebook();
wxAuiNotebook(wxWindow* parent, wxWindowID id = wxID_ANY, wxAuiNotebook(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxAUI_NB_DEFAULT_STYLE); long style = wxAUI_NB_DEFAULT_STYLE);
//@} //@}
/** /**
@@ -228,7 +228,7 @@ public:
of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT. of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.
*/ */
void SetUniformBitmapSize(const wxSize& size); void SetUniformBitmapSize(const wxSize& size);
void Split(size_t page, int direction); void Split(size_t page, int direction);
//@} //@}
/** /**
@@ -242,13 +242,13 @@ public:
/** /**
@class wxAuiTabArt @class wxAuiTabArt
@headerfile auibook.h wx/aui/auibook.h @headerfile auibook.h wx/aui/auibook.h
Tab art class. Tab art class.
@library{wxaui} @library{wxaui}
@category{aui} @category{aui}
*/ */
class wxAuiTabArt class wxAuiTabArt
{ {
public: public:
/** /**

View File

@@ -9,14 +9,14 @@
/** /**
@class wxAuiDockArt @class wxAuiDockArt
@headerfile dockart.h wx/aui/dockart.h @headerfile dockart.h wx/aui/dockart.h
wxAuiDockArt is part of the wxAUI class framework. wxAuiDockArt is part of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview". See also @ref overview_wxauioverview "wxAUI overview".
Dock art provider code - a dock provider provides all drawing Dock art provider code - a dock provider provides all drawing
functionality to the wxAui dock manager. This allows the dock functionality to the wxAui dock manager. This allows the dock
manager to have a plugable look-and-feel. manager to have a plugable look-and-feel.
By default, a wxAuiManager uses an By default, a wxAuiManager uses an
instance of this class called @b wxAuiDefaultDockArt which instance of this class called @b wxAuiDefaultDockArt which
provides bitmap art and a colour scheme that is adapted to provides bitmap art and a colour scheme that is adapted to
@@ -24,14 +24,14 @@
class to alter its behaviour or write a completely new dock class to alter its behaviour or write a completely new dock
art class. Call wxAuiManager::SetArtProvider art class. Call wxAuiManager::SetArtProvider
to make use this new dock art. to make use this new dock art.
@library{wxaui} @library{wxaui}
@category{aui} @category{aui}
@seealso @seealso
wxAuiManager, wxAuiPaneInfo wxAuiManager, wxAuiPaneInfo
*/ */
class wxAuiDockArt class wxAuiDockArt
{ {
public: public:
/** /**

View File

@@ -1,46 +1,46 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: base64.h // Name: base64.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
//@{ //@{
/** /**
These functions encode the given data using base64. The first of them is the These functions encode the given data using base64. The first of them is the
raw encoding function writing the output string into provided buffer while the raw encoding function writing the output string into provided buffer while the
other ones return the output as wxString. There is no error return for these other ones return the output as wxString. There is no error return for these
functions except for the first one which returns @c wxCONV_FAILED if the functions except for the first one which returns @c wxCONV_FAILED if the
output buffer is too small. To allocate the buffer of the correct size, use output buffer is too small. To allocate the buffer of the correct size, use
wxBase64EncodedSize or call this function with wxBase64EncodedSize or call this function with
@e dst set to @NULL -- it will then return the necessary buffer size. @e dst set to @NULL -- it will then return the necessary buffer size.
@param dst @param dst
The output buffer, may be @NULL to retrieve the needed buffer The output buffer, may be @NULL to retrieve the needed buffer
size. size.
@param dstLen @param dstLen
The output buffer size, ignored if dst is @NULL. The output buffer size, ignored if dst is @NULL.
@param src @param src
The input buffer, must not be @NULL. The input buffer, must not be @NULL.
@param srcLen @param srcLen
The length of the input data. The length of the input data.
*/ */
size_t wxBase64Encode(char * dst, size_t dstLen, size_t wxBase64Encode(char * dst, size_t dstLen,
const void * src, const void * src,
size_t srcLen); size_t srcLen);
wxString wxBase64Encode(const void * src, size_t srcLen); wxString wxBase64Encode(const void * src, size_t srcLen);
wxString wxBase64Encode(const wxMemoryBuffer& buf); wxString wxBase64Encode(const wxMemoryBuffer& buf);
//@} //@}
/** /**
Returns the size of the buffer necessary to contain the data encoded in a Returns the size of the buffer necessary to contain the data encoded in a
base64 string of length @e srcLen. This can be useful for allocating a base64 string of length @e srcLen. This can be useful for allocating a
buffer to be passed to wxBase64Decode. buffer to be passed to wxBase64Decode.
*/ */
size_t wxBase64DecodedSize(size_t srcLen); size_t wxBase64DecodedSize(size_t srcLen);
@@ -56,42 +56,42 @@ size_t wxBase64EncodedSize(size_t len);
These function decode a Base64-encoded string. The first version is a raw These function decode a Base64-encoded string. The first version is a raw
decoding function and decodes the data into the provided buffer @e dst of decoding function and decodes the data into the provided buffer @e dst of
the given size @e dstLen. An error is returned if the buffer is not large the given size @e dstLen. An error is returned if the buffer is not large
enough -- that is not at least wxBase64DecodedSize(srcLen) enough -- that is not at least wxBase64DecodedSize(srcLen)
bytes. The second version allocates memory internally and returns it as bytes. The second version allocates memory internally and returns it as
wxMemoryBuffer and is recommended for normal use. wxMemoryBuffer and is recommended for normal use.
The first version returns the number of bytes written to the buffer or the The first version returns the number of bytes written to the buffer or the
necessary buffer size if @e dst was @NULL or @c wxCONV_FAILED on necessary buffer size if @e dst was @NULL or @c wxCONV_FAILED on
error, e.g. if the output buffer is too small or invalid characters were error, e.g. if the output buffer is too small or invalid characters were
encountered in the input string. The second version returns a buffer with the encountered in the input string. The second version returns a buffer with the
base64 decoded binary equivalent of the input string. In neither case is the base64 decoded binary equivalent of the input string. In neither case is the
buffer NUL-terminated. buffer NUL-terminated.
@param dst @param dst
Pointer to output buffer, may be @NULL to just compute the Pointer to output buffer, may be @NULL to just compute the
necessary buffer size. necessary buffer size.
@param dstLen @param dstLen
The size of the output buffer, ignored if dst is The size of the output buffer, ignored if dst is
@NULL. @NULL.
@param src @param src
The input string, must not be @NULL. For the version using The input string, must not be @NULL. For the version using
wxString, the input string should contain only ASCII characters. wxString, the input string should contain only ASCII characters.
@param srcLen @param srcLen
The length of the input string or special value The length of the input string or special value
wxNO_LEN if the string is NUL-terminated and the length should be wxNO_LEN if the string is NUL-terminated and the length should be
computed by this function itself. computed by this function itself.
@param mode @param mode
This parameter specifies the function behaviour when invalid This parameter specifies the function behaviour when invalid
characters are encountered in input. By default, any such character stops the characters are encountered in input. By default, any such character stops the
decoding with error. If the mode is wxBase64DecodeMode_SkipWS, then the white decoding with error. If the mode is wxBase64DecodeMode_SkipWS, then the white
space characters are silently skipped instead. And if it is space characters are silently skipped instead. And if it is
wxBase64DecodeMode_Relaxed, then all invalid characters are skipped. wxBase64DecodeMode_Relaxed, then all invalid characters are skipped.
@param posErr @param posErr
If this pointer is non-@NULL and an error occurs during If this pointer is non-@NULL and an error occurs during
decoding, it is filled with the index of the invalid character. decoding, it is filled with the index of the invalid character.
*/ */
@@ -100,12 +100,12 @@ size_t wxBase64Decode(void * dst, size_t dstLen,
size_t srcLen = wxNO_LEN, size_t srcLen = wxNO_LEN,
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
size_t posErr = @NULL); size_t posErr = @NULL);
wxMemoryBuffer wxBase64Decode(const char * src, wxMemoryBuffer wxBase64Decode(const char * src,
size_t srcLen = wxNO_LEN, size_t srcLen = wxNO_LEN,
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
size_t posErr = @NULL); size_t posErr = @NULL);
wxMemoryBuffer wxBase64Decode(const wxString& src, wxMemoryBuffer wxBase64Decode(const wxString& src,
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
size_t posErr = @NULL); size_t posErr = @NULL);
//@} //@}

View File

@@ -9,21 +9,21 @@
/** /**
@class wxBitmapHandler @class wxBitmapHandler
@wxheader{bitmap.h} @wxheader{bitmap.h}
Overview Overview
This is the base class for implementing bitmap file loading/saving, and bitmap This is the base class for implementing bitmap file loading/saving, and bitmap
creation from data. creation from data.
It is used within wxBitmap and is not normally seen by the application. It is used within wxBitmap and is not normally seen by the application.
If you wish to extend the capabilities of wxBitmap, derive a class from If you wish to extend the capabilities of wxBitmap, derive a class from
wxBitmapHandler wxBitmapHandler
and add the handler using wxBitmap::AddHandler in your and add the handler using wxBitmap::AddHandler in your
application initialisation. application initialisation.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxBitmap, wxIcon, wxCursor wxBitmap, wxIcon, wxCursor
*/ */
@@ -46,22 +46,22 @@ public:
wxBitmap object @e bitmap is wxBitmap object @e bitmap is
manipulated by this function. manipulated by this function.
@param bitmap @param bitmap
The wxBitmap object. The wxBitmap object.
@param width @param width
The width of the bitmap in pixels. The width of the bitmap in pixels.
@param height @param height
The height of the bitmap in pixels. The height of the bitmap in pixels.
@param depth @param depth
The depth of the bitmap in pixels. If this is -1, the screen depth is used. The depth of the bitmap in pixels. If this is -1, the screen depth is used.
@param data @param data
Data whose type depends on the value of type. Data whose type depends on the value of type.
@param type @param type
A bitmap type identifier - see wxBitmapHandler() for a list A bitmap type identifier - see wxBitmapHandler() for a list
of possible values. of possible values.
@@ -91,14 +91,14 @@ public:
Loads a bitmap from a file or resource, putting the resulting data into @e Loads a bitmap from a file or resource, putting the resulting data into @e
bitmap. bitmap.
@param bitmap @param bitmap
The bitmap object which is to be affected by this operation. The bitmap object which is to be affected by this operation.
@param name @param name
Either a filename or a Windows resource name. Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter. The meaning of name is determined by the type parameter.
@param type @param type
See wxBitmap::wxBitmap for values this can take. See wxBitmap::wxBitmap for values this can take.
@returns @true if the operation succeeded, @false otherwise. @returns @true if the operation succeeded, @false otherwise.
@@ -110,16 +110,16 @@ public:
/** /**
Saves a bitmap in the named file. Saves a bitmap in the named file.
@param bitmap @param bitmap
The bitmap object which is to be affected by this operation. The bitmap object which is to be affected by this operation.
@param name @param name
A filename. The meaning of name is determined by the type parameter. A filename. The meaning of name is determined by the type parameter.
@param type @param type
See wxBitmap::wxBitmap for values this can take. See wxBitmap::wxBitmap for values this can take.
@param palette @param palette
An optional palette used for saving the bitmap. An optional palette used for saving the bitmap.
@returns @true if the operation succeeded, @false otherwise. @returns @true if the operation succeeded, @false otherwise.
@@ -132,7 +132,7 @@ public:
/** /**
Sets the handler extension. Sets the handler extension.
@param extension @param extension
Handler extension. Handler extension.
*/ */
void SetExtension(const wxString& extension); void SetExtension(const wxString& extension);
@@ -140,7 +140,7 @@ public:
/** /**
Sets the handler name. Sets the handler name.
@param name @param name
Handler name. Handler name.
*/ */
void SetName(const wxString& name); void SetName(const wxString& name);
@@ -148,7 +148,7 @@ public:
/** /**
Sets the handler type. Sets the handler type.
@param name @param name
Handler type. Handler type.
*/ */
void SetType(long type); void SetType(long type);
@@ -158,17 +158,17 @@ public:
/** /**
@class wxBitmap @class wxBitmap
@wxheader{bitmap.h} @wxheader{bitmap.h}
This class encapsulates the concept of a platform-dependent bitmap, This class encapsulates the concept of a platform-dependent bitmap,
either monochrome or colour or colour with alpha channel support. either monochrome or colour or colour with alpha channel support.
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @stdobjects
Objects: Objects:
wxNullBitmap wxNullBitmap
@seealso @seealso
@ref overview_wxbitmapoverview "wxBitmap overview", @ref @ref overview_wxbitmapoverview "wxBitmap overview", @ref
overview_supportedbitmapformats "supported bitmap file formats", wxDC::Blit, wxIcon, wxCursor, wxBitmap, wxMemoryDC overview_supportedbitmapformats "supported bitmap file formats", wxDC::Blit, wxIcon, wxCursor, wxBitmap, wxMemoryDC
@@ -196,25 +196,25 @@ public:
creating the wxBitmap (most useful in 8-bit display mode). On other platforms, creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
the palette is currently ignored. the palette is currently ignored.
@param bits @param bits
Specifies an array of pixel values. Specifies an array of pixel values.
@param width @param width
Specifies the width of the bitmap. Specifies the width of the bitmap.
@param height @param height
Specifies the height of the bitmap. Specifies the height of the bitmap.
@param depth @param depth
Specifies the depth of the bitmap. If this is omitted, the display depth of the Specifies the depth of the bitmap. If this is omitted, the display depth of the
screen is used. screen is used.
@param name @param name
This can refer to a resource name under MS Windows, or a filename under MS This can refer to a resource name under MS Windows, or a filename under MS
Windows and X. Windows and X.
Its meaning is determined by the type parameter. Its meaning is determined by the type parameter.
@param type @param type
May be one of the following: May be one of the following:
@@ -261,7 +261,7 @@ public:
wxBITMAP_TYPE_PCX, wxBITMAP_TYPE_PCX,
and wxBITMAP_TYPE_PNM. Of course, you must have wxImage handlers loaded. and wxBITMAP_TYPE_PNM. Of course, you must have wxImage handlers loaded.
@param img @param img
Platform-independent wxImage object. Platform-independent wxImage object.
@remarks The first form constructs a bitmap object with no data; an @remarks The first form constructs a bitmap object with no data; an
@@ -271,15 +271,15 @@ public:
@sa LoadFile() @sa LoadFile()
*/ */
wxBitmap(); wxBitmap();
wxBitmap(const wxBitmap& bitmap); wxBitmap(const wxBitmap& bitmap);
wxBitmap(const void* data, int type, int width, int height, wxBitmap(const void* data, int type, int width, int height,
int depth = -1); int depth = -1);
wxBitmap(const char bits[], int width, int height, wxBitmap(const char bits[], int width, int height,
int depth = 1); int depth = 1);
wxBitmap(int width, int height, int depth = -1); wxBitmap(int width, int height, int depth = -1);
wxBitmap(const char* const* bits); wxBitmap(const char* const* bits);
wxBitmap(const wxString& name, long type); wxBitmap(const wxString& name, long type);
wxBitmap(const wxImage& img, int depth = -1); wxBitmap(const wxImage& img, int depth = -1);
//@} //@}
/** /**
@@ -297,7 +297,7 @@ public:
/** /**
Adds a handler to the end of the static list of format handlers. Adds a handler to the end of the static list of format handlers.
@param handler @param handler
A new bitmap format handler object. There is usually only one instance A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session. of a given handler class in an application session.
@@ -328,19 +328,19 @@ public:
/** /**
Creates a bitmap from the given data, which can be of arbitrary type. Creates a bitmap from the given data, which can be of arbitrary type.
@param width @param width
The width of the bitmap in pixels. The width of the bitmap in pixels.
@param height @param height
The height of the bitmap in pixels. The height of the bitmap in pixels.
@param depth @param depth
The depth of the bitmap in pixels. If this is -1, the screen depth is used. The depth of the bitmap in pixels. If this is -1, the screen depth is used.
@param data @param data
Data whose type depends on the value of type. Data whose type depends on the value of type.
@param type @param type
A bitmap type identifier - see wxBitmap() for a list A bitmap type identifier - see wxBitmap() for a list
of possible values. of possible values.
@@ -352,22 +352,22 @@ public:
@sa wxBitmap() @sa wxBitmap()
*/ */
virtual bool Create(int width, int height, int depth = -1); virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(const void* data, int type, int width, virtual bool Create(const void* data, int type, int width,
int height, int height,
int depth = -1); int depth = -1);
//@} //@}
//@{ //@{
/** /**
Finds the handler associated with the given bitmap type. Finds the handler associated with the given bitmap type.
@param name @param name
The handler name. The handler name.
@param extension @param extension
The file extension, such as "bmp". The file extension, such as "bmp".
@param bitmapType @param bitmapType
The bitmap type, such as wxBITMAP_TYPE_BMP. The bitmap type, such as wxBITMAP_TYPE_BMP.
@returns A pointer to the handler if found, @NULL otherwise. @returns A pointer to the handler if found, @NULL otherwise.
@@ -375,9 +375,9 @@ public:
@sa wxBitmapHandler @sa wxBitmapHandler
*/ */
static wxBitmapHandler* FindHandler(const wxString& name); static wxBitmapHandler* FindHandler(const wxString& name);
static wxBitmapHandler* FindHandler(const wxString& extension, static wxBitmapHandler* FindHandler(const wxString& extension,
wxBitmapType bitmapType); wxBitmapType bitmapType);
static wxBitmapHandler* FindHandler(wxBitmapType bitmapType); static wxBitmapHandler* FindHandler(wxBitmapType bitmapType);
//@} //@}
/** /**
@@ -441,7 +441,7 @@ public:
/** /**
Adds a handler at the start of the static list of format handlers. Adds a handler at the start of the static list of format handlers.
@param handler @param handler
A new bitmap format handler object. There is usually only one instance A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session. of a given handler class in an application session.
@@ -457,11 +457,11 @@ public:
/** /**
Loads a bitmap from a file or resource. Loads a bitmap from a file or resource.
@param name @param name
Either a filename or a Windows resource name. Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter. The meaning of name is determined by the type parameter.
@param type @param type
One of the following values: One of the following values:
@@ -517,7 +517,7 @@ public:
Finds the handler with the given name, and removes it. The handler Finds the handler with the given name, and removes it. The handler
is not deleted. is not deleted.
@param name @param name
The handler name. The handler name.
@returns @true if the handler was found and removed, @false otherwise. @returns @true if the handler was found and removed, @false otherwise.
@@ -529,10 +529,10 @@ public:
/** /**
Saves a bitmap in the named file. Saves a bitmap in the named file.
@param name @param name
A filename. The meaning of name is determined by the type parameter. A filename. The meaning of name is determined by the type parameter.
@param type @param type
One of the following values: One of the following values:
@@ -562,7 +562,7 @@ public:
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG). (wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG).
(Of course you must have wxImage handlers loaded.) (Of course you must have wxImage handlers loaded.)
@param palette @param palette
An optional palette used for saving the bitmap. An optional palette used for saving the bitmap.
@returns @true if the operation succeeded, @false otherwise. @returns @true if the operation succeeded, @false otherwise.
@@ -578,7 +578,7 @@ public:
/** /**
Sets the depth member (does not affect the bitmap data). Sets the depth member (does not affect the bitmap data).
@param depth @param depth
Bitmap depth. Bitmap depth.
*/ */
void SetDepth(int depth); void SetDepth(int depth);
@@ -586,7 +586,7 @@ public:
/** /**
Sets the height member (does not affect the bitmap data). Sets the height member (does not affect the bitmap data).
@param height @param height
Bitmap height in pixels. Bitmap height in pixels.
*/ */
void SetHeight(int height); void SetHeight(int height);
@@ -603,7 +603,7 @@ public:
/** /**
Sets the associated palette. (Not implemented under GTK+). Sets the associated palette. (Not implemented under GTK+).
@param palette @param palette
The palette to set. The palette to set.
@sa wxPalette @sa wxPalette
@@ -613,7 +613,7 @@ public:
/** /**
Sets the width member (does not affect the bitmap data). Sets the width member (does not affect the bitmap data).
@param width @param width
Bitmap width in pixels. Bitmap width in pixels.
*/ */
void SetWidth(int width); void SetWidth(int width);
@@ -621,7 +621,7 @@ public:
/** /**
Assignment operator, using @ref overview_trefcount "reference counting". Assignment operator, using @ref overview_trefcount "reference counting".
@param bitmap @param bitmap
Bitmap to assign. Bitmap to assign.
*/ */
wxBitmap operator =(const wxBitmap& bitmap); wxBitmap operator =(const wxBitmap& bitmap);
@@ -631,17 +631,17 @@ public:
/** /**
@class wxMask @class wxMask
@wxheader{bitmap.h} @wxheader{bitmap.h}
This class encapsulates a monochrome mask bitmap, where the masked area is This class encapsulates a monochrome mask bitmap, where the masked area is
black and black and
the unmasked area is white. When associated with a bitmap and drawn in a device the unmasked area is white. When associated with a bitmap and drawn in a device
context, context,
the unmasked area of the bitmap will be drawn, and the masked area will not be the unmasked area of the bitmap will be drawn, and the masked area will not be
drawn. drawn.
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@seealso @seealso
wxBitmap, wxDC::Blit, wxMemoryDC wxBitmap, wxDC::Blit, wxMemoryDC
*/ */
@@ -654,20 +654,20 @@ public:
background. Not background. Not
yet implemented for GTK. yet implemented for GTK.
@param bitmap @param bitmap
A valid bitmap. A valid bitmap.
@param colour @param colour
A colour specifying the transparency RGB values. A colour specifying the transparency RGB values.
@param index @param index
Index into a palette, specifying the transparency colour. Index into a palette, specifying the transparency colour.
*/ */
wxMask(); wxMask();
wxMask(const wxBitmap& bitmap); wxMask(const wxBitmap& bitmap);
wxMask(const wxBitmap& bitmap, wxMask(const wxBitmap& bitmap,
const wxColour& colour); const wxColour& colour);
wxMask(const wxBitmap& bitmap, int index); wxMask(const wxBitmap& bitmap, int index);
//@} //@}
/** /**
@@ -681,17 +681,17 @@ public:
background. Not background. Not
yet implemented for GTK. yet implemented for GTK.
@param bitmap @param bitmap
A valid bitmap. A valid bitmap.
@param colour @param colour
A colour specifying the transparency RGB values. A colour specifying the transparency RGB values.
@param index @param index
Index into a palette, specifying the transparency colour. Index into a palette, specifying the transparency colour.
*/ */
bool Create(const wxBitmap& bitmap); bool Create(const wxBitmap& bitmap);
bool Create(const wxBitmap& bitmap, const wxColour& colour); bool Create(const wxBitmap& bitmap, const wxColour& colour);
bool Create(const wxBitmap& bitmap, int index); bool Create(const wxBitmap& bitmap, int index);
//@} //@}
}; };

View File

@@ -9,11 +9,11 @@
/** /**
@class wxBitmapButton @class wxBitmapButton
@wxheader{bmpbuttn.h} @wxheader{bmpbuttn.h}
A bitmap button is a control that contains a bitmap. A bitmap button is a control that contains a bitmap.
It may be placed on a @ref overview_wxdialog "dialog box" or panel, or indeed It may be placed on a @ref overview_wxdialog "dialog box" or panel, or indeed
almost any other window. almost any other window.
@beginStyleTable @beginStyleTable
@style{wxBU_AUTODRAW}: @style{wxBU_AUTODRAW}:
If this is specified, the button will be drawn automatically using If this is specified, the button will be drawn automatically using
@@ -29,17 +29,17 @@
@style{wxBU_BOTTOM}: @style{wxBU_BOTTOM}:
Aligns the bitmap label to the bottom of the button. WIN32 only. Aligns the bitmap label to the bottom of the button. WIN32 only.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_BUTTON(id\, func)}: @event{EVT_BUTTON(id\, func)}:
Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is
clicked. clicked.
@endEventTable @endEventTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{bitmapbutton.png} @appearance{bitmapbutton.png}
@seealso @seealso
wxButton wxButton
*/ */
@@ -50,29 +50,29 @@ public:
/** /**
Constructor, creating and showing a button. Constructor, creating and showing a button.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Button identifier. The value wxID_ANY indicates a default value. Button identifier. The value wxID_ANY indicates a default value.
@param bitmap @param bitmap
Bitmap to be displayed. Bitmap to be displayed.
@param pos @param pos
Button position. Button position.
@param size @param size
Button size. If wxDefaultSize is specified then the button is sized Button size. If wxDefaultSize is specified then the button is sized
appropriately for the bitmap. appropriately for the bitmap.
@param style @param style
Window style. See wxBitmapButton. Window style. See wxBitmapButton.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@remarks The bitmap parameter is normally the only bitmap you need to @remarks The bitmap parameter is normally the only bitmap you need to
@@ -86,13 +86,13 @@ public:
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxBitmapButton(); wxBitmapButton();
wxBitmapButton(wxWindow* parent, wxWindowID id, wxBitmapButton(wxWindow* parent, wxWindowID id,
const wxBitmap& bitmap, const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW, long style = wxBU_AUTODRAW,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "button"); const wxString& name = "button");
//@} //@}
/** /**
@@ -121,7 +121,7 @@ public:
@sa SetBitmapDisabled() @sa SetBitmapDisabled()
*/ */
const wxBitmap GetBitmapDisabled(); const wxBitmap GetBitmapDisabled();
wxBitmap GetBitmapDisabled(); wxBitmap GetBitmapDisabled();
//@} //@}
//@{ //@{
@@ -133,7 +133,7 @@ public:
@sa SetBitmapFocus() @sa SetBitmapFocus()
*/ */
const wxBitmap GetBitmapFocus(); const wxBitmap GetBitmapFocus();
wxBitmap GetBitmapFocus(); wxBitmap GetBitmapFocus();
//@} //@}
//@{ //@{
@@ -143,7 +143,7 @@ public:
@sa SetBitmapHover() @sa SetBitmapHover()
*/ */
const wxBitmap GetBitmapHover(); const wxBitmap GetBitmapHover();
wxBitmap GetBitmapHover(); wxBitmap GetBitmapHover();
//@} //@}
//@{ //@{
@@ -155,7 +155,7 @@ public:
@sa SetBitmapLabel() @sa SetBitmapLabel()
*/ */
const wxBitmap GetBitmapLabel(); const wxBitmap GetBitmapLabel();
wxBitmap GetBitmapLabel(); wxBitmap GetBitmapLabel();
//@} //@}
/** /**
@@ -170,7 +170,7 @@ public:
/** /**
Sets the bitmap for the disabled button appearance. Sets the bitmap for the disabled button appearance.
@param bitmap @param bitmap
The bitmap to set. The bitmap to set.
@sa GetBitmapDisabled(), SetBitmapLabel(), @sa GetBitmapDisabled(), SetBitmapLabel(),
@@ -181,7 +181,7 @@ public:
/** /**
Sets the bitmap for the button appearance when it has the keyboard focus. Sets the bitmap for the button appearance when it has the keyboard focus.
@param bitmap @param bitmap
The bitmap to set. The bitmap to set.
@sa GetBitmapFocus(), SetBitmapLabel(), @sa GetBitmapFocus(), SetBitmapLabel(),
@@ -193,7 +193,7 @@ public:
Sets the bitmap to be shown when the mouse is over the button. Sets the bitmap to be shown when the mouse is over the button.
This function is new since wxWidgets version 2.7.0 and the hover bitmap is This function is new since wxWidgets version 2.7.0 and the hover bitmap is
currently only supported in wxMSW. currently only supported in wxMSW.
@sa GetBitmapHover() @sa GetBitmapHover()
*/ */
@@ -202,7 +202,7 @@ public:
/** /**
Sets the bitmap label for the button. Sets the bitmap label for the button.
@param bitmap @param bitmap
The bitmap label to set. The bitmap label to set.
@remarks This is the bitmap used for the unselected state, and for all @remarks This is the bitmap used for the unselected state, and for all
@@ -215,7 +215,7 @@ public:
/** /**
Sets the bitmap for the selected (depressed) button appearance. Sets the bitmap for the selected (depressed) button appearance.
@param bitmap @param bitmap
The bitmap to set. The bitmap to set.
*/ */
void SetBitmapSelected(const wxBitmap& bitmap); void SetBitmapSelected(const wxBitmap& bitmap);

View File

@@ -9,11 +9,11 @@
/** /**
@class wxBitmapComboBox @class wxBitmapComboBox
@wxheader{bmpcbox.h} @wxheader{bmpcbox.h}
A combobox that displays bitmap in front of the list items. A combobox that displays bitmap in front of the list items.
It currently only allows using bitmaps of one size, and resizes itself It currently only allows using bitmaps of one size, and resizes itself
so that a bitmap can be shown next to the text field. so that a bitmap can be shown next to the text field.
@beginStyleTable @beginStyleTable
@style{wxCB_READONLY}: @style{wxCB_READONLY}:
Creates a combobox without a text editor. On some platforms the Creates a combobox without a text editor. On some platforms the
@@ -26,7 +26,7 @@
control or used for navigation between dialog controls). Windows control or used for navigation between dialog controls). Windows
only. only.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_COMBOBOX(id\, func)}: @event{EVT_COMBOBOX(id\, func)}:
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
@@ -38,11 +38,11 @@
Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in
the combobox. the combobox.
@endEventTable @endEventTable
@library{wxadv} @library{wxadv}
@category{ctrl} @category{ctrl}
@appearance{bitmapcombobox.png} @appearance{bitmapcombobox.png}
@seealso @seealso
wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxCommandEvent wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxCommandEvent
*/ */
@@ -53,57 +53,57 @@ public:
/** /**
Constructor, creating and showing a combobox. Constructor, creating and showing a combobox.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Window identifier. The value wxID_ANY indicates a default value. Window identifier. The value wxID_ANY indicates a default value.
@param value @param value
Initial selection string. An empty string indicates no selection. Initial selection string. An empty string indicates no selection.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. If wxDefaultSize is specified then the window is sized Window size. If wxDefaultSize is specified then the window is sized
appropriately. appropriately.
@param n @param n
Number of strings with which to initialise the control. Number of strings with which to initialise the control.
@param choices @param choices
An array of strings with which to initialise the control. An array of strings with which to initialise the control.
@param style @param style
Window style. See wxBitmapComboBox. Window style. See wxBitmapComboBox.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxBitmapComboBox(); wxBitmapComboBox();
wxBitmapComboBox(wxWindow* parent, wxWindowID id, wxBitmapComboBox(wxWindow* parent, wxWindowID id,
const wxString& value = "", const wxString& value = "",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
int n = 0, int n = 0,
const wxString choices[] = @NULL, const wxString choices[] = @NULL,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
wxBitmapComboBox(wxWindow* parent, wxWindowID id, wxBitmapComboBox(wxWindow* parent, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
//@} //@}
/** /**
@@ -118,10 +118,10 @@ public:
*/ */
int Append(const wxString& item, int Append(const wxString& item,
const wxBitmap& bitmap = wxNullBitmap); const wxBitmap& bitmap = wxNullBitmap);
int Append(const wxString& item, const wxBitmap& bitmap, int Append(const wxString& item, const wxBitmap& bitmap,
void * clientData); void * clientData);
int Append(const wxString& item, const wxBitmap& bitmap, int Append(const wxString& item, const wxBitmap& bitmap,
wxClientData * clientData); wxClientData * clientData);
//@} //@}
//@{ //@{
@@ -138,14 +138,14 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
bool Create(wxWindow* parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
//@} //@}
/** /**
@@ -166,12 +166,12 @@ public:
*/ */
int Insert(const wxString& item, const wxBitmap& bitmap, int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos); unsigned int pos);
int Insert(const wxString& item, const wxBitmap& bitmap, int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos, unsigned int pos,
void * clientData); void * clientData);
int Insert(const wxString& item, const wxBitmap& bitmap, int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos, unsigned int pos,
wxClientData * clientData); wxClientData * clientData);
//@} //@}
/** /**

View File

@@ -9,38 +9,38 @@
/** /**
@class wxBrush @class wxBrush
@wxheader{brush.h} @wxheader{brush.h}
A brush is a drawing tool for filling in areas. It is used for painting A brush is a drawing tool for filling in areas. It is used for painting
the background of rectangles, ellipses, etc. It has a colour and a the background of rectangles, ellipses, etc. It has a colour and a
style. style.
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @stdobjects
Objects: Objects:
wxNullBrush wxNullBrush
Pointers: Pointers:
wxBLUE_BRUSH wxBLUE_BRUSH
wxGREEN_BRUSH wxGREEN_BRUSH
wxWHITE_BRUSH wxWHITE_BRUSH
wxBLACK_BRUSH wxBLACK_BRUSH
wxGREY_BRUSH wxGREY_BRUSH
wxMEDIUM_GREY_BRUSH wxMEDIUM_GREY_BRUSH
wxLIGHT_GREY_BRUSH wxLIGHT_GREY_BRUSH
wxTRANSPARENT_BRUSH wxTRANSPARENT_BRUSH
wxCYAN_BRUSH wxCYAN_BRUSH
wxRED_BRUSH wxRED_BRUSH
@seealso @seealso
wxBrushList, wxDC, wxDC::SetBrush wxBrushList, wxDC, wxDC::SetBrush
*/ */
@@ -51,13 +51,13 @@ public:
/** /**
Copy constructor, uses @ref overview_trefcount "reference counting". Copy constructor, uses @ref overview_trefcount "reference counting".
@param colour @param colour
Colour object. Colour object.
@param colourName @param colourName
Colour name. The name will be looked up in the colour database. Colour name. The name will be looked up in the colour database.
@param style @param style
One of: One of:
wxTRANSPARENT wxTRANSPARENT
@@ -105,10 +105,10 @@ public:
Vertical hatch. Vertical hatch.
@param brush @param brush
Pointer or reference to a brush to copy. Pointer or reference to a brush to copy.
@param stippleBitmap @param stippleBitmap
A bitmap to use for stippling. A bitmap to use for stippling.
@remarks If a stipple brush is created, the brush style will be set to @remarks If a stipple brush is created, the brush style will be set to
@@ -117,10 +117,10 @@ public:
@sa wxBrushList, wxColour, wxColourDatabase @sa wxBrushList, wxColour, wxColourDatabase
*/ */
wxBrush(); wxBrush();
wxBrush(const wxColour& colour, int style = wxSOLID); wxBrush(const wxColour& colour, int style = wxSOLID);
wxBrush(const wxString& colourName, int style); wxBrush(const wxString& colourName, int style);
wxBrush(const wxBitmap& stippleBitmap); wxBrush(const wxBitmap& stippleBitmap);
wxBrush(const wxBrush& brush); wxBrush(const wxBrush& brush);
//@} //@}
/** /**
@@ -233,15 +233,15 @@ public:
@sa GetColour() @sa GetColour()
*/ */
void SetColour(wxColour& colour); void SetColour(wxColour& colour);
void SetColour(const wxString& colourName); void SetColour(const wxString& colourName);
void SetColour(unsigned char red, unsigned char green, void SetColour(unsigned char red, unsigned char green,
unsigned char blue); unsigned char blue);
//@} //@}
/** /**
Sets the stipple bitmap. Sets the stipple bitmap.
@param bitmap @param bitmap
The bitmap to use for stippling. The bitmap to use for stippling.
@remarks The style will be set to wxSTIPPLE, unless the bitmap has a mask @remarks The style will be set to wxSTIPPLE, unless the bitmap has a mask
@@ -255,7 +255,7 @@ public:
/** /**
Sets the brush style. Sets the brush style.
@param style @param style
One of: One of:
wxTRANSPARENT wxTRANSPARENT

View File

@@ -9,45 +9,45 @@
/** /**
@class wxMemoryBuffer @class wxMemoryBuffer
@wxheader{buffer.h} @wxheader{buffer.h}
A @b wxMemoryBuffer is a useful data structure for storing arbitrary sized A @b wxMemoryBuffer is a useful data structure for storing arbitrary sized
blocks blocks
of memory. wxMemoryBuffer guarantees deletion of the memory block when the of memory. wxMemoryBuffer guarantees deletion of the memory block when the
object object
is destroyed. is destroyed.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
class wxMemoryBuffer class wxMemoryBuffer
{ {
public: public:
//@{ //@{
/** /**
Create a new buffer. Create a new buffer.
@param size @param size
size of new buffer. size of new buffer.
*/ */
wxMemoryBuffer(const wxMemoryBuffer& src); wxMemoryBuffer(const wxMemoryBuffer& src);
wxMemoryBuffer(size_t size); wxMemoryBuffer(size_t size);
//@} //@}
/** /**
Append a single byte to the buffer. Append a single byte to the buffer.
@param data @param data
New byte to append to the buffer. New byte to append to the buffer.
*/ */
void AppendByte(char data); void AppendByte(char data);
/** /**
Ensure that the buffer is big enough and return a pointer to the start Ensure that the buffer is big enough and return a pointer to the start
of the empty space in the buffer. This pointer can be used to directly of the empty space in the buffer. This pointer can be used to directly
write data into the buffer, this new data will be appended to write data into the buffer, this new data will be appended to
the existing data. the existing data.
@param sizeNeeded @param sizeNeeded
Amount of extra space required in the buffer for Amount of extra space required in the buffer for
the append operation the append operation
*/ */
@@ -84,7 +84,7 @@ public:
Sets the length of the data stored in the buffer. Mainly useful for truncating Sets the length of the data stored in the buffer. Mainly useful for truncating
existing data. existing data.
@param size @param size
New length of the valid data in the buffer. This is New length of the valid data in the buffer. This is
distinct from the allocated size distinct from the allocated size
*/ */
@@ -94,8 +94,8 @@ public:
Update the length after completing a direct append, which Update the length after completing a direct append, which
you must have used GetAppendBuf() to initialise. you must have used GetAppendBuf() to initialise.
@param sizeUsed @param sizeUsed
This is the amount of new data that has been This is the amount of new data that has been
appended. appended.
*/ */
void UngetAppendBuf(size_t sizeUsed); void UngetAppendBuf(size_t sizeUsed);
@@ -104,7 +104,7 @@ public:
Update the buffer after completing a direct write, which Update the buffer after completing a direct write, which
you must have used GetWriteBuf() to initialise. you must have used GetWriteBuf() to initialise.
@param sizeUsed @param sizeUsed
The amount of data written in to buffer The amount of data written in to buffer
by the direct write by the direct write
*/ */

View File

@@ -9,52 +9,52 @@
/** /**
@class wxBusyInfo @class wxBusyInfo
@wxheader{busyinfo.h} @wxheader{busyinfo.h}
This class makes it easy to tell your user that the program is temporarily busy. This class makes it easy to tell your user that the program is temporarily busy.
Just create a wxBusyInfo object on the stack, and within the current scope, Just create a wxBusyInfo object on the stack, and within the current scope,
a message window will be shown. a message window will be shown.
For example: For example:
@code @code
wxBusyInfo wait("Please wait, working..."); wxBusyInfo wait("Please wait, working...");
for (int i = 0; i 100000; i++) for (int i = 0; i 100000; i++)
{ {
DoACalculation(); DoACalculation();
} }
@endcode @endcode
It works by creating a window in the constructor, It works by creating a window in the constructor,
and deleting it in the destructor. and deleting it in the destructor.
You may also want to call wxTheApp-Yield() to refresh the window You may also want to call wxTheApp-Yield() to refresh the window
periodically (in case it had been obscured by other windows, for periodically (in case it had been obscured by other windows, for
example) like this: example) like this:
@code @code
wxWindowDisabler disableAll; wxWindowDisabler disableAll;
wxBusyInfo wait("Please wait, working..."); wxBusyInfo wait("Please wait, working...");
for (int i = 0; i 100000; i++) for (int i = 0; i 100000; i++)
{ {
DoACalculation(); DoACalculation();
if ( !(i % 1000) ) if ( !(i % 1000) )
wxTheApp-Yield(); wxTheApp-Yield();
} }
@endcode @endcode
but take care to not cause undesirable reentrancies when doing it (see but take care to not cause undesirable reentrancies when doing it (see
wxApp::Yield for more details). The simplest way to do wxApp::Yield for more details). The simplest way to do
it is to use wxWindowDisabler class as illustrated it is to use wxWindowDisabler class as illustrated
in the above example. in the above example.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
*/ */
class wxBusyInfo class wxBusyInfo
{ {
public: public:
/** /**

View File

@@ -9,12 +9,12 @@
/** /**
@class wxButton @class wxButton
@wxheader{button.h} @wxheader{button.h}
A button is a control that contains a text string, A button is a control that contains a text string,
and is one of the most common elements of a GUI. It may be placed on a and is one of the most common elements of a GUI. It may be placed on a
@ref overview_wxdialog "dialog box" or panel, or indeed @ref overview_wxdialog "dialog box" or panel, or indeed
almost any other window. almost any other window.
@beginStyleTable @beginStyleTable
@style{wxBU_LEFT}: @style{wxBU_LEFT}:
Left-justifies the label. Windows and GTK+ only. Left-justifies the label. Windows and GTK+ only.
@@ -30,17 +30,17 @@
@style{wxBORDER_NONE}: @style{wxBORDER_NONE}:
Creates a flat button. Windows and GTK+ only. Creates a flat button. Windows and GTK+ only.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_BUTTON(id\, func)}: @event{EVT_BUTTON(id\, func)}:
Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is
clicked. clicked.
@endEventTable @endEventTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{button.png} @appearance{button.png}
@seealso @seealso
wxBitmapButton wxBitmapButton
*/ */
@@ -57,41 +57,41 @@ public:
to to
that, the button will be decorated with stock icons under GTK+ 2. that, the button will be decorated with stock icons under GTK+ 2.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Button identifier. A value of wxID_ANY indicates a default value. Button identifier. A value of wxID_ANY indicates a default value.
@param label @param label
Text to be displayed on the button. Text to be displayed on the button.
@param pos @param pos
Button position. Button position.
@param size @param size
Button size. If the default size is specified then the button is sized Button size. If the default size is specified then the button is sized
appropriately for the text. appropriately for the text.
@param style @param style
Window style. See wxButton. Window style. See wxButton.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxButton(); wxButton();
wxButton(wxWindow* parent, wxWindowID id, wxButton(wxWindow* parent, wxWindowID id,
const wxString& label = wxEmptyString, const wxString& label = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "button"); const wxString& name = "button");
//@} //@}
/** /**
@@ -143,7 +143,7 @@ public:
/** /**
Sets the string label for the button. Sets the string label for the button.
@param label @param label
The label to set. The label to set.
*/ */
void SetLabel(const wxString& label); void SetLabel(const wxString& label);

View File

@@ -9,13 +9,13 @@
/** /**
@class wxCalendarEvent @class wxCalendarEvent
@wxheader{calctrl.h} @wxheader{calctrl.h}
The wxCalendarEvent class is used together with The wxCalendarEvent class is used together with
wxCalendarCtrl. wxCalendarCtrl.
@library{wxadv} @library{wxadv}
@category{events} @category{events}
@seealso @seealso
wxCalendarCtrl wxCalendarCtrl
*/ */
@@ -23,7 +23,7 @@ class wxCalendarEvent : public wxDateEvent
{ {
public: public:
/** /**
Returns the week day on which the user clicked in Returns the week day on which the user clicked in
@c EVT_CALENDAR_WEEKDAY_CLICKED handler. It doesn't make sense to call @c EVT_CALENDAR_WEEKDAY_CLICKED handler. It doesn't make sense to call
this function in other handlers. this function in other handlers.
*/ */
@@ -40,17 +40,17 @@ public:
/** /**
@class wxCalendarDateAttr @class wxCalendarDateAttr
@wxheader{calctrl.h} @wxheader{calctrl.h}
wxCalendarDateAttr is a custom attributes for a calendar date. The objects of wxCalendarDateAttr is a custom attributes for a calendar date. The objects of
this class are used with wxCalendarCtrl. this class are used with wxCalendarCtrl.
@library{wxadv} @library{wxadv}
@category{misc} @category{misc}
@seealso @seealso
wxCalendarCtrl wxCalendarCtrl
*/ */
class wxCalendarDateAttr class wxCalendarDateAttr
{ {
public: public:
//@{ //@{
@@ -58,13 +58,13 @@ public:
The constructors. The constructors.
*/ */
wxCalendarDateAttr(); wxCalendarDateAttr();
wxCalendarDateAttr(const wxColour& colText, wxCalendarDateAttr(const wxColour& colText,
const wxColour& colBack = wxNullColour, const wxColour& colBack = wxNullColour,
const wxColour& colBorder = wxNullColour, const wxColour& colBorder = wxNullColour,
const wxFont& font = wxNullFont, const wxFont& font = wxNullFont,
wxCalendarDateBorder border = wxCAL_BORDER_NONE); wxCalendarDateBorder border = wxCAL_BORDER_NONE);
wxCalendarDateAttr(wxCalendarDateBorder border, wxCalendarDateAttr(wxCalendarDateBorder border,
const wxColour& colBorder = wxNullColour); const wxColour& colBorder = wxNullColour);
//@} //@}
/** /**
@@ -159,33 +159,33 @@ public:
/** /**
@class wxCalendarCtrl @class wxCalendarCtrl
@wxheader{calctrl.h} @wxheader{calctrl.h}
The calendar control allows the user to pick a date. For this, The calendar control allows the user to pick a date. For this,
it displays a window containing several parts: a control at the top to pick the it displays a window containing several parts: a control at the top to pick the
month month
and the year (either or both of them may be disabled), and a month and the year (either or both of them may be disabled), and a month
area below them which shows all the days in the month. The user can move the area below them which shows all the days in the month. The user can move the
current selection using the keyboard and select the date (generating current selection using the keyboard and select the date (generating
@c EVT_CALENDAR event) by pressing @c Return or double clicking it. @c EVT_CALENDAR event) by pressing @c Return or double clicking it.
It has advanced possibilities for the customization of its display. All global It has advanced possibilities for the customization of its display. All global
settings (such as colours and fonts used) can, of course, be changed. But settings (such as colours and fonts used) can, of course, be changed. But
also, the display style for each day in the month can be set independently also, the display style for each day in the month can be set independently
using wxCalendarDateAttr class. using wxCalendarDateAttr class.
An item without custom attributes is drawn with the default colours and An item without custom attributes is drawn with the default colours and
font and without border, but setting custom attributes with font and without border, but setting custom attributes with
wxCalendarCtrl::SetAttr allows to modify its appearance. Just wxCalendarCtrl::SetAttr allows to modify its appearance. Just
create a custom attribute object and set it for the day you want to be create a custom attribute object and set it for the day you want to be
displayed specially (note that the control will take ownership of the pointer, displayed specially (note that the control will take ownership of the pointer,
i.e. it will delete it itself). A day may be marked as being a holiday, even i.e. it will delete it itself). A day may be marked as being a holiday, even
if it is not recognized as one by wxDateTime using if it is not recognized as one by wxDateTime using
wxCalendarDateAttr::SetHoliday method. wxCalendarDateAttr::SetHoliday method.
As the attributes are specified for each day, they may change when the month As the attributes are specified for each day, they may change when the month
is changed, so you will often want to update them in is changed, so you will often want to update them in
@c EVT_CALENDAR_MONTH event handler. @c EVT_CALENDAR_MONTH event handler.
@beginStyleTable @beginStyleTable
@style{wxCAL_SUNDAY_FIRST}: @style{wxCAL_SUNDAY_FIRST}:
Show Sunday as the first day in the week Show Sunday as the first day in the week
@@ -203,11 +203,11 @@ public:
Use alternative, more compact, style for the month and year Use alternative, more compact, style for the month and year
selection controls. selection controls.
@endStyleTable @endStyleTable
@library{wxadv} @library{wxadv}
@category{ctrl} @category{ctrl}
@appearance{calendarctrl.png} @appearance{calendarctrl.png}
@seealso @seealso
@ref overview_samplecalendar "Calendar sample", wxCalendarDateAttr, @ref overview_samplecalendar "Calendar sample", wxCalendarDateAttr,
wxCalendarEvent wxCalendarEvent
@@ -220,12 +220,12 @@ public:
Does the same as Create() method. Does the same as Create() method.
*/ */
wxCalendarCtrl(); wxCalendarCtrl();
wxCalendarCtrl(wxWindow* parent, wxWindowID id, wxCalendarCtrl(wxWindow* parent, wxWindowID id,
const wxDateTime& date = wxDefaultDateTime, const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS, long style = wxCAL_SHOW_HOLIDAYS,
const wxString& name = wxCalendarNameStr); const wxString& name = wxCalendarNameStr);
//@} //@}
/** /**
@@ -252,7 +252,7 @@ public:
void EnableHolidayDisplay(bool display = @true); void EnableHolidayDisplay(bool display = @true);
/** /**
This function should be used instead of changing This function should be used instead of changing
@c wxCAL_NO_MONTH_CHANGE style bit. It allows or disallows the user to @c wxCAL_NO_MONTH_CHANGE style bit. It allows or disallows the user to
change the month interactively. Note that if the month can not be changed, the change the month interactively. Note that if the month can not be changed, the
year can not be changed neither. year can not be changed neither.
@@ -321,8 +321,8 @@ public:
const wxColour GetHolidayColourFg(); const wxColour GetHolidayColourFg();
/** /**
Returns one of @c wxCAL_HITTEST_XXX Returns one of @c wxCAL_HITTEST_XXX
constants and fills either @e date or constants and fills either @e date or
@e wd pointer with the corresponding value depending on the hit test code. @e wd pointer with the corresponding value depending on the hit test code.
*/ */
wxCalendarHitTestResult HitTest(const wxPoint& pos, wxCalendarHitTestResult HitTest(const wxPoint& pos,

View File

@@ -9,25 +9,25 @@
/** /**
@class wxCaret @class wxCaret
@wxheader{caret.h} @wxheader{caret.h}
A caret is a blinking cursor showing the position where the typed text will A caret is a blinking cursor showing the position where the typed text will
appear. The text controls usually have a caret but wxCaret class also allows appear. The text controls usually have a caret but wxCaret class also allows
to use a caret in other windows. to use a caret in other windows.
Currently, the caret appears as a rectangle of the given size. In the future, Currently, the caret appears as a rectangle of the given size. In the future,
it will be possible to specify a bitmap to be used for the caret shape. it will be possible to specify a bitmap to be used for the caret shape.
A caret is always associated with a window and the current caret can be A caret is always associated with a window and the current caret can be
retrieved using wxWindow::GetCaret. The same caret retrieved using wxWindow::GetCaret. The same caret
can't be reused in two different windows. can't be reused in two different windows.
@library{wxcore} @library{wxcore}
@category{misc} @category{misc}
@seealso @seealso
wxCaret::GetBlinkTime wxCaret::GetBlinkTime
*/ */
class wxCaret class wxCaret
{ {
public: public:
//@{ //@{
@@ -36,8 +36,8 @@ public:
with the given window. with the given window.
*/ */
wxCaret(); wxCaret();
wxCaret(wxWindow* window, int width, int height); wxCaret(wxWindow* window, int width, int height);
wxCaret(wxWindowBase* window, const wxSize& size); wxCaret(wxWindowBase* window, const wxSize& size);
//@} //@}
//@{ //@{
@@ -46,7 +46,7 @@ public:
with the given window (same as constructor). with the given window (same as constructor).
*/ */
bool Create(wxWindowBase* window, int width, int height); bool Create(wxWindowBase* window, int width, int height);
bool Create(wxWindowBase* window, const wxSize& size); bool Create(wxWindowBase* window, const wxSize& size);
//@} //@}
/** /**
@@ -74,7 +74,7 @@ public:
@c ( x, y ) @c ( x, y )
*/ */
void GetPosition(int* x, int* y); void GetPosition(int* x, int* y);
wxPoint GetPosition(); wxPoint GetPosition();
//@} //@}
//@{ //@{
@@ -95,7 +95,7 @@ public:
@c ( width, height ) @c ( width, height )
*/ */
void GetSize(int* width, int* height); void GetSize(int* width, int* height);
wxSize GetSize(); wxSize GetSize();
//@} //@}
/** /**
@@ -125,7 +125,7 @@ public:
Move the caret to given position (in logical coordinates). Move the caret to given position (in logical coordinates).
*/ */
void Move(int x, int y); void Move(int x, int y);
void Move(const wxPoint& pt); void Move(const wxPoint& pt);
//@} //@}
/** /**
@@ -144,7 +144,7 @@ public:
Changes the size of the caret. Changes the size of the caret.
*/ */
void SetSize(int width, int height); void SetSize(int width, int height);
void SetSize(const wxSize& size); void SetSize(const wxSize& size);
//@} //@}
/** /**

View File

@@ -1,21 +1,21 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: chartype.h // Name: chartype.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
//@{ //@{
/** /**
wxT() is a macro which can be used with character and string literals (in other wxT() is a macro which can be used with character and string literals (in other
words, @c 'x' or @c "foo") to automatically convert them to Unicode in words, @c 'x' or @c "foo") to automatically convert them to Unicode in
Unicode build configuration. Please see the Unicode build configuration. Please see the
@ref overview_unicode "Unicode overview" for more information. @ref overview_unicode "Unicode overview" for more information.
This macro is simply returns the value passed to it without changes in ASCII This macro is simply returns the value passed to it without changes in ASCII
build. In fact, its definition is: build. In fact, its definition is:
@code @code
#ifdef UNICODE #ifdef UNICODE
#define wxT(x) L ## x #define wxT(x) L ## x
@@ -25,11 +25,11 @@
@endcode @endcode
*/ */
wxChar wxT(char ch); wxChar wxT(char ch);
const wxChar * wxT(const char * s); const wxChar * wxT(const char * s);
//@} //@}
//@{ //@{
/** /**
wxS is macro which can be used with character and string literals to either wxS is macro which can be used with character and string literals to either
convert them to wide characters or strings in @c wchar_t-based Unicode convert them to wide characters or strings in @c wchar_t-based Unicode
@@ -38,10 +38,10 @@ wxChar wxT(char ch);
mismatch between the kind of the literal used and wxStringCharType used in the mismatch between the kind of the literal used and wxStringCharType used in the
current build, but using it can be beneficial in performance-sensitive code to current build, but using it can be beneficial in performance-sensitive code to
do the conversion at compile-time instead. do the conversion at compile-time instead.
@sa wxT @sa wxT
*/ */
wxStringCharType wxS(char ch); wxStringCharType wxS(char ch);
const wxStringCharType * wxS(const char * s); const wxStringCharType * wxS(const char * s);
//@} //@}

View File

@@ -9,12 +9,12 @@
/** /**
@class wxCheckBox @class wxCheckBox
@wxheader{checkbox.h} @wxheader{checkbox.h}
A checkbox is a labelled box which by default is either on (checkmark is A checkbox is a labelled box which by default is either on (checkmark is
visible) or off (no checkmark). Optionally (when the wxCHK_3STATE style flag visible) or off (no checkmark). Optionally (when the wxCHK_3STATE style flag
is set) it can have a third state, called the mixed or undetermined state. is set) it can have a third state, called the mixed or undetermined state.
Often this is used as a "Does Not Apply" state. Often this is used as a "Does Not Apply" state.
@beginStyleTable @beginStyleTable
@style{wxCHK_2STATE}: @style{wxCHK_2STATE}:
Create a 2-state checkbox. This is the default. Create a 2-state checkbox. This is the default.
@@ -28,17 +28,17 @@
@style{wxALIGN_RIGHT}: @style{wxALIGN_RIGHT}:
Makes the text appear on the left of the checkbox. Makes the text appear on the left of the checkbox.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_CHECKBOX(id\, func)}: @event{EVT_CHECKBOX(id\, func)}:
Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox
is clicked. is clicked.
@endEventTable @endEventTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{checkbox.png} @appearance{checkbox.png}
@seealso @seealso
wxRadioButton, wxCommandEvent wxRadioButton, wxCommandEvent
*/ */
@@ -49,42 +49,42 @@ public:
/** /**
Constructor, creating and showing a checkbox. Constructor, creating and showing a checkbox.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Checkbox identifier. The value wxID_ANY indicates a default value. Checkbox identifier. The value wxID_ANY indicates a default value.
@param label @param label
Text to be displayed next to the checkbox. Text to be displayed next to the checkbox.
@param pos @param pos
Checkbox position. If wxDefaultPosition is specified then a default Checkbox position. If wxDefaultPosition is specified then a default
position is chosen. position is chosen.
@param size @param size
Checkbox size. If wxDefaultSize is specified then a default size is Checkbox size. If wxDefaultSize is specified then a default size is
chosen. chosen.
@param style @param style
Window style. See wxCheckBox. Window style. See wxCheckBox.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxCheckBox(); wxCheckBox();
wxCheckBox(wxWindow* parent, wxWindowID id, wxCheckBox(wxWindow* parent, wxWindowID id,
const wxString& label, const wxString& label,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxValidator& val, const wxValidator& val,
const wxString& name = "checkBox"); const wxString& name = "checkBox");
//@} //@}
/** /**
@@ -140,8 +140,8 @@ public:
bool Is3rdStateAllowedForUser(); bool Is3rdStateAllowedForUser();
/** /**
This is just a maybe more readable synonym for This is just a maybe more readable synonym for
GetValue(): just as the latter, it returns GetValue(): just as the latter, it returns
@true if the checkbox is checked and @false otherwise. @true if the checkbox is checked and @false otherwise.
*/ */
bool IsChecked(); bool IsChecked();
@@ -150,7 +150,7 @@ public:
Sets the checkbox to the given state. This does not cause a Sets the checkbox to the given state. This does not cause a
wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted. wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
@param state @param state
If @true, the check is on, otherwise it is off. If @true, the check is on, otherwise it is off.
*/ */
void SetValue(bool state); void SetValue(bool state);

View File

@@ -9,27 +9,27 @@
/** /**
@class wxCheckListBox @class wxCheckListBox
@wxheader{checklst.h} @wxheader{checklst.h}
A checklistbox is like a listbox, but allows items to be checked or unchecked. A checklistbox is like a listbox, but allows items to be checked or unchecked.
When using this class under Windows wxWidgets must be compiled with When using this class under Windows wxWidgets must be compiled with
USE_OWNER_DRAWN set to 1. USE_OWNER_DRAWN set to 1.
Only the new functions for this class are documented; see also wxListBox. Only the new functions for this class are documented; see also wxListBox.
Please note that wxCheckListBox uses client data in its implementation, Please note that wxCheckListBox uses client data in its implementation,
and therefore this is not available to the application. and therefore this is not available to the application.
@beginEventTable @beginEventTable
@event{EVT_CHECKLISTBOX(id\, func)}: @event{EVT_CHECKLISTBOX(id\, func)}:
Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in
the check list box is checked or unchecked. the check list box is checked or unchecked.
@endEventTable @endEventTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{checklistbox.png} @appearance{checklistbox.png}
@seealso @seealso
wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
*/ */
@@ -40,50 +40,50 @@ public:
/** /**
Constructor, creating and showing a list box. Constructor, creating and showing a list box.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Window identifier. The value wxID_ANY indicates a default value. Window identifier. The value wxID_ANY indicates a default value.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. If wxDefaultSize is specified then the window is sized Window size. If wxDefaultSize is specified then the window is sized
appropriately. appropriately.
@param n @param n
Number of strings with which to initialise the control. Number of strings with which to initialise the control.
@param choices @param choices
An array of strings with which to initialise the control. An array of strings with which to initialise the control.
@param style @param style
Window style. See wxCheckListBox. Window style. See wxCheckListBox.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
*/ */
wxCheckListBox(); wxCheckListBox();
wxCheckListBox(wxWindow* parent, wxWindowID id, wxCheckListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
int n, int n,
const wxString choices[] = @NULL, const wxString choices[] = @NULL,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "listBox"); const wxString& name = "listBox");
wxCheckListBox(wxWindow* parent, wxWindowID id, wxCheckListBox(wxWindow* parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "listBox"); const wxString& name = "listBox");
//@} //@}
/** /**
@@ -95,10 +95,10 @@ public:
Checks the given item. Note that calling this method doesn't result in Checks the given item. Note that calling this method doesn't result in
wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted. wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
@param item @param item
Index of item to check. Index of item to check.
@param check @param check
@true if the item is to be checked, @false otherwise. @true if the item is to be checked, @false otherwise.
*/ */
void Check(int item, bool check = @true); void Check(int item, bool check = @true);

View File

@@ -9,13 +9,13 @@
/** /**
@class wxMultiChoiceDialog @class wxMultiChoiceDialog
@wxheader{choicdlg.h} @wxheader{choicdlg.h}
This class represents a dialog that shows a list of strings, and allows This class represents a dialog that shows a list of strings, and allows
the user to select one or more. the user to select one or more.
@library{wxbase} @library{wxbase}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxmultichoicedialogoverview "wxMultiChoiceDialog overview", @ref overview_wxmultichoicedialogoverview "wxMultiChoiceDialog overview",
wxSingleChoiceDialog wxSingleChoiceDialog
@@ -27,22 +27,22 @@ public:
/** /**
Constructor taking an array of wxString choices. Constructor taking an array of wxString choices.
@param parent @param parent
Parent window. Parent window.
@param message @param message
Message to show on the dialog. Message to show on the dialog.
@param caption @param caption
The dialog caption. The dialog caption.
@param n @param n
The number of choices. The number of choices.
@param choices @param choices
An array of strings, or a string list, containing the choices. An array of strings, or a string list, containing the choices.
@param style @param style
A dialog style (bitlist) containing flags chosen from standard A dialog style (bitlist) containing flags chosen from standard
dialog styles and the following: dialog styles and the following:
@@ -62,10 +62,10 @@ public:
Centre the message. Not Windows. Centre the message. Not Windows.
The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
wxOK | wxCANCEL | wxCENTRE. wxOK | wxCANCEL | wxCENTRE.
@param pos @param pos
Dialog position. Not Windows. Dialog position. Not Windows.
@remarks Use ShowModal() to show the dialog. @remarks Use ShowModal() to show the dialog.
@@ -76,12 +76,12 @@ public:
const wxString* choices, const wxString* choices,
long style = wxCHOICEDLG_STYLE, long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition); const wxPoint& pos = wxDefaultPosition);
wxMultiChoiceDialog(wxWindow* parent, wxMultiChoiceDialog(wxWindow* parent,
const wxString& message, const wxString& message,
const wxString& caption, const wxString& caption,
const wxArrayString& choices, const wxArrayString& choices,
long style = wxCHOICEDLG_STYLE, long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition); const wxPoint& pos = wxDefaultPosition);
//@} //@}
/** /**
@@ -104,14 +104,14 @@ public:
/** /**
@class wxSingleChoiceDialog @class wxSingleChoiceDialog
@wxheader{choicdlg.h} @wxheader{choicdlg.h}
This class represents a dialog that shows a list of strings, and allows the This class represents a dialog that shows a list of strings, and allows the
user to select one. Double-clicking on a list item is equivalent to user to select one. Double-clicking on a list item is equivalent to
single-clicking and then pressing OK. single-clicking and then pressing OK.
@library{wxbase} @library{wxbase}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxsinglechoicedialogoverview "wxSingleChoiceDialog overview", @ref overview_wxsinglechoicedialogoverview "wxSingleChoiceDialog overview",
wxMultiChoiceDialog wxMultiChoiceDialog
@@ -123,26 +123,26 @@ public:
/** /**
Constructor, taking an array of wxString choices and optional client data. Constructor, taking an array of wxString choices and optional client data.
@param parent @param parent
Parent window. Parent window.
@param message @param message
Message to show on the dialog. Message to show on the dialog.
@param caption @param caption
The dialog caption. The dialog caption.
@param n @param n
The number of choices. The number of choices.
@param choices @param choices
An array of strings, or a string list, containing the choices. An array of strings, or a string list, containing the choices.
@param clientData @param clientData
An array of client data to be associated with the items. An array of client data to be associated with the items.
See GetSelectionClientData. See GetSelectionClientData.
@param style @param style
A dialog style (bitlist) containing flags chosen from standard A dialog style (bitlist) containing flags chosen from standard
dialog styles and the following: dialog styles and the following:
@@ -162,10 +162,10 @@ public:
Centre the message. Not Windows. Centre the message. Not Windows.
The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
wxOK | wxCANCEL | wxCENTRE. wxOK | wxCANCEL | wxCENTRE.
@param pos @param pos
Dialog position. Not Windows. Dialog position. Not Windows.
@remarks Use ShowModal() to show the dialog. @remarks Use ShowModal() to show the dialog.
@@ -177,13 +177,13 @@ public:
void** clientData = @NULL, void** clientData = @NULL,
long style = wxCHOICEDLG_STYLE, long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition); const wxPoint& pos = wxDefaultPosition);
wxSingleChoiceDialog(wxWindow* parent, wxSingleChoiceDialog(wxWindow* parent,
const wxString& message, const wxString& message,
const wxString& caption, const wxString& caption,
const wxArrayString& choices, const wxArrayString& choices,
void** clientData = @NULL, void** clientData = @NULL,
long style = wxCHOICEDLG_STYLE, long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition); const wxPoint& pos = wxDefaultPosition);
//@} //@}
/** /**
@@ -231,16 +231,16 @@ int wxGetSingleChoiceIndex(const wxString& message,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
int wxGetSingleChoiceIndex(const wxString& message, int wxGetSingleChoiceIndex(const wxString& message,
const wxString& caption, const wxString& caption,
int n, int n,
const wxString& choices[], const wxString& choices[],
wxWindow * parent = @NULL, wxWindow * parent = @NULL,
int x = -1, int x = -1,
int y = -1, int y = -1,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
//@} //@}
//@{ //@{
@@ -250,11 +250,11 @@ int wxGetSingleChoiceIndex(const wxString& message,
string or Cancel to return the empty string. Use string or Cancel to return the empty string. Use
wxGetSingleChoiceIndex if empty string is a wxGetSingleChoiceIndex if empty string is a
valid choice and if you want to be able to detect pressing Cancel reliably. valid choice and if you want to be able to detect pressing Cancel reliably.
You may pass the list of strings to choose from either using @e choices You may pass the list of strings to choose from either using @e choices
which is an array of @e n strings for the listbox or by using a single which is an array of @e n strings for the listbox or by using a single
@e aChoices parameter of type wxArrayString. @e aChoices parameter of type wxArrayString.
If @e centre is @true, the message text (which may include new line If @e centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified. characters) is centred; if @false, the message is left-justified.
*/ */
@@ -267,16 +267,16 @@ wxString wxGetSingleChoice(const wxString& message,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
wxString wxGetSingleChoice(const wxString& message, wxString wxGetSingleChoice(const wxString& message,
const wxString& caption, const wxString& caption,
int n, int n,
const wxString& choices[], const wxString& choices[],
wxWindow * parent = @NULL, wxWindow * parent = @NULL,
int x = -1, int x = -1,
int y = -1, int y = -1,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
//@} //@}
//@{ //@{
@@ -296,17 +296,17 @@ wxString wxGetSingleChoiceData(const wxString& message,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
wxString wxGetSingleChoiceData(const wxString& message, wxString wxGetSingleChoiceData(const wxString& message,
const wxString& caption, const wxString& caption,
int n, int n,
const wxString& choices[], const wxString& choices[],
const wxString& client_data[], const wxString& client_data[],
wxWindow * parent = @NULL, wxWindow * parent = @NULL,
int x = -1, int x = -1,
int y = -1, int y = -1,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
//@} //@}
//@{ //@{
@@ -316,11 +316,11 @@ wxString wxGetSingleChoiceData(const wxString& message,
number of items in the listbox whose indices will be returned in number of items in the listbox whose indices will be returned in
@e selection array. The initial contents of this array will be used to @e selection array. The initial contents of this array will be used to
select the items when the dialog is shown. select the items when the dialog is shown.
You may pass the list of strings to choose from either using @e choices You may pass the list of strings to choose from either using @e choices
which is an array of @e n strings for the listbox or by using a single which is an array of @e n strings for the listbox or by using a single
@e aChoices parameter of type wxArrayString. @e aChoices parameter of type wxArrayString.
If @e centre is @true, the message text (which may include new line If @e centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified. characters) is centred; if @false, the message is left-justified.
*/ */
@@ -334,16 +334,16 @@ size_t wxGetMultipleChoices(wxArrayInt& selections,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
size_t wxGetMultipleChoices(wxArrayInt& selections, size_t wxGetMultipleChoices(wxArrayInt& selections,
const wxString& message, const wxString& message,
const wxString& caption, const wxString& caption,
int n, int n,
const wxString& choices[], const wxString& choices[],
wxWindow * parent = @NULL, wxWindow * parent = @NULL,
int x = -1, int x = -1,
int y = -1, int y = -1,
bool centre = @true, bool centre = @true,
int width=150, int width=150,
int height=200); int height=200);
//@} //@}

View File

@@ -9,26 +9,26 @@
/** /**
@class wxChoice @class wxChoice
@wxheader{choice.h} @wxheader{choice.h}
A choice item is used to select one of a list of strings. Unlike a A choice item is used to select one of a list of strings. Unlike a
listbox, only the selection is visible until the user pulls down the listbox, only the selection is visible until the user pulls down the
menu of choices. menu of choices.
@beginStyleTable @beginStyleTable
@style{wxCB_SORT}: @style{wxCB_SORT}:
Sorts the entries alphabetically. Sorts the entries alphabetically.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_CHOICE(id\, func)}: @event{EVT_CHOICE(id\, func)}:
Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the
list is selected. list is selected.
@endEventTable @endEventTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{choice.png} @appearance{choice.png}
@seealso @seealso
wxListBox, wxComboBox, wxCommandEvent wxListBox, wxComboBox, wxCommandEvent
*/ */
@@ -39,51 +39,51 @@ public:
/** /**
Constructor, creating and showing a choice. Constructor, creating and showing a choice.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Window identifier. The value wxID_ANY indicates a default value. Window identifier. The value wxID_ANY indicates a default value.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. If wxDefaultSize is specified then the choice is sized Window size. If wxDefaultSize is specified then the choice is sized
appropriately. appropriately.
@param n @param n
Number of strings with which to initialise the choice control. Number of strings with which to initialise the choice control.
@param choices @param choices
An array of strings with which to initialise the choice control. An array of strings with which to initialise the choice control.
@param style @param style
Window style. See wxChoice. Window style. See wxChoice.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxChoice(); wxChoice();
wxChoice(wxWindow * parent, wxWindowID id, wxChoice(wxWindow * parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, int n, const wxSize& size, int n,
const wxString choices[], const wxString choices[],
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "choice"); const wxString& name = "choice");
wxChoice(wxWindow * parent, wxWindowID id, wxChoice(wxWindow * parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "choice"); const wxString& name = "choice");
//@} //@}
/** /**
@@ -101,13 +101,13 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "choice"); const wxString& name = "choice");
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow * parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "choice"); const wxString& name = "choice");
//@} //@}
/** /**
@@ -135,7 +135,7 @@ public:
/** /**
Sets the number of columns in this choice item. Sets the number of columns in this choice item.
@param n @param n
Number of columns. Number of columns.
*/ */
void SetColumns(int n = 1); void SetColumns(int n = 1);

View File

@@ -9,22 +9,22 @@
/** /**
@class wxChoicebook @class wxChoicebook
@wxheader{choicebk.h} @wxheader{choicebk.h}
wxChoicebook is a class similar to wxNotebook but which wxChoicebook is a class similar to wxNotebook but which
uses a wxChoice to show the labels instead of the uses a wxChoice to show the labels instead of the
tabs. tabs.
There is no documentation for this class yet but its usage is There is no documentation for this class yet but its usage is
identical to wxNotebook (except for the features clearly related to tabs identical to wxNotebook (except for the features clearly related to tabs
only), so please refer to that class documentation for now. You can also only), so please refer to that class documentation for now. You can also
use the @ref overview_samplenotebook "notebook sample" to see wxChoicebook in use the @ref overview_samplenotebook "notebook sample" to see wxChoicebook in
action. action.
wxChoicebook allows the use of wxBookCtrl::GetControlSizer, allowing a program wxChoicebook allows the use of wxBookCtrl::GetControlSizer, allowing a program
to add other controls next to the choice control. This is particularly useful to add other controls next to the choice control. This is particularly useful
when screen space is restricted, as it often is when wxChoicebook is being when screen space is restricted, as it often is when wxChoicebook is being
employed. employed.
@beginStyleTable @beginStyleTable
@style{wxCHB_DEFAULT}: @style{wxCHB_DEFAULT}:
Choose the default location for the labels depending on the current Choose the default location for the labels depending on the current
@@ -38,10 +38,10 @@
@style{wxCHB_BOTTOM}: @style{wxCHB_BOTTOM}:
Place labels below the page area. Place labels below the page area.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{miscwnd} @category{miscwnd}
@seealso @seealso
wxBookCtrl, wxNotebook, @ref overview_samplenotebook "notebook sample" wxBookCtrl, wxNotebook, @ref overview_samplenotebook "notebook sample"
*/ */
@@ -53,10 +53,10 @@ public:
Constructs a choicebook control. Constructs a choicebook control.
*/ */
wxChoicebook(); wxChoicebook();
wxChoicebook(wxWindow* parent, wxWindowID id, wxChoicebook(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxEmptyStr); const wxString& name = wxEmptyStr);
//@} //@}
}; };

View File

@@ -1,32 +1,32 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: clipboard.h // Name: clipboard.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** /**
Gets the name of a registered clipboard format, and puts it into the buffer @e Gets the name of a registered clipboard format, and puts it into the buffer @e
formatName which is of maximum formatName which is of maximum
length @e maxCount. @e dataFormat must not specify a predefined clipboard length @e maxCount. @e dataFormat must not specify a predefined clipboard
format. format.
*/ */
bool wxGetClipboardFormatName(int dataFormat, bool wxGetClipboardFormatName(int dataFormat,
const wxString& formatName, const wxString& formatName,
int maxCount); int maxCount);
/** /**
Gets data from the clipboard. Gets data from the clipboard.
@e dataFormat may be one of: @e dataFormat may be one of:
wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a
null-terminated text string. null-terminated text string.
wxCF_BITMAP: returns a new wxBitmap. wxCF_BITMAP: returns a new wxBitmap.
The clipboard must have previously been opened for this call to succeed. The clipboard must have previously been opened for this call to succeed.
*/ */
wxObject * wxGetClipboardData(int dataFormat); wxObject * wxGetClipboardData(int dataFormat);
@@ -65,15 +65,15 @@ bool wxCloseClipboard();
to the clipboard. Each call to this function specifies a known to the clipboard. Each call to this function specifies a known
available format; the function returns the format that appears next in available format; the function returns the format that appears next in
the list. the list.
@e dataFormat specifies a known format. If this parameter is zero, @e dataFormat specifies a known format. If this parameter is zero,
the function returns the first format in the list. the function returns the first format in the list.
The return value specifies the next known clipboard data format if the The return value specifies the next known clipboard data format if the
function is successful. It is zero if the @e dataFormat parameter specifies function is successful. It is zero if the @e dataFormat parameter specifies
the last format in the list of available formats, or if the clipboard the last format in the list of available formats, or if the clipboard
is not open. is not open.
Before it enumerates the formats function, an application must open the Before it enumerates the formats function, an application must open the
clipboard by using the clipboard by using the
wxOpenClipboard function. wxOpenClipboard function.

View File

@@ -9,18 +9,18 @@
/** /**
@class wxClipboard @class wxClipboard
@wxheader{clipbrd.h} @wxheader{clipbrd.h}
A class for manipulating the clipboard. Note that this is not compatible with A class for manipulating the clipboard. Note that this is not compatible with
the the
clipboard class from wxWidgets 1.xx, which has the same name but a different clipboard class from wxWidgets 1.xx, which has the same name but a different
implementation. implementation.
To use the clipboard, you call member functions of the global @b wxTheClipboard To use the clipboard, you call member functions of the global @b wxTheClipboard
object. object.
See also the @ref overview_wxdataobjectoverview "wxDataObject overview" for See also the @ref overview_wxdataobjectoverview "wxDataObject overview" for
further information. further information.
Call wxClipboard::Open to get ownership of the clipboard. If this operation Call wxClipboard::Open to get ownership of the clipboard. If this operation
returns @true, you returns @true, you
now own the clipboard. Call wxClipboard::SetData to put data now own the clipboard. Call wxClipboard::SetData to put data
@@ -28,19 +28,19 @@
retrieve data from the clipboard. Call wxClipboard::Close to close retrieve data from the clipboard. Call wxClipboard::Close to close
the clipboard and relinquish ownership. You should keep the clipboard open only the clipboard and relinquish ownership. You should keep the clipboard open only
momentarily. momentarily.
For example: For example:
@code @code
// Write some text to the clipboard // Write some text to the clipboard
if (wxTheClipboard-Open()) if (wxTheClipboard-Open())
{ {
// This data objects are held by the clipboard, // This data objects are held by the clipboard,
// so do not delete them in the app. // so do not delete them in the app.
wxTheClipboard-SetData( new wxTextDataObject("Some text") ); wxTheClipboard-SetData( new wxTextDataObject("Some text") );
wxTheClipboard-Close(); wxTheClipboard-Close();
} }
// Read some text // Read some text
if (wxTheClipboard-Open()) if (wxTheClipboard-Open())
{ {
@@ -49,14 +49,14 @@
wxTextDataObject data; wxTextDataObject data;
wxTheClipboard-GetData( data ); wxTheClipboard-GetData( data );
wxMessageBox( data.GetText() ); wxMessageBox( data.GetText() );
} }
wxTheClipboard-Close(); wxTheClipboard-Close();
} }
@endcode @endcode
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDataObject @ref overview_wxdndoverview "Drag and drop overview", wxDataObject
*/ */
@@ -129,7 +129,7 @@ public:
bool IsUsingPrimarySelection(); bool IsUsingPrimarySelection();
/** /**
Call this function to open the clipboard before calling SetData() Call this function to open the clipboard before calling SetData()
and GetData(). and GetData().
Call Close() when you have finished with the clipboard. You Call Close() when you have finished with the clipboard. You

View File

@@ -9,7 +9,7 @@
/** /**
@class wxClientDataContainer @class wxClientDataContainer
@wxheader{clntdata.h} @wxheader{clntdata.h}
This class is a mixin that provides storage and management of "client This class is a mixin that provides storage and management of "client
data." This data can either be of type void - in which case the data data." This data can either be of type void - in which case the data
@e container does not take care of freeing the data again @e container does not take care of freeing the data again
@@ -17,17 +17,17 @@
container will free the memory itself later. container will free the memory itself later.
Note that you @e must not assign both void data and data Note that you @e must not assign both void data and data
derived from the wxClientData class to a container. derived from the wxClientData class to a container.
NOTE: This functionality is currently duplicated in wxEvtHandler in NOTE: This functionality is currently duplicated in wxEvtHandler in
order to avoid having more than one vtable in that class hierarchy. order to avoid having more than one vtable in that class hierarchy.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxEvtHandler, wxClientData wxEvtHandler, wxClientData
*/ */
class wxClientDataContainer class wxClientDataContainer
{ {
public: public:
/** /**
@@ -65,7 +65,7 @@ public:
/** /**
@class wxClientData @class wxClientData
@wxheader{clntdata.h} @wxheader{clntdata.h}
All classes deriving from wxEvtHandler All classes deriving from wxEvtHandler
(such as all controls and wxApp) (such as all controls and wxApp)
can hold arbitrary data which is here referred to as "client data". can hold arbitrary data which is here referred to as "client data".
@@ -78,24 +78,24 @@ public:
container (e.g. a control) will free the memory itself later. container (e.g. a control) will free the memory itself later.
Note that you @e must not assign both void data and data Note that you @e must not assign both void data and data
derived from the wxClientData class to a container. derived from the wxClientData class to a container.
Some controls can hold various items and these controls can Some controls can hold various items and these controls can
additionally hold client data for each item. This is the case for additionally hold client data for each item. This is the case for
wxChoice, wxComboBox wxChoice, wxComboBox
and wxListBox. wxTreeCtrl and wxListBox. wxTreeCtrl
has a specialized class wxTreeItemData has a specialized class wxTreeItemData
for each item in the tree. for each item in the tree.
If you want to add client data to your own classes, you may If you want to add client data to your own classes, you may
use the mix-in class wxClientDataContainer. use the mix-in class wxClientDataContainer.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxEvtHandler, wxTreeItemData, wxStringClientData, wxClientDataContainer wxEvtHandler, wxTreeItemData, wxStringClientData, wxClientDataContainer
*/ */
class wxClientData class wxClientData
{ {
public: public:
/** /**
@@ -113,9 +113,9 @@ public:
/** /**
@class wxStringClientData @class wxStringClientData
@wxheader{clntdata.h} @wxheader{clntdata.h}
Predefined client data class for holding a string. Predefined client data class for holding a string.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
@@ -127,7 +127,7 @@ public:
Create client data with string. Create client data with string.
*/ */
wxStringClientData(); wxStringClientData();
wxStringClientData(const wxString& data); wxStringClientData(const wxString& data);
//@} //@}
/** /**

View File

@@ -9,14 +9,14 @@
/** /**
@class wxColourPickerCtrl @class wxColourPickerCtrl
@wxheader{clrpicker.h} @wxheader{clrpicker.h}
This control allows the user to select a colour. The generic implementation is This control allows the user to select a colour. The generic implementation is
a button which brings up a wxColourDialog when clicked. Native implementation a button which brings up a wxColourDialog when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the may differ but this is usually a (small) widget which give access to the
colour-chooser colour-chooser
dialog. dialog.
It is only available if @c wxUSE_COLOURPICKERCTRL is set to 1 (the default). It is only available if @c wxUSE_COLOURPICKERCTRL is set to 1 (the default).
@beginStyleTable @beginStyleTable
@style{wxCLRP_DEFAULT_STYLE}: @style{wxCLRP_DEFAULT_STYLE}:
The default style: 0. The default style: 0.
@@ -30,11 +30,11 @@
Shows the colour in HTML form (AABBCC) as colour button label Shows the colour in HTML form (AABBCC) as colour button label
(instead of no label at all). (instead of no label at all).
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{miscpickers} @category{miscpickers}
@appearance{colourpickerctrl.png} @appearance{colourpickerctrl.png}
@seealso @seealso
wxColourDialog, wxColourPickerEvent wxColourDialog, wxColourPickerEvent
*/ */
@@ -54,28 +54,28 @@ public:
const wxString& name = "colourpickerctrl"); const wxString& name = "colourpickerctrl");
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param colour @param colour
The initial colour shown in the control. The initial colour shown in the control.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param style @param style
The window style, see wxCRLP_* flags. The window style, see wxCRLP_* flags.
@param validator @param validator
Validator which can be used for additional date checks. Validator which can be used for additional date checks.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
@@ -99,7 +99,7 @@ public:
Sets the currently selected colour. See wxColour::Set. Sets the currently selected colour. See wxColour::Set.
*/ */
void SetColour(const wxColour & col); void SetColour(const wxColour & col);
void SetColour(const wxString & colname); void SetColour(const wxString & colname);
//@} //@}
}; };
@@ -107,13 +107,13 @@ public:
/** /**
@class wxColourPickerEvent @class wxColourPickerEvent
@wxheader{clrpicker.h} @wxheader{clrpicker.h}
This event class is used for the events generated by This event class is used for the events generated by
wxColourPickerCtrl. wxColourPickerCtrl.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxColourPickerCtrl wxColourPickerCtrl
*/ */

View File

@@ -9,75 +9,75 @@
/** /**
@class wxCmdLineParser @class wxCmdLineParser
@wxheader{cmdline.h} @wxheader{cmdline.h}
wxCmdLineParser is a class for parsing the command line. wxCmdLineParser is a class for parsing the command line.
It has the following features: It has the following features:
distinguishes options, switches and parameters; allows option grouping distinguishes options, switches and parameters; allows option grouping
allows both short and long options allows both short and long options
automatically generates the usage message from the command line description automatically generates the usage message from the command line description
does type checks on the options values (number, date, ...). does type checks on the options values (number, date, ...).
To use it you should follow these steps: To use it you should follow these steps:
@ref wxCmdLineParser::construction construct an object of this class @ref wxCmdLineParser::construction construct an object of this class
giving it the command line to parse and optionally its description or use giving it the command line to parse and optionally its description or use
@c AddXXX() functions later @c AddXXX() functions later
call @c Parse() call @c Parse()
use @c Found() to retrieve the results use @c Found() to retrieve the results
In the documentation below the following terminology is used: In the documentation below the following terminology is used:
switch switch
This is a boolean option which can be given or not, but This is a boolean option which can be given or not, but
which doesn't have any value. We use the word switch to distinguish such boolean which doesn't have any value. We use the word switch to distinguish such boolean
options from more generic options like those described below. For example, options from more generic options like those described below. For example,
@c -v might be a switch meaning "enable verbose mode". @c -v might be a switch meaning "enable verbose mode".
option option
Option for us here is something which comes with a value 0 Option for us here is something which comes with a value 0
unlike a switch. For example, @c -o:filename might be an option which allows unlike a switch. For example, @c -o:filename might be an option which allows
to specify the name of the output file. to specify the name of the output file.
parameter parameter
This is a required program argument. This is a required program argument.
@library{wxbase} @library{wxbase}
@category{appmanagement} @category{appmanagement}
@seealso @seealso
wxApp::argc and wxApp::argv, console sample wxApp::argc and wxApp::argv, console sample
*/ */
class wxCmdLineParser class wxCmdLineParser
{ {
public: public:
//@{ //@{
/** /**
Specifies both the command line (in Windows format) and the Specifies both the command line (in Windows format) and the
@ref setdesc() "command line description". @ref setdesc() "command line description".
*/ */
wxCmdLineParser(); wxCmdLineParser();
wxCmdLineParser(int argc, char** argv); wxCmdLineParser(int argc, char** argv);
wxCmdLineParser(int argc, wchar_t** argv); wxCmdLineParser(int argc, wchar_t** argv);
wxCmdLineParser(const wxString& cmdline); wxCmdLineParser(const wxString& cmdline);
wxCmdLineParser(const wxCmdLineEntryDesc* desc); wxCmdLineParser(const wxCmdLineEntryDesc* desc);
wxCmdLineParser(const wxCmdLineEntryDesc* desc, int argc, wxCmdLineParser(const wxCmdLineEntryDesc* desc, int argc,
char** argv); char** argv);
wxCmdLineParser(const wxCmdLineEntryDesc* desc, wxCmdLineParser(const wxCmdLineEntryDesc* desc,
const wxString& cmdline); const wxString& cmdline);
//@} //@}
/** /**
@@ -129,26 +129,26 @@ public:
description in what follows. description in what follows.
You have complete freedom of choice as to when specify the required information, You have complete freedom of choice as to when specify the required information,
the only restriction is that it must be done before calling the only restriction is that it must be done before calling
Parse(). Parse().
To specify the command line to parse you may use either one of constructors To specify the command line to parse you may use either one of constructors
accepting it (@c wxCmdLineParser(argc, argv) or @c wxCmdLineParser(const accepting it (@c wxCmdLineParser(argc, argv) or @c wxCmdLineParser(const
wxString) usually) wxString) usually)
or, if you use the default constructor, you can do it later by calling or, if you use the default constructor, you can do it later by calling
SetCmdLine(). SetCmdLine().
The same holds for command line description: it can be specified either in The same holds for command line description: it can be specified either in
the @ref wxcmdlineparserctor() constructor (with or without the @ref wxcmdlineparserctor() constructor (with or without
the command line itself) or constructed later using either the command line itself) or constructed later using either
SetDesc() or combination of SetDesc() or combination of
AddSwitch(), AddSwitch(),
AddOption() and AddOption() and
AddParam() methods. AddParam() methods.
Using constructors or SetDesc() uses a (usually Using constructors or SetDesc() uses a (usually
@c const static) table containing the command line description. If you want @c const static) table containing the command line description. If you want
to decide which options to accept during the run-time, using one of the to decide which options to accept during the run-time, using one of the
@c AddXXX() functions above might be preferable. @c AddXXX() functions above might be preferable.
*/ */
@@ -169,7 +169,7 @@ public:
The long options are the ones which start with two dashes (@c "--") and look The long options are the ones which start with two dashes (@c "--") and look
like this: @c --verbose, i.e. they generally are complete words and not some like this: @c --verbose, i.e. they generally are complete words and not some
abbreviations of them. As long options are used by more and more applications, abbreviations of them. As long options are used by more and more applications,
they are enabled by default, but may be disabled with they are enabled by default, but may be disabled with
DisableLongOptions(). DisableLongOptions().
Another global option is the set of characters which may be used to start an Another global option is the set of characters which may be used to start an
@@ -180,7 +180,7 @@ public:
with SetSwitchChars() method. with SetSwitchChars() method.
Finally, SetLogo() can be used to show some Finally, SetLogo() can be used to show some
application-specific text before the explanation given by application-specific text before the explanation given by
Usage() function. Usage() function.
*/ */
@@ -206,9 +206,9 @@ public:
value in the provided pointer (which should not be @NULL). value in the provided pointer (which should not be @NULL).
*/ */
bool Found(const wxString& name); bool Found(const wxString& name);
bool Found(const wxString& name, wxString* value); bool Found(const wxString& name, wxString* value);
bool Found(const wxString& name, long* value); bool Found(const wxString& name, long* value);
bool Found(const wxString& name, wxDateTime* value); bool Found(const wxString& name, wxDateTime* value);
//@} //@}
/** /**
@@ -227,21 +227,21 @@ public:
you may access the results of parsing using one of overloaded @c Found() you may access the results of parsing using one of overloaded @c Found()
methods. methods.
For a simple switch, you will simply call For a simple switch, you will simply call
Found() to determine if the switch was given Found() to determine if the switch was given
or not, for an option or a parameter, you will call a version of @c Found() or not, for an option or a parameter, you will call a version of @c Found()
which also returns the associated value in the provided variable. All which also returns the associated value in the provided variable. All
@c Found() functions return @true if the switch or option were found in the @c Found() functions return @true if the switch or option were found in the
command line or @false if they were not specified. command line or @false if they were not specified.
*/ */
/** /**
Parse the command line, return 0 if ok, -1 if @c "-h" or @c "--help" 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 option was encountered and the help message was given or a positive value if a
syntax error occurred. syntax error occurred.
@param giveUsage @param giveUsage
If @true (default), the usage message is given if a If @true (default), the usage message is given if a
syntax error was encountered while parsing the command line or if help was syntax error was encountered while parsing the command line or if help was
requested. If @false, only error messages about possible syntax errors requested. If @false, only error messages about possible syntax errors
@@ -268,8 +268,8 @@ public:
Set command line to parse after using one of the constructors which don't do it. Set command line to parse after using one of the constructors which don't do it.
*/ */
void SetCmdLine(int argc, char** argv); void SetCmdLine(int argc, char** argv);
void SetCmdLine(int argc, wchar_t** argv); void SetCmdLine(int argc, wchar_t** argv);
void SetCmdLine(const wxString& cmdline); void SetCmdLine(const wxString& cmdline);
//@} //@}
/** /**
@@ -282,7 +282,7 @@ public:
void SetDesc(const wxCmdLineEntryDesc* desc); void SetDesc(const wxCmdLineEntryDesc* desc);
/** /**
@e logo is some extra text which will be shown by @e logo is some extra text which will be shown by
Usage() method. Usage() method.
*/ */
void SetLogo(const wxString& logo); void SetLogo(const wxString& logo);

View File

@@ -9,15 +9,15 @@
/** /**
@class wxCommand @class wxCommand
@wxheader{cmdproc.h} @wxheader{cmdproc.h}
wxCommand is a base class for modelling an application command, wxCommand is a base class for modelling an application command,
which is an action usually performed by selecting a menu item, pressing which is an action usually performed by selecting a menu item, pressing
a toolbar button or any other means provided by the application to a toolbar button or any other means provided by the application to
change the data or view. change the data or view.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
Overview Overview
*/ */
@@ -89,14 +89,14 @@ public:
/** /**
@class wxCommandProcessor @class wxCommandProcessor
@wxheader{cmdproc.h} @wxheader{cmdproc.h}
wxCommandProcessor is a class that maintains a history of wxCommands, wxCommandProcessor is a class that maintains a history of wxCommands,
with undo/redo functionality built-in. Derive a new class from this with undo/redo functionality built-in. Derive a new class from this
if you want different behaviour. if you want different behaviour.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxcommandprocessoroverview "wxCommandProcessor overview", @ref overview_wxcommandprocessoroverview "wxCommandProcessor overview",
wxCommand wxCommand
@@ -173,14 +173,14 @@ public:
/** /**
Returns a boolean value that indicates if changes have been made since Returns a boolean value that indicates if changes have been made since
the last save operation. This only works if the last save operation. This only works if
MarkAsSaved() MarkAsSaved()
is called whenever the project is saved. is called whenever the project is saved.
*/ */
virtual bool IsDirty(); virtual bool IsDirty();
/** /**
You must call this method whenever the project is saved if you plan to use You must call this method whenever the project is saved if you plan to use
IsDirty(). IsDirty().
*/ */
virtual void MarkAsSaved(); virtual void MarkAsSaved();

View File

@@ -9,14 +9,14 @@
/** /**
@class wxFontData @class wxFontData
@wxheader{cmndata.h} @wxheader{cmndata.h}
@ref overview_wxfontdialogoverview "wxFontDialog overview" @ref overview_wxfontdialogoverview "wxFontDialog overview"
This class holds a variety of information related to font dialogs. This class holds a variety of information related to font dialogs.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
Overview, wxFont, wxFontDialog Overview, wxFont, wxFontDialog
*/ */
@@ -132,16 +132,16 @@ public:
/** /**
@class wxPageSetupDialogData @class wxPageSetupDialogData
@wxheader{cmndata.h} @wxheader{cmndata.h}
This class holds a variety of information related to wxPageSetupDialog. This class holds a variety of information related to wxPageSetupDialog.
It contains a wxPrintData member which is used to hold basic printer It contains a wxPrintData member which is used to hold basic printer
configuration data (as opposed to the configuration data (as opposed to the
user-interface configuration settings stored by wxPageSetupDialogData). user-interface configuration settings stored by wxPageSetupDialogData).
@library{wxcore} @library{wxcore}
@category{printing} @category{printing}
@seealso @seealso
@ref overview_printingoverview "Printing framework overview", wxPageSetupDialog @ref overview_printingoverview "Printing framework overview", wxPageSetupDialog
*/ */
@@ -153,8 +153,8 @@ public:
Construct an object from a print data object. Construct an object from a print data object.
*/ */
wxPageSetupDialogData(); wxPageSetupDialogData();
wxPageSetupDialogData(wxPageSetupDialogData& data); wxPageSetupDialogData(wxPageSetupDialogData& data);
wxPageSetupDialogData(wxPrintData& printData); wxPageSetupDialogData(wxPrintData& printData);
//@} //@}
/** /**
@@ -338,7 +338,7 @@ public:
Assigns page setup data to this object. Assigns page setup data to this object.
*/ */
void operator =(const wxPrintData& data); void operator =(const wxPrintData& data);
void operator =(const wxPageSetupDialogData& data); void operator =(const wxPageSetupDialogData& data);
//@} //@}
}; };
@@ -346,12 +346,12 @@ public:
/** /**
@class wxColourData @class wxColourData
@wxheader{cmndata.h} @wxheader{cmndata.h}
This class holds a variety of information related to colour dialogs. This class holds a variety of information related to colour dialogs.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxColour, wxColourDialog, @ref overview_wxcolourdialogoverview "wxColourDialog wxColour, wxColourDialog, @ref overview_wxcolourdialogoverview "wxColourDialog
overview" overview"
@@ -431,16 +431,16 @@ public:
/** /**
@class wxPrintData @class wxPrintData
@wxheader{cmndata.h} @wxheader{cmndata.h}
This class holds a variety of information related to printers and This class holds a variety of information related to printers and
printer device contexts. This class is used to create a wxPrinterDC printer device contexts. This class is used to create a wxPrinterDC
and a wxPostScriptDC. It is also used as a data member of wxPrintDialogData and a wxPostScriptDC. It is also used as a data member of wxPrintDialogData
and wxPageSetupDialogData, as part of the mechanism for transferring data and wxPageSetupDialogData, as part of the mechanism for transferring data
between the print dialogs and the application. between the print dialogs and the application.
@library{wxcore} @library{wxcore}
@category{printing} @category{printing}
@seealso @seealso
@ref overview_printingoverview "Printing framework overview", wxPrintDialog, @ref overview_printingoverview "Printing framework overview", wxPrintDialog,
wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, @ref overview_wxprintdialogoverview "wxPrintDialog Overview", wxPrinterDC, wxPostScriptDC wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, @ref overview_wxprintdialogoverview "wxPrintDialog Overview", wxPrinterDC, wxPostScriptDC
@@ -453,7 +453,7 @@ public:
Copy constructor. Copy constructor.
*/ */
wxPrintData(); wxPrintData();
wxPrintData(const wxPrintData& data); wxPrintData(const wxPrintData& data);
//@} //@}
/** /**
@@ -587,7 +587,7 @@ public:
but retained for backward compatibility. but retained for backward compatibility.
*/ */
void operator =(const wxPrintData& data); void operator =(const wxPrintData& data);
void operator =(const wxPrintSetupData& data); void operator =(const wxPrintSetupData& data);
//@} //@}
}; };
@@ -595,14 +595,14 @@ public:
/** /**
@class wxPrintDialogData @class wxPrintDialogData
@wxheader{cmndata.h} @wxheader{cmndata.h}
This class holds information related to the visual characteristics of This class holds information related to the visual characteristics of
wxPrintDialog. wxPrintDialog.
It contains a wxPrintData object with underlying printing settings. It contains a wxPrintData object with underlying printing settings.
@library{wxcore} @library{wxcore}
@category{printing} @category{printing}
@seealso @seealso
@ref overview_printingoverview "Printing framework overview", wxPrintDialog, @ref overview_printingoverview "Printing framework overview", wxPrintDialog,
@ref overview_wxprintdialogoverview "wxPrintDialog Overview" @ref overview_wxprintdialogoverview "wxPrintDialog Overview"
@@ -615,8 +615,8 @@ public:
Construct an object from a print dialog data object. Construct an object from a print dialog data object.
*/ */
wxPrintDialogData(); wxPrintDialogData();
wxPrintDialogData(wxPrintDialogData& dialogData); wxPrintDialogData(wxPrintDialogData& dialogData);
wxPrintDialogData(wxPrintData& printData); wxPrintDialogData(wxPrintData& printData);
//@} //@}
/** /**
@@ -763,6 +763,6 @@ public:
Assigns another print dialog data object to this object. Assigns another print dialog data object to this object.
*/ */
void operator =(const wxPrintData& data); void operator =(const wxPrintData& data);
void operator =(const wxPrintDialogData& data); void operator =(const wxPrintDialogData& data);
//@} //@}
}; };

View File

@@ -9,13 +9,13 @@
/** /**
@class wxCollapsiblePaneEvent @class wxCollapsiblePaneEvent
@wxheader{collpane.h} @wxheader{collpane.h}
This event class is used for the events generated by This event class is used for the events generated by
wxCollapsiblePane. wxCollapsiblePane.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxCollapsiblePane wxCollapsiblePane
*/ */
@@ -45,16 +45,16 @@ public:
/** /**
@class wxCollapsiblePane @class wxCollapsiblePane
@wxheader{collpane.h} @wxheader{collpane.h}
A collapsible pane is a container with an embedded button-like control which A collapsible pane is a container with an embedded button-like control which
can be can be
used by the user to collapse or expand the pane's contents. used by the user to collapse or expand the pane's contents.
Once constructed you should use the wxCollapsiblePane::GetPane Once constructed you should use the wxCollapsiblePane::GetPane
function to access the pane and add your controls inside it (i.e. use the function to access the pane and add your controls inside it (i.e. use the
wxCollapsiblePane::GetPane's returned pointer as parent for the wxCollapsiblePane::GetPane's returned pointer as parent for the
controls which must go in the pane, NOT the wxCollapsiblePane itself!). controls which must go in the pane, NOT the wxCollapsiblePane itself!).
Note that because of its nature of control which can dynamically (and Note that because of its nature of control which can dynamically (and
drastically) drastically)
change its size at run-time under user-input, when putting wxCollapsiblePane change its size at run-time under user-input, when putting wxCollapsiblePane
@@ -65,17 +65,17 @@ public:
would automatically get resized each time the user expands or collapse the pane would automatically get resized each time the user expands or collapse the pane
window window
resulting usually in a weird, flickering effect. resulting usually in a weird, flickering effect.
Usage sample: Usage sample:
@code @code
wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY, wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY,
wxT("Details:")); wxT("Details:"));
// add the pane with a zero proportion value to the 'sz' sizer which // add the pane with a zero proportion value to the 'sz' sizer which
contains it contains it
sz-Add(collpane, 0, wxGROW|wxALL, 5); sz-Add(collpane, 0, wxGROW|wxALL, 5);
// now add a test label in the collapsible pane using a sizer to layout it: // now add a test label in the collapsible pane using a sizer to layout it:
wxWindow *win = collpane-GetPane(); wxWindow *win = collpane-GetPane();
wxSizer *paneSz = new wxBoxSizer(wxVERTICAL); wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
@@ -84,18 +84,18 @@ public:
win-SetSizer(paneSz); win-SetSizer(paneSz);
paneSz-SetSizeHints(win); paneSz-SetSizeHints(win);
@endcode @endcode
It is only available if @c wxUSE_COLLPANE is set to 1 (the default). It is only available if @c wxUSE_COLLPANE is set to 1 (the default).
@beginStyleTable @beginStyleTable
@style{wxCP_DEFAULT_STYLE}: @style{wxCP_DEFAULT_STYLE}:
The default style: 0. The default style: 0.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{collapsiblepane.png} @appearance{collapsiblepane.png}
@seealso @seealso
wxPanel, wxCollapsiblePaneEvent wxPanel, wxCollapsiblePaneEvent
*/ */
@@ -120,29 +120,29 @@ public:
void Collapse(bool collapse = @true); void Collapse(bool collapse = @true);
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param label @param label
The initial label shown in the button which allows the user to expand or The initial label shown in the button which allows the user to expand or
collapse the pane window. collapse the pane window.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param style @param style
The window style, see wxCP_* flags. The window style, see wxCP_* flags.
@param validator @param validator
Validator which can be used for additional date checks. Validator which can be used for additional date checks.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if

View File

@@ -9,12 +9,12 @@
/** /**
@class wxColourDialog @class wxColourDialog
@wxheader{colordlg.h} @wxheader{colordlg.h}
This class represents the colour chooser dialog. This class represents the colour chooser dialog.
@library{wxcore} @library{wxcore}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxcolourdialogoverview "wxColourDialog Overview", wxColour, @ref overview_wxcolourdialogoverview "wxColourDialog Overview", wxColour,
wxColourData, wxGetColourFromUser wxColourData, wxGetColourFromUser
@@ -66,17 +66,17 @@ public:
Shows the colour selection dialog and returns the colour selected by user or Shows the colour selection dialog and returns the colour selected by user or
invalid colour (use @ref wxColour::isok wxColour:IsOk to test whether a colour invalid colour (use @ref wxColour::isok wxColour:IsOk to test whether a colour
is valid) if the dialog was cancelled. is valid) if the dialog was cancelled.
@param parent @param parent
The parent window for the colour selection dialog The parent window for the colour selection dialog
@param colInit @param colInit
If given, this will be the colour initially selected in the dialog. If given, this will be the colour initially selected in the dialog.
@param caption @param caption
If given, this will be used for the dialog caption. If given, this will be used for the dialog caption.
@param data @param data
Optional object storing additional colour dialog settings, such Optional object storing additional colour dialog settings, such
as custom colours. If none is provided the same settings as the last time are as custom colours. If none is provided the same settings as the last time are
used. used.

View File

@@ -9,38 +9,38 @@
/** /**
@class wxColour @class wxColour
@wxheader{colour.h} @wxheader{colour.h}
A colour is an object representing a combination of Red, Green, and Blue (RGB) A colour is an object representing a combination of Red, Green, and Blue (RGB)
intensity values, intensity values,
and is used to determine drawing colours. See the and is used to determine drawing colours. See the
entry for wxColourDatabase for how a pointer to a predefined, entry for wxColourDatabase for how a pointer to a predefined,
named colour may be returned instead of creating a new colour. named colour may be returned instead of creating a new colour.
Valid RGB values are in the range 0 to 255. Valid RGB values are in the range 0 to 255.
You can retrieve the current system colour settings with wxSystemSettings. You can retrieve the current system colour settings with wxSystemSettings.
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @stdobjects
Objects: Objects:
wxNullColour wxNullColour
Pointers: Pointers:
wxBLACK wxBLACK
wxWHITE wxWHITE
wxRED wxRED
wxBLUE wxBLUE
wxGREEN wxGREEN
wxCYAN wxCYAN
wxLIGHT_GREY wxLIGHT_GREY
@seealso @seealso
wxColourDatabase, wxPen, wxBrush, wxColourDialog, wxSystemSettings wxColourDatabase, wxPen, wxBrush, wxColourDialog, wxSystemSettings
*/ */
@@ -51,33 +51,33 @@ public:
/** /**
Copy constructor. Copy constructor.
@param red @param red
The red value. The red value.
@param green @param green
The green value. The green value.
@param blue @param blue
The blue value. The blue value.
@param alpha @param alpha
The alpha value. Alpha values range from 0 (wxALPHA_TRANSPARENT) to 255 The alpha value. Alpha values range from 0 (wxALPHA_TRANSPARENT) to 255
(wxALPHA_OPAQUE). (wxALPHA_OPAQUE).
@param colourName @param colourName
The colour name. The colour name.
@param colour @param colour
The colour to copy. The colour to copy.
@sa wxColourDatabase @sa wxColourDatabase
*/ */
wxColour(); wxColour();
wxColour(unsigned char red, unsigned char green, wxColour(unsigned char red, unsigned char green,
unsigned char blue, unsigned char blue,
unsigned char alpha=wxALPHA_OPAQUE); unsigned char alpha=wxALPHA_OPAQUE);
wxColour(const wxString& colourNname); wxColour(const wxString& colourNname);
wxColour(const wxColour& colour); wxColour(const wxColour& colour);
//@} //@}
/** /**
@@ -99,14 +99,14 @@ public:
This function is new since wxWidgets version 2.7.0 This function is new since wxWidgets version 2.7.0
*/ */
wxString GetAsString(long flags); wxString GetAsString(long flags);
wxC2S_NAME wxC2S_CSS_SYNTAX, to obtain wxC2S_NAME wxC2S_CSS_SYNTAX, to obtain
the colour in the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax the colour in the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax
(e.g. wxColour(255,0,0,85) - "rgba(255,0,0,0.333)"), and (e.g. wxColour(255,0,0,85) - "rgba(255,0,0,0.333)"), and
wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed
by 6 hexadecimal digits (e.g. wxColour(255,0,0) - "#FF0000"). by 6 hexadecimal digits (e.g. wxColour(255,0,0) - "#FF0000").
This function never fails and always returns a non-empty string but asserts if This function never fails and always returns a non-empty string but asserts if
the colour has alpha channel (i.e. is non opaque) but the colour has alpha channel (i.e. is non opaque) but
wxC2S_CSS_SYNTAX(); wxC2S_CSS_SYNTAX();
//@} //@}
/** /**
@@ -139,10 +139,10 @@ wxC2S_CSS_SYNTAX();
Sets the RGB intensity values using the given values (first overload), Sets the RGB intensity values using the given values (first overload),
extracting them from the packed long (second overload), using the given string (third overloard). extracting them from the packed long (second overload), using the given string (third overloard).
When using third form, Set() accepts: colour names (those listed in When using third form, Set() accepts: colour names (those listed in
wxTheColourDatabase), the CSS-like wxTheColourDatabase), the CSS-like
@c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax (case insensitive) @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax (case insensitive)
and the HTML-like syntax (i.e. @c "#" followed by 6 hexadecimal digits and the HTML-like syntax (i.e. @c "#" followed by 6 hexadecimal digits
for red, green, blue components). for red, green, blue components).
Returns @true if the conversion was successful, @false otherwise. Returns @true if the conversion was successful, @false otherwise.
@@ -152,8 +152,8 @@ wxC2S_CSS_SYNTAX();
void Set(unsigned char red, unsigned char green, void Set(unsigned char red, unsigned char green,
unsigned char blue, unsigned char blue,
unsigned char alpha=wxALPHA_OPAQUE); unsigned char alpha=wxALPHA_OPAQUE);
void Set(unsigned long RGB); void Set(unsigned long RGB);
bool Set(const wxString & str); bool Set(const wxString & str);
//@} //@}
/** /**
@@ -169,7 +169,7 @@ wxC2S_CSS_SYNTAX();
@sa wxColourDatabase @sa wxColourDatabase
*/ */
wxColour operator =(const wxColour& colour); wxColour operator =(const wxColour& colour);
wxColour operator =(const wxString& colourName); wxColour operator =(const wxString& colourName);
//@} //@}
/** /**

View File

@@ -9,19 +9,19 @@
/** /**
@class wxComboPopup @class wxComboPopup
@wxheader{combo.h} @wxheader{combo.h}
In order to use a custom popup with wxComboCtrl, In order to use a custom popup with wxComboCtrl,
an interface class must be derived from wxComboPopup. For more information an interface class must be derived from wxComboPopup. For more information
how to use it, see @ref overview_wxcomboctrl "Setting Custom Popup for how to use it, see @ref overview_wxcomboctrl "Setting Custom Popup for
wxComboCtrl". wxComboCtrl".
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxComboCtrl wxComboCtrl
*/ */
class wxComboPopup class wxComboPopup
{ {
public: public:
/** /**
@@ -47,14 +47,14 @@ public:
The derived class may implement this to return adjusted size The derived class may implement this to return adjusted size
for the popup control, according to the variables given. for the popup control, according to the variables given.
@param minWidth @param minWidth
Preferred minimum width. Preferred minimum width.
@param prefHeight @param prefHeight
Preferred height. May be -1 to indicate Preferred height. May be -1 to indicate
no preference. no preference.
@param maxWidth @param maxWidth
Max height for window, as limited by Max height for window, as limited by
screen size. screen size.
@@ -153,12 +153,12 @@ public:
/** /**
@class wxComboCtrl @class wxComboCtrl
@wxheader{combo.h} @wxheader{combo.h}
A combo control is a generic combobox that allows totally A combo control is a generic combobox that allows totally
custom popup. In addition it has other customization features. custom popup. In addition it has other customization features.
For instance, position and size of the dropdown button For instance, position and size of the dropdown button
can be changed. can be changed.
@beginStyleTable @beginStyleTable
@style{wxCB_READONLY}: @style{wxCB_READONLY}:
Text will not be editable. Text will not be editable.
@@ -177,7 +177,7 @@ public:
@style{wxCC_STD_BUTTON}: @style{wxCC_STD_BUTTON}:
Drop button will behave more like a standard push button. Drop button will behave more like a standard push button.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_TEXT(id\, func)}: @event{EVT_TEXT(id\, func)}:
Process a wxEVT_COMMAND_TEXT_UPDATED event, when the text changes. Process a wxEVT_COMMAND_TEXT_UPDATED event, when the text changes.
@@ -185,11 +185,11 @@ public:
Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in
the combo control. the combo control.
@endEventTable @endEventTable
@library{wxbase} @library{wxbase}
@category{ctrl} @category{ctrl}
@appearance{comboctrl.png} @appearance{comboctrl.png}
@seealso @seealso
wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxComboPopup, wxCommandEvent wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxComboPopup, wxCommandEvent
*/ */
@@ -200,41 +200,41 @@ public:
/** /**
Constructor, creating and showing a combo control. Constructor, creating and showing a combo control.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Window identifier. The value wxID_ANY indicates a default value. Window identifier. The value wxID_ANY indicates a default value.
@param value @param value
Initial selection string. An empty string indicates no selection. Initial selection string. An empty string indicates no selection.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. If wxDefaultSize is specified then the window is sized Window size. If wxDefaultSize is specified then the window is sized
appropriately. appropriately.
@param style @param style
Window style. See wxComboCtrl. Window style. See wxComboCtrl.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxComboCtrl(); wxComboCtrl();
wxComboCtrl(wxWindow* parent, wxWindowID id, wxComboCtrl(wxWindow* parent, wxWindowID id,
const wxString& value = "", const wxString& value = "",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboCtrl"); const wxString& name = "comboCtrl");
//@} //@}
/** /**
@@ -294,10 +294,10 @@ public:
if AnimateShow() did not finish if AnimateShow() did not finish
the animation within it's function scope). the animation within it's function scope).
@param rect @param rect
Position to show the popup window at, in screen coordinates. Position to show the popup window at, in screen coordinates.
@param flags @param flags
Combination of any of the following: Combination of any of the following:
*/ */
virtual void DoShowPopup(const wxRect& rect, int flags); virtual void DoShowPopup(const wxRect& rect, int flags);
@@ -460,10 +460,10 @@ public:
/** /**
Removes the text between the two positions in the combo control text field. Removes the text between the two positions in the combo control text field.
@param from @param from
The first position. The first position.
@param to @param to
The last position. The last position.
*/ */
void Remove(long from, long to); void Remove(long from, long to);
@@ -472,13 +472,13 @@ public:
Replaces the text between two positions with the given text, in the combo Replaces the text between two positions with the given text, in the combo
control text field. control text field.
@param from @param from
The first position. The first position.
@param to @param to
The second position. The second position.
@param text @param text
The text to insert. The text to insert.
*/ */
void Replace(long from, long to, const wxString& value); void Replace(long from, long to, const wxString& value);
@@ -486,22 +486,22 @@ public:
/** /**
Sets custom dropdown button graphics. Sets custom dropdown button graphics.
@param bmpNormal @param bmpNormal
Default button image. Default button image.
@param pushButtonBg @param pushButtonBg
If @true, blank push button background is painted If @true, blank push button background is painted
below the image. below the image.
@param bmpPressed @param bmpPressed
Depressed button image. Depressed button image.
@param bmpHover @param bmpHover
Button image when mouse hovers above it. This Button image when mouse hovers above it. This
should be ignored on platforms and themes that do not generally draw should be ignored on platforms and themes that do not generally draw
different kind of button on mouse hover. different kind of button on mouse hover.
@param bmpDisabled @param bmpDisabled
Disabled button image. Disabled button image.
*/ */
void SetButtonBitmaps(const wxBitmap& bmpNormal, void SetButtonBitmaps(const wxBitmap& bmpNormal,
@@ -513,17 +513,17 @@ public:
/** /**
Sets size and position of dropdown button. Sets size and position of dropdown button.
@param width @param width
Button width. Value = 0 specifies default. Button width. Value = 0 specifies default.
@param height @param height
Button height. Value = 0 specifies default. Button height. Value = 0 specifies default.
@param side @param side
Indicates which side the button will be placed. Indicates which side the button will be placed.
Value can be wxLEFT or wxRIGHT. Value can be wxLEFT or wxRIGHT.
@param spacingX @param spacingX
Horizontal spacing around the button. Default is 0. Horizontal spacing around the button. Default is 0.
*/ */
void SetButtonPosition(int width = -1, int height = -1, void SetButtonPosition(int width = -1, int height = -1,
@@ -540,7 +540,7 @@ public:
/** /**
Sets the insertion point in the text field. Sets the insertion point in the text field.
@param pos @param pos
The new insertion point. The new insertion point.
*/ */
void SetInsertionPoint(long pos); void SetInsertionPoint(long pos);
@@ -568,11 +568,11 @@ public:
/** /**
Extends popup size horizontally, relative to the edges of the combo control. Extends popup size horizontally, relative to the edges of the combo control.
@param extLeft @param extLeft
How many pixel to extend beyond the left edge of the How many pixel to extend beyond the left edge of the
control. Default is 0. control. Default is 0.
@param extRight @param extRight
How many pixel to extend beyond the right edge of the How many pixel to extend beyond the right edge of the
control. Default is 0. control. Default is 0.
@@ -598,10 +598,10 @@ public:
/** /**
Selects the text between the two positions, in the combo control text field. Selects the text between the two positions, in the combo control text field.
@param from @param from
The first position. The first position.
@param to @param to
The second position. The second position.
*/ */
void SetSelection(long from, long to); void SetSelection(long from, long to);

View File

@@ -9,19 +9,19 @@
/** /**
@class wxComboBox @class wxComboBox
@wxheader{combobox.h} @wxheader{combobox.h}
A combobox is like a combination of an edit control and a listbox. It can be A combobox is like a combination of an edit control and a listbox. It can be
displayed as static list with editable or read-only text field; or a drop-down displayed as static list with editable or read-only text field; or a drop-down
list with list with
text field; or a drop-down list without a text field. text field; or a drop-down list without a text field.
A combobox permits a single selection only. Combobox items are numbered from A combobox permits a single selection only. Combobox items are numbered from
zero. zero.
If you need a customized combobox, have a look at wxComboCtrl, If you need a customized combobox, have a look at wxComboCtrl,
wxOwnerDrawnComboBox, wxComboPopup wxOwnerDrawnComboBox, wxComboPopup
and the ready-to-use wxBitmapComboBox. and the ready-to-use wxBitmapComboBox.
@beginStyleTable @beginStyleTable
@style{wxCB_SIMPLE}: @style{wxCB_SIMPLE}:
Creates a combobox with a permanently displayed list. Windows only. Creates a combobox with a permanently displayed list. Windows only.
@@ -39,7 +39,7 @@
control or used for navigation between dialog controls). Windows control or used for navigation between dialog controls). Windows
only. only.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_COMBOBOX(id\, func)}: @event{EVT_COMBOBOX(id\, func)}:
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
@@ -53,11 +53,11 @@
the combobox (notice that the combobox must have been created with the combobox (notice that the combobox must have been created with
wxTE_PROCESS_ENTER style to receive this event). wxTE_PROCESS_ENTER style to receive this event).
@endEventTable @endEventTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{combobox.png} @appearance{combobox.png}
@seealso @seealso
wxListBox, wxTextCtrl, wxChoice, wxCommandEvent wxListBox, wxTextCtrl, wxChoice, wxCommandEvent
*/ */
@@ -68,57 +68,57 @@ public:
/** /**
Constructor, creating and showing a combobox. Constructor, creating and showing a combobox.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Window identifier. The value wxID_ANY indicates a default value. Window identifier. The value wxID_ANY indicates a default value.
@param value @param value
Initial selection string. An empty string indicates no selection. Initial selection string. An empty string indicates no selection.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. If wxDefaultSize is specified then the window is sized Window size. If wxDefaultSize is specified then the window is sized
appropriately. appropriately.
@param n @param n
Number of strings with which to initialise the control. Number of strings with which to initialise the control.
@param choices @param choices
An array of strings with which to initialise the control. An array of strings with which to initialise the control.
@param style @param style
Window style. See wxComboBox. Window style. See wxComboBox.
@param validator @param validator
Window validator. Window validator.
@param name @param name
Window name. Window name.
@sa Create(), wxValidator @sa Create(), wxValidator
*/ */
wxComboBox(); wxComboBox();
wxComboBox(wxWindow* parent, wxWindowID id, wxComboBox(wxWindow* parent, wxWindowID id,
const wxString& value = "", const wxString& value = "",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
int n = 0, int n = 0,
const wxString choices[] = @NULL, const wxString choices[] = @NULL,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
wxComboBox(wxWindow* parent, wxWindowID id, wxComboBox(wxWindow* parent, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
//@} //@}
/** /**
@@ -178,14 +178,14 @@ public:
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
bool Create(wxWindow* parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxString& value, const wxString& value,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
const wxArrayString& choices, const wxArrayString& choices,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox"); const wxString& name = "comboBox");
//@} //@}
/** /**
@@ -194,7 +194,7 @@ public:
#define void Cut() /* implementation is private */ #define void Cut() /* implementation is private */
/** /**
This function does the same things as This function does the same things as
wxChoice::GetCurrentSelection and wxChoice::GetCurrentSelection and
returns the item currently selected in the dropdown list if it's open or the returns the item currently selected in the dropdown list if it's open or the
same thing as wxControlWithItems::GetSelection otherwise. same thing as wxControlWithItems::GetSelection otherwise.
@@ -215,7 +215,7 @@ public:
virtual wxTextPos GetLastPosition(); virtual wxTextPos GetLastPosition();
/** /**
This is the same as wxTextCtrl::GetSelection This is the same as wxTextCtrl::GetSelection
for the text control which is part of the combobox. Notice that this is a for the text control which is part of the combobox. Notice that this is a
different method from wxControlWithItems::GetSelection. different method from wxControlWithItems::GetSelection.
@@ -241,10 +241,10 @@ public:
/** /**
Removes the text between the two positions in the combobox text field. Removes the text between the two positions in the combobox text field.
@param from @param from
The first position. The first position.
@param to @param to
The last position. The last position.
*/ */
void Remove(long from, long to); void Remove(long from, long to);
@@ -253,13 +253,13 @@ public:
Replaces the text between two positions with the given text, in the combobox Replaces the text between two positions with the given text, in the combobox
text field. text field.
@param from @param from
The first position. The first position.
@param to @param to
The second position. The second position.
@param text @param text
The text to insert. The text to insert.
*/ */
void Replace(long from, long to, const wxString& text); void Replace(long from, long to, const wxString& text);
@@ -267,7 +267,7 @@ public:
/** /**
Sets the insertion point in the combobox text field. Sets the insertion point in the combobox text field.
@param pos @param pos
The new insertion point. The new insertion point.
*/ */
void SetInsertionPoint(long pos); void SetInsertionPoint(long pos);
@@ -280,10 +280,10 @@ public:
/** /**
Selects the text between the two positions, in the combobox text field. Selects the text between the two positions, in the combobox text field.
@param from @param from
The first position. The first position.
@param to @param to
The second position. The second position.
*/ */
void SetSelection(long from, long to); void SetSelection(long from, long to);
@@ -294,7 +294,7 @@ public:
@b NB: For a combobox with @c wxCB_READONLY style the string must be in @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. the combobox choices list, otherwise the call to SetValue() is ignored.
@param text @param text
The text to set. The text to set.
*/ */
void SetValue(const wxString& text); void SetValue(const wxString& text);

View File

@@ -9,12 +9,12 @@
/** /**
@class wxConfigBase @class wxConfigBase
@wxheader{config.h} @wxheader{config.h}
wxConfigBase class defines the basic interface of all config classes. It can wxConfigBase class defines the basic interface of all config classes. It can
not be used by itself (it is an abstract base class) and you will always use one not be used by itself (it is an abstract base class) and you will always use one
of its derivations: wxFileConfig, of its derivations: wxFileConfig,
wxRegConfig or any other. wxRegConfig or any other.
However, usually you don't even need to know the precise nature of the class However, usually you don't even need to know the precise nature of the class
you're working with but you would just use the wxConfigBase methods. This you're working with but you would just use the wxConfigBase methods. This
allows you to write the same code regardless of whether you're working with allows you to write the same code regardless of whether you're working with
@@ -24,13 +24,13 @@
which is mapped onto the native wxConfigBase implementation on the given which is mapped onto the native wxConfigBase implementation on the given
platform: i.e. wxRegConfig under Win32 and platform: i.e. wxRegConfig under Win32 and
wxFileConfig otherwise. wxFileConfig otherwise.
See @ref overview_wxconfigoverview "config overview" for the descriptions of all See @ref overview_wxconfigoverview "config overview" for the descriptions of all
features of this class. features of this class.
It is highly recommended to use static functions @e Get() and/or @e Set(), It is highly recommended to use static functions @e Get() and/or @e Set(),
so please have a @ref overview_wxconfigstaticfunctions "look at them." so please have a @ref overview_wxconfigstaticfunctions "look at them."
@library{wxbase} @library{wxbase}
@category{misc} @category{misc}
*/ */
@@ -43,26 +43,26 @@ public:
This is the default and only constructor of the wxConfigBase class, and This is the default and only constructor of the wxConfigBase class, and
derived classes. derived classes.
@param appName @param appName
The application name. If this is empty, the class will The application name. If this is empty, the class will
normally use wxApp::GetAppName to set it. The normally use wxApp::GetAppName to set it. The
application name is used in the registry key on Windows, and can be used to application name is used in the registry key on Windows, and can be used to
deduce the local filename parameter if that is missing. deduce the local filename parameter if that is missing.
@param vendorName @param vendorName
The vendor name. If this is empty, it is assumed that The vendor name. If this is empty, it is assumed that
no vendor name is wanted, if this is optional for the current config class. no vendor name is wanted, if this is optional for the current config class.
The vendor name is appended to the application name for wxRegConfig. The vendor name is appended to the application name for wxRegConfig.
@param localFilename @param localFilename
Some config classes require a local filename. If this Some config classes require a local filename. If this
is not present, but required, the application name will be used instead. is not present, but required, the application name will be used instead.
@param globalFilename @param globalFilename
Some config classes require a global filename. If Some config classes require a global filename. If
this is not present, but required, the application name will be used instead. this is not present, but required, the application name will be used instead.
@param style @param style
Can be one of wxCONFIG_USE_LOCAL_FILE and Can be one of wxCONFIG_USE_LOCAL_FILE and
wxCONFIG_USE_GLOBAL_FILE. The style interpretation depends on the config wxCONFIG_USE_GLOBAL_FILE. The style interpretation depends on the config
class and is ignored by some implementations. For wxFileConfig, these styles class and is ignored by some implementations. For wxFileConfig, these styles
@@ -91,17 +91,17 @@ public:
For wxFileConfig, you can also add wxCONFIG_USE_NO_ESCAPE_CHARACTERS which For wxFileConfig, you can also add wxCONFIG_USE_NO_ESCAPE_CHARACTERS which
will turn off character escaping for the values of entries stored in the config will turn off character escaping for the values of entries stored in the config
file: for example a foo key with some backslash characters will be stored file: for example a foo key with some backslash characters will be stored
as foo=C:\mydir instead of the usual storage of as foo=C:\mydir instead of the usual storage of
foo=C:\\mydir. foo=C:\\mydir.
The wxCONFIG_USE_NO_ESCAPE_CHARACTERS style can be helpful if your config The wxCONFIG_USE_NO_ESCAPE_CHARACTERS style can be helpful if your config
file must be read or written to by a non-wxWidgets program (which might not file must be read or written to by a non-wxWidgets program (which might not
understand the escape characters). Note, however, that if understand the escape characters). Note, however, that if
wxCONFIG_USE_NO_ESCAPE_CHARACTERS style is used, it is is now wxCONFIG_USE_NO_ESCAPE_CHARACTERS style is used, it is is now
your application's responsibility to ensure that there is no newline or your application's responsibility to ensure that there is no newline or
other illegal characters in a value, before writing that value to the file. other illegal characters in a value, before writing that value to the file.
@param conv @param conv
This parameter is only used by wxFileConfig when compiled This parameter is only used by wxFileConfig when compiled
in Unicode mode. It specifies the encoding in which the configuration file in Unicode mode. It specifies the encoding in which the configuration file
is written. is written.
@@ -419,21 +419,21 @@ public:
Returns a boolean Returns a boolean
*/ */
bool Read(const wxString& key, wxString* str); bool Read(const wxString& key, wxString* str);
bool Read(const wxString& key, wxString* str, bool Read(const wxString& key, wxString* str,
const wxString& defaultVal); const wxString& defaultVal);
wxString Read(const wxString& key, wxString Read(const wxString& key,
const const
wxString& defaultVal); wxString& defaultVal);
bool Read(const wxString& key, long* l); bool Read(const wxString& key, long* l);
bool Read(const wxString& key, long* l, long defaultVal); bool Read(const wxString& key, long* l, long defaultVal);
bool Read(const wxString& key, double* d); bool Read(const wxString& key, double* d);
bool Read(const wxString& key, double* d, double defaultVal); bool Read(const wxString& key, double* d, double defaultVal);
bool Read(const wxString& key, bool* b); bool Read(const wxString& key, bool* b);
bool Read(const wxString& key, bool* d, bool defaultVal); bool Read(const wxString& key, bool* d, bool defaultVal);
bool Read(const wxString& key, wxMemoryBuffer* buf); bool Read(const wxString& key, wxMemoryBuffer* buf);
bool Read(const wxString& key, T* value); bool Read(const wxString& key, T* value);
bool Read(const wxString& key, T* value, bool Read(const wxString& key, T* value,
T const& defaultVal); T const& defaultVal);
//@} //@}
/** /**
@@ -456,7 +456,7 @@ wxString& defaultVal);
/** /**
Reads a value of type T, for which function Reads a value of type T, for which function
wxFromString is defined, from the key and returns it. wxFromString is defined, from the key and returns it.
@e defaultVal is returned if the key is not found. @e defaultVal is returned if the key is not found.
*/ */
T ReadObject(const wxString& key, T const& defaultVal); T ReadObject(const wxString& key, T const& defaultVal);
@@ -597,10 +597,10 @@ wxString& defaultVal);
Writes a boolean Writes a boolean
*/ */
bool Write(const wxString& key, const wxString& value); bool Write(const wxString& key, const wxString& value);
bool Write(const wxString& key, long value); bool Write(const wxString& key, long value);
bool Write(const wxString& key, double value); bool Write(const wxString& key, double value);
bool Write(const wxString& key, bool value); bool Write(const wxString& key, bool value);
bool Write(const wxString& key, const wxMemoryBuffer& buf); bool Write(const wxString& key, const wxMemoryBuffer& buf);
bool Write(const wxString& key, const T& buf); bool Write(const wxString& key, const T& buf);
//@} //@}
}; };

View File

@@ -9,16 +9,16 @@
/** /**
@class wxControl @class wxControl
@wxheader{control.h} @wxheader{control.h}
This is the base class for a control or "widget''. This is the base class for a control or "widget''.
A control is generally a small window which processes user input and/or A control is generally a small window which processes user input and/or
displays one or more item of data. displays one or more item of data.
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{control.png} @appearance{control.png}
@seealso @seealso
wxValidator wxValidator
*/ */
@@ -46,7 +46,7 @@ public:
version, without the mnemonics characters. version, without the mnemonics characters.
*/ */
const wxString GetLabelText(); const wxString GetLabelText();
static wxString GetLabelText(const wxString& label); static wxString GetLabelText(const wxString& label);
//@} //@}
/** /**
@@ -55,7 +55,7 @@ public:
The @c characters in the @e label are special and indicate that the The @c characters in the @e label are special and indicate that the
following character is a mnemonic for this control and can be used to activate following character is a mnemonic for this control and can be used to activate
it from the keyboard (typically by using @e Alt key in combination with it from the keyboard (typically by using @e Alt key in combination with
it). To insert a literal ampersand character, you need to double it, i.e. use it). To insert a literal ampersand character, you need to double it, i.e. use
@c "". @c "".
*/ */
void SetLabel(const wxString& label); void SetLabel(const wxString& label);

View File

@@ -9,7 +9,7 @@
/** /**
@class wxConvAuto @class wxConvAuto
@wxheader{convauto.h} @wxheader{convauto.h}
This class implements a Unicode to/from multibyte converter capable of This class implements a Unicode to/from multibyte converter capable of
automatically recognizing the encoding of the multibyte text on input. The automatically recognizing the encoding of the multibyte text on input. The
logic used is very simple: the class uses the BOM (byte order mark) if it's logic used is very simple: the class uses the BOM (byte order mark) if it's
@@ -18,7 +18,7 @@
specified in the constructor of a wxConvAuto instance and, in turn, defaults to specified in the constructor of a wxConvAuto instance and, in turn, defaults to
the value of @ref wxConvAuto::getdefaultmbencoding GetFallbackEncoding if the value of @ref wxConvAuto::getdefaultmbencoding GetFallbackEncoding if
not explicitly given. not explicitly given.
For the conversion from Unicode to multibyte, the same encoding as was For the conversion from Unicode to multibyte, the same encoding as was
previously used for multibyte to Unicode conversion is reused. If there had previously used for multibyte to Unicode conversion is reused. If there had
been no previous multibyte to Unicode conversion, UTF-8 is used by default. been no previous multibyte to Unicode conversion, UTF-8 is used by default.
@@ -29,19 +29,19 @@
operator, or using wxMBConv::Clone method, resets the operator, or using wxMBConv::Clone method, resets the
automatically detected encoding so that the new copy will try to detect the automatically detected encoding so that the new copy will try to detect the
encoding of the input on first use. encoding of the input on first use.
This class is used by default in wxWidgets classes and functions reading text This class is used by default in wxWidgets classes and functions reading text
from files such as wxFile, wxFFile, from files such as wxFile, wxFFile,
wxTextFile, wxFileConfig and wxTextFile, wxFileConfig and
various stream classes so the encoding set with its various stream classes so the encoding set with its
@ref wxConvAuto::setdefaultmbencoding SetFallbackEncoding method will @ref wxConvAuto::setdefaultmbencoding SetFallbackEncoding method will
affect how these classes treat input files. In particular, use this method affect how these classes treat input files. In particular, use this method
to change the fall-back multibyte encoding used to interpret the contents of to change the fall-back multibyte encoding used to interpret the contents of
the files whose contents isn't valid UTF-8 or to disallow it completely. the files whose contents isn't valid UTF-8 or to disallow it completely.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_mbconvclasses "wxMBConv classes overview" @ref overview_mbconvclasses "wxMBConv classes overview"
*/ */
@@ -63,7 +63,7 @@ public:
@c wxFONTENCODING_SYSTEM which means to use the encoding currently used @c wxFONTENCODING_SYSTEM which means to use the encoding currently used
on the user system, i.e. the encoding returned by on the user system, i.e. the encoding returned by
wxLocale::GetSystemEncoding. Any other wxLocale::GetSystemEncoding. Any other
encoding will be used as is, e.g. passing @c wxFONTENCODING_ISO8859_1 encoding will be used as is, e.g. passing @c wxFONTENCODING_ISO8859_1
ensures that non-UTF-8 input will be treated as latin1. ensures that non-UTF-8 input will be treated as latin1.
*/ */
wxConvAuto(wxFontEncoding enc = wxFONTENCODING_DEFAULT); wxConvAuto(wxFontEncoding enc = wxFONTENCODING_DEFAULT);
@@ -76,8 +76,8 @@ public:
/** /**
Returns the encoding used by default by wxConvAuto if no other encoding is Returns the encoding used by default by wxConvAuto if no other encoding is
explicitly specified in constructor. By default, returns explicitly specified in constructor. By default, returns
@c wxFONTENCODING_ISO8859_1 but can be changed using @c wxFONTENCODING_ISO8859_1 but can be changed using
@ref setdefaultmbencoding() SetFallbackEncoding method. @ref setdefaultmbencoding() SetFallbackEncoding method.
*/ */
static wxFontEncoding GetFallbackEncoding(); static wxFontEncoding GetFallbackEncoding();
@@ -85,10 +85,10 @@ public:
/** /**
Changes the encoding used by default by wxConvAuto if no other encoding is Changes the encoding used by default by wxConvAuto if no other encoding is
explicitly specified in constructor. The default value, which can be retrieved explicitly specified in constructor. The default value, which can be retrieved
using @ref getdefaultmbencoding() GetFallbackEncoding, is using @ref getdefaultmbencoding() GetFallbackEncoding, is
@c wxFONTENCODING_ISO8859_1. @c wxFONTENCODING_ISO8859_1.
Special values of @c wxFONTENCODING_SYSTEM or Special values of @c wxFONTENCODING_SYSTEM or
@c wxFONTENCODING_MAX can be used for @e enc parameter to use the @c wxFONTENCODING_MAX can be used for @e enc parameter to use the
encoding of the current user locale as fall back or not use any encoding for encoding of the current user locale as fall back or not use any encoding for
fall back at all, respectively (just as with the similar constructor fall back at all, respectively (just as with the similar constructor

View File

@@ -1,33 +1,33 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: cpp.h // Name: cpp.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
//@{ //@{
/** /**
These macro return the concatenation of the tokens passed as their arguments. These macro return the concatenation of the tokens passed as their arguments.
Unlike when using the preprocessor @c operator, the arguments undergo Unlike when using the preprocessor @c operator, the arguments undergo
the macro expansion before being concatenated. the macro expansion before being concatenated.
*/ */
wxCONCAT(x1, x2); wxCONCAT(x1, x2);
wxCONCAT3(x1, x2, x3); wxCONCAT3(x1, x2, x3);
wxCONCAT4(x1, x2, x3, x4); wxCONCAT4(x1, x2, x3, x4);
wxCONCAT5(x1, x2, x3, x4, x5); wxCONCAT5(x1, x2, x3, x4, x5);
//@} //@}
/** /**
Returns the string representation of the given symbol which can be either a Returns the string representation of the given symbol which can be either a
literal or a macro (hence the advantage of using this macro instead of the literal or a macro (hence the advantage of using this macro instead of the
standard preprocessor @c # operator which doesn't work with macros). standard preprocessor @c # operator which doesn't work with macros).
Notice that this macro always produces a @c char string, use Notice that this macro always produces a @c char string, use
wxSTRINGIZE_T to build a wide string Unicode build. wxSTRINGIZE_T to build a wide string Unicode build.
@sa wxCONCAT @sa wxCONCAT
*/ */
#define wxSTRINGIZE(x) /* implementation is private */ #define wxSTRINGIZE(x) /* implementation is private */

View File

@@ -9,22 +9,22 @@
/** /**
@class wxHelpProvider @class wxHelpProvider
@wxheader{cshelp.h} @wxheader{cshelp.h}
wxHelpProvider is an abstract class used by a program implementing wxHelpProvider is an abstract class used by a program implementing
context-sensitive help to context-sensitive help to
show the help text for the given window. show the help text for the given window.
The current help provider must be explicitly set by the application using The current help provider must be explicitly set by the application using
wxHelpProvider::Set(). wxHelpProvider::Set().
@library{wxcore} @library{wxcore}
@category{help} @category{help}
@seealso @seealso
wxContextHelp, wxContextHelpButton, wxSimpleHelpProvider, wxContextHelp, wxContextHelpButton, wxSimpleHelpProvider,
wxHelpControllerHelpProvider, wxWindow::SetHelpText, wxWindow::GetHelpTextAtPoint wxHelpControllerHelpProvider, wxWindow::SetHelpText, wxWindow::GetHelpTextAtPoint
*/ */
class wxHelpProvider class wxHelpProvider
{ {
public: public:
/** /**
@@ -34,7 +34,7 @@ public:
/** /**
Associates the text with the given window or id. Although all help Associates the text with the given window or id. Although all help
providers have these functions to allow making wxWindow::SetHelpText providers have these functions to allow making wxWindow::SetHelpText
work, not all of them implement the functions. work, not all of them implement the functions.
*/ */
void AddHelp(wxWindowBase* window, const wxString& text); void AddHelp(wxWindowBase* window, const wxString& text);
@@ -52,7 +52,7 @@ public:
the application, for example. the application, for example.
*/ */
wxString GetHelp(const wxWindowBase* window); wxString GetHelp(const wxWindowBase* window);
void AddHelp(wxWindowID id, const wxString& text); void AddHelp(wxWindowID id, const wxString& text);
//@} //@}
/** /**
@@ -71,7 +71,7 @@ public:
/** /**
Shows help for the given window. Override this function if the help doesn't Shows help for the given window. Override this function if the help doesn't
depend on the exact position inside the window, otherwise you need to override depend on the exact position inside the window, otherwise you need to override
ShowHelpAtPoint(). ShowHelpAtPoint().
Returns @true if help was shown, or @false if no help was available for this Returns @true if help was shown, or @false if no help was available for this
@@ -81,20 +81,20 @@ public:
/** /**
This function may be overridden to show help for the window when it should This function may be overridden to show help for the window when it should
depend on the position inside the window, By default this method forwards to depend on the position inside the window, By default this method forwards to
ShowHelp(), so it is enough to only implement ShowHelp(), so it is enough to only implement
the latter if the help doesn't depend on the position. 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 Returns @true if help was shown, or @false if no help was available for this
window. window.
@param window @param window
Window to show help text for. Window to show help text for.
@param point @param point
Coordinates of the mouse at the moment of help event emission. Coordinates of the mouse at the moment of help event emission.
@param origin @param origin
Help event origin, see wxHelpEvent::GetOrigin. Help event origin, see wxHelpEvent::GetOrigin.
*/ */
bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint point, bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint point,
@@ -105,7 +105,7 @@ public:
/** /**
@class wxHelpControllerHelpProvider @class wxHelpControllerHelpProvider
@wxheader{cshelp.h} @wxheader{cshelp.h}
wxHelpControllerHelpProvider is an implementation of wxHelpProvider which wxHelpControllerHelpProvider is an implementation of wxHelpProvider which
supports supports
both context identifiers and plain text help strings. If the help text is an both context identifiers and plain text help strings. If the help text is an
@@ -115,14 +115,14 @@ public:
in a tooltip as per wxSimpleHelpProvider. If you use this with a in a tooltip as per wxSimpleHelpProvider. If you use this with a
wxCHMHelpController instance wxCHMHelpController instance
on windows, it will use the native style of tip window instead of wxTipWindow. on windows, it will use the native style of tip window instead of wxTipWindow.
You can use the convenience function @b wxContextId to convert an integer You can use the convenience function @b wxContextId to convert an integer
context context
id to a string for passing to wxWindow::SetHelpText. id to a string for passing to wxWindow::SetHelpText.
@library{wxcore} @library{wxcore}
@category{help} @category{help}
@seealso @seealso
wxHelpProvider, wxSimpleHelpProvider, wxContextHelp, wxWindow::SetHelpText, wxHelpProvider, wxSimpleHelpProvider, wxContextHelp, wxWindow::SetHelpText,
wxWindow::GetHelpTextAtPoint wxWindow::GetHelpTextAtPoint
@@ -151,22 +151,22 @@ public:
/** /**
@class wxContextHelp @class wxContextHelp
@wxheader{cshelp.h} @wxheader{cshelp.h}
This class changes the cursor to a query and puts the application into a This class changes the cursor to a query and puts the application into a
'context-sensitive help mode'. 'context-sensitive help mode'.
When the user left-clicks on a window within the specified window, a wxEVT_HELP When the user left-clicks on a window within the specified window, a wxEVT_HELP
event is event is
sent to that control, and the application may respond to it by popping up some sent to that control, and the application may respond to it by popping up some
help. help.
For example: For example:
@code @code
wxContextHelp contextHelp(myWindow); wxContextHelp contextHelp(myWindow);
@endcode @endcode
There are a couple of ways to invoke this behaviour implicitly: There are a couple of ways to invoke this behaviour implicitly:
Use the wxDIALOG_EX_CONTEXTHELP style for a dialog (Windows only). This will Use the wxDIALOG_EX_CONTEXTHELP style for a dialog (Windows only). This will
put a question mark put a question mark
in the titlebar, and Windows will put the application into context-sensitive in the titlebar, and Windows will put the application into context-sensitive
@@ -177,13 +177,13 @@ public:
Normally you will write your application so that this button is only added to a Normally you will write your application so that this button is only added to a
dialog for non-Windows platforms dialog for non-Windows platforms
(use wxDIALOG_EX_CONTEXTHELP on Windows). (use wxDIALOG_EX_CONTEXTHELP on Windows).
Note that on Mac OS X, the cursor does not change when in context-sensitive Note that on Mac OS X, the cursor does not change when in context-sensitive
help mode. help mode.
@library{wxcore} @library{wxcore}
@category{help} @category{help}
@seealso @seealso
wxHelpEvent, wxHelpController, wxContextHelpButton wxHelpEvent, wxHelpController, wxContextHelpButton
*/ */
@@ -223,21 +223,21 @@ public:
/** /**
@class wxContextHelpButton @class wxContextHelpButton
@wxheader{cshelp.h} @wxheader{cshelp.h}
Instances of this class may be used to add a question mark button that when Instances of this class may be used to add a question mark button that when
pressed, puts the pressed, puts the
application into context-help mode. It does this by creating a wxContextHelp application into context-help mode. It does this by creating a wxContextHelp
object which itself object which itself
generates a wxEVT_HELP event when the user clicks on a window. generates a wxEVT_HELP event when the user clicks on a window.
On Windows, you may add a question-mark icon to a dialog by use of the On Windows, you may add a question-mark icon to a dialog by use of the
wxDIALOG_EX_CONTEXTHELP extra style, but wxDIALOG_EX_CONTEXTHELP extra style, but
on other platforms you will have to add a button explicitly, usually next to on other platforms you will have to add a button explicitly, usually next to
OK, Cancel or similar buttons. OK, Cancel or similar buttons.
@library{wxcore} @library{wxcore}
@category{help} @category{help}
@seealso @seealso
wxBitmapButton, wxContextHelp wxBitmapButton, wxContextHelp
*/ */
@@ -248,28 +248,28 @@ public:
/** /**
Constructor, creating and showing a context help button. Constructor, creating and showing a context help button.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Button identifier. Defaults to wxID_CONTEXT_HELP. Button identifier. Defaults to wxID_CONTEXT_HELP.
@param pos @param pos
Button position. Button position.
@param size @param size
Button size. If wxDefaultSize is specified then the button is sized Button size. If wxDefaultSize is specified then the button is sized
appropriately for the question mark bitmap. appropriately for the question mark bitmap.
@param style @param style
Window style. Window style.
*/ */
wxContextHelpButton(); wxContextHelpButton();
wxContextHelpButton(wxWindow* parent, wxContextHelpButton(wxWindow* parent,
wxWindowID id = wxID_CONTEXT_HELP, wxWindowID id = wxID_CONTEXT_HELP,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW); long style = wxBU_AUTODRAW);
//@} //@}
}; };
@@ -277,14 +277,14 @@ public:
/** /**
@class wxSimpleHelpProvider @class wxSimpleHelpProvider
@wxheader{cshelp.h} @wxheader{cshelp.h}
wxSimpleHelpProvider is an implementation of wxHelpProvider which supports wxSimpleHelpProvider is an implementation of wxHelpProvider which supports
only plain text help strings, and shows the string associated with the only plain text help strings, and shows the string associated with the
control (if any) in a tooltip. control (if any) in a tooltip.
@library{wxcore} @library{wxcore}
@category{help} @category{help}
@seealso @seealso
wxHelpProvider, wxHelpControllerHelpProvider, wxContextHelp, wxHelpProvider, wxHelpControllerHelpProvider, wxContextHelp,
wxWindow::SetHelpText, wxWindow::GetHelpTextAtPoint wxWindow::SetHelpText, wxWindow::GetHelpTextAtPoint
@@ -292,5 +292,5 @@ public:
class wxSimpleHelpProvider : public wxHelpProvider class wxSimpleHelpProvider : public wxHelpProvider
{ {
public: public:
}; };

View File

@@ -9,16 +9,16 @@
/** /**
@class wxControlWithItems @class wxControlWithItems
@wxheader{ctrlsub.h} @wxheader{ctrlsub.h}
This class is an abstract base class for some wxWidgets controls which contain This class is an abstract base class for some wxWidgets controls which contain
several items, such as wxListBox and several items, such as wxListBox and
wxCheckListBox derived from it, wxCheckListBox derived from it,
wxChoice and wxComboBox. wxChoice and wxComboBox.
It defines the methods for accessing the controls items and although each of It defines the methods for accessing the controls items and although each of
the derived classes implements them differently, they still all conform to the the derived classes implements them differently, they still all conform to the
same interface. same interface.
The items in a wxControlWithItems have (non-empty) string labels and, The items in a wxControlWithItems have (non-empty) string labels and,
optionally, client data associated with them. Client data may be of two optionally, client data associated with them. Client data may be of two
different kinds: either simple untyped (@c void *) pointers which are simply different kinds: either simple untyped (@c void *) pointers which are simply
@@ -31,10 +31,10 @@
data of the same type (typed or untyped), if any. This type is determined by data of the same type (typed or untyped), if any. This type is determined by
the first call to wxControlWithItems::Append (the version with the first call to wxControlWithItems::Append (the version with
client data pointer) or wxControlWithItems::SetClientData. client data pointer) or wxControlWithItems::SetClientData.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxControlWithItems::Clear wxControlWithItems::Clear
*/ */
@@ -47,19 +47,19 @@ public:
is usually much faster than appending them one by one if you need to add a lot is usually much faster than appending them one by one if you need to add a lot
of items. of items.
@param item @param item
String to add. String to add.
@param stringsArray @param stringsArray
Contains items to append to the control. Contains items to append to the control.
@param strings @param strings
Array of strings of size n. Array of strings of size n.
@param n @param n
Number of items in the strings array. Number of items in the strings array.
@param clientData @param clientData
Array of client data pointers of size n to associate with the new items. 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 @returns When appending a single item, the return value is the index of
@@ -68,14 +68,14 @@ public:
or wxCB_SORT style). or wxCB_SORT style).
*/ */
int Append(const wxString& item); int Append(const wxString& item);
int Append(const wxString& item, void * clientData); int Append(const wxString& item, void * clientData);
int Append(const wxString& item, wxClientData * clientData); int Append(const wxString& item, wxClientData * clientData);
void Append(const wxArrayString& strings); void Append(const wxArrayString& strings);
void Append(unsigned int n, const wxString* strings); void Append(unsigned int n, const wxString* strings);
void Append(unsigned int n, const wxString* strings, void Append(unsigned int n, const wxString* strings,
void ** clientData); void ** clientData);
void Append(unsigned int n, const wxString* strings, void Append(unsigned int n, const wxString* strings,
wxClientData ** clientData); wxClientData ** clientData);
//@} //@}
/** /**
@@ -94,7 +94,7 @@ public:
remove an item with the index negative or greater or equal than the number of remove an item with the index negative or greater or equal than the number of
items in the control. items in the control.
@param n @param n
The zero-based item index. The zero-based item index.
@sa Clear() @sa Clear()
@@ -104,10 +104,10 @@ public:
/** /**
Finds an item whose label matches the given string. Finds an item whose label matches the given string.
@param string @param string
String to find. String to find.
@param caseSensitive @param caseSensitive
Whether search is case sensitive (default is not). Whether search is case sensitive (default is not).
@returns The zero-based position of the item, or wxNOT_FOUND if the @returns The zero-based position of the item, or wxNOT_FOUND if the
@@ -122,7 +122,7 @@ public:
client data at all although it is ok to call it even if the given item doesn't 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). have any client data associated with it (but other items do).
@param n @param n
The zero-based position of the item. The zero-based position of the item.
@returns A pointer to the client data, or @NULL if not present. @returns A pointer to the client data, or @NULL if not present.
@@ -135,7 +135,7 @@ public:
client data at all although it is ok to call it even if the given item doesn't 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). have any client data associated with it (but other items do).
@param n @param n
The zero-based position of the item. The zero-based position of the item.
@returns A pointer to the client data, or @NULL if not present. @returns A pointer to the client data, or @NULL if not present.
@@ -166,7 +166,7 @@ public:
/** /**
Returns the label of the item with the given index. Returns the label of the item with the given index.
@param n @param n
The zero-based index. The zero-based index.
@returns The label of the item or an empty string if the position was @returns The label of the item or an empty string if the position was
@@ -194,42 +194,42 @@ public:
lot lot
of items. of items.
@param item @param item
String to add. String to add.
@param pos @param pos
Position to insert item before, zero based. Position to insert item before, zero based.
@param stringsArray @param stringsArray
Contains items to insert into the control content Contains items to insert into the control content
@param strings @param strings
Array of strings of size n. Array of strings of size n.
@param n @param n
Number of items in the strings array. Number of items in the strings array.
@param clientData @param clientData
Array of client data pointers of size n to associate with the new items. 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 @returns The return value is the index of the newly inserted item. If the
insertion failed for some reason, -1 is returned. insertion failed for some reason, -1 is returned.
*/ */
int Insert(const wxString& item, unsigned int pos); int Insert(const wxString& item, unsigned int pos);
int Insert(const wxString& item, unsigned int pos, int Insert(const wxString& item, unsigned int pos,
void * clientData); void * clientData);
int Insert(const wxString& item, unsigned int pos, int Insert(const wxString& item, unsigned int pos,
wxClientData * clientData); wxClientData * clientData);
void Insert(const wxArrayString& strings, unsigned int pos); void Insert(const wxArrayString& strings, unsigned int pos);
void Insert(const wxArrayString& strings, unsigned int pos); void Insert(const wxArrayString& strings, unsigned int pos);
void Insert(unsigned int n, const wxString* strings, void Insert(unsigned int n, const wxString* strings,
unsigned int pos); unsigned int pos);
void Insert(unsigned int n, const wxString* strings, void Insert(unsigned int n, const wxString* strings,
unsigned int pos, unsigned int pos,
void ** clientData); void ** clientData);
void Insert(unsigned int n, const wxString* strings, void Insert(unsigned int n, const wxString* strings,
unsigned int pos, unsigned int pos,
wxClientData ** clientData); wxClientData ** clientData);
//@} //@}
/** /**
@@ -252,19 +252,19 @@ public:
this method is much faster than appending the items one by one if you need to this method is much faster than appending the items one by one if you need to
append a lot of them. append a lot of them.
@param item @param item
The single item to insert into the control. The single item to insert into the control.
@param stringsArray @param stringsArray
Contains items to set as control content. Contains items to set as control content.
@param strings @param strings
Raw C++ array of strings. Only used in conjunction with 'n'. Raw C++ array of strings. Only used in conjunction with 'n'.
@param n @param n
Number of items passed in 'strings'. Only used in conjunction with 'strings'. Number of items passed in 'strings'. Only used in conjunction with 'strings'.
@param clientData @param clientData
Client data to associate with the item(s). Client data to associate with the item(s).
@returns When the control is sorted (e.g. has wxLB_SORT or wxCB_SORT @returns When the control is sorted (e.g. has wxLB_SORT or wxCB_SORT
@@ -276,14 +276,14 @@ public:
wxCB_SORT style). wxCB_SORT style).
*/ */
int Set(const wxString& item); int Set(const wxString& item);
int Set(const wxString& item, void * clientData); int Set(const wxString& item, void * clientData);
int Set(const wxString& item, wxClientData * clientData); int Set(const wxString& item, wxClientData * clientData);
void Set(const wxArrayString& stringsArray); void Set(const wxArrayString& stringsArray);
void Set(unsigned int n, const wxString* strings); void Set(unsigned int n, const wxString* strings);
void Set(unsigned int n, const wxString* strings, void Set(unsigned int n, const wxString* strings,
void ** clientData); void ** clientData);
void Set(unsigned int n, const wxString* strings, void Set(unsigned int n, const wxString* strings,
wxClientData ** clientData); wxClientData ** clientData);
//@} //@}
/** /**
@@ -291,10 +291,10 @@ public:
it is an error to call this function if any typed client data pointers had been it is an error to call this function if any typed client data pointers had been
associated with the control items before. associated with the control items before.
@param n @param n
The zero-based item index. The zero-based item index.
@param data @param data
The client data to associate with the item. The client data to associate with the item.
*/ */
void SetClientData(unsigned int n, void * data); void SetClientData(unsigned int n, void * data);
@@ -308,10 +308,10 @@ public:
Note that it is an error to call this function if any untyped client data Note that it is an error to call this function if any untyped client data
pointers had been associated with the control items before. pointers had been associated with the control items before.
@param n @param n
The zero-based item index. The zero-based item index.
@param data @param data
The client data to associate with the item. The client data to associate with the item.
*/ */
void SetClientObject(unsigned int n, wxClientData * data); void SetClientObject(unsigned int n, wxClientData * data);
@@ -323,7 +323,7 @@ public:
Note that this does not cause any command events to be emitted nor does it 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. deselect any other items in the controls which support multiple selections.
@param n @param n
The string position to select, starting from zero. The string position to select, starting from zero.
@sa SetString(), SetStringSelection() @sa SetString(), SetStringSelection()
@@ -333,10 +333,10 @@ public:
/** /**
Sets the label for the given item. Sets the label for the given item.
@param n @param n
The zero-based item index. The zero-based item index.
@param string @param string
The label to set. The label to set.
*/ */
void SetString(unsigned int n, const wxString& string); void SetString(unsigned int n, const wxString& string);
@@ -345,7 +345,7 @@ public:
Selects the item with the specified string in the control. This doesn't cause Selects the item with the specified string in the control. This doesn't cause
any command events to be emitted. any command events to be emitted.
@param string @param string
The string to select. The string to select.
@returns @true if the specified string has been selected, @false if it @returns @true if the specified string has been selected, @false if it

View File

@@ -9,7 +9,7 @@
/** /**
@class wxCursor @class wxCursor
@wxheader{cursor.h} @wxheader{cursor.h}
A cursor is a small bitmap usually used for denoting where the mouse A cursor is a small bitmap usually used for denoting where the mouse
pointer is, with a picture that might indicate the interpretation of a pointer is, with a picture that might indicate the interpretation of a
mouse click. As with icons, cursors in X and MS Windows are created mouse click. As with icons, cursors in X and MS Windows are created
@@ -18,25 +18,25 @@
object are catered for, and this is an occasion where object are catered for, and this is an occasion where
conditional compilation will probably be required (see wxIcon for conditional compilation will probably be required (see wxIcon for
an example). an example).
A single cursor object may be used in many windows (any subwindow type). A single cursor object may be used in many windows (any subwindow type).
The wxWidgets convention is to set the cursor for a window, as in X, The wxWidgets convention is to set the cursor for a window, as in X,
rather than to set it globally as in MS Windows, although a rather than to set it globally as in MS Windows, although a
global ::wxSetCursor is also available for MS Windows use. global ::wxSetCursor is also available for MS Windows use.
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @stdobjects
Objects: Objects:
wxNullCursor wxNullCursor
Pointers: Pointers:
wxSTANDARD_CURSOR wxSTANDARD_CURSOR
wxHOURGLASS_CURSOR wxHOURGLASS_CURSOR
wxCROSS_CURSOR wxCROSS_CURSOR
@seealso @seealso
wxBitmap, wxIcon, wxWindow::SetCursor, ::wxSetCursor wxBitmap, wxIcon, wxWindow::SetCursor, ::wxSetCursor
*/ */
@@ -47,25 +47,25 @@ public:
/** /**
Copy constructor, uses @ref overview_trefcount "reference counting". Copy constructor, uses @ref overview_trefcount "reference counting".
@param bits @param bits
An array of bits. An array of bits.
@param maskBits @param maskBits
Bits for a mask bitmap. Bits for a mask bitmap.
@param width @param width
Cursor width. Cursor width.
@param height @param height
Cursor height. Cursor height.
@param hotSpotX @param hotSpotX
Hotspot x coordinate. Hotspot x coordinate.
@param hotSpotY @param hotSpotY
Hotspot y coordinate. Hotspot y coordinate.
@param type @param type
Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM. Under Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM. Under
Windows, Windows,
it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to
@@ -99,7 +99,7 @@ public:
Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h). Specify hotSpotX and hotSpotY. is enabled in setup.h). Specify hotSpotX and hotSpotY.
@param cursorId @param cursorId
A stock cursor identifier. May be one of: A stock cursor identifier. May be one of:
@@ -242,20 +242,20 @@ public:
Note that not all cursors are available on all platforms. Note that not all cursors are available on all platforms.
@param cursor @param cursor
Pointer or reference to a cursor to copy. Pointer or reference to a cursor to copy.
*/ */
wxCursor(); wxCursor();
wxCursor(const char bits[], int width, int height, wxCursor(const char bits[], int width, int height,
int hotSpotX=-1, int hotSpotY=-1, int hotSpotX=-1, int hotSpotY=-1,
const char maskBits[]=@NULL, const char maskBits[]=@NULL,
wxColour* fg=@NULL, wxColour* fg=@NULL,
wxColour* bg=@NULL); wxColour* bg=@NULL);
wxCursor(const wxString& cursorName, long type, wxCursor(const wxString& cursorName, long type,
int hotSpotX=0, int hotSpotY=0); int hotSpotX=0, int hotSpotY=0);
wxCursor(int cursorId); wxCursor(int cursorId);
wxCursor(const wxImage& image); wxCursor(const wxImage& image);
wxCursor(const wxCursor& cursor); wxCursor(const wxCursor& cursor);
//@} //@}
/** /**

View File

@@ -9,27 +9,27 @@
/** /**
@class wxCustomDataObject @class wxCustomDataObject
@wxheader{dataobj.h} @wxheader{dataobj.h}
wxCustomDataObject is a specialization of wxCustomDataObject is a specialization of
wxDataObjectSimple for some wxDataObjectSimple for some
application-specific data in arbitrary (either custom or one of the standard application-specific data in arbitrary (either custom or one of the standard
ones). The only restriction is that it is supposed that this data can be ones). The only restriction is that it is supposed that this data can be
copied bitwise (i.e. with @c memcpy()), so it would be a bad idea to make copied bitwise (i.e. with @c memcpy()), so it would be a bad idea to make
it contain a C++ object (though C struct is fine). it contain a C++ object (though C struct is fine).
By default, wxCustomDataObject stores the data inside in a buffer. To put the By default, wxCustomDataObject stores the data inside in a buffer. To put the
data into the buffer you may use either data into the buffer you may use either
wxCustomDataObject::SetData or wxCustomDataObject::SetData or
wxCustomDataObject::TakeData depending on whether you want wxCustomDataObject::TakeData depending on whether you want
the object to make a copy of data or not. the object to make a copy of data or not.
If you already store the data in another place, it may be more convenient and If you already store the data in another place, it may be more convenient and
efficient to provide the data on-demand which is possible too if you override efficient to provide the data on-demand which is possible too if you override
the virtual functions mentioned below. the virtual functions mentioned below.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
wxDataObject wxDataObject
*/ */
@@ -38,7 +38,7 @@ class wxCustomDataObject : public wxDataObjectSimple
public: public:
/** /**
The constructor accepts a @e format argument which specifies the (single) The constructor accepts a @e format argument which specifies the (single)
format supported by this object. If it isn't set here, format supported by this object. If it isn't set here,
wxDataObjectSimple::SetFormat should be used. wxDataObjectSimple::SetFormat should be used.
*/ */
wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid); wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid);
@@ -95,23 +95,23 @@ public:
/** /**
@class wxDataObjectComposite @class wxDataObjectComposite
@wxheader{dataobj.h} @wxheader{dataobj.h}
wxDataObjectComposite is the simplest wxDataObjectComposite is the simplest
wxDataObject derivation which may be used to support wxDataObject derivation which may be used to support
multiple formats. It contains several multiple formats. It contains several
wxDataObjectSimple objects and supports any wxDataObjectSimple objects and supports any
format supported by at least one of them. Only one of these data objects is format supported by at least one of them. Only one of these data objects is
@e preferred (the first one if not explicitly changed by using the second @e preferred (the first one if not explicitly changed by using the second
parameter of wxDataObjectComposite::Add) and its format determines parameter of wxDataObjectComposite::Add) and its format determines
the preferred format of the composite data object as well. the preferred format of the composite data object as well.
See wxDataObject documentation for the reasons why you See wxDataObject documentation for the reasons why you
might prefer to use wxDataObject directly instead of wxDataObjectComposite for might prefer to use wxDataObject directly instead of wxDataObjectComposite for
efficiency reasons. efficiency reasons.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref overview_wxdndoverview "Clipboard and drag and drop overview",
wxDataObject, wxDataObjectSimple, wxFileDataObject, wxTextDataObject, wxBitmapDataObject wxDataObject, wxDataObjectSimple, wxFileDataObject, wxTextDataObject, wxBitmapDataObject
@@ -143,26 +143,26 @@ public:
/** /**
@class wxDataObjectSimple @class wxDataObjectSimple
@wxheader{dataobj.h} @wxheader{dataobj.h}
This is the simplest possible implementation of the This is the simplest possible implementation of the
wxDataObject class. The data object of (a class derived wxDataObject class. The data object of (a class derived
from) this class only supports one format, so the number of virtual functions from) this class only supports one format, so the number of virtual functions
to be implemented is reduced. to be implemented is reduced.
Notice that this is still an abstract base class and cannot be used but should Notice that this is still an abstract base class and cannot be used but should
be derived from. be derived from.
@b wxPython note: If you wish to create a derived wxDataObjectSimple class in @b wxPython note: If you wish to create a derived wxDataObjectSimple class in
wxPython you should derive the class from wxPyDataObjectSimple wxPython you should derive the class from wxPyDataObjectSimple
in order to get Python-aware capabilities for the various virtual in order to get Python-aware capabilities for the various virtual
methods. methods.
@b wxPerl note: In wxPerl, you need to derive your data object class @b wxPerl note: In wxPerl, you need to derive your data object class
from Wx::PlDataObjectSimple. from Wx::PlDataObjectSimple.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref @ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref
overview_samplednd "DnD sample", wxFileDataObject, wxTextDataObject, wxBitmapDataObject overview_samplednd "DnD sample", wxFileDataObject, wxTextDataObject, wxBitmapDataObject
@@ -213,22 +213,22 @@ public:
/** /**
@class wxBitmapDataObject @class wxBitmapDataObject
@wxheader{dataobj.h} @wxheader{dataobj.h}
wxBitmapDataObject is a specialization of wxDataObject for bitmap data. It can wxBitmapDataObject is a specialization of wxDataObject for bitmap data. It can
be used without change to paste data into the be used without change to paste data into the
wxClipboard or a wxDropSource. A wxClipboard or a wxDropSource. A
user may wish to derive a new class from this class for providing a bitmap user may wish to derive a new class from this class for providing a bitmap
on-demand in order to minimize memory consumption when offering data in several on-demand in order to minimize memory consumption when offering data in several
formats, such as a bitmap and GIF. formats, such as a bitmap and GIF.
@b wxPython note: If you wish to create a derived wxBitmapDataObject class in @b wxPython note: If you wish to create a derived wxBitmapDataObject class in
wxPython you should derive the class from wxPyBitmapDataObject wxPython you should derive the class from wxPyBitmapDataObject
in order to get Python-aware capabilities for the various virtual in order to get Python-aware capabilities for the various virtual
methods. methods.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref overview_wxdndoverview "Clipboard and drag and drop overview",
wxDataObject, wxDataObjectSimple, wxFileDataObject, wxTextDataObject, wxDataObject wxDataObject, wxDataObjectSimple, wxFileDataObject, wxTextDataObject, wxDataObject
@@ -237,7 +237,7 @@ class wxBitmapDataObject : public wxDataObjectSimple
{ {
public: public:
/** /**
Constructor, optionally passing a bitmap (otherwise use Constructor, optionally passing a bitmap (otherwise use
SetBitmap() later). SetBitmap() later).
*/ */
wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap); wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap);
@@ -262,64 +262,64 @@ public:
/** /**
@class wxDataFormat @class wxDataFormat
@wxheader{dataobj.h} @wxheader{dataobj.h}
A wxDataFormat is an encapsulation of a platform-specific format handle which A wxDataFormat is an encapsulation of a platform-specific format handle which
is used by the system for the clipboard and drag and drop operations. The is used by the system for the clipboard and drag and drop operations. The
applications are usually only interested in, for example, pasting data from the applications are usually only interested in, for example, pasting data from the
clipboard only if the data is in a format the program understands and a data clipboard only if the data is in a format the program understands and a data
format is something which uniquely identifies this format. format is something which uniquely identifies this format.
On the system level, a data format is usually just a number (@c CLIPFORMAT On the system level, a data format is usually just a number (@c CLIPFORMAT
under Windows or @c Atom under X11, for example) and the standard formats under Windows or @c Atom under X11, for example) and the standard formats
are, indeed, just numbers which can be implicitly converted to wxDataFormat. are, indeed, just numbers which can be implicitly converted to wxDataFormat.
The standard formats are: The standard formats are:
wxDF_INVALID wxDF_INVALID
An invalid format - used as default argument for An invalid format - used as default argument for
functions taking a wxDataFormat argument sometimes functions taking a wxDataFormat argument sometimes
wxDF_TEXT wxDF_TEXT
Text format (wxString) Text format (wxString)
wxDF_BITMAP wxDF_BITMAP
A bitmap (wxBitmap) A bitmap (wxBitmap)
wxDF_METAFILE wxDF_METAFILE
A metafile (wxMetafile, Windows only) A metafile (wxMetafile, Windows only)
wxDF_FILENAME wxDF_FILENAME
A list of filenames A list of filenames
wxDF_HTML wxDF_HTML
An HTML string. This is only valid when passed to wxSetClipboardData An HTML string. This is only valid when passed to wxSetClipboardData
when compiled with Visual C++ in non-Unicode mode when compiled with Visual C++ in non-Unicode mode
As mentioned above, these standard formats may be passed to any function taking As mentioned above, these standard formats may be passed to any function taking
wxDataFormat argument because wxDataFormat has an implicit conversion from wxDataFormat argument because wxDataFormat has an implicit conversion from
them (or, to be precise from the type @c wxDataFormat::NativeFormat which is them (or, to be precise from the type @c wxDataFormat::NativeFormat which is
the type used by the underlying platform for data formats). the type used by the underlying platform for data formats).
Aside the standard formats, the application may also use custom formats which Aside the standard formats, the application may also use custom formats which
are identified by their names (strings) and not numeric identifiers. Although are identified by their names (strings) and not numeric identifiers. Although
internally custom format must be created (or @e registered) first, you internally custom format must be created (or @e registered) first, you
@@ -329,19 +329,19 @@ public:
with non-default constructor because their constructors are executed before the with non-default constructor because their constructors are executed before the
program has time to perform all necessary initialisations and so an attempt to program has time to perform all necessary initialisations and so an attempt to
do clipboard format registration at this time will usually lead to a crash! do clipboard format registration at this time will usually lead to a crash!
@library{wxbase} @library{wxbase}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref @ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref
overview_samplednd "DnD sample", wxDataObject overview_samplednd "DnD sample", wxDataObject
*/ */
class wxDataFormat class wxDataFormat
{ {
public: public:
/** /**
Constructs a data format object for a custom format identified by its name Constructs a data format object for a custom format identified by its name
@e format. @e format.
*/ */
wxDataFormat(const wxChar format); wxDataFormat(const wxChar format);
@@ -382,26 +382,26 @@ public:
/** /**
@class wxURLDataObject @class wxURLDataObject
@wxheader{dataobj.h} @wxheader{dataobj.h}
wxURLDataObject is a wxDataObject containing an URL wxURLDataObject is a wxDataObject containing an URL
and can be used e.g. when you need to put an URL on or retrieve it from the and can be used e.g. when you need to put an URL on or retrieve it from the
clipboard: clipboard:
@code @code
wxTheClipboard-SetData(new wxURLDataObject(url)); wxTheClipboard-SetData(new wxURLDataObject(url));
@endcode @endcode
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", wxDataObject @ref overview_wxdndoverview "Clipboard and drag and drop overview", wxDataObject
*/ */
class wxURLDataObject class wxURLDataObject
{ {
public: public:
/** /**
Constructor, may be used to initialize the URL. If @e url is empty, Constructor, may be used to initialize the URL. If @e url is empty,
SetURL() can be used later. SetURL() can be used later.
*/ */
wxURLDataObject(const wxString& url = wxEmptyString); wxURLDataObject(const wxString& url = wxEmptyString);
@@ -421,21 +421,21 @@ public:
/** /**
@class wxDataObject @class wxDataObject
@wxheader{dataobj.h} @wxheader{dataobj.h}
A wxDataObject represents data that can be copied to or from the clipboard, or A wxDataObject represents data that can be copied to or from the clipboard, or
dragged and dropped. The important thing about wxDataObject is that this is a dragged and dropped. The important thing about wxDataObject is that this is a
'smart' piece of data unlike 'dumb' data containers such as memory 'smart' piece of data unlike 'dumb' data containers such as memory
buffers or files. Being 'smart' here means that the data object itself should buffers or files. Being 'smart' here means that the data object itself should
know what data formats it supports and how to render itself in each of know what data formats it supports and how to render itself in each of
its supported formats. its supported formats.
A supported format, incidentally, is exactly the format in which the data can A supported format, incidentally, is exactly the format in which the data can
be requested from a data object or from which the data object may be set. In be requested from a data object or from which the data object may be set. In
the general case, an object may support different formats on 'input' and the general case, an object may support different formats on 'input' and
'output', i.e. it may be able to render itself in a given format but not be 'output', i.e. it may be able to render itself in a given format but not be
created from data on this format or vice versa. wxDataObject defines an created from data on this format or vice versa. wxDataObject defines an
enumeration type enumeration type
@code @code
enum Direction enum Direction
{ {
@@ -443,63 +443,63 @@ public:
Set = 0x02 // format is supported by SetData() Set = 0x02 // format is supported by SetData()
}; };
@endcode @endcode
which distinguishes between them. See which distinguishes between them. See
wxDataFormat documentation for more about formats. wxDataFormat documentation for more about formats.
Not surprisingly, being 'smart' comes at a price of added complexity. This is Not surprisingly, being 'smart' comes at a price of added complexity. This is
reasonable for the situations when you really need to support multiple formats, reasonable for the situations when you really need to support multiple formats,
but may be annoying if you only want to do something simple like cut and paste but may be annoying if you only want to do something simple like cut and paste
text. text.
To provide a solution for both cases, wxWidgets has two predefined classes To provide a solution for both cases, wxWidgets has two predefined classes
which derive from wxDataObject: wxDataObjectSimple and which derive from wxDataObject: wxDataObjectSimple and
wxDataObjectComposite. wxDataObjectComposite.
wxDataObjectSimple is wxDataObjectSimple is
the simplest wxDataObject possible and only holds data in a single format (such the simplest wxDataObject possible and only holds data in a single format (such
as HTML or text) and wxDataObjectComposite is as HTML or text) and wxDataObjectComposite is
the simplest way to implement a wxDataObject that does support multiple formats the simplest way to implement a wxDataObject that does support multiple formats
because it achieves this by simply holding several wxDataObjectSimple objects. because it achieves this by simply holding several wxDataObjectSimple objects.
So, you have several solutions when you need a wxDataObject class (and you need So, you have several solutions when you need a wxDataObject class (and you need
one as soon as you want to transfer data via the clipboard or drag and drop): one as soon as you want to transfer data via the clipboard or drag and drop):
@b 1. Use one of the built-in classes @b 1. Use one of the built-in classes
You may use wxTextDataObject, You may use wxTextDataObject,
wxBitmapDataObject or wxFileDataObject in the simplest cases when you only need wxBitmapDataObject or wxFileDataObject in the simplest cases when you only need
to support one format and your data is either text, bitmap or list of files. to support one format and your data is either text, bitmap or list of files.
@b 2. Use wxDataObjectSimple @b 2. Use wxDataObjectSimple
Deriving from wxDataObjectSimple is the simplest Deriving from wxDataObjectSimple is the simplest
solution for custom data - you will only support one format and so probably solution for custom data - you will only support one format and so probably
won't be able to communicate with other programs, but data transfer will work won't be able to communicate with other programs, but data transfer will work
in your program (or between different copies of it). in your program (or between different copies of it).
@b 3. Use wxDataObjectComposite @b 3. Use wxDataObjectComposite
This is a simple but powerful This is a simple but powerful
solution which allows you to support any number of formats (either solution which allows you to support any number of formats (either
standard or custom if you combine it with the previous solution). standard or custom if you combine it with the previous solution).
@b 4. Use wxDataObject directly @b 4. Use wxDataObject directly
This is the solution for This is the solution for
maximal flexibility and efficiency, but it is also the most difficult to maximal flexibility and efficiency, but it is also the most difficult to
implement. implement.
Please note that the easiest way to use drag and drop and the clipboard with Please note that the easiest way to use drag and drop and the clipboard with
multiple formats is by using wxDataObjectComposite, but it is not the most multiple formats is by using wxDataObjectComposite, but it is not the most
efficient one as each wxDataObjectSimple would contain the whole data in its efficient one as each wxDataObjectSimple would contain the whole data in its
@@ -508,22 +508,22 @@ public:
the clipboard and even today's computers are in trouble. For this case, you the clipboard and even today's computers are in trouble. For this case, you
will have to derive from wxDataObject directly and make it enumerate its will have to derive from wxDataObject directly and make it enumerate its
formats and provide the data in the requested format on demand. formats and provide the data in the requested format on demand.
Note that neither the GTK+ data transfer mechanisms for clipboard and Note that neither the GTK+ data transfer mechanisms for clipboard and
drag and drop, nor OLE data transfer, copy any data until another application drag and drop, nor OLE data transfer, copy any data until another application
actually requests the data. This is in contrast to the 'feel' offered to the actually requests the data. This is in contrast to the 'feel' offered to the
user of a program who would normally think that the data resides in the user of a program who would normally think that the data resides in the
clipboard after having pressed 'Copy' - in reality it is only declared to be clipboard after having pressed 'Copy' - in reality it is only declared to be
available. available.
There are several predefined data object classes derived from There are several predefined data object classes derived from
wxDataObjectSimple: wxFileDataObject, wxDataObjectSimple: wxFileDataObject,
wxTextDataObject, wxTextDataObject,
wxBitmapDataObject and wxBitmapDataObject and
wxURLDataObject wxURLDataObject
which can be used without change. which can be used without change.
You may also derive your own data object classes from You may also derive your own data object classes from
wxCustomDataObject for user-defined types. The wxCustomDataObject for user-defined types. The
format of user-defined data is given as a mime-type string literal, such as format of user-defined data is given as a mime-type string literal, such as
"application/word" or "image/png". These strings are used as they are under "application/word" or "image/png". These strings are used as they are under
@@ -531,22 +531,22 @@ public:
Windows equivalent under Win32 (using the OLE IDataObject for data exchange to Windows equivalent under Win32 (using the OLE IDataObject for data exchange to
and from the clipboard and for drag and drop). Note that the format string and from the clipboard and for drag and drop). Note that the format string
translation under Windows is not yet finished. translation under Windows is not yet finished.
@b wxPython note: At this time this class is not directly usable from wxPython. @b wxPython note: At this time this class is not directly usable from wxPython.
Derive a class from wxPyDataObjectSimple Derive a class from wxPyDataObjectSimple
instead. instead.
@b wxPerl note: This class is not currently usable from wxPerl; you may @b wxPerl note: This class is not currently usable from wxPerl; you may
use Wx::PlDataObjectSimple instead. use Wx::PlDataObjectSimple instead.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref @ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref
overview_samplednd "DnD sample", wxFileDataObject, wxTextDataObject, wxBitmapDataObject, wxCustomDataObject, wxDropTarget, wxDropSource, wxTextDropTarget, wxFileDropTarget overview_samplednd "DnD sample", wxFileDataObject, wxTextDataObject, wxBitmapDataObject, wxCustomDataObject, wxDropTarget, wxDropSource, wxTextDropTarget, wxFileDropTarget
*/ */
class wxDataObject class wxDataObject
{ {
public: public:
/** /**
@@ -560,7 +560,7 @@ public:
~wxDataObject(); ~wxDataObject();
/** /**
Copy all supported formats in the given direction to the array pointed to by Copy all supported formats in the given direction to the array pointed to by
@e formats. There is enough space for GetFormatCount(dir) formats in it. @e formats. There is enough space for GetFormatCount(dir) formats in it.
*/ */
virtual void GetAllFormats(wxDataFormat * formats, virtual void GetAllFormats(wxDataFormat * formats,
@@ -603,30 +603,30 @@ public:
/** /**
@class wxTextDataObject @class wxTextDataObject
@wxheader{dataobj.h} @wxheader{dataobj.h}
wxTextDataObject is a specialization of wxDataObject for text data. It can be wxTextDataObject is a specialization of wxDataObject for text data. It can be
used without change to paste data into the wxClipboard used without change to paste data into the wxClipboard
or a wxDropSource. A user may wish to derive a new or a wxDropSource. A user may wish to derive a new
class from this class for providing text on-demand in order to minimize memory class from this class for providing text on-demand in order to minimize memory
consumption when offering data in several formats, such as plain text and RTF consumption when offering data in several formats, such as plain text and RTF
because by default the text is stored in a string in this class, but it might because by default the text is stored in a string in this class, but it might
as well be generated when requested. For this, as well be generated when requested. For this,
wxTextDataObject::GetTextLength and wxTextDataObject::GetTextLength and
wxTextDataObject::GetText will have to be overridden. wxTextDataObject::GetText will have to be overridden.
Note that if you already have the text inside a string, you will not achieve Note that if you already have the text inside a string, you will not achieve
any efficiency gain by overriding these functions because copying wxStrings is any efficiency gain by overriding these functions because copying wxStrings is
already a very efficient operation (data is not actually copied because already a very efficient operation (data is not actually copied because
wxStrings are reference counted). wxStrings are reference counted).
@b wxPython note: If you wish to create a derived wxTextDataObject class in @b wxPython note: If you wish to create a derived wxTextDataObject class in
wxPython you should derive the class from wxPyTextDataObject wxPython you should derive the class from wxPyTextDataObject
in order to get Python-aware capabilities for the various virtual in order to get Python-aware capabilities for the various virtual
methods. methods.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref overview_wxdndoverview "Clipboard and drag and drop overview",
wxDataObject, wxDataObjectSimple, wxFileDataObject, wxBitmapDataObject wxDataObject, wxDataObjectSimple, wxFileDataObject, wxBitmapDataObject
@@ -635,7 +635,7 @@ class wxTextDataObject : public wxDataObjectSimple
{ {
public: public:
/** /**
Constructor, may be used to initialise the text (otherwise Constructor, may be used to initialise the text (otherwise
SetText() should be used later). SetText() should be used later).
*/ */
wxTextDataObject(const wxString& text = wxEmptyString); wxTextDataObject(const wxString& text = wxEmptyString);
@@ -670,23 +670,23 @@ public:
/** /**
@class wxFileDataObject @class wxFileDataObject
@wxheader{dataobj.h} @wxheader{dataobj.h}
wxFileDataObject is a specialization of wxDataObject wxFileDataObject is a specialization of wxDataObject
for file names. The program works with it just as if it were a list of absolute for file names. The program works with it just as if it were a list of absolute
file file
names, but internally it uses the same format as names, but internally it uses the same format as
Explorer and other compatible programs under Windows or GNOME/KDE filemanager Explorer and other compatible programs under Windows or GNOME/KDE filemanager
under Unix which makes it possible to receive files from them using this under Unix which makes it possible to receive files from them using this
class. class.
@b Warning: Under all non-Windows platforms this class is currently @b Warning: Under all non-Windows platforms this class is currently
"input-only", i.e. you can receive the files from another application, but "input-only", i.e. you can receive the files from another application, but
copying (or dragging) file(s) from a wxWidgets application is not currently copying (or dragging) file(s) from a wxWidgets application is not currently
supported. PS: GTK2 should work as well. supported. PS: GTK2 should work as well.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
wxDataObject, wxDataObjectSimple, wxTextDataObject, wxBitmapDataObject, wxDataObject, wxDataObjectSimple, wxTextDataObject, wxBitmapDataObject,
wxDataObject wxDataObject

View File

@@ -9,12 +9,12 @@
/** /**
@class wxDataViewIconText @class wxDataViewIconText
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewIconText is used by wxDataViewIconText is used by
wxDataViewIconTextRenderer wxDataViewIconTextRenderer
for data transfer. This class can be converted to a from for data transfer. This class can be converted to a from
a wxVariant. a wxVariant.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
@@ -27,7 +27,7 @@ public:
*/ */
wxDataViewIconText(const wxString& text = wxEmptyString, wxDataViewIconText(const wxString& text = wxEmptyString,
const wxIcon& icon = wxNullIcon); const wxIcon& icon = wxNullIcon);
wxDataViewIconText(const wxDataViewIconText& other); wxDataViewIconText(const wxDataViewIconText& other);
//@} //@}
/** /**
@@ -55,9 +55,9 @@ public:
/** /**
@class wxDataViewEvent @class wxDataViewEvent
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewEvent - the event class for the wxDataViewCtrl notifications wxDataViewEvent - the event class for the wxDataViewCtrl notifications
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -70,7 +70,7 @@ public:
*/ */
wxDataViewEvent(wxEventType commandType = wxEVT_@NULL, wxDataViewEvent(wxEventType commandType = wxEVT_@NULL,
int winid = 0); int winid = 0);
wxDataViewEvent(const wxDataViewEvent& event); wxDataViewEvent(const wxDataViewEvent& event);
//@} //@}
/** /**
@@ -130,14 +130,14 @@ public:
/** /**
@class wxDataViewIconTextRenderer @class wxDataViewIconTextRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
The wxDataViewIconTextRenderer class is used to display text with The wxDataViewIconTextRenderer class is used to display text with
a small icon next to it as it is typically done in a file manager. a small icon next to it as it is typically done in a file manager.
This classes uses the wxDataViewIconText This classes uses the wxDataViewIconText
helper class to store its data. wxDataViewIonText can be converted helper class to store its data. wxDataViewIonText can be converted
to a from a wxVariant using the left shift to a from a wxVariant using the left shift
operator. operator.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -155,22 +155,22 @@ public:
/** /**
@class wxDataViewIndexListModel @class wxDataViewIndexListModel
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewIndexListModel is a specialized data model which lets wxDataViewIndexListModel is a specialized data model which lets
you address an item by its position (row) rather than its you address an item by its position (row) rather than its
wxDataViewItem (which you can obtain from this class). wxDataViewItem (which you can obtain from this class).
This model also provides its own This model also provides its own
wxDataViewIndexListModel::Compare method wxDataViewIndexListModel::Compare method
which sorts the model's data by the index. which sorts the model's data by the index.
This model is special in the it is implemented differently under OS X This model is special in the it is implemented differently under OS X
and other platforms. Under OS X a wxDataViewItem is always persistent and other platforms. Under OS X a wxDataViewItem is always persistent
and this is also the case for this class. Under other platforms, the and this is also the case for this class. Under other platforms, the
meaning of a wxDataViewItem is changed to reflect a row number for meaning of a wxDataViewItem is changed to reflect a row number for
wxDataViewIndexListModel. The consequence of this is that wxDataViewIndexListModel. The consequence of this is that
wxDataViewIndexListModel can be used as a virtual model with an wxDataViewIndexListModel can be used as a virtual model with an
almost infinate number of items on platforms other than OS X. almost infinate number of items on platforms other than OS X.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
@@ -196,7 +196,7 @@ public:
/** /**
Oberride this to indicate that the row has special font attributes. Oberride this to indicate that the row has special font attributes.
This only affects the This only affects the
wxDataViewTextRendererText renderer. wxDataViewTextRendererText renderer.
See also wxDataViewItemAttr. See also wxDataViewItemAttr.
@@ -276,46 +276,46 @@ public:
/** /**
@class wxDataViewModel @class wxDataViewModel
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewModel is the base class for all data model to be wxDataViewModel is the base class for all data model to be
displayed by a wxDataViewCtrl. displayed by a wxDataViewCtrl.
All other models derive from it and must implement its All other models derive from it and must implement its
pure virtual functions in order to define a complete pure virtual functions in order to define a complete
data model. In detail, you need to override data model. In detail, you need to override
wxDataViewModel::IsContainer, wxDataViewModel::IsContainer,
wxDataViewModel::GetParent, wxDataViewModel::GetParent,
wxDataViewModel::GetChildren, wxDataViewModel::GetChildren,
wxDataViewModel::GetColumnCount, wxDataViewModel::GetColumnCount,
wxDataViewModel::GetColumnType and wxDataViewModel::GetColumnType and
wxDataViewModel::GetValue in order to wxDataViewModel::GetValue in order to
define the data model which acts as an interface between define the data model which acts as an interface between
your actual data and the wxDataViewCtrl. Since you will your actual data and the wxDataViewCtrl. Since you will
usually also allow the wxDataViewCtrl to change your data usually also allow the wxDataViewCtrl to change your data
through its graphical interface, you will also have to override through its graphical interface, you will also have to override
wxDataViewModel::SetValue which the wxDataViewModel::SetValue which the
wxDataViewCtrl will call when a change to some data has been wxDataViewCtrl will call when a change to some data has been
commited. commited.
wxDataViewModel (as indeed the entire wxDataViewCtrl wxDataViewModel (as indeed the entire wxDataViewCtrl
code) is using wxVariant to store data and code) is using wxVariant to store data and
its type in a generic way. wxVariant can be extended to contain its type in a generic way. wxVariant can be extended to contain
almost any data without changes to the original class. almost any data without changes to the original class.
The data that is presented through this data model is expected The data that is presented through this data model is expected
to change at run-time. You need to inform the data model when to change at run-time. You need to inform the data model when
a change happened. Depending on what happened you need to call a change happened. Depending on what happened you need to call
one of the following methods: one of the following methods:
wxDataViewModel::ValueChanged, wxDataViewModel::ValueChanged,
wxDataViewModel::ItemAdded, wxDataViewModel::ItemAdded,
wxDataViewModel::ItemDeleted, wxDataViewModel::ItemDeleted,
wxDataViewModel::ItemChanged, wxDataViewModel::ItemChanged,
wxDataViewModel::Cleared. There are wxDataViewModel::Cleared. There are
plural forms for notification of addition, change plural forms for notification of addition, change
or removal of several item at once. See or removal of several item at once. See
wxDataViewModel::ItemsAdded, wxDataViewModel::ItemsAdded,
wxDataViewModel::ItemsDeleted, wxDataViewModel::ItemsDeleted,
wxDataViewModel::ItemsChanged. wxDataViewModel::ItemsChanged.
Note that wxDataViewModel does not define the position or Note that wxDataViewModel does not define the position or
index of any item in the control because different controls index of any item in the control because different controls
might display the same data differently. wxDataViewModel does might display the same data differently. wxDataViewModel does
@@ -323,29 +323,29 @@ public:
which the wxDataViewCtrl may use to sort the data either which the wxDataViewCtrl may use to sort the data either
in conjunction with a column header or without (see in conjunction with a column header or without (see
wxDataViewModel::HasDefaultCompare). wxDataViewModel::HasDefaultCompare).
This class maintains a list of This class maintains a list of
wxDataViewModelNotifier wxDataViewModelNotifier
which link this class to the specific implementations on the which link this class to the specific implementations on the
supported platforms so that e.g. calling supported platforms so that e.g. calling
wxDataViewModel::ValueChanged wxDataViewModel::ValueChanged
on this model will just call on this model will just call
wxDataViewModelNotifier::ValueChanged wxDataViewModelNotifier::ValueChanged
for each notifier that has been added. You can also add for each notifier that has been added. You can also add
your own notifier in order to get informed about any changes your own notifier in order to get informed about any changes
to the data in the list model. to the data in the list model.
Currently wxWidgets provides the following models apart Currently wxWidgets provides the following models apart
from the base model: from the base model:
wxDataViewIndexListModel, wxDataViewIndexListModel,
wxDataViewTreeStore. wxDataViewTreeStore.
Note that wxDataViewModel is reference counted, derives from Note that wxDataViewModel is reference counted, derives from
wxObjectRefData and cannot be deleted wxObjectRefData and cannot be deleted
directly as it can be shared by several wxDataViewCtrls. This directly as it can be shared by several wxDataViewCtrls. This
implies that you need to decrease the reference count after implies that you need to decrease the reference count after
associating the model with a control like this: associating the model with a control like this:
@code @code
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, ID_MUSIC_CTRL ); wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, ID_MUSIC_CTRL );
wxDataViewModel *musicModel = new MyMusicModel; wxDataViewModel *musicModel = new MyMusicModel;
@@ -353,8 +353,8 @@ public:
musicModel-DecRef(); // avoid memory leak !! musicModel-DecRef(); // avoid memory leak !!
// add columns now // add columns now
@endcode @endcode
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -397,7 +397,7 @@ public:
/** /**
Oberride this to indicate that the item has special font attributes. Oberride this to indicate that the item has special font attributes.
This only affects the This only affects the
wxDataViewTextRendererText renderer. wxDataViewTextRendererText renderer.
See also wxDataViewItemAttr. See also wxDataViewItemAttr.
@@ -442,7 +442,7 @@ public:
/** /**
Override this method to indicate if a container item merely Override this method to indicate if a container item merely
acts as a headline (or for categorisation) or if it also acts as a headline (or for categorisation) or if it also
acts a normal item with entries for futher columns. By acts a normal item with entries for futher columns. By
default returns @e @false. default returns @e @false.
*/ */
virtual bool HasContainerColumns(const wxDataViewItem& item); virtual bool HasContainerColumns(const wxDataViewItem& item);
@@ -531,7 +531,7 @@ public:
/** /**
Call this to inform this model that a value in the model has Call this to inform this model that a value in the model has
been changed. This is also called from wxDataViewCtrl's been changed. This is also called from wxDataViewCtrl's
internal editing code, e.g. when editing a text field internal editing code, e.g. when editing a text field
in the control. in the control.
This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
@@ -545,23 +545,23 @@ public:
/** /**
@class wxDataViewCustomRenderer @class wxDataViewCustomRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
You need to derive a new class from wxDataViewCustomRenderer in You need to derive a new class from wxDataViewCustomRenderer in
order to write a new renderer. You need to override at least order to write a new renderer. You need to override at least
wxDataViewRenderer::SetValue, wxDataViewRenderer::SetValue,
wxDataViewRenderer::GetValue, wxDataViewRenderer::GetValue,
wxDataViewCustomRenderer::GetSize wxDataViewCustomRenderer::GetSize
and wxDataViewCustomRenderer::Render. and wxDataViewCustomRenderer::Render.
If you want your renderer to support in-place editing then you If you want your renderer to support in-place editing then you
also need to override also need to override
wxDataViewCustomRenderer::HasEditorCtrl, wxDataViewCustomRenderer::HasEditorCtrl,
wxDataViewCustomRenderer::CreateEditorCtrl wxDataViewCustomRenderer::CreateEditorCtrl
and wxDataViewCustomRenderer::GetValueFromEditorCtrl. and wxDataViewCustomRenderer::GetValueFromEditorCtrl.
Note that a special event handler will be pushed onto that Note that a special event handler will be pushed onto that
editor control which handles ENTER and focus out events editor control which handles ENTER and focus out events
in order to end the editing. in order to end the editing.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -608,7 +608,7 @@ public:
virtual wxSize GetSize(); virtual wxSize GetSize();
/** /**
Overrride this so that the renderer can get the value Overrride this so that the renderer can get the value
from the editor control (pointed to by @e editor): from the editor control (pointed to by @e editor):
*/ */
virtual bool GetValueFromEditorCtrl(wxControl* editor, virtual bool GetValueFromEditorCtrl(wxControl* editor,
@@ -665,9 +665,9 @@ public:
/** /**
@class wxDataViewBitmapRenderer @class wxDataViewBitmapRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewBitmapRenderer wxDataViewBitmapRenderer
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -685,19 +685,19 @@ public:
/** /**
@class wxDataViewItemAttr @class wxDataViewItemAttr
@wxheader{dataview.h} @wxheader{dataview.h}
This class is used to indicate to a wxDataViewCtrl This class is used to indicate to a wxDataViewCtrl
that a certain Item has extra font attributes that a certain Item has extra font attributes
for its renderer. For this, it is required to override for its renderer. For this, it is required to override
wxDataViewModel::GetAttr. wxDataViewModel::GetAttr.
Attributes are currently only supported by Attributes are currently only supported by
wxDataViewTextRendererText. wxDataViewTextRendererText.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
class wxDataViewItemAttr class wxDataViewItemAttr
{ {
public: public:
/** /**
@@ -726,15 +726,15 @@ public:
/** /**
@class wxDataViewItem @class wxDataViewItem
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewItem is a small opaque class that represents an wxDataViewItem is a small opaque class that represents an
item in a wxDataViewCtrl in a item in a wxDataViewCtrl in a
persistent way, i.e. indepent of the position of the persistent way, i.e. indepent of the position of the
item in the control or changes to its contents. It must item in the control or changes to its contents. It must
hold a unique ID of type @e void* in its only field hold a unique ID of type @e void* in its only field
and can be converted to a from it. and can be converted to a from it.
If the ID is @e @NULL the wxDataViewItem is invalid and If the ID is @e @NULL the wxDataViewItem is invalid and
wxDataViewItem::IsOk will return @e @false wxDataViewItem::IsOk will return @e @false
which used in many places in the API of wxDataViewCtrl which used in many places in the API of wxDataViewCtrl
to indicate that e.g. no item was found. An ID of @NULL to indicate that e.g. no item was found. An ID of @NULL
@@ -742,11 +742,11 @@ public:
for this are for this are
wxDataViewModel::GetParent and wxDataViewModel::GetParent and
wxDataViewModel::GetChildren. wxDataViewModel::GetChildren.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
class wxDataViewItem class wxDataViewItem
{ {
public: public:
//@{ //@{
@@ -754,7 +754,7 @@ public:
*/ */
wxDataViewItem(void* id = @NULL); wxDataViewItem(void* id = @NULL);
wxDataViewItem(const wxDataViewItem& item); wxDataViewItem(const wxDataViewItem& item);
//@} //@}
/** /**
@@ -772,38 +772,38 @@ public:
/** /**
@class wxDataViewCtrl @class wxDataViewCtrl
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewCtrl is a control to display data either wxDataViewCtrl is a control to display data either
in a tree like fashion or in a tabular form or both. in a tree like fashion or in a tabular form or both.
If you only need to display a simple tree structure If you only need to display a simple tree structure
with an API more like the older wxTreeCtrl class, with an API more like the older wxTreeCtrl class,
then the specialized wxDataViewTreeCtrl then the specialized wxDataViewTreeCtrl
can be used. can be used.
A wxDataViewItem is used A wxDataViewItem is used
to represent a (visible) item in the control. to represent a (visible) item in the control.
Unlike wxListCtrl wxDataViewCtrl doesn't Unlike wxListCtrl wxDataViewCtrl doesn't
get its data from the user through virtual functions or by get its data from the user through virtual functions or by
setting it directly. Instead you need to write your own setting it directly. Instead you need to write your own
wxDataViewModel and associate wxDataViewModel and associate
it with this control. Then you need to add a number of it with this control. Then you need to add a number of
wxDataViewColumn to this control to wxDataViewColumn to this control to
define what each column shall display. Each wxDataViewColumn define what each column shall display. Each wxDataViewColumn
in turn owns 1 instance of a in turn owns 1 instance of a
wxDataViewRenderer to render its wxDataViewRenderer to render its
cells. A number of standard renderers for rendering text, dates, cells. A number of standard renderers for rendering text, dates,
images, toggle, a progress bar etc. are provided. Additionally, images, toggle, a progress bar etc. are provided. Additionally,
the user can write custom renderes deriving from the user can write custom renderes deriving from
wxDataViewCustomRenderer wxDataViewCustomRenderer
for displaying anything. for displaying anything.
All data transfer from the control to the model and the user All data transfer from the control to the model and the user
code is done through wxVariant which can code is done through wxVariant which can
be extended to support more data formats as necessary. be extended to support more data formats as necessary.
Accordingly, all type information uses the strings returned Accordingly, all type information uses the strings returned
from wxVariant::GetType. from wxVariant::GetType.
@beginStyleTable @beginStyleTable
@style{wxDV_SINGLE}: @style{wxDV_SINGLE}:
Single selection mode. This is the default. Single selection mode. This is the default.
@@ -816,7 +816,7 @@ public:
@style{wxDV_VERT_RULES}: @style{wxDV_VERT_RULES}:
Display fine rules between columns is supported. Display fine rules between columns is supported.
@endStyleTable @endStyleTable
@library{wxadv} @library{wxadv}
@category{ctrl} @category{ctrl}
@appearance{dataviewctrl.png} @appearance{dataviewctrl.png}
@@ -829,11 +829,11 @@ public:
Constructor. Calls Create(). Constructor. Calls Create().
*/ */
wxDataViewCtrl(); wxDataViewCtrl();
wxDataViewCtrl(wxWindow* parent, wxWindowID id, wxDataViewCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxValidator& validator = wxDefaultValidator); const wxValidator& validator = wxDefaultValidator);
//@} //@}
/** /**
@@ -852,12 +852,12 @@ public:
int width = -1, int width = -1,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn* AppendBitmapColumn(const wxBitmap& label, wxDataViewColumn* AppendBitmapColumn(const wxBitmap& label,
unsigned int model_column, unsigned int model_column,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int width = -1, int width = -1,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
/** /**
@@ -865,7 +865,7 @@ public:
@e @true on success. @e @true on success.
Note that there is a number of short cut methods which implicitly create Note that there is a number of short cut methods which implicitly create
a wxDataViewColumn and a a wxDataViewColumn and a
wxDataViewRenderer for it (see below). wxDataViewRenderer for it (see below).
*/ */
virtual bool AppendColumn(wxDataViewColumn* col); virtual bool AppendColumn(wxDataViewColumn* col);
@@ -881,18 +881,18 @@ public:
int width = -1, int width = -1,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn* AppendDateColumn(const wxBitmap& label, wxDataViewColumn* AppendDateColumn(const wxBitmap& label,
unsigned int model_column, unsigned int model_column,
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
int width = -1, int width = -1,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
//@{ //@{
/** /**
Appends a column for rendering text with an icon. Returns the wxDataViewColumn Appends a column for rendering text with an icon. Returns the wxDataViewColumn
created in the function or @NULL on failure. This uses the created in the function or @NULL on failure. This uses the
wxDataViewIconTextRenderer. wxDataViewIconTextRenderer.
*/ */
wxDataViewColumn* AppendIconTextColumn(const wxString& label, wxDataViewColumn* AppendIconTextColumn(const wxString& label,
@@ -901,12 +901,12 @@ public:
int width = -1, int width = -1,
wxAlignment align = wxALIGN_LEFT, wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn* AppendIconTextColumn(const wxBitmap& label, wxDataViewColumn* AppendIconTextColumn(const wxBitmap& label,
unsigned int model_column, unsigned int model_column,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int width = -1, int width = -1,
wxAlignment align = wxALIGN_LEFT, wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
//@{ //@{
@@ -921,12 +921,12 @@ public:
int width = 80, int width = 80,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn* AppendProgressColumn(const wxBitmap& label, wxDataViewColumn* AppendProgressColumn(const wxBitmap& label,
unsigned int model_column, unsigned int model_column,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int width = 80, int width = 80,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
//@{ //@{
@@ -940,12 +940,12 @@ public:
int width = -1, int width = -1,
wxAlignment align = wxALIGN_LEFT, wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn* AppendTextColumn(const wxBitmap& label, wxDataViewColumn* AppendTextColumn(const wxBitmap& label,
unsigned int model_column, unsigned int model_column,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int width = -1, int width = -1,
wxAlignment align = wxALIGN_LEFT, wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
//@{ //@{
@@ -959,12 +959,12 @@ public:
int width = 30, int width = 30,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn* AppendToggleColumn(const wxBitmap& label, wxDataViewColumn* AppendToggleColumn(const wxBitmap& label,
unsigned int model_column, unsigned int model_column,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int width = 30, int width = 30,
wxAlignment align = wxALIGN_CENTER, wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
/** /**
@@ -1014,7 +1014,7 @@ public:
void Expand(const wxDataViewItem & item); void Expand(const wxDataViewItem & item);
/** /**
Returns pointer to the column. @e pos refers to the Returns pointer to the column. @e pos refers to the
position in the control which may change after reordering position in the control which may change after reordering
columns by the user. columns by the user.
*/ */
@@ -1121,17 +1121,17 @@ public:
/** /**
@class wxDataViewModelNotifier @class wxDataViewModelNotifier
@wxheader{dataview.h} @wxheader{dataview.h}
A wxDataViewModelNotifier instance is owned by a A wxDataViewModelNotifier instance is owned by a
wxDataViewModel wxDataViewModel
and mirrors its notification interface. See and mirrors its notification interface. See
the documentation of that class for further the documentation of that class for further
information. information.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
class wxDataViewModelNotifier class wxDataViewModelNotifier
{ {
public: public:
/** /**
@@ -1208,7 +1208,7 @@ public:
/** /**
@class wxDataViewRenderer @class wxDataViewRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
This class is used by wxDataViewCtrl to This class is used by wxDataViewCtrl to
render the individual cells. One instance of a renderer class is render the individual cells. One instance of a renderer class is
owned by wxDataViewColumn. There is owned by wxDataViewColumn. There is
@@ -1221,10 +1221,10 @@ public:
wxDataViewBitmapRenderer, wxDataViewBitmapRenderer,
wxDataViewDateRenderer. wxDataViewDateRenderer.
wxDataViewSpinRenderer. wxDataViewSpinRenderer.
Additionally, the user can write own renderers by deriving from Additionally, the user can write own renderers by deriving from
wxDataViewCustomRenderer. wxDataViewCustomRenderer.
The @e wxDataViewCellMode flag controls, what actions The @e wxDataViewCellMode flag controls, what actions
the cell data allows. @e wxDATAVIEW_CELL_ACTIVATABLE the cell data allows. @e wxDATAVIEW_CELL_ACTIVATABLE
indicates that the user can double click the cell and indicates that the user can double click the cell and
@@ -1232,10 +1232,10 @@ public:
will pop up). @e wxDATAVIEW_CELL_EDITABLE indicates will pop up). @e wxDATAVIEW_CELL_EDITABLE indicates
that the user can edit the data in-place, i.e. an control that the user can edit the data in-place, i.e. an control
will show up after a slow click on the cell. This behaviour will show up after a slow click on the cell. This behaviour
is best known from changing the filename in most file is best known from changing the filename in most file
managers etc. managers etc.
@code @code
enum wxDataViewCellMode enum wxDataViewCellMode
{ {
@@ -1244,10 +1244,10 @@ public:
wxDATAVIEW_CELL_EDITABLE wxDATAVIEW_CELL_EDITABLE
}; };
@endcode @endcode
The @e wxDataViewCellRenderState flag controls how the The @e wxDataViewCellRenderState flag controls how the
the renderer should display its contents in a cell: the renderer should display its contents in a cell:
@code @code
enum wxDataViewCellRenderState enum wxDataViewCellRenderState
{ {
@@ -1257,8 +1257,8 @@ public:
wxDATAVIEW_CELL_FOCUSED = 8 wxDATAVIEW_CELL_FOCUSED = 8
}; };
@endcode @endcode
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1326,10 +1326,10 @@ public:
/** /**
@class wxDataViewTextRenderer @class wxDataViewTextRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewTextRenderer is used for rendering text. It supports wxDataViewTextRenderer is used for rendering text. It supports
in-place editing if desired. in-place editing if desired.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1347,9 +1347,9 @@ public:
/** /**
@class wxDataViewProgressRenderer @class wxDataViewProgressRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewProgressRenderer wxDataViewProgressRenderer
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1368,11 +1368,11 @@ public:
/** /**
@class wxDataViewSpinRenderer @class wxDataViewSpinRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
This is a specialized renderer for rendering integer values. It This is a specialized renderer for rendering integer values. It
supports modifying the values in-place by using a wxSpinCtrl. supports modifying the values in-place by using a wxSpinCtrl.
The renderer only support variants of type @e long. The renderer only support variants of type @e long.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
@@ -1392,9 +1392,9 @@ public:
/** /**
@class wxDataViewToggleRenderer @class wxDataViewToggleRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewToggleRenderer wxDataViewToggleRenderer
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1412,14 +1412,14 @@ public:
/** /**
@class wxDataViewTreeCtrl @class wxDataViewTreeCtrl
@wxheader{dataview.h} @wxheader{dataview.h}
This class is a wxDataViewCtrl which internally This class is a wxDataViewCtrl which internally
uses a wxDataViewTreeStore and forwards uses a wxDataViewTreeStore and forwards
most of its API to that class. Additionally, it uses a wxImageList most of its API to that class. Additionally, it uses a wxImageList
to store a list of icons. The main purpose of this class is to look to store a list of icons. The main purpose of this class is to look
like a wxTreeCtrl to make a transition from it like a wxTreeCtrl to make a transition from it
to the wxDataViewCtrl class simpler. to the wxDataViewCtrl class simpler.
@library{wxbase} @library{wxbase}
@category{ctrl} @category{ctrl}
@appearance{dataviewtreectrl.png} @appearance{dataviewtreectrl.png}
@@ -1432,11 +1432,11 @@ public:
Constructor. Calls Create(). Constructor. Calls Create().
*/ */
wxDataViewTreeCtrl(); wxDataViewTreeCtrl();
wxDataViewTreeCtrl(wxWindow* parent, wxWindowID id, wxDataViewTreeCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDV_NO_HEADER, long style = wxDV_NO_HEADER,
const wxValidator& validator = wxDefaultValidator); const wxValidator& validator = wxDefaultValidator);
//@} //@}
/** /**
@@ -1527,7 +1527,7 @@ public:
Returns the store. Returns the store.
*/ */
wxDataViewTreeStore* GetStore(); wxDataViewTreeStore* GetStore();
const wxDataViewTreeStore* GetStore(); const wxDataViewTreeStore* GetStore();
//@} //@}
/** /**
@@ -1602,14 +1602,14 @@ public:
/** /**
@class wxDataViewTreeStore @class wxDataViewTreeStore
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewTreeStore is a specialised wxDataViewModel wxDataViewTreeStore is a specialised wxDataViewModel
for displaying simple trees very much like wxTreeCtrl for displaying simple trees very much like wxTreeCtrl
does and it offers a similar API. This class actually stores the entire does and it offers a similar API. This class actually stores the entire
tree (therefore its name) and implements all virtual methods from the base tree (therefore its name) and implements all virtual methods from the base
class so it can be used directly without having to derive any class from it. class so it can be used directly without having to derive any class from it.
This comes at the price of much reduced flexibility. This comes at the price of much reduced flexibility.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1746,9 +1746,9 @@ public:
/** /**
@class wxDataViewDateRenderer @class wxDataViewDateRenderer
@wxheader{dataview.h} @wxheader{dataview.h}
wxDataViewDateRenderer wxDataViewDateRenderer
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1766,14 +1766,14 @@ public:
/** /**
@class wxDataViewTextRendererAttr @class wxDataViewTextRendererAttr
@wxheader{dataview.h} @wxheader{dataview.h}
The same as wxDataViewTextRenderer but with The same as wxDataViewTextRenderer but with
support for font attributes. Font attributes are currently only supported support for font attributes. Font attributes are currently only supported
under GTK+ and MSW. under GTK+ and MSW.
See also wxDataViewModel::GetAttr and See also wxDataViewModel::GetAttr and
wxDataViewItemAttr. wxDataViewItemAttr.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1792,14 +1792,14 @@ public:
/** /**
@class wxDataViewColumn @class wxDataViewColumn
@wxheader{dataview.h} @wxheader{dataview.h}
This class represents a column in a wxDataViewCtrl. This class represents a column in a wxDataViewCtrl.
One wxDataViewColumn is bound to one column in the data model, One wxDataViewColumn is bound to one column in the data model,
to which the wxDataViewCtrl has been associated. to which the wxDataViewCtrl has been associated.
An instance of wxDataViewRenderer is used by An instance of wxDataViewRenderer is used by
this class to render its data. this class to render its data.
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
*/ */
@@ -1816,12 +1816,12 @@ public:
int width = wxDVC_DEFAULT_WIDTH, int width = wxDVC_DEFAULT_WIDTH,
wxAlignment align = wxALIGN_CENTRE, wxAlignment align = wxALIGN_CENTRE,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
wxDataViewColumn(const wxBitmap& bitmap, wxDataViewColumn(const wxBitmap& bitmap,
wxDataViewRenderer* renderer, wxDataViewRenderer* renderer,
unsigned int model_column, unsigned int model_column,
int width = wxDVC_DEFAULT_WIDTH, int width = wxDVC_DEFAULT_WIDTH,
wxAlignment align = wxALIGN_CENTRE, wxAlignment align = wxALIGN_CENTRE,
int flags = wxDATAVIEW_COL_RESIZABLE); int flags = wxDATAVIEW_COL_RESIZABLE);
//@} //@}
/** /**
@@ -1888,7 +1888,7 @@ public:
/** /**
Indicate wether the column can be reordered by the Indicate wether the column can be reordered by the
user using the mouse. This is typically implemented user using the mouse. This is typically implemented
visually by dragging the header button around. visually by dragging the header button around.
*/ */
void SetReorderable(bool reorderable); void SetReorderable(bool reorderable);
@@ -1903,7 +1903,7 @@ public:
/** /**
Indicate that the column is sortable. This does Indicate that the column is sortable. This does
not show any sorting indicate yet, but it does not show any sorting indicate yet, but it does
make the column header clickable. Call make the column header clickable. Call
SetSortOrder() SetSortOrder()
afterwards to actually make the sort indicator appear. afterwards to actually make the sort indicator appear.
If @e sortable is @false, the column header is If @e sortable is @false, the column header is

View File

@@ -9,17 +9,17 @@
/** /**
@class wxDatePickerCtrl @class wxDatePickerCtrl
@wxheader{datectrl.h} @wxheader{datectrl.h}
This control allows the user to select a date. Unlike This control allows the user to select a date. Unlike
wxCalendarCtrl, which is a relatively big control, wxCalendarCtrl, which is a relatively big control,
wxDatePickerCtrl is implemented as a small window showing the currently wxDatePickerCtrl is implemented as a small window showing the currently
selected date. selected date.
The control can be edited using the keyboard, and can also display a popup The control can be edited using the keyboard, and can also display a popup
window for more user-friendly date selection, depending on the styles used and window for more user-friendly date selection, depending on the styles used and
the platform, except PalmOS where date is selected using native dialog. the platform, except PalmOS where date is selected using native dialog.
It is only available if @c wxUSE_DATEPICKCTRL is set to 1. It is only available if @c wxUSE_DATEPICKCTRL is set to 1.
@beginStyleTable @beginStyleTable
@style{wxDP_SPIN}: @style{wxDP_SPIN}:
Creates a control without a month calendar drop down but with Creates a control without a month calendar drop down but with
@@ -41,17 +41,17 @@
this style the century could be displayed, or not, depending on the this style the century could be displayed, or not, depending on the
default date representation in the system. default date representation in the system.
@endStyleTable @endStyleTable
@beginEventTable @beginEventTable
@event{EVT_DATE_CHANGED(id\, func)}: @event{EVT_DATE_CHANGED(id\, func)}:
This event fires when the user changes the current selection in the This event fires when the user changes the current selection in the
control. control.
@endEventTable @endEventTable
@library{wxadv} @library{wxadv}
@category{miscpickers} @category{miscpickers}
@appearance{datepickerctrl.png} @appearance{datepickerctrl.png}
@seealso @seealso
wxCalendarCtrl, wxDateEvent wxCalendarCtrl, wxDateEvent
*/ */
@@ -71,32 +71,32 @@ public:
const wxString& name = "datectrl"); const wxString& name = "datectrl");
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param dt @param dt
The initial value of the control, if an invalid date (such as the The initial value of the control, if an invalid date (such as the
default value) is used, the control is set to today. default value) is used, the control is set to today.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. If left at default value, the control chooses its Initial size. If left at default value, the control chooses its
own best size by using the height approximately equal to a text control and own best size by using the height approximately equal to a text control and
width large enough to show the date string fully. width large enough to show the date string fully.
@param style @param style
The window style, should be left at 0 as there are no The window style, should be left at 0 as there are no
special styles for this control in this version. special styles for this control in this version.
@param validator @param validator
Validator which can be used for additional date checks. Validator which can be used for additional date checks.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
@@ -111,17 +111,17 @@ public:
const wxString& name = "datectrl"); const wxString& name = "datectrl");
/** /**
If the control had been previously limited to a range of dates using If the control had been previously limited to a range of dates using
SetRange(), returns the lower and upper SetRange(), returns the lower and upper
bounds of this range. If no range is set (or only one of the bounds is set), bounds of this range. If no range is set (or only one of the bounds is set),
@e dt1 and/or @e dt2 are set to be invalid. @e dt1 and/or @e dt2 are set to be invalid.
@param dt1 @param dt1
Pointer to the object which receives the lower range limit or 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 becomes invalid if it is not set. May be @NULL if the caller is not
interested in lower limit interested in lower limit
@param dt2 @param dt2
Same as above but for the upper limit Same as above but for the upper limit
@returns @false if no range limits are currently set, @true if at least one @returns @false if no range limits are currently set, @true if at least one

View File

@@ -9,11 +9,11 @@
/** /**
@class wxDateEvent @class wxDateEvent
@wxheader{dateevt.h} @wxheader{dateevt.h}
This event class holds information about a date change and is used together This event class holds information about a date change and is used together
with wxDatePickerCtrl. It also serves as a base class with wxDatePickerCtrl. It also serves as a base class
for wxCalendarEvent. for wxCalendarEvent.
@library{wxadv} @library{wxadv}
@category{events} @category{events}
*/ */

View File

@@ -9,17 +9,17 @@
/** /**
@class wxDateTime @class wxDateTime
@wxheader{datetime.h} @wxheader{datetime.h}
wxDateTime class represents an absolute moment in the time. wxDateTime class represents an absolute moment in the time.
@library{wxbase} @library{wxbase}
@category{data} @category{data}
@seealso @seealso
@ref overview_wxdatetimeoverview "Date classes overview", wxTimeSpan, @ref overview_wxdatetimeoverview "Date classes overview", wxTimeSpan,
wxDateSpan, wxCalendarCtrl wxDateSpan, wxCalendarCtrl
*/ */
class wxDateTime class wxDateTime
{ {
public: public:
/** /**
@@ -79,8 +79,8 @@ public:
Adds the given date span to this object. Adds the given date span to this object.
*/ */
wxDateTime Add(const wxDateSpan& diff); wxDateTime Add(const wxDateSpan& diff);
wxDateTime Add(const wxDateSpan& diff); wxDateTime Add(const wxDateSpan& diff);
wxDateTime operator+=(const wxDateSpan& diff); wxDateTime operator+=(const wxDateSpan& diff);
//@} //@}
/** /**
@@ -314,7 +314,7 @@ public:
wxString FormatTime(); wxString FormatTime();
/** /**
Transform the date from the given time zone to the local one. If @e noDST is Transform the date from the given time zone to the local one. If @e noDST is
@true, no DST adjustments will be made. @true, no DST adjustments will be made.
Returns the date in the local time zone. Returns the date in the local time zone.
@@ -484,9 +484,9 @@ public:
*/ */
static wxDateTime_t GetNumberOfDays(int year, static wxDateTime_t GetNumberOfDays(int year,
Calendar cal = Gregorian); Calendar cal = Gregorian);
static wxDateTime_t GetNumberOfDays(Month month, static wxDateTime_t GetNumberOfDays(Month month,
int year = Inv_Year, int year = Inv_Year,
Calendar cal = Gregorian); Calendar cal = Gregorian);
//@} //@}
/** /**
@@ -733,8 +733,8 @@ public:
*/ */
const char * ParseDate(const wxString& date, const char * ParseDate(const wxString& date,
wxString::const_iterator * end = @NULL); wxString::const_iterator * end = @NULL);
const char * ParseDate(const char * date); const char * ParseDate(const char * date);
const wchar_t * ParseDate(const wchar_t * date); const wchar_t * ParseDate(const wchar_t * date);
//@} //@}
//@{ //@{
@@ -750,8 +750,8 @@ public:
*/ */
const char * ParseDateTime(const wxString& datetime, const char * ParseDateTime(const wxString& datetime,
wxString::const_iterator * end = @NULL); wxString::const_iterator * end = @NULL);
const char * ParseDateTime(const char * datetime); const char * ParseDateTime(const char * datetime);
const wchar_t * ParseDateTime(const wchar_t * datetime); const wchar_t * ParseDateTime(const wchar_t * datetime);
//@} //@}
//@{ //@{
@@ -780,12 +780,12 @@ public:
const wxString& format = wxDefaultDateTimeFormat, const wxString& format = wxDefaultDateTimeFormat,
const wxDateTime& dateDef = wxDefaultDateTime, const wxDateTime& dateDef = wxDefaultDateTime,
wxString::const_iterator * end = @NULL); wxString::const_iterator * end = @NULL);
const char * ParseFormat(const char * date, const char * ParseFormat(const char * date,
const wxString& format = wxDefaultDateTimeFormat, const wxString& format = wxDefaultDateTimeFormat,
const wxDateTime& dateDef = wxDefaultDateTime); const wxDateTime& dateDef = wxDefaultDateTime);
const wchar_t * ParseFormat(const wchar_t * date, const wchar_t * ParseFormat(const wchar_t * date,
const wxString& format = wxDefaultDateTimeFormat, const wxString& format = wxDefaultDateTimeFormat,
const wxDateTime& dateDef = wxDefaultDateTime); const wxDateTime& dateDef = wxDefaultDateTime);
//@} //@}
/** /**
@@ -834,8 +834,8 @@ public:
*/ */
const char * ParseRfc822Date(const wxString& date, const char * ParseRfc822Date(const wxString& date,
wxString::const_iterator * end = @NULL); wxString::const_iterator * end = @NULL);
const char * ParseRfc822Date(const char* date); const char * ParseRfc822Date(const char* date);
const wchar_t * ParseRfc822Date(const wchar_t* date); const wchar_t * ParseRfc822Date(const wchar_t* date);
//@} //@}
//@{ //@{
@@ -848,8 +848,8 @@ public:
*/ */
const char * ParseTime(const wxString& time, const char * ParseTime(const wxString& time,
wxString::const_iterator * end = @NULL); wxString::const_iterator * end = @NULL);
const char * ParseTime(const char * time); const char * ParseTime(const char * time);
const wchar_t * ParseTime(const wchar_t * time); const wchar_t * ParseTime(const wchar_t * time);
//@} //@}
/** /**
@@ -931,11 +931,11 @@ public:
Sets the date and time from the parameters. Sets the date and time from the parameters.
*/ */
#define wxDateTime Set(wxDateTime_t day, Month month = Inv_Month, #define wxDateTime Set(wxDateTime_t day, Month month = Inv_Month,
int year = Inv_Year, int year = Inv_Year,
wxDateTime_t hour = 0, wxDateTime_t hour = 0,
wxDateTime_t minute = 0, wxDateTime_t minute = 0,
wxDateTime_t second = 0, wxDateTime_t second = 0,
wxDateTime_t millisec = 0) /* implementation is private */ wxDateTime_t millisec = 0) /* implementation is private */
/** /**
Sets the country to use by default. This setting influences the DST Sets the country to use by default. This setting influences the DST
@@ -1041,7 +1041,7 @@ public:
*/ */
bool SetToWeekDay(WeekDay weekday, int n = 1, bool SetToWeekDay(WeekDay weekday, int n = 1,
Month month = Inv_Month, Month month = Inv_Month,
int year = Inv_Year); int year = Inv_Year);
/** /**
Adjusts the date so that it will still lie in the same week as before, but its Adjusts the date so that it will still lie in the same week as before, but its
@@ -1194,70 +1194,70 @@ public:
Same as @ref settm() Set. Same as @ref settm() Set.
*/ */
wxDateTime operator(const struct tm& tm); wxDateTime operator(const struct tm& tm);
}; };
/** /**
@class wxDateTimeWorkDays @class wxDateTimeWorkDays
@wxheader{datetime.h} @wxheader{datetime.h}
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
class wxDateTimeWorkDays class wxDateTimeWorkDays
{ {
public: public:
}; };
/** /**
@class wxDateSpan @class wxDateSpan
@wxheader{datetime.h} @wxheader{datetime.h}
This class is a "logical time span" and is useful for implementing program This class is a "logical time span" and is useful for implementing program
logic for such things as "add one month to the date" which, in general, logic for such things as "add one month to the date" which, in general,
doesn't mean to add 60*60*24*31 seconds to it, but to take the same date doesn't mean to add 60*60*24*31 seconds to it, but to take the same date
the next month (to understand that this is indeed different consider adding the next month (to understand that this is indeed different consider adding
one month to Feb, 15 -- we want to get Mar, 15, of course). one month to Feb, 15 -- we want to get Mar, 15, of course).
When adding a month to the date, all lesser components (days, hours, ...) When adding a month to the date, all lesser components (days, hours, ...)
won't be changed unless the resulting date would be invalid: for example, won't be changed unless the resulting date would be invalid: for example,
Jan 31 + 1 month will be Feb 28, not (non-existing) Feb 31. Jan 31 + 1 month will be Feb 28, not (non-existing) Feb 31.
Because of this feature, adding and subtracting back again the same Because of this feature, adding and subtracting back again the same
wxDateSpan will @b not, in general give back the original date: Feb 28 - 1 wxDateSpan will @b not, in general give back the original date: Feb 28 - 1
month will be Jan 28, not Jan 31! month will be Jan 28, not Jan 31!
wxDateSpan objects can be either positive or negative. They may be wxDateSpan objects can be either positive or negative. They may be
multiplied by scalars which multiply all deltas by the scalar: i.e. multiplied by scalars which multiply all deltas by the scalar: i.e.
2*(1 month and 1 day) is 2 months and 2 days. They can 2*(1 month and 1 day) is 2 months and 2 days. They can
be added together and with wxDateTime or be added together and with wxDateTime or
wxTimeSpan, but the type of result is different for each wxTimeSpan, but the type of result is different for each
case. case.
Beware about weeks: if you specify both weeks and days, the total number of Beware about weeks: if you specify both weeks and days, the total number of
days added will be 7*weeks + days! See also GetTotalDays() days added will be 7*weeks + days! See also GetTotalDays()
function. function.
Equality operators are defined for wxDateSpans. Two datespans are equal if Equality operators are defined for wxDateSpans. Two datespans are equal if
and only if they both give the same target date when added to @b every and only if they both give the same target date when added to @b every
source date. Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30), source date. Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30),
because they don't give the same date when added to 1 Feb. But because they don't give the same date when added to 1 Feb. But
wxDateSpan::Days(14) is equal to wxDateSpan::Weeks(2) wxDateSpan::Days(14) is equal to wxDateSpan::Weeks(2)
Finally, notice that for adding hours, minutes and so on you don't need this Finally, notice that for adding hours, minutes and so on you don't need this
class at all: wxTimeSpan will do the job because there class at all: wxTimeSpan will do the job because there
are no subtleties associated with those (we don't support leap seconds). are no subtleties associated with those (we don't support leap seconds).
@library{wxbase} @library{wxbase}
@category{data} @category{data}
@seealso @seealso
@ref overview_wxdatetimeoverview "Date classes overview", wxDateTime @ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
*/ */
class wxDateSpan class wxDateSpan
{ {
public: public:
/** /**
@@ -1273,8 +1273,8 @@ public:
second and third ones modify this object in place. second and third ones modify this object in place.
*/ */
wxDateSpan Add(const wxDateSpan& other); wxDateSpan Add(const wxDateSpan& other);
wxDateSpan Add(const wxDateSpan& other); wxDateSpan Add(const wxDateSpan& other);
wxDateSpan operator+=(const wxDateSpan& other); wxDateSpan operator+=(const wxDateSpan& other);
//@} //@}
/** /**
@@ -1347,8 +1347,8 @@ public:
object in place. object in place.
*/ */
wxDateSpan Multiply(int factor); wxDateSpan Multiply(int factor);
wxDateSpan Multiply(int factor); wxDateSpan Multiply(int factor);
wxDateSpan operator*=(int factor); wxDateSpan operator*=(int factor);
//@} //@}
//@{ //@{
@@ -1358,7 +1358,7 @@ public:
@sa Negate() @sa Negate()
*/ */
wxDateSpan Neg(); wxDateSpan Neg();
wxDateSpan operator-(); wxDateSpan operator-();
//@} //@}
/** /**
@@ -1398,8 +1398,8 @@ public:
object, the second and third ones modify this object in place. object, the second and third ones modify this object in place.
*/ */
wxDateSpan Subtract(const wxDateSpan& other); wxDateSpan Subtract(const wxDateSpan& other);
wxDateSpan Subtract(const wxDateSpan& other); wxDateSpan Subtract(const wxDateSpan& other);
wxDateSpan operator+=(const wxDateSpan& other); wxDateSpan operator+=(const wxDateSpan& other);
//@} //@}
/** /**
@@ -1447,16 +1447,16 @@ public:
/** /**
@class wxTimeSpan @class wxTimeSpan
@wxheader{datetime.h} @wxheader{datetime.h}
wxTimeSpan class represents a time interval. wxTimeSpan class represents a time interval.
@library{wxbase} @library{wxbase}
@category{data} @category{data}
@seealso @seealso
@ref overview_wxdatetimeoverview "Date classes overview", wxDateTime @ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
*/ */
class wxTimeSpan class wxTimeSpan
{ {
public: public:
//@{ //@{
@@ -1466,7 +1466,7 @@ public:
minutes, seconds or milliseconds. minutes, seconds or milliseconds.
*/ */
wxTimeSpan(); wxTimeSpan();
wxTimeSpan(long hours, long min, long sec, long msec); wxTimeSpan(long hours, long min, long sec, long msec);
//@} //@}
/** /**
@@ -1495,8 +1495,8 @@ public:
Returns the sum of two timespans. Returns the sum of two timespans.
*/ */
wxTimeSpan Add(const wxTimeSpan& diff); wxTimeSpan Add(const wxTimeSpan& diff);
wxTimeSpan Add(const wxTimeSpan& diff); wxTimeSpan Add(const wxTimeSpan& diff);
wxTimeSpan operator+=(const wxTimeSpan& diff); wxTimeSpan operator+=(const wxTimeSpan& diff);
//@} //@}
/** /**
@@ -1677,8 +1677,8 @@ public:
Multiplies timespan by a scalar. Multiplies timespan by a scalar.
*/ */
wxTimeSpan Multiply(int n); wxTimeSpan Multiply(int n);
wxTimeSpan Multiply(int n); wxTimeSpan Multiply(int n);
wxTimeSpan operator*=(int n); wxTimeSpan operator*=(int n);
//@} //@}
//@{ //@{
@@ -1686,7 +1686,7 @@ public:
Negate the value of the timespan. Negate the value of the timespan.
*/ */
wxTimeSpan Neg(); wxTimeSpan Neg();
wxTimeSpan operator-(); wxTimeSpan operator-();
//@} //@}
/** /**
@@ -1751,8 +1751,8 @@ public:
Returns the difference of two timespans. Returns the difference of two timespans.
*/ */
wxTimeSpan Subtract(const wxTimeSpan& diff); wxTimeSpan Subtract(const wxTimeSpan& diff);
wxTimeSpan Subtract(const wxTimeSpan& diff); wxTimeSpan Subtract(const wxTimeSpan& diff);
wxTimeSpan operator-=(const wxTimeSpan& diff); wxTimeSpan operator-=(const wxTimeSpan& diff);
//@} //@}
/** /**
@@ -1785,13 +1785,13 @@ public:
/** /**
@class wxDateTimeHolidayAuthority @class wxDateTimeHolidayAuthority
@wxheader{datetime.h} @wxheader{datetime.h}
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
class wxDateTimeHolidayAuthority class wxDateTimeHolidayAuthority
{ {
public: public:
}; };

View File

@@ -9,24 +9,24 @@
/** /**
@class wxDataOutputStream @class wxDataOutputStream
@wxheader{datstrm.h} @wxheader{datstrm.h}
This class provides functions that write binary data types in a This class provides functions that write binary data types in a
portable way. Data can be written in either big-endian or little-endian portable way. Data can be written in either big-endian or little-endian
format, little-endian being the default on all architectures. format, little-endian being the default on all architectures.
If you want to write data to text files (or streams) use If you want to write data to text files (or streams) use
wxTextOutputStream instead. wxTextOutputStream instead.
The operator is overloaded and you can use this class like a standard The operator is overloaded and you can use this class like a standard
C++ iostream. See wxDataInputStream for its C++ iostream. See wxDataInputStream for its
usage and caveats. usage and caveats.
See also wxDataInputStream. See also wxDataInputStream.
@library{wxbase} @library{wxbase}
@category{streams} @category{streams}
*/ */
class wxDataOutputStream class wxDataOutputStream
{ {
public: public:
//@{ //@{
@@ -36,11 +36,11 @@ public:
Constructs a datastream object from an output stream. Only write methods will 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. be available. The second form is only available in Unicode build of wxWidgets.
@param stream @param stream
The output stream. The output stream.
@param conv @param conv
Charset conversion object object used to encoding Unicode Charset conversion object object used to encoding Unicode
strings before writing them to the stream strings before writing them to the stream
in Unicode mode (see WriteString() in Unicode mode (see WriteString()
documentation for detailed description). Note that you must not destroy documentation for detailed description). Note that you must not destroy
@@ -48,7 +48,7 @@ public:
recommended to use default value (UTF-8). recommended to use default value (UTF-8).
*/ */
wxDataOutputStream(wxOutputStream& stream); wxDataOutputStream(wxOutputStream& stream);
wxDataOutputStream(wxOutputStream& stream); wxDataOutputStream(wxOutputStream& stream);
//@} //@}
/** /**
@@ -70,7 +70,7 @@ public:
16 bit unsigned integer to write is specified with the @e size variable. 16 bit unsigned integer to write is specified with the @e size variable.
*/ */
void Write16(wxUint16 i16); void Write16(wxUint16 i16);
void Write16(const wxUint16 * buffer, size_t size); void Write16(const wxUint16 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -79,7 +79,7 @@ public:
32 bit unsigned integer to write is specified with the @e size variable. 32 bit unsigned integer to write is specified with the @e size variable.
*/ */
void Write32(wxUint32 i32); void Write32(wxUint32 i32);
void Write32(const wxUint32 * buffer, size_t size); void Write32(const wxUint32 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -88,7 +88,7 @@ public:
64 bit unsigned integer to write is specified with the @e size variable. 64 bit unsigned integer to write is specified with the @e size variable.
*/ */
void Write64(wxUint64 i64); void Write64(wxUint64 i64);
void Write64(const wxUint64 * buffer, size_t size); void Write64(const wxUint64 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -97,7 +97,7 @@ public:
specified with the @e size variable. specified with the @e size variable.
*/ */
void Write8(wxUint8 i8); void Write8(wxUint8 i8);
void Write8(const wxUint8 * buffer, size_t size); void Write8(const wxUint8 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -106,7 +106,7 @@ public:
specified with the @e size variable. specified with the @e size variable.
*/ */
void WriteDouble(double f); void WriteDouble(double f);
void WriteDouble(const double * buffer, size_t size); void WriteDouble(const double * buffer, size_t size);
//@} //@}
/** /**
@@ -116,7 +116,7 @@ public:
In ANSI build of wxWidgets, the string is written to the stream in exactly In ANSI build of wxWidgets, the string is written to the stream in exactly
same way it is represented in memory. In Unicode build, however, the string same way it is represented in memory. In Unicode build, however, the string
is first converted to multibyte representation with @e conv object passed is first converted to multibyte representation with @e conv object passed
to stream's constructor (consequently, ANSI application can read data to stream's constructor (consequently, ANSI application can read data
written by Unicode application, as long as they agree on encoding) and this written by Unicode application, as long as they agree on encoding) and this
representation is written to the stream. UTF-8 is used by default. representation is written to the stream. UTF-8 is used by default.
*/ */
@@ -127,14 +127,14 @@ public:
/** /**
@class wxDataInputStream @class wxDataInputStream
@wxheader{datstrm.h} @wxheader{datstrm.h}
This class provides functions that read binary data types in a This class provides functions that read binary data types in a
portable way. Data can be read in either big-endian or little-endian portable way. Data can be read in either big-endian or little-endian
format, little-endian being the default on all architectures. format, little-endian being the default on all architectures.
If you want to read data from text files (or streams) use If you want to read data from text files (or streams) use
wxTextInputStream instead. wxTextInputStream instead.
The operator is overloaded and you can use this class like a standard C++ The operator is overloaded and you can use this class like a standard C++
iostream. iostream.
Note, however, that the arguments are the fixed size types wxUint32, wxInt32 etc Note, however, that the arguments are the fixed size types wxUint32, wxInt32 etc
@@ -143,27 +143,27 @@ public:
is defined as signed int on 32-bit architectures) so that you cannot use long. is defined as signed int on 32-bit architectures) so that you cannot use long.
To avoid To avoid
problems (here and elsewhere), make use of the wxInt32, wxUint32, etc types. problems (here and elsewhere), make use of the wxInt32, wxUint32, etc types.
For example: For example:
@code @code
wxFileInputStream input( "mytext.dat" ); wxFileInputStream input( "mytext.dat" );
wxDataInputStream store( input ); wxDataInputStream store( input );
wxUint8 i1; wxUint8 i1;
float f2; float f2;
wxString line; wxString line;
store i1; // read a 8 bit integer. store i1; // read a 8 bit integer.
store i1 f2; // read a 8 bit integer followed by float. store i1 f2; // read a 8 bit integer followed by float.
store line; // read a text line store line; // read a text line
@endcode @endcode
See also wxDataOutputStream. See also wxDataOutputStream.
@library{wxbase} @library{wxbase}
@category{streams} @category{streams}
*/ */
class wxDataInputStream class wxDataInputStream
{ {
public: public:
//@{ //@{
@@ -173,17 +173,17 @@ public:
Constructs a datastream object from an input stream. Only read methods will 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. be available. The second form is only available in Unicode build of wxWidgets.
@param stream @param stream
The input stream. The input stream.
@param conv @param conv
Charset conversion object object used to decode strings in Unicode Charset conversion object object used to decode strings in Unicode
mode (see ReadString() mode (see ReadString()
documentation for detailed description). Note that you must not destroy documentation for detailed description). Note that you must not destroy
conv before you destroy this wxDataInputStream instance! conv before you destroy this wxDataInputStream instance!
*/ */
wxDataInputStream(wxInputStream& stream); wxDataInputStream(wxInputStream& stream);
wxDataInputStream(wxInputStream& stream); wxDataInputStream(wxInputStream& stream);
//@} //@}
/** /**
@@ -193,8 +193,8 @@ public:
/** /**
If @e be_order is @true, all data will be read in big-endian If @e be_order is @true, all data will be read in big-endian
order, such as written by programs on a big endian architecture order, such as written by programs on a big endian architecture
(e.g. Sparc) or written by Java-Streams (which always use (e.g. Sparc) or written by Java-Streams (which always use
big-endian order). big-endian order).
*/ */
void BigEndianOrdered(bool be_order); void BigEndianOrdered(bool be_order);
@@ -205,7 +205,7 @@ public:
amount of 16 bit unsigned integer to read is specified by the @e size variable. amount of 16 bit unsigned integer to read is specified by the @e size variable.
*/ */
wxUint16 Read16(); wxUint16 Read16();
void Read16(wxUint16 * buffer, size_t size); void Read16(wxUint16 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -215,7 +215,7 @@ public:
32 bit unsigned integer to read is specified by the @e size variable. 32 bit unsigned integer to read is specified by the @e size variable.
*/ */
wxUint32 Read32(); wxUint32 Read32();
void Read32(wxUint32 * buffer, size_t size); void Read32(wxUint32 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -225,7 +225,7 @@ public:
64 bit unsigned integer to read is specified by the @e size variable. 64 bit unsigned integer to read is specified by the @e size variable.
*/ */
wxUint64 Read64(); wxUint64 Read64();
void Read64(wxUint64 * buffer, size_t size); void Read64(wxUint64 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -234,7 +234,7 @@ public:
bytes to read is specified by the @e size variable. bytes to read is specified by the @e size variable.
*/ */
wxUint8 Read8(); wxUint8 Read8();
void Read8(wxUint8 * buffer, size_t size); void Read8(wxUint8 * buffer, size_t size);
//@} //@}
//@{ //@{
@@ -244,12 +244,12 @@ public:
double to read is specified by the @e size variable. double to read is specified by the @e size variable.
*/ */
double ReadDouble(); double ReadDouble();
void ReadDouble(double * buffer, size_t size); void ReadDouble(double * buffer, size_t size);
//@} //@}
/** /**
Reads a string from a stream. Actually, this function first reads a long Reads a string from a stream. Actually, this function first reads a long
integer specifying the length of the string (without the last null character) integer specifying the length of the string (without the last null character)
and then reads the string. and then reads the string.
In Unicode build of wxWidgets, the fuction first reads multibyte (char*) In Unicode build of wxWidgets, the fuction first reads multibyte (char*)

View File

@@ -9,27 +9,27 @@
/** /**
@class wxDC @class wxDC
@wxheader{dc.h} @wxheader{dc.h}
A wxDC is a @e device context onto which graphics and text can be drawn. A wxDC is a @e device context onto which graphics and text can be drawn.
It is intended to represent a number of output devices in a generic way, It is intended to represent a number of output devices in a generic way,
so a window can have a device context associated with it, and a printer also so a window can have a device context associated with it, and a printer also
has a device context. has a device context.
In this way, the same piece of code may write to a number of different devices, In this way, the same piece of code may write to a number of different devices,
if the device context is used as a parameter. if the device context is used as a parameter.
Notice that wxDC is an abstract base class and can't be created directly, Notice that wxDC is an abstract base class and can't be created directly,
please use wxPaintDC, wxClientDC, please use wxPaintDC, wxClientDC,
wxWindowDC, wxScreenDC, wxWindowDC, wxScreenDC,
wxMemoryDC or wxPrinterDC. wxMemoryDC or wxPrinterDC.
Please note that in addition to the versions of the methods documented here, Please note that in addition to the versions of the methods documented here,
there are also versions which accept single @c wxPoint parameter instead of there are also versions which accept single @c wxPoint parameter instead of
two @c wxCoord ones or @c wxPoint and @c wxSize instead of four of two @c wxCoord ones or @c wxPoint and @c wxSize instead of four of
them. them.
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
Overview Overview
*/ */
@@ -41,31 +41,31 @@ public:
coordinates, size of area to copy, source DC, source coordinates, coordinates, size of area to copy, source DC, source coordinates,
logical function, whether to use a bitmap mask, and mask source position. logical function, whether to use a bitmap mask, and mask source position.
@param xdest @param xdest
Destination device context x position. Destination device context x position.
@param ydest @param ydest
Destination device context y position. Destination device context y position.
@param width @param width
Width of source area to be copied. Width of source area to be copied.
@param height @param height
Height of source area to be copied. Height of source area to be copied.
@param source @param source
Source device context. Source device context.
@param xsrc @param xsrc
Source device context x position. Source device context x position.
@param ysrc @param ysrc
Source device context y position. Source device context y position.
@param logicalFunc @param logicalFunc
Logical function to use: see SetLogicalFunction(). Logical function to use: see SetLogicalFunction().
@param useMask @param useMask
If @true, Blit does a transparent blit using the mask that is associated with If @true, Blit does a transparent blit using the mask that is associated with
the bitmap the bitmap
selected into the source device context. The Windows implementation does the selected into the source device context. The Windows implementation does the
@@ -93,13 +93,13 @@ public:
whether MaskBlt whether MaskBlt
or the explicit mask blitting code above is used, by using wxSystemOptions and or the explicit mask blitting code above is used, by using wxSystemOptions and
setting the no-maskblt option to 1. setting the no-maskblt option to 1.
@param xsrcMask @param xsrcMask
Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc ysrc
will be assumed for the mask source position. Currently only implemented on will be assumed for the mask source position. Currently only implemented on
Windows. Windows.
@param ysrcMask @param ysrcMask
Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc ysrc
will be assumed for the mask source position. Currently only implemented on will be assumed for the mask source position. Currently only implemented on
@@ -118,8 +118,8 @@ public:
wxCoord ysrcMask = -1); wxCoord ysrcMask = -1);
/** /**
Adds the specified point to the bounding box which can be retrieved with Adds the specified point to the bounding box which can be retrieved with
MinX(), MaxX() and MinX(), MaxX() and
MinY(), MaxY() functions. MinY(), MaxY() functions.
@sa ResetBoundingBox() @sa ResetBoundingBox()
@@ -133,7 +133,7 @@ public:
/** /**
Performs all necessary computations for given platform and context type Performs all necessary computations for given platform and context type
after each change of scale and origin parameters. Usually called automatically after each change of scale and origin parameters. Usually called automatically
internally after such changes. internally after such changes.
*/ */
virtual void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
@@ -198,7 +198,7 @@ public:
draw the foreground draw the foreground
of the bitmap (all bits set to 1), and the current text background colour to of the bitmap (all bits set to 1), and the current text background colour to
draw the background draw the background
(all bits set to 0). See also SetTextForeground(), (all bits set to 0). See also SetTextForeground(),
SetTextBackground() and wxMemoryDC. SetTextBackground() and wxMemoryDC.
*/ */
void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y,
@@ -210,7 +210,7 @@ public:
*/ */
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
void DrawCheckMark(const wxRect & rect); void DrawCheckMark(const wxRect & rect);
//@} //@}
//@{ //@{
@@ -220,7 +220,7 @@ public:
@sa DrawEllipse() @sa DrawEllipse()
*/ */
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius); void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
void DrawCircle(const wxPoint& pt, wxCoord radius); void DrawCircle(const wxPoint& pt, wxCoord radius);
//@} //@}
//@{ //@{
@@ -233,8 +233,8 @@ public:
*/ */
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
void DrawEllipse(const wxPoint& pt, const wxSize& size); void DrawEllipse(const wxPoint& pt, const wxSize& size);
void DrawEllipse(const wxRect& rect); void DrawEllipse(const wxRect& rect);
//@} //@}
/** /**
@@ -281,9 +281,9 @@ public:
int alignment = wxALIGN_LEFT | wxALIGN_TOP, int alignment = wxALIGN_LEFT | wxALIGN_TOP,
int indexAccel = -1, int indexAccel = -1,
wxRect * rectBounding = @NULL); wxRect * rectBounding = @NULL);
void DrawLabel(const wxString& text, const wxRect& rect, void DrawLabel(const wxString& text, const wxRect& rect,
int alignment = wxALIGN_LEFT | wxALIGN_TOP, int alignment = wxALIGN_LEFT | wxALIGN_TOP,
int indexAccel = -1); int indexAccel = -1);
//@} //@}
/** /**
@@ -302,9 +302,9 @@ public:
*/ */
void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0, void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0); wxCoord yoffset = 0);
void DrawLines(const wxPointList * points, void DrawLines(const wxPointList * points,
wxCoord xoffset = 0, wxCoord xoffset = 0,
wxCoord yoffset = 0); wxCoord yoffset = 0);
//@} //@}
/** /**
@@ -321,8 +321,8 @@ public:
of this function (Windows and PostScript-based wxDC currently), this is more of this function (Windows and PostScript-based wxDC currently), this is more
efficient than using DrawPolygon() in a loop. efficient than using DrawPolygon() in a loop.
@e n specifies the number of polygons to draw, the array @e count of size @e n specifies the number of polygons to draw, the array @e count of size
@e n specifies the number of points in each of the polygons in the @e n specifies the number of points in each of the polygons in the
@e points array. @e points array.
The last argument specifies the fill rule: @b wxODDEVEN_RULE (the default) The last argument specifies the fill rule: @b wxODDEVEN_RULE (the default)
@@ -358,10 +358,10 @@ public:
void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0, wxCoord yoffset = 0,
int fill_style = wxODDEVEN_RULE); int fill_style = wxODDEVEN_RULE);
void DrawPolygon(const wxPointList * points, void DrawPolygon(const wxPointList * points,
wxCoord xoffset = 0, wxCoord xoffset = 0,
wxCoord yoffset = 0, wxCoord yoffset = 0,
int fill_style = wxODDEVEN_RULE); int fill_style = wxODDEVEN_RULE);
//@} //@}
/** /**
@@ -408,11 +408,11 @@ public:
Draws a three-point spline using the current pen. Draws a three-point spline using the current pen.
*/ */
void DrawSpline(int n, wxPoint points[]); void DrawSpline(int n, wxPoint points[]);
void DrawSpline(const wxPointList * points); void DrawSpline(const wxPointList * points);
void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2, void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
wxCoord y2, wxCoord y2,
wxCoord x3, wxCoord x3,
wxCoord y3); wxCoord y3);
//@} //@}
/** /**
@@ -424,7 +424,7 @@ public:
to get the dimensions of a text string, which can be used to position the to get the dimensions of a text string, which can be used to position the
text more precisely. text more precisely.
@b NB: under wxGTK the current @b NB: under wxGTK the current
@ref getlogicalfunction() "logical function" is used by this function @ref getlogicalfunction() "logical function" is used by this function
but it is ignored by wxMSW. Thus, you should avoid using logical functions but it is ignored by wxMSW. Thus, you should avoid using logical functions
with this function in portable programs. with this function in portable programs.
@@ -500,7 +500,7 @@ public:
/** /**
Gets the current font. Notice that even although each device context object has Gets the current font. Notice that even although each device context object has
some default font after creation, this method would return a @c wxNullFont some default font after creation, this method would return a @c wxNullFont
initially and only after calling SetFont() a valid initially and only after calling SetFont() a valid
font is returned. font is returned.
*/ */
@@ -509,8 +509,8 @@ public:
/** /**
Gets the current layout direction of the device context. On platforms where RTL Gets the current layout direction of the device context. On platforms where RTL
layout layout
is supported, the return value will either be @c wxLayout_LeftToRight or 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 @c wxLayout_RightToLeft. If RTL layout is not supported, the return value will
be @c wxLayout_Default. be @c wxLayout_Default.
@sa SetLayoutDirection() @sa SetLayoutDirection()
@@ -547,7 +547,7 @@ public:
wxCoord * h, wxCoord * h,
wxCoord * heightLine = @NULL, wxCoord * heightLine = @NULL,
wxFont * font = @NULL); wxFont * font = @NULL);
wxSize GetMultiLineTextExtent(const wxString& string); wxSize GetMultiLineTextExtent(const wxString& string);
//@} //@}
/** /**
@@ -556,13 +556,13 @@ public:
#define wxSize GetPPI() /* implementation is private */ #define wxSize GetPPI() /* implementation is private */
/** /**
Fills the @e widths array with the widths from the beginning of Fills the @e widths array with the widths from the beginning of
@e text to the corresponding character of @e text. The generic @e text to the corresponding character of @e text. The generic
version simply builds a running total of the widths of each character version simply builds a running total of the widths of each character
using GetTextExtent(), however if the using GetTextExtent(), however if the
various platforms have a native API function that is faster or more various platforms have a native API function that is faster or more
accurate than the generic implementation then it should be used accurate than the generic implementation then it should be used
instead. instead.
@sa GetMultiLineTextExtent(), GetTextExtent() @sa GetMultiLineTextExtent(), GetTextExtent()
*/ */
@@ -605,7 +605,7 @@ public:
@c ( width, height ) @c ( width, height )
*/ */
void GetSize(wxCoord * width, wxCoord * height); void GetSize(wxCoord * width, wxCoord * height);
wxSize GetSize(); wxSize GetSize();
//@} //@}
//@{ //@{
@@ -613,7 +613,7 @@ public:
Returns the horizontal and vertical resolution in millimetres. Returns the horizontal and vertical resolution in millimetres.
*/ */
void GetSizeMM(wxCoord * width, wxCoord * height); void GetSizeMM(wxCoord * width, wxCoord * height);
wxSize GetSizeMM(); wxSize GetSizeMM();
//@} //@}
/** /**
@@ -645,7 +645,7 @@ public:
wxCoord * descent = @NULL, wxCoord * descent = @NULL,
wxCoord * externalLeading = @NULL, wxCoord * externalLeading = @NULL,
const wxFont * font = @NULL); const wxFont * font = @NULL);
wxSize GetTextExtent(const wxString& string); wxSize GetTextExtent(const wxString& string);
//@} //@}
/** /**
@@ -660,8 +660,8 @@ public:
//@{ //@{
/** /**
Fill the area specified by rect with a radial gradient, starting from Fill the area specified by rect with a radial gradient, starting from
@e initialColour at the centre of the circle and fading to @e destColour @e initialColour at the centre of the circle and fading to @e destColour
on the circle outside. on the circle outside.
@e circleCenter are the relative coordinates of centre of the circle in @e circleCenter are the relative coordinates of centre of the circle in
@@ -674,17 +674,17 @@ public:
void GradientFillConcentric(const wxRect& rect, void GradientFillConcentric(const wxRect& rect,
const wxColour& initialColour, const wxColour& initialColour,
const wxColour& destColour); const wxColour& destColour);
void GradientFillConcentric(const wxRect& rect, void GradientFillConcentric(const wxRect& rect,
const wxColour& initialColour, const wxColour& initialColour,
const wxColour& destColour, const wxColour& destColour,
const wxPoint& circleCenter); const wxPoint& circleCenter);
//@} //@}
/** /**
Fill the area specified by @e rect with a linear gradient, starting from Fill the area specified by @e rect with a linear gradient, starting from
@e initialColour and eventually fading to @e destColour. The @e initialColour and eventually fading to @e destColour. The
@e nDirection specifies the direction of the colour change, default is to @e nDirection specifies the direction of the colour change, default is to
use @e initialColour on the left part of the rectangle and use @e initialColour on the left part of the rectangle and
@e destColour on the right one. @e destColour on the right one.
*/ */
void GradientFillLinear(const wxRect& rect, void GradientFillLinear(const wxRect& rect,
@@ -753,14 +753,14 @@ public:
/** /**
Sets the x and y axis orientation (i.e., the direction from lowest to Sets the x and y axis orientation (i.e., the direction from lowest to
highest values on the axis). The default orientation is highest values on the axis). The default orientation is
x axis from left to right and y axis from top down. x axis from left to right and y axis from top down.
@param xLeftRight @param xLeftRight
True to set the x axis orientation to the natural True to set the x axis orientation to the natural
left to right orientation, @false to invert it. left to right orientation, @false to invert it.
@param yBottomUp @param yBottomUp
True to set the y axis orientation to the natural True to set the y axis orientation to the natural
bottom up orientation, @false to invert it. bottom up orientation, @false to invert it.
*/ */
@@ -795,7 +795,7 @@ public:
/** /**
Sets the clipping region for this device context to the intersection of the Sets the clipping region for this device context to the intersection of the
given region described by the parameters of this method and the previously set given region described by the parameters of this method and the previously set
clipping region. You should call clipping region. You should call
DestroyClippingRegion() if you want to set DestroyClippingRegion() if you want to set
the clipping region exactly to the region specified. the clipping region exactly to the region specified.
@@ -807,9 +807,9 @@ public:
*/ */
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
void SetClippingRegion(const wxPoint& pt, const wxSize& sz); void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
void SetClippingRegion(const wxRect& rect); void SetClippingRegion(const wxRect& rect);
void SetClippingRegion(const wxRegion& region); void SetClippingRegion(const wxRegion& region);
//@} //@}
/** /**
@@ -952,40 +952,40 @@ public:
/** /**
Copy from a source DC to this DC, specifying the destination Copy from a source DC to this DC, specifying the destination
coordinates, destination size, source DC, source coordinates, coordinates, destination size, source DC, source coordinates,
size of source area to copy, logical function, whether to use a bitmap mask, size of source area to copy, logical function, whether to use a bitmap mask,
and mask source position. and mask source position.
@param xdest @param xdest
Destination device context x position. Destination device context x position.
@param ydest @param ydest
Destination device context y position. Destination device context y position.
@param dstWidth @param dstWidth
Width of destination area. Width of destination area.
@param dstHeight @param dstHeight
Height of destination area. Height of destination area.
@param source @param source
Source device context. Source device context.
@param xsrc @param xsrc
Source device context x position. Source device context x position.
@param ysrc @param ysrc
Source device context y position. Source device context y position.
@param srcWidth @param srcWidth
Width of source area to be copied. Width of source area to be copied.
@param srcHeight @param srcHeight
Height of source area to be copied. Height of source area to be copied.
@param logicalFunc @param logicalFunc
Logical function to use: see SetLogicalFunction(). Logical function to use: see SetLogicalFunction().
@param useMask @param useMask
If @true, Blit does a transparent blit using the mask that is associated with If @true, Blit does a transparent blit using the mask that is associated with
the bitmap the bitmap
selected into the source device context. The Windows implementation does the selected into the source device context. The Windows implementation does the
@@ -1013,13 +1013,13 @@ public:
whether MaskBlt whether MaskBlt
or the explicit mask blitting code above is used, by using wxSystemOptions and or the explicit mask blitting code above is used, by using wxSystemOptions and
setting the no-maskblt option to 1. setting the no-maskblt option to 1.
@param xsrcMask @param xsrcMask
Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc ysrc
will be assumed for the mask source position. Currently only implemented on will be assumed for the mask source position. Currently only implemented on
Windows. Windows.
@param ysrcMask @param ysrcMask
Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc ysrc
will be assumed for the mask source position. Currently only implemented on will be assumed for the mask source position. Currently only implemented on
@@ -1043,19 +1043,19 @@ public:
/** /**
@class wxDCClipper @class wxDCClipper
@wxheader{dc.h} @wxheader{dc.h}
wxDCClipper is a small helper class for setting a clipping region on a wxDCClipper is a small helper class for setting a clipping region on a
wxDC and unsetting it automatically. An object of wxDCClipper wxDC and unsetting it automatically. An object of wxDCClipper
class is typically created on the stack so that it is automatically destroyed class is typically created on the stack so that it is automatically destroyed
when the object goes out of scope. A typical usage example: when the object goes out of scope. A typical usage example:
@code @code
void MyFunction(wxDC& dc) void MyFunction(wxDC& dc)
{ {
wxDCClipper clip(rect); wxDCClipper clip(rect);
... drawing functions here are affected by clipping rect ... ... drawing functions here are affected by clipping rect ...
} }
void OtherFunction() void OtherFunction()
{ {
wxDC dc; wxDC dc;
@@ -1063,14 +1063,14 @@ public:
... drawing functions here are not affected by clipping rect ... ... drawing functions here are not affected by clipping rect ...
} }
@endcode @endcode
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@seealso @seealso
wxDC::SetClippingRegion wxDC::SetClippingRegion
*/ */
class wxDCClipper class wxDCClipper
{ {
public: public:
//@{ //@{
@@ -1082,7 +1082,7 @@ public:
The clipping region is automatically unset when this object is destroyed. The clipping region is automatically unset when this object is destroyed.
*/ */
wxDCClipper(wxDC& dc, const wxRegion& r); wxDCClipper(wxDC& dc, const wxRegion& r);
wxDCClipper(wxDC& dc, const wxRect& rect); wxDCClipper(wxDC& dc, const wxRect& rect);
wxDCClipper(wxDC& dc, int x, int y, int w, int h); wxDCClipper(wxDC& dc, int x, int y, int w, int h);
//@} //@}
}; };

View File

@@ -9,7 +9,7 @@
/** /**
@class wxBufferedDC @class wxBufferedDC
@wxheader{dcbuffer.h} @wxheader{dcbuffer.h}
This class provides a simple way to avoid flicker: when drawing on it, This class provides a simple way to avoid flicker: when drawing on it,
everything is in fact first drawn on an in-memory buffer (a everything is in fact first drawn on an in-memory buffer (a
wxBitmap) and then copied to the screen, using the wxBitmap) and then copied to the screen, using the
@@ -17,27 +17,27 @@
is typically associated with wxClientDC, if you want to is typically associated with wxClientDC, if you want to
use it in your @c EVT_PAINT handler, you should look at use it in your @c EVT_PAINT handler, you should look at
wxBufferedPaintDC instead. wxBufferedPaintDC instead.
When used like this, a valid @e dc must be specified in the constructor When used like this, a valid @e dc must be specified in the constructor
while the @e buffer bitmap doesn't have to be explicitly provided, by while the @e buffer bitmap doesn't have to be explicitly provided, by
default this class will allocate the bitmap of required size itself. However default this class will allocate the bitmap of required size itself. However
using a dedicated bitmap can speed up the redrawing process by eliminating the using a dedicated bitmap can speed up the redrawing process by eliminating the
repeated creation and destruction of a possibly big bitmap. Otherwise, repeated creation and destruction of a possibly big bitmap. Otherwise,
wxBufferedDC can be used in the same way as any other device context. wxBufferedDC can be used in the same way as any other device context.
There is another possible use for wxBufferedDC is to use it to maintain a There is another possible use for wxBufferedDC is to use it to maintain a
backing store for the window contents. In this case, the associated @e dc backing store for the window contents. In this case, the associated @e dc
may be @NULL but a valid backing store bitmap should be specified. may be @NULL but a valid backing store bitmap should be specified.
Finally, please note that GTK+ 2.0 as well as OS X provide double buffering Finally, please note that GTK+ 2.0 as well as OS X provide double buffering
themselves natively. You can either use wxWindow::IsDoubleBuffered themselves natively. You can either use wxWindow::IsDoubleBuffered
to determine whether you need to use buffering or not, or use to determine whether you need to use buffering or not, or use
wxAutoBufferedPaintDC to avoid needless double wxAutoBufferedPaintDC to avoid needless double
buffering on the systems which already do it automatically. buffering on the systems which already do it automatically.
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxMemoryDC, wxBufferedPaintDC, wxAutoBufferedPaintDC wxDC, wxMemoryDC, wxBufferedPaintDC, wxAutoBufferedPaintDC
*/ */
@@ -46,28 +46,28 @@ class wxBufferedDC : public wxMemoryDC
public: public:
//@{ //@{
/** /**
If you use the first, default, constructor, you must call one of the If you use the first, default, constructor, you must call one of the
Init() methods later in order to use the object. Init() methods later in order to use the object.
The other constructors initialize the object immediately and @c Init() The other constructors initialize the object immediately and @c Init()
must not be called after using them. must not be called after using them.
@param dc @param dc
The underlying DC: everything drawn to this object will be The underlying DC: everything drawn to this object will be
flushed to this DC when this object is destroyed. You may pass @NULL flushed to this DC when this object is destroyed. You may pass @NULL
in order to just initialize the buffer, and not flush it. in order to just initialize the buffer, and not flush it.
@param area @param area
The size of the bitmap to be used for buffering (this bitmap is The size of the bitmap to be used for buffering (this bitmap is
created internally when it is not given explicitly). created internally when it is not given explicitly).
@param buffer @param buffer
Explicitly provided bitmap to be used for buffering: this is Explicitly provided bitmap to be used for buffering: this is
the most efficient solution as the bitmap doesn't have to be recreated each the most efficient solution as the bitmap doesn't have to be recreated each
time but it also requires more memory as the bitmap is never freed. The bitmap time but it also requires more memory as the bitmap is never freed. The bitmap
should have appropriate size, anything drawn outside of its bounds is clipped. should have appropriate size, anything drawn outside of its bounds is clipped.
@param style @param style
wxBUFFER_CLIENT_AREA to indicate that just the client area of wxBUFFER_CLIENT_AREA to indicate that just the client area of
the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the buffer the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the buffer
bitmap bitmap
@@ -76,10 +76,10 @@ public:
device context). device context).
*/ */
wxBufferedDC(); wxBufferedDC();
wxBufferedDC(wxDC * dc, const wxSize& area, wxBufferedDC(wxDC * dc, const wxSize& area,
int style = wxBUFFER_CLIENT_AREA); int style = wxBUFFER_CLIENT_AREA);
wxBufferedDC(wxDC * dc, wxBitmap& buffer, wxBufferedDC(wxDC * dc, wxBitmap& buffer,
int style = wxBUFFER_CLIENT_AREA); int style = wxBUFFER_CLIENT_AREA);
//@} //@}
/** /**
@@ -95,8 +95,8 @@ public:
*/ */
void Init(wxDC * dc, const wxSize& area, void Init(wxDC * dc, const wxSize& area,
int style = wxBUFFER_CLIENT_AREA); int style = wxBUFFER_CLIENT_AREA);
void Init(wxDC * dc, wxBitmap& buffer, void Init(wxDC * dc, wxBitmap& buffer,
int style = wxBUFFER_CLIENT_AREA); int style = wxBUFFER_CLIENT_AREA);
//@} //@}
}; };
@@ -104,7 +104,7 @@ public:
/** /**
@class wxAutoBufferedPaintDC @class wxAutoBufferedPaintDC
@wxheader{dcbuffer.h} @wxheader{dcbuffer.h}
This wxDC derivative can be used inside of an @c OnPaint() event handler to This wxDC derivative can be used inside of an @c OnPaint() event handler to
achieve achieve
double-buffered drawing. Just create an object of this class instead of double-buffered drawing. Just create an object of this class instead of
@@ -113,15 +113,15 @@ public:
with wxBG_STYLE_CUSTOM somewhere in the class initialization code, and that's with wxBG_STYLE_CUSTOM somewhere in the class initialization code, and that's
all you have all you have
to do to (mostly) avoid flicker. to do to (mostly) avoid flicker.
The difference between wxBufferedPaintDC and this class, The difference between wxBufferedPaintDC and this class,
is the lightweigthness - on platforms which have native double-buffering, is the lightweigthness - on platforms which have native double-buffering,
wxAutoBufferedPaintDC is simply wxAutoBufferedPaintDC is simply
a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC. a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC.
@library{wxbase} @library{wxbase}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxBufferedPaintDC wxDC, wxBufferedPaintDC
*/ */
@@ -138,7 +138,7 @@ public:
/** /**
@class wxBufferedPaintDC @class wxBufferedPaintDC
@wxheader{dcbuffer.h} @wxheader{dcbuffer.h}
This is a subclass of wxBufferedDC which can be used This is a subclass of wxBufferedDC which can be used
inside of an @c OnPaint() event handler. Just create an object of this class inside of an @c OnPaint() event handler. Just create an object of this class
instead instead
@@ -150,10 +150,10 @@ public:
using this class together with wxScrolledWindow, you probably using this class together with wxScrolledWindow, you probably
do @b not want to call wxScrolledWindow::PrepareDC on it as it do @b not want to call wxScrolledWindow::PrepareDC on it as it
already does this internally for the real underlying wxPaintDC. already does this internally for the real underlying wxPaintDC.
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxBufferedDC, wxAutoBufferedPaintDC wxDC, wxBufferedDC, wxAutoBufferedPaintDC
*/ */
@@ -176,8 +176,8 @@ public:
*/ */
wxBufferedPaintDC(wxWindow * window, wxBitmap& buffer, wxBufferedPaintDC(wxWindow * window, wxBitmap& buffer,
int style = wxBUFFER_CLIENT_AREA); int style = wxBUFFER_CLIENT_AREA);
wxBufferedPaintDC(wxWindow * window, wxBufferedPaintDC(wxWindow * window,
int style = wxBUFFER_CLIENT_AREA); int style = wxBUFFER_CLIENT_AREA);
//@} //@}
/** /**

View File

@@ -9,26 +9,26 @@
/** /**
@class wxPaintDC @class wxPaintDC
@wxheader{dcclient.h} @wxheader{dcclient.h}
A wxPaintDC must be constructed if an application wishes to paint on the A wxPaintDC must be constructed if an application wishes to paint on the
client area of a window from within an @b OnPaint event. client area of a window from within an @b OnPaint event.
This should normally be constructed as a temporary stack object; don't store This should normally be constructed as a temporary stack object; don't store
a wxPaintDC object. If you have an OnPaint handler, you @e must create a a wxPaintDC object. If you have an OnPaint handler, you @e must create a
wxPaintDC wxPaintDC
object within it even if you don't actually use it. object within it even if you don't actually use it.
Using wxPaintDC within OnPaint is important because it automatically Using wxPaintDC within OnPaint is important because it automatically
sets the clipping area to the damaged area of the window. Attempts to draw sets the clipping area to the damaged area of the window. Attempts to draw
outside this area do not appear. outside this area do not appear.
To draw on a window from outside @b OnPaint, construct a wxClientDC object. To draw on a window from outside @b OnPaint, construct a wxClientDC object.
To draw on the whole window including decorations, construct a wxWindowDC object To draw on the whole window including decorations, construct a wxWindowDC object
(Windows only). (Windows only).
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
*/ */
@@ -45,20 +45,20 @@ public:
/** /**
@class wxClientDC @class wxClientDC
@wxheader{dcclient.h} @wxheader{dcclient.h}
A wxClientDC must be constructed if an application wishes to paint on the A wxClientDC must be constructed if an application wishes to paint on the
client area of a window from outside an @b OnPaint event. client area of a window from outside an @b OnPaint event.
This should normally be constructed as a temporary stack object; don't store This should normally be constructed as a temporary stack object; don't store
a wxClientDC object. a wxClientDC object.
To draw on a window from within @b OnPaint, construct a wxPaintDC object. To draw on a window from within @b OnPaint, construct a wxPaintDC object.
To draw on the whole window including decorations, construct a wxWindowDC object To draw on the whole window including decorations, construct a wxWindowDC object
(Windows only). (Windows only).
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
*/ */
@@ -75,23 +75,23 @@ public:
/** /**
@class wxWindowDC @class wxWindowDC
@wxheader{dcclient.h} @wxheader{dcclient.h}
A wxWindowDC must be constructed if an application wishes to paint on the A wxWindowDC must be constructed if an application wishes to paint on the
whole area of a window (client and decorations). whole area of a window (client and decorations).
This should normally be constructed as a temporary stack object; don't store This should normally be constructed as a temporary stack object; don't store
a wxWindowDC object. a wxWindowDC object.
To draw on a window from inside @b OnPaint, construct a wxPaintDC object. To draw on a window from inside @b OnPaint, construct a wxPaintDC object.
To draw on the client area of a window from outside @b OnPaint, construct a To draw on the client area of a window from outside @b OnPaint, construct a
wxClientDC object. wxClientDC object.
To draw on the whole window including decorations, construct a wxWindowDC object To draw on the whole window including decorations, construct a wxWindowDC object
(Windows only). (Windows only).
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
*/ */

View File

@@ -9,16 +9,16 @@
/** /**
@class wxMemoryDC @class wxMemoryDC
@wxheader{dcmemory.h} @wxheader{dcmemory.h}
A memory device context provides a means to draw graphics onto a bitmap. When A memory device context provides a means to draw graphics onto a bitmap. When
drawing in to a mono-bitmap, using @c wxWHITE, @c wxWHITE_PEN and drawing in to a mono-bitmap, using @c wxWHITE, @c wxWHITE_PEN and
@c wxWHITE_BRUSH @c wxWHITE_BRUSH
will draw the background colour (i.e. 0) whereas all other colours will draw the will draw the background colour (i.e. 0) whereas all other colours will draw the
foreground colour (i.e. 1). foreground colour (i.e. 1).
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxBitmap, wxDC wxBitmap, wxDC
*/ */
@@ -33,7 +33,7 @@ public:
in creating a usable device context. in creating a usable device context.
*/ */
wxMemoryDC(); wxMemoryDC();
wxMemoryDC(wxBitmap& bitmap); wxMemoryDC(wxBitmap& bitmap);
//@} //@}
/** /**

View File

@@ -9,15 +9,15 @@
/** /**
@class wxMirrorDC @class wxMirrorDC
@wxheader{dcmirror.h} @wxheader{dcmirror.h}
wxMirrorDC is a simple wrapper class which is always associated with a real wxMirrorDC is a simple wrapper class which is always associated with a real
wxDC object and either forwards all of its operations to it wxDC object and either forwards all of its operations to it
without changes (no mirroring takes place) or exchanges @e x and @e y without changes (no mirroring takes place) or exchanges @e x and @e y
coordinates which makes it possible to reuse the same code to draw a figure and coordinates which makes it possible to reuse the same code to draw a figure and
its mirror -- i.e. reflection related to the diagonal line x == y. its mirror -- i.e. reflection related to the diagonal line x == y.
wxMirrorDC has been added in wxWidgets version 2.5.0. wxMirrorDC has been added in wxWidgets version 2.5.0.
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
*/ */
@@ -28,7 +28,7 @@ public:
Creates a (maybe) mirrored DC associated with the real @e dc. Everything Creates a (maybe) mirrored DC associated with the real @e dc. Everything
drawn on wxMirrorDC will appear (and maybe mirrored) on @e dc. drawn on wxMirrorDC will appear (and maybe mirrored) on @e dc.
@e mirror specifies if we do mirror (if it is @true) or not (if it is @e mirror specifies if we do mirror (if it is @true) or not (if it is
@false). @false).
*/ */
wxMirrorDC(wxDC& dc, bool mirror); wxMirrorDC(wxDC& dc, bool mirror);

View File

@@ -9,15 +9,15 @@
/** /**
@class wxPrinterDC @class wxPrinterDC
@wxheader{dcprint.h} @wxheader{dcprint.h}
A printer device context is specific to MSW and Mac, and allows access to any A printer device context is specific to MSW and Mac, and allows access to any
printer with a Windows or Macintosh driver. See wxDC for further printer with a Windows or Macintosh driver. See wxDC for further
information on device contexts, and wxDC::GetSize for information on device contexts, and wxDC::GetSize for
advice on achieving the correct scaling for the page. advice on achieving the correct scaling for the page.
@library{wxcore} @library{wxcore}
@category{printing} @category{printing}
@seealso @seealso
@ref overview_printingoverview "Printing framework overview", wxDC @ref overview_printingoverview "Printing framework overview", wxDC
*/ */
@@ -36,10 +36,10 @@ public:
This constructor is deprecated and retained only for backward compatibility. This constructor is deprecated and retained only for backward compatibility.
*/ */
wxPrinterDC(const wxPrintData& printData); wxPrinterDC(const wxPrintData& printData);
wxPrinterDC(const wxString& driver, const wxString& device, wxPrinterDC(const wxString& driver, const wxString& device,
const wxString& output, const wxString& output,
const bool interactive = @true, const bool interactive = @true,
int orientation = wxPORTRAIT); int orientation = wxPORTRAIT);
//@} //@}
/** /**

View File

@@ -9,11 +9,11 @@
/** /**
@class wxPostScriptDC @class wxPostScriptDC
@wxheader{dcps.h} @wxheader{dcps.h}
This defines the wxWidgets Encapsulated PostScript device context, This defines the wxWidgets Encapsulated PostScript device context,
which can write PostScript files on any platform. See wxDC for which can write PostScript files on any platform. See wxDC for
descriptions of the member functions. descriptions of the member functions.
@library{wxbase} @library{wxbase}
@category{dc} @category{dc}
*/ */
@@ -36,13 +36,13 @@ public:
use the wxPrintData constructor instead. use the wxPrintData constructor instead.
*/ */
wxPostScriptDC(const wxPrintData& printData); wxPostScriptDC(const wxPrintData& printData);
wxPostScriptDC(const wxString& output, wxPostScriptDC(const wxString& output,
bool interactive = @true, bool interactive = @true,
wxWindow * parent); wxWindow * parent);
//@} //@}
/** /**
Return resolution used in PostScript output. See Return resolution used in PostScript output. See
SetResolution(). SetResolution().
*/ */
static int GetResolution(); static int GetResolution();

View File

@@ -9,14 +9,14 @@
/** /**
@class wxScreenDC @class wxScreenDC
@wxheader{dcscreen.h} @wxheader{dcscreen.h}
A wxScreenDC can be used to paint on the screen. A wxScreenDC can be used to paint on the screen.
This should normally be constructed as a temporary stack object; don't store This should normally be constructed as a temporary stack object; don't store
a wxScreenDC object. a wxScreenDC object.
@library{wxcore} @library{wxcore}
@category{dc} @category{dc}
@seealso @seealso
wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxWindowDC wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxWindowDC
*/ */
@@ -67,6 +67,6 @@ public:
applications. applications.
*/ */
bool StartDrawingOnTop(wxWindow* window); bool StartDrawingOnTop(wxWindow* window);
bool StartDrawingOnTop(wxRect* rect = @NULL); bool StartDrawingOnTop(wxRect* rect = @NULL);
//@} //@}
}; };

View File

@@ -9,33 +9,33 @@
/** /**
@class wxSVGFileDC @class wxSVGFileDC
@wxheader{dcsvg.h} @wxheader{dcsvg.h}
A wxSVGFileDC is a @e device context onto which graphics and text can be drawn, A wxSVGFileDC is a @e device context onto which graphics and text can be drawn,
and the output and the output
produced as a vector file, in the SVG format produced as a vector file, in the SVG format
(see W3C specifications). (see W3C specifications).
This format can be read by a range of programs, including a Netscape plugin This format can be read by a range of programs, including a Netscape plugin
(Adobe), full details (Adobe), full details
in the SVG Implementation and Resource Directory. in the SVG Implementation and Resource Directory.
Vector formats may often be smaller than raster formats. Vector formats may often be smaller than raster formats.
The intention behind wxSVGFileDC is that it can be used to produce a file The intention behind wxSVGFileDC is that it can be used to produce a file
corresponding corresponding
to the screen display context, wxSVGFileDC, by passing the wxSVGFileDC as a to the screen display context, wxSVGFileDC, by passing the wxSVGFileDC as a
parameter instead of a wxSVGFileDC. Thus the wxSVGFileDC is a write-only class. parameter instead of a wxSVGFileDC. Thus the wxSVGFileDC is a write-only class.
As the wxSVGFileDC is a vector format, raster operations like GetPixel are As the wxSVGFileDC is a vector format, raster operations like GetPixel are
unlikely to be supported. unlikely to be supported.
However, the SVG specification allows for PNG format raster files to be However, the SVG specification allows for PNG format raster files to be
embedded in the SVG, and so embedded in the SVG, and so
bitmaps, icons and blit operations into the wxSVGFileDC are supported. bitmaps, icons and blit operations into the wxSVGFileDC are supported.
A more substantial SVG library (for reading and writing) is available at the A more substantial SVG library (for reading and writing) is available at the
wxArt2D website. wxArt2D website.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@b Members @b Members
*/ */
@@ -44,15 +44,15 @@ class wxSVGFileDC : public wxDC
public: public:
//@{ //@{
/** /**
Constructors: Constructors:
a filename @e f with default size 340x240 at 72.0 dots per inch (a frequent a filename @e f with default size 340x240 at 72.0 dots per inch (a frequent
screen resolution). screen resolution).
a filename @e f with size @e Width by @e Height at 72.0 dots per inch a filename @e f with size @e Width by @e Height at 72.0 dots per inch
a filename @e f with size @e Width by @e Height at @e dpi resolution. a filename @e f with size @e Width by @e Height at @e dpi resolution.
*/ */
wxSVGFileDC(wxString f); wxSVGFileDC(wxString f);
wxSVGFileDC(wxString f, int Width, int Height); wxSVGFileDC(wxString f, int Width, int Height);
wxSVGFileDC(wxString f, int Width, int Height, float dpi); wxSVGFileDC(wxString f, int Width, int Height, float dpi);
//@} //@}
/** /**
@@ -79,8 +79,8 @@ public:
wxCoord ysrcMask = -1); wxCoord ysrcMask = -1);
/** /**
Adds the specified point to the bounding box which can be retrieved with Adds the specified point to the bounding box which can be retrieved with
wxDC::MinX, wxDC::MaxX and wxDC::MinX, wxDC::MaxX and
wxDC::MinY, wxDC::MaxY functions. wxDC::MinY, wxDC::MaxY functions.
*/ */
void CalcBoundingBox(wxCoord x, wxCoord y); void CalcBoundingBox(wxCoord x, wxCoord y);
@@ -147,7 +147,7 @@ public:
draw the foreground draw the foreground
of the bitmap (all bits set to 1), and the current text background colour to of the bitmap (all bits set to 1), and the current text background colour to
draw the background draw the background
(all bits set to 0). See also wxDC::SetTextForeground, (all bits set to 0). See also wxDC::SetTextForeground,
wxDC::SetTextBackground and wxMemoryDC. wxDC::SetTextBackground and wxMemoryDC.
*/ */
void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y,
@@ -159,7 +159,7 @@ public:
*/ */
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
void DrawCheckMark(const wxRect & rect); void DrawCheckMark(const wxRect & rect);
//@} //@}
//@{ //@{
@@ -169,7 +169,7 @@ public:
@sa wxDC::DrawEllipse @sa wxDC::DrawEllipse
*/ */
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius); void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
void DrawCircle(const wxPoint& pt, wxCoord radius); void DrawCircle(const wxPoint& pt, wxCoord radius);
//@} //@}
//@{ //@{
@@ -182,8 +182,8 @@ public:
*/ */
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
void DrawEllipse(const wxPoint& pt, const wxSize& size); void DrawEllipse(const wxPoint& pt, const wxSize& size);
void DrawEllipse(const wxRect& rect); void DrawEllipse(const wxRect& rect);
//@} //@}
/** /**
@@ -231,8 +231,8 @@ public:
*/ */
void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0, void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0); wxCoord yoffset = 0);
void DrawLines(wxList * points, wxCoord xoffset = 0, void DrawLines(wxList * points, wxCoord xoffset = 0,
wxCoord yoffset = 0); wxCoord yoffset = 0);
//@} //@}
/** /**
@@ -257,9 +257,9 @@ public:
void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0, wxCoord yoffset = 0,
int fill_style = wxODDEVEN_RULE); int fill_style = wxODDEVEN_RULE);
void DrawPolygon(wxList * points, wxCoord xoffset = 0, void DrawPolygon(wxList * points, wxCoord xoffset = 0,
wxCoord yoffset = 0, wxCoord yoffset = 0,
int fill_style = wxODDEVEN_RULE); int fill_style = wxODDEVEN_RULE);
//@} //@}
/** /**
@@ -302,10 +302,10 @@ public:
Draws a three-point spline using the current pen. Draws a three-point spline using the current pen.
*/ */
void DrawSpline(wxList * points); void DrawSpline(wxList * points);
void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2, void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
wxCoord y2, wxCoord y2,
wxCoord x3, wxCoord x3,
wxCoord y3); wxCoord y3);
//@} //@}
/** /**
@@ -346,7 +346,7 @@ public:
wxSVGFileDC::SetBackground). wxSVGFileDC::SetBackground).
*/ */
wxBrush GetBackground(); wxBrush GetBackground();
const wxBrush GetBackground(); const wxBrush GetBackground();
//@} //@}
/** /**
@@ -361,7 +361,7 @@ public:
Gets the current brush (see wxSVGFileDC::SetBrush). Gets the current brush (see wxSVGFileDC::SetBrush).
*/ */
wxBrush GetBrush(); wxBrush GetBrush();
const wxBrush GetBrush(); const wxBrush GetBrush();
//@} //@}
/** /**
@@ -385,7 +385,7 @@ public:
Gets the current font (see wxSVGFileDC::SetFont). Gets the current font (see wxSVGFileDC::SetFont).
*/ */
wxFont GetFont(); wxFont GetFont();
const wxFont GetFont(); const wxFont GetFont();
//@} //@}
/** /**
@@ -403,7 +403,7 @@ public:
Gets the current pen (see wxSVGFileDC::SetPen). Gets the current pen (see wxSVGFileDC::SetPen).
*/ */
wxPen GetPen(); wxPen GetPen();
const wxPen GetPen(); const wxPen GetPen();
//@} //@}
/** /**
@@ -422,7 +422,7 @@ public:
Gets the current text background colour (see wxSVGFileDC::SetTextBackground). Gets the current text background colour (see wxSVGFileDC::SetTextBackground).
*/ */
wxColour GetTextBackground(); wxColour GetTextBackground();
const wxColour GetTextBackground(); const wxColour GetTextBackground();
//@} //@}
/** /**
@@ -451,7 +451,7 @@ public:
Gets the current text foreground colour (see wxSVGFileDC::SetTextForeground). Gets the current text foreground colour (see wxSVGFileDC::SetTextForeground).
*/ */
wxColour GetTextForeground(); wxColour GetTextForeground();
const wxColour GetTextForeground(); const wxColour GetTextForeground();
//@} //@}
/** /**
@@ -506,7 +506,7 @@ public:
#define wxCoord MinY() /* implementation is private */ #define wxCoord MinY() /* implementation is private */
/** /**
Returns @true if the DC is ok to use; False values arise from being unable to Returns @true if the DC is ok to use; False values arise from being unable to
write the file write the file
*/ */
#define bool Ok() /* implementation is private */ #define bool Ok() /* implementation is private */
@@ -524,11 +524,11 @@ public:
highest values on the axis). The default orientation is the natural 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. orientation, e.g. x axis from left to right and y axis from bottom up.
@param xLeftRight @param xLeftRight
True to set the x axis orientation to the natural True to set the x axis orientation to the natural
left to right orientation, @false to invert it. left to right orientation, @false to invert it.
@param yBottomUp @param yBottomUp
True to set the y axis orientation to the natural True to set the y axis orientation to the natural
bottom up orientation, @false to invert it. bottom up orientation, @false to invert it.
*/ */
@@ -565,9 +565,9 @@ public:
*/ */
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
void SetClippingRegion(const wxPoint& pt, const wxSize& sz); void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
void SetClippingRegion(const wxRect& rect); void SetClippingRegion(const wxRect& rect);
void SetClippingRegion(const wxRegion& region); void SetClippingRegion(const wxRegion& region);
//@} //@}
/** /**

View File

@@ -9,7 +9,7 @@
/** /**
@class wxDDEConnection @class wxDDEConnection
@wxheader{dde.h} @wxheader{dde.h}
A wxDDEConnection object represents the connection between a client and a A wxDDEConnection object represents the connection between a client and a
server. It can be created by making a connection using a server. It can be created by making a connection using a
wxDDEClient object, or by the acceptance of a connection by a wxDDEClient object, or by the acceptance of a connection by a
@@ -17,18 +17,18 @@
conversation is controlled by conversation is controlled by
calling members in a @b wxDDEConnection object or by overriding its calling members in a @b wxDDEConnection object or by overriding its
members. members.
An application should normally derive a new connection class from An application should normally derive a new connection class from
wxDDEConnection, in order to override the communication event handlers wxDDEConnection, in order to override the communication event handlers
to do something interesting. to do something interesting.
This DDE-based implementation is available on Windows only, This DDE-based implementation is available on Windows only,
but a platform-independent, socket-based version but a platform-independent, socket-based version
of this API is available using wxTCPConnection. of this API is available using wxTCPConnection.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxDDEClient, wxDDEServer, @ref overview_ipcoverview "Interprocess wxDDEClient, wxDDEServer, @ref overview_ipcoverview "Interprocess
communications overview" communications overview"
@@ -51,7 +51,7 @@ public:
transactions. transactions.
*/ */
wxDDEConnection(); wxDDEConnection();
wxDDEConnection(void* buffer, size_t size); wxDDEConnection(void* buffer, size_t size);
//@} //@}
//@{ //@{
@@ -63,9 +63,9 @@ public:
*/ */
bool Advise(const wxString& item, const void* data, size_t size, bool Advise(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE); wxIPCFormat format = wxIPC_PRIVATE);
bool Advise(const wxString& item, const char* data); bool Advise(const wxString& item, const char* data);
bool Advise(const wxString& item, const wchar_t* data); bool Advise(const wxString& item, const wchar_t* data);
bool Advise(const wxString& item, const wxString data); bool Advise(const wxString& item, const wxString data);
//@} //@}
/** /**
@@ -89,9 +89,9 @@ public:
*/ */
bool Execute(const void* data, size_t size, bool Execute(const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE); wxIPCFormat format = wxIPC_PRIVATE);
bool Execute(const char* data); bool Execute(const char* data);
bool Execute(const wchar_t* data); bool Execute(const wchar_t* data);
bool Execute(const wxString data); bool Execute(const wxString data);
//@} //@}
/** /**
@@ -166,9 +166,9 @@ public:
*/ */
bool Poke(const wxString& item, const void* data, size_t size, bool Poke(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE); wxIPCFormat format = wxIPC_PRIVATE);
bool Poke(const wxString& item, const char* data); bool Poke(const wxString& item, const char* data);
bool Poke(const wxString& item, const wchar_t* data); bool Poke(const wxString& item, const wchar_t* data);
bool Poke(const wxString& item, const wxString data); bool Poke(const wxString& item, const wxString data);
//@} //@}
/** /**
@@ -200,24 +200,24 @@ public:
/** /**
@class wxDDEClient @class wxDDEClient
@wxheader{dde.h} @wxheader{dde.h}
A wxDDEClient object represents the client part of a client-server DDE A wxDDEClient object represents the client part of a client-server DDE
(Dynamic Data Exchange) conversation. (Dynamic Data Exchange) conversation.
To create a client which can communicate with a suitable server, To create a client which can communicate with a suitable server,
you need to derive a class from wxDDEConnection and another from wxDDEClient. you need to derive a class from wxDDEConnection and another from wxDDEClient.
The custom wxDDEConnection class will intercept communications in The custom wxDDEConnection class will intercept communications in
a 'conversation' with a server, and the custom wxDDEServer is required a 'conversation' with a server, and the custom wxDDEServer is required
so that a user-overridden wxDDEClient::OnMakeConnection member can return so that a user-overridden wxDDEClient::OnMakeConnection member can return
a wxDDEConnection of the required class, when a connection is made. a wxDDEConnection of the required class, when a connection is made.
This DDE-based implementation is This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version available on Windows only, but a platform-independent, socket-based version
of this API is available using wxTCPClient. of this API is available using wxTCPClient.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxDDEServer, wxDDEConnection, @ref overview_ipcoverview "Interprocess wxDDEServer, wxDDEConnection, @ref overview_ipcoverview "Interprocess
communications overview" communications overview"
@@ -267,21 +267,21 @@ public:
/** /**
@class wxDDEServer @class wxDDEServer
@wxheader{dde.h} @wxheader{dde.h}
A wxDDEServer object represents the server part of a client-server DDE A wxDDEServer object represents the server part of a client-server DDE
(Dynamic Data Exchange) conversation. (Dynamic Data Exchange) conversation.
This DDE-based implementation is This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version available on Windows only, but a platform-independent, socket-based version
of this API is available using wxTCPServer. of this API is available using wxTCPServer.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxDDEClient, wxDDEConnection, @ref overview_ipcoverview "IPC overview" wxDDEClient, wxDDEConnection, @ref overview_ipcoverview "IPC overview"
*/ */
class wxDDEServer class wxDDEServer
{ {
public: public:
/** /**
@@ -319,17 +319,17 @@ public:
Called when wxWidgets exits, to clean up the DDE system. This no longer needs Called when wxWidgets exits, to clean up the DDE system. This no longer needs
to be to be
called by the application. called by the application.
See also wxDDEInitialize. See also wxDDEInitialize.
*/ */
void wxDDECleanUp(); void wxDDECleanUp();
/** /**
Initializes the DDE system. May be called multiple times without harm. Initializes the DDE system. May be called multiple times without harm.
This no longer needs to be called by the application: it will be called This no longer needs to be called by the application: it will be called
by wxWidgets if necessary. by wxWidgets if necessary.
See also wxDDEServer, wxDDEClient, wxDDEConnection, See also wxDDEServer, wxDDEClient, wxDDEConnection,
wxDDECleanUp. wxDDECleanUp.
*/ */

View File

@@ -1,29 +1,29 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: debug.h // Name: debug.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** /**
Will always generate an assert error if this code is reached (in debug mode). Will always generate an assert error if this code is reached (in debug mode).
See also: wxFAIL_MSG See also: wxFAIL_MSG
*/ */
#define wxFAIL() /* implementation is private */ #define wxFAIL() /* implementation is private */
/** /**
This function is called whenever one of debugging macros fails (i.e. condition This function is called whenever one of debugging macros fails (i.e. condition
is @false in an assertion). It is only defined in the debug mode, in release is @false in an assertion). It is only defined in the debug mode, in release
builds the wxCHECK failures don't result in anything. builds the wxCHECK failures don't result in anything.
To override the default behaviour in the debug builds which is to show the user To override the default behaviour in the debug builds which is to show the user
a dialog asking whether he wants to abort the program, continue or continue a dialog asking whether he wants to abort the program, continue or continue
ignoring any subsequent assert failures, you may override ignoring any subsequent assert failures, you may override
wxApp::OnAssertFailure which is called by this function if wxApp::OnAssertFailure which is called by this function if
the global application object exists. the global application object exists.
*/ */
void wxOnAssert(const char * fileName, int lineNumber, void wxOnAssert(const char * fileName, int lineNumber,
const char * func, const char * func,
@@ -34,7 +34,7 @@ void wxOnAssert(const char * fileName, int lineNumber,
In debug mode (when @c __WXDEBUG__ is defined) this function generates a In debug mode (when @c __WXDEBUG__ is defined) this function generates a
debugger exception meaning that the control is passed to the debugger if one is debugger exception meaning that the control is passed to the debugger if one is
attached to the process. Otherwise the program just terminates abnormally. attached to the process. Otherwise the program just terminates abnormally.
In release mode this function does nothing. In release mode this function does nothing.
*/ */
void wxTrap(); void wxTrap();
@@ -42,11 +42,11 @@ void wxTrap();
/** /**
Will always generate an assert error with specified message if this code is Will always generate an assert error with specified message if this code is
reached (in debug mode). reached (in debug mode).
This macro is useful for marking unreachable" code areas, for example This macro is useful for marking unreachable" code areas, for example
it may be used in the "default:" branch of a switch statement if all possible it may be used in the "default:" branch of a switch statement if all possible
cases are processed above. cases are processed above.
@sa wxFAIL @sa wxFAIL
*/ */
#define wxFAIL_MSG(msg) /* implementation is private */ #define wxFAIL_MSG(msg) /* implementation is private */
@@ -62,12 +62,12 @@ void wxTrap();
This macro results in a This macro results in a
@ref overview_wxcompiletimeassert "compile time assertion failure" if the size @ref overview_wxcompiletimeassert "compile time assertion failure" if the size
of the given type @e type is less than @e size bits. of the given type @e type is less than @e size bits.
You may use it like this, for example: You may use it like this, for example:
@code @code
// we rely on the int being able to hold values up to 2^32 // we rely on the int being able to hold values up to 2^32
wxASSERT_MIN_BITSIZE(int, 32); wxASSERT_MIN_BITSIZE(int, 32);
// can't work with the platforms using UTF-8 for wchar_t // can't work with the platforms using UTF-8 for wchar_t
wxASSERT_MIN_BITSIZE(wchar_t, 16); wxASSERT_MIN_BITSIZE(wchar_t, 16);
@endcode @endcode
@@ -77,7 +77,7 @@ void wxTrap();
/** /**
Assert macro with message. An error message will be generated if the condition Assert macro with message. An error message will be generated if the condition
is @false. is @false.
@sa wxASSERT, wxCOMPILE_TIME_ASSERT @sa wxASSERT, wxCOMPILE_TIME_ASSERT
*/ */
#define wxASSERT_MSG(condition, msg) /* implementation is private */ #define wxASSERT_MSG(condition, msg) /* implementation is private */
@@ -92,10 +92,10 @@ void wxTrap();
/** /**
Assert macro. An error message will be generated if the condition is @false in Assert macro. An error message will be generated if the condition is @false in
debug mode, but nothing will be done in the release build. debug mode, but nothing will be done in the release build.
Please note that the condition in wxASSERT() should have no side effects Please note that the condition in wxASSERT() should have no side effects
because it will not be executed in release mode at all. because it will not be executed in release mode at all.
@sa wxASSERT_MSG, wxCOMPILE_TIME_ASSERT @sa wxASSERT_MSG, wxCOMPILE_TIME_ASSERT
*/ */
#define wxASSERT(condition) /* implementation is private */ #define wxASSERT(condition) /* implementation is private */
@@ -103,7 +103,7 @@ void wxTrap();
/** /**
Checks that the condition is @true, and returns if not (FAILs with given error Checks that the condition is @true, and returns if not (FAILs with given error
message in debug mode). This check is done even in release mode. message in debug mode). This check is done even in release mode.
This macro should be used in void functions instead of This macro should be used in void functions instead of
wxCHECK_MSG. wxCHECK_MSG.
*/ */
@@ -114,7 +114,7 @@ void wxTrap();
@e operation if it is not. This is a generalisation of @e operation if it is not. This is a generalisation of
wxCHECK and may be used when something else than just wxCHECK and may be used when something else than just
returning from the function must be done when the @e condition is @false. returning from the function must be done when the @e condition is @false.
This check is done even in release mode. This check is done even in release mode.
*/ */
#define wxCHECK2(condition, operation) /* implementation is private */ #define wxCHECK2(condition, operation) /* implementation is private */
@@ -131,7 +131,7 @@ void wxTrap();
Checks that the condition is @true, returns with the given return value if not Checks that the condition is @true, returns with the given return value if not
(FAILs in debug mode). (FAILs in debug mode).
This check is done even in release mode. This check is done even in release mode.
This macro may be only used in non-void functions, see also This macro may be only used in non-void functions, see also
wxCHECK_RET. wxCHECK_RET.
*/ */
@@ -142,22 +142,22 @@ void wxTrap();
specified @e condition is @false. The compiler error message should include specified @e condition is @false. The compiler error message should include
the @e msg identifier - please note that it must be a valid C++ identifier the @e msg identifier - please note that it must be a valid C++ identifier
and not a string unlike in the other cases. and not a string unlike in the other cases.
This macro is mostly useful for testing the expressions involving the This macro is mostly useful for testing the expressions involving the
@c sizeof operator as they can't be tested by the preprocessor but it is @c sizeof operator as they can't be tested by the preprocessor but it is
sometimes desirable to test them at the compile time. sometimes desirable to test them at the compile time.
Note that this macro internally declares a struct whose name it tries to make Note that this macro internally declares a struct whose name it tries to make
unique by using the @c __LINE__ in it but it may still not work if you unique by using the @c __LINE__ in it but it may still not work if you
use it on the same line in two different source files. In this case you may use it on the same line in two different source files. In this case you may
either change the line in which either of them appears on or use the either change the line in which either of them appears on or use the
wxCOMPILE_TIME_ASSERT2 macro. wxCOMPILE_TIME_ASSERT2 macro.
Also note that Microsoft Visual C++ has a bug which results in compiler errors Also note that Microsoft Visual C++ has a bug which results in compiler errors
if you use this macro with 'Program Database For Edit And Continue' if you use this macro with 'Program Database For Edit And Continue'
(@c /ZI) option, so you shouldn't use it ('Program Database' (@c /ZI) option, so you shouldn't use it ('Program Database'
(@c /Zi) is ok though) for the code making use of this macro. (@c /Zi) is ok though) for the code making use of this macro.
@sa wxASSERT_MSG, wxASSERT_MIN_BITSIZE @sa wxASSERT_MSG, wxASSERT_MIN_BITSIZE
*/ */
#define wxCOMPILE_TIME_ASSERT(condition, msg) /* implementation is private */ #define wxCOMPILE_TIME_ASSERT(condition, msg) /* implementation is private */

View File

@@ -9,22 +9,22 @@
/** /**
@class wxDebugReportPreview @class wxDebugReportPreview
@wxheader{debugrpt.h} @wxheader{debugrpt.h}
This class presents the debug report to the user and allows him to veto report This class presents the debug report to the user and allows him to veto report
entirely or remove some parts of it. Although not mandatory, using this class entirely or remove some parts of it. Although not mandatory, using this class
is strongly recommended as data included in the debug report might contain is strongly recommended as data included in the debug report might contain
sensitive private information and the user should be notified about it as well sensitive private information and the user should be notified about it as well
as having a possibility to examine the data which had been gathered to check as having a possibility to examine the data which had been gathered to check
whether this is effectively the case and discard the debug report if it is. whether this is effectively the case and discard the debug report if it is.
wxDebugReportPreview is an abstract base class, currently the only concrete wxDebugReportPreview is an abstract base class, currently the only concrete
class deriving from it is class deriving from it is
wxDebugReportPreviewStd. wxDebugReportPreviewStd.
@library{wxqa} @library{wxqa}
@category{debugging} @category{debugging}
*/ */
class wxDebugReportPreview class wxDebugReportPreview
{ {
public: public:
/** /**
@@ -50,11 +50,11 @@ public:
/** /**
@class wxDebugReportCompress @class wxDebugReportCompress
@wxheader{debugrpt.h} @wxheader{debugrpt.h}
wxDebugReportCompress is a wxDebugReport which wxDebugReportCompress is a wxDebugReport which
compresses all the files in this debug report into a single .ZIP file in its compresses all the files in this debug report into a single .ZIP file in its
@c @e Process() function. @c @e Process() function.
@library{wxqa} @library{wxqa}
@category{debugging} @category{debugging}
*/ */
@@ -76,37 +76,37 @@ public:
/** /**
@class wxDebugReport @class wxDebugReport
@wxheader{debugrpt.h} @wxheader{debugrpt.h}
wxDebugReport is used to generate a debug report, containing information about wxDebugReport is used to generate a debug report, containing information about
the program current state. It is usually used from the program current state. It is usually used from
wxApp::OnFatalException as shown in the wxApp::OnFatalException as shown in the
sample. sample.
A wxDebugReport object contains one or more files. A few of them can be created A wxDebugReport object contains one or more files. A few of them can be created
by the by the
class itself but more can be created from the outside and then added to the class itself but more can be created from the outside and then added to the
report. Also note that several virtual functions may be overridden to further report. Also note that several virtual functions may be overridden to further
customize the class behaviour. customize the class behaviour.
Once a report is fully assembled, it can simply be left in the temporary Once a report is fully assembled, it can simply be left in the temporary
directory so that the user can email it to the developers (in which case you directory so that the user can email it to the developers (in which case you
should still use wxDebugReportCompress to should still use wxDebugReportCompress to
compress it in a single file) or uploaded to a Web server using compress it in a single file) or uploaded to a Web server using
wxDebugReportUpload (setting up the Web server wxDebugReportUpload (setting up the Web server
to accept uploads is your responsibility, of course). Other handlers, for to accept uploads is your responsibility, of course). Other handlers, for
example for example for
automatically emailing the report, can be defined as well but are not currently automatically emailing the report, can be defined as well but are not currently
included in wxWidgets. included in wxWidgets.
@library{wxqa} @library{wxqa}
@category{debugging} @category{debugging}
*/ */
class wxDebugReport class wxDebugReport
{ {
public: public:
/** /**
The constructor creates a temporary directory where the files that will The constructor creates a temporary directory where the files that will
be included in the report are created. Use be included in the report are created. Use
IsOk() to check for errors. IsOk() to check for errors.
*/ */
wxDebugReport(); wxDebugReport();
@@ -145,7 +145,7 @@ public:
/** /**
Adds the minidump file to the debug report. Adds the minidump file to the debug report.
Minidumps are only available under recent Win32 versions (@c dbghlp32.dll Minidumps are only available under recent Win32 versions (@c dbghlp32.dll
can be installed under older systems to make minidumps available). can be installed under older systems to make minidumps available).
*/ */
bool AddDump(Context ctx); bool AddDump(Context ctx);
@@ -216,7 +216,7 @@ public:
const wxString GetDirectory(); const wxString GetDirectory();
/** /**
Retrieves the name (relative to Retrieves the name (relative to
wxDebugReport::GetDirectory) and the description of the wxDebugReport::GetDirectory) and the description of the
file with the given index. If @e n is greater than or equal to the number of file with the given index. If @e n is greater than or equal to the number of
filse, @false is returned. filse, @false is returned.
@@ -229,14 +229,14 @@ public:
size_t GetFilesCount(); size_t GetFilesCount();
/** /**
Gets the name used as a base name for various files, by default Gets the name used as a base name for various files, by default
wxApp::GetAppName is used. wxApp::GetAppName is used.
*/ */
wxString GetReportName(); wxString GetReportName();
/** /**
Returns @true if the object was successfully initialized. If this method Returns @true if the object was successfully initialized. If this method
returns returns
@false the report can't be used. @false the report can't be used.
*/ */
#define bool IsOk() /* implementation is private */ #define bool IsOk() /* implementation is private */
@@ -249,7 +249,7 @@ public:
bool Process(); bool Process();
/** /**
Removes the file from report: this is used by Removes the file from report: this is used by
wxDebugReportPreview to allow the user to wxDebugReportPreview to allow the user to
remove files potentially containing private information from the report. remove files potentially containing private information from the report.
*/ */
@@ -266,11 +266,11 @@ public:
/** /**
@class wxDebugReportPreviewStd @class wxDebugReportPreviewStd
@wxheader{debugrpt.h} @wxheader{debugrpt.h}
wxDebugReportPreviewStd is a standard debug report preview window. It displays wxDebugReportPreviewStd is a standard debug report preview window. It displays
a GUIdialog allowing the user to examine the contents of a debug report, remove a GUIdialog allowing the user to examine the contents of a debug report, remove
files from and add notes to it. files from and add notes to it.
@library{wxqa} @library{wxqa}
@category{debugging} @category{debugging}
*/ */
@@ -283,7 +283,7 @@ public:
wxDebugReportPreviewStd(); wxDebugReportPreviewStd();
/** /**
Show the dialog, see Show the dialog, see
wxDebugReportPreview::Show for more wxDebugReportPreview::Show for more
information. information.
*/ */
@@ -294,11 +294,11 @@ public:
/** /**
@class wxDebugReportUpload @class wxDebugReportUpload
@wxheader{debugrpt.h} @wxheader{debugrpt.h}
This class is used to upload a compressed file using HTTP POST request. As this This class is used to upload a compressed file using HTTP POST request. As this
class derives from wxDebugReportCompress, before upload the report is class derives from wxDebugReportCompress, before upload the report is
compressed in a single .ZIP file. compressed in a single .ZIP file.
@library{wxqa} @library{wxqa}
@category{debugging} @category{debugging}
*/ */
@@ -324,7 +324,7 @@ public:
This function may be overridden in a derived class to show the output from This function may be overridden in a derived class to show the output from
curl: this may be an HTML page or anything else that the server returned. curl: this may be an HTML page or anything else that the server returned.
Value returned by this function becomes the return value of Value returned by this function becomes the return value of
wxDebugReport::Process. wxDebugReport::Process.
*/ */
bool OnServerReply(); bool OnServerReply();

View File

@@ -1,47 +1,47 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: defs.h // Name: defs.h
// Purpose: documentation for global functions // Purpose: documentation for global functions
// Author: wxWidgets team // Author: wxWidgets team
// RCS-ID: $Id$ // RCS-ID: $Id$
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
//@{ //@{
/** /**
These macros will swap the bytes of the @e value variable from little These macros will swap the bytes of the @e value variable from little
endian to big endian or vice versa unconditionally, i.e. independently of the endian to big endian or vice versa unconditionally, i.e. independently of the
current platform. current platform.
*/ */
wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value); wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value);
wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value); wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value);
wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value); wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value);
wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value); wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value);
//@} //@}
//@{ //@{
/** /**
This macro will swap the bytes of the @e value variable from little This macro will swap the bytes of the @e value variable from little
endian to big endian or vice versa if the program is compiled on a endian to big endian or vice versa if the program is compiled on a
little-endian architecture (such as Intel PCs). If the program has little-endian architecture (such as Intel PCs). If the program has
been compiled on a big-endian architecture, the value will be unchanged. been compiled on a big-endian architecture, the value will be unchanged.
Use these macros to read data from and write data to a file that stores Use these macros to read data from and write data to a file that stores
data in big-endian format. data in big-endian format.
*/ */
wxInt32 wxINT32_SWAP_ON_LE(wxInt32 value); wxInt32 wxINT32_SWAP_ON_LE(wxInt32 value);
wxUint32 wxUINT32_SWAP_ON_LE(wxUint32 value); wxUint32 wxUINT32_SWAP_ON_LE(wxUint32 value);
wxInt16 wxINT16_SWAP_ON_LE(wxInt16 value); wxInt16 wxINT16_SWAP_ON_LE(wxInt16 value);
wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value); wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value);
//@} //@}
/** /**
This macro is similar to wxDEPRECATED but can be used This macro is similar to wxDEPRECATED but can be used
to not only declare the function @e func as deprecated but to also provide to not only declare the function @e func as deprecated but to also provide
its (inline) implementation @e body. its (inline) implementation @e body.
It can be used as following: It can be used as following:
@code @code
class wxFoo class wxFoo
{ {
@@ -77,14 +77,14 @@ wxInt32 wxINT32_SWAP_ON_LE(wxInt32 value);
RefCounted() { m_nRef = 1; } RefCounted() { m_nRef = 1; }
void IncRef() { m_nRef++ ; } void IncRef() { m_nRef++ ; }
void DecRef() { if ( !--m_nRef ) delete this; } void DecRef() { if ( !--m_nRef ) delete this; }
private: private:
~RefCounted() { } ~RefCounted() { }
wxSUPPRESS_GCC_PRIVATE_DTOR(RefCounted) wxSUPPRESS_GCC_PRIVATE_DTOR(RefCounted)
}; };
@endcode @endcode
Notice that there should be no semicolon after this macro. Notice that there should be no semicolon after this macro.
*/ */
#define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) /* implementation is private */ #define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) /* implementation is private */
@@ -95,14 +95,14 @@ wxInt32 wxINT32_SWAP_ON_LE(wxInt32 value);
endian to big endian or vice versa if the program is compiled on a endian to big endian or vice versa if the program is compiled on a
big-endian architecture (such as Sun work stations). If the program has big-endian architecture (such as Sun work stations). If the program has
been compiled on a little-endian architecture, the value will be unchanged. been compiled on a little-endian architecture, the value will be unchanged.
Use these macros to read data from and write data to a file that stores Use these macros to read data from and write data to a file that stores
data in little-endian (for example Intel i386) format. data in little-endian (for example Intel i386) format.
*/ */
wxInt32 wxINT32_SWAP_ON_BE(wxInt32 value); wxInt32 wxINT32_SWAP_ON_BE(wxInt32 value);
wxUint32 wxUINT32_SWAP_ON_BE(wxUint32 value); wxUint32 wxUINT32_SWAP_ON_BE(wxUint32 value);
wxInt16 wxINT16_SWAP_ON_BE(wxInt16 value); wxInt16 wxINT16_SWAP_ON_BE(wxInt16 value);
wxUint16 wxUINT16_SWAP_ON_BE(wxUint16 value); wxUint16 wxUINT16_SWAP_ON_BE(wxUint16 value);
//@} //@}
/** /**
@@ -110,13 +110,13 @@ wxInt32 wxINT32_SWAP_ON_BE(wxInt32 value);
indicating that this function is deprecated (i.e. obsolete and planned to be indicating that this function is deprecated (i.e. obsolete and planned to be
removed in the future) when it is used. Only Visual C++ 7 and higher and g++ removed in the future) when it is used. Only Visual C++ 7 and higher and g++
compilers currently support this functionality. compilers currently support this functionality.
Example of use: Example of use:
@code @code
// old function, use wxString version instead // old function, use wxString version instead
wxDEPRECATED( void wxGetSomething(char *buf, size_t len) ); wxDEPRECATED( void wxGetSomething(char *buf, size_t len) );
// ... // ...
wxString wxGetSomething(); wxString wxGetSomething();
@endcode @endcode
@@ -128,7 +128,7 @@ wxInt32 wxINT32_SWAP_ON_BE(wxInt32 value);
which support it or its replacement for those that don't. It must be used to which support it or its replacement for those that don't. It must be used to
preserve the value of a @c va_list object if you need to use it after preserve the value of a @c va_list object if you need to use it after
passing it to another function because it can be modified by the latter. passing it to another function because it can be modified by the latter.
As with @c va_start, each call to @c wxVaCopy must have a matching As with @c va_start, each call to @c wxVaCopy must have a matching
@c va_end. @c va_end.
*/ */

View File

@@ -9,14 +9,14 @@
/** /**
@class wxDialog @class wxDialog
@wxheader{dialog.h} @wxheader{dialog.h}
A dialog box is a window with a title bar and sometimes a system menu, which A dialog box is a window with a title bar and sometimes a system menu, which
can be moved around the screen. It can contain controls and other windows and can be moved around the screen. It can contain controls and other windows and
is often used to allow the user to make some choice or to answer a question. is often used to allow the user to make some choice or to answer a question.
Dialogs can be made scrollable, automatically: please see @ref Dialogs can be made scrollable, automatically: please see @ref
overview_autoscrollingdialogs "Automatic scrolling dialogs" for further details. overview_autoscrollingdialogs "Automatic scrolling dialogs" for further details.
@beginStyleTable @beginStyleTable
@style{wxCAPTION}: @style{wxCAPTION}:
Puts a caption on the dialog box. Puts a caption on the dialog box.
@@ -56,10 +56,10 @@
On Mac OS X, frames with this style will be shown with a metallic On Mac OS X, frames with this style will be shown with a metallic
look. This is an extra style. look. This is an extra style.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxdialogoverview "wxDialog overview", wxFrame, @ref @ref overview_wxdialogoverview "wxDialog overview", wxFrame, @ref
overview_validatoroverview "Validator overview" overview_validatoroverview "Validator overview"
@@ -71,27 +71,27 @@ public:
/** /**
Constructor. Constructor.
@param parent @param parent
Can be @NULL, a frame or another dialog box. Can be @NULL, a frame or another dialog box.
@param id @param id
An identifier for the dialog. A value of -1 is taken to mean a default. An identifier for the dialog. A value of -1 is taken to mean a default.
@param title @param title
The title of the dialog. The title of the dialog.
@param pos @param pos
The dialog position. The value wxDefaultPosition indicates a default position, chosen by The dialog position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform. either the windowing system or wxWidgets, depending on platform.
@param size @param size
The dialog size. The value wxDefaultSize indicates a default size, chosen by The dialog size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform. either the windowing system or wxWidgets, depending on platform.
@param style @param style
The window style. See wxDialog. The window style. See wxDialog.
@param name @param name
Used to associate a name with the window, Used to associate a name with the window,
allowing the application user to set Motif resource values for allowing the application user to set Motif resource values for
individual dialog boxes. individual dialog boxes.
@@ -99,12 +99,12 @@ public:
@sa Create() @sa Create()
*/ */
wxDialog(); wxDialog();
wxDialog(wxWindow* parent, wxWindowID id, wxDialog(wxWindow* parent, wxWindowID id,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE, long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = "dialogBox"); const wxString& name = "dialogBox");
//@} //@}
/** /**
@@ -134,7 +134,7 @@ public:
/** /**
Centres the dialog box on the display. Centres the dialog box on the display.
@param direction @param direction
May be wxHORIZONTAL, wxVERTICAL or wxBOTH. May be wxHORIZONTAL, wxVERTICAL or wxBOTH.
*/ */
void Centre(int direction = wxBOTH); void Centre(int direction = wxBOTH);
@@ -152,12 +152,12 @@ public:
/** /**
Creates a sizer with standard buttons. @e flags is a bit list Creates a sizer with standard buttons. @e flags is a bit list
of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE, of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE,
wxHELP, wxNO_DEFAULT. wxHELP, wxNO_DEFAULT.
The sizer lays out the buttons in a manner appropriate to the platform. The sizer lays out the buttons in a manner appropriate to the platform.
This function uses CreateStdDialogButtonSizer() This function uses CreateStdDialogButtonSizer()
internally for most platforms but doesn't create the sizer at all for the internally for most platforms but doesn't create the sizer at all for the
platforms with hardware buttons (such as smartphones) for which it sets up the platforms with hardware buttons (such as smartphones) for which it sets up the
hardware buttons appropriately and returns @NULL, so don't forget to test that hardware buttons appropriately and returns @NULL, so don't forget to test that
@@ -166,12 +166,12 @@ public:
wxSizer* CreateButtonSizer(long flags); wxSizer* CreateButtonSizer(long flags);
/** /**
Creates a sizer with standard buttons using Creates a sizer with standard buttons using
CreateButtonSizer() separated from the rest CreateButtonSizer() separated from the rest
of the dialog contents by a horizontal wxStaticLine. of the dialog contents by a horizontal wxStaticLine.
Please notice that just like CreateButtonSizer() this function may return @c Please notice that just like CreateButtonSizer() this function may return @c
@NULL @NULL
if no buttons were created. if no buttons were created.
*/ */
wxSizer* CreateSeparatedButtonSizer(long flags); wxSizer* CreateSeparatedButtonSizer(long flags);
@@ -215,7 +215,7 @@ public:
Ends a modal dialog, passing a value to be returned from the ShowModal() Ends a modal dialog, passing a value to be returned from the ShowModal()
invocation. invocation.
@param retCode @param retCode
The value that should be returned by ShowModal. The value that should be returned by ShowModal.
@sa ShowModal(), GetReturnCode(), SetReturnCode() @sa ShowModal(), GetReturnCode(), SetReturnCode()
@@ -316,7 +316,7 @@ public:
/** /**
Iconizes or restores the dialog. Windows only. Iconizes or restores the dialog. Windows only.
@param iconize @param iconize
If @true, iconizes the dialog box; if @false, shows and restores it. If @true, iconizes the dialog box; if @false, shows and restores it.
@remarks Note that in Windows, iconization has no effect since dialog @remarks Note that in Windows, iconization has no effect since dialog
@@ -362,7 +362,7 @@ public:
/** /**
The default handler for wxEVT_SYS_COLOUR_CHANGED. The default handler for wxEVT_SYS_COLOUR_CHANGED.
@param event @param event
The colour change event. The colour change event.
@remarks Changes the dialog's colour to conform to the current settings @remarks Changes the dialog's colour to conform to the current settings
@@ -379,8 +379,8 @@ public:
/** /**
Sets the identifier to be used as OK button. When the button with this Sets the identifier to be used as OK button. When the button with this
identifier is pressed, the dialog calls wxWindow::Validate identifier is pressed, the dialog calls wxWindow::Validate
and wxWindow::TransferDataFromWindow and wxWindow::TransferDataFromWindow
and, if they both return @true, closes the dialog with @c wxID_OK return and, if they both return @true, closes the dialog with @c wxID_OK return
code. code.
@@ -395,15 +395,15 @@ public:
void SetAffirmativeId(int id); void SetAffirmativeId(int id);
/** /**
Sets the identifier of the button which should work like the standard Sets the identifier of the button which should work like the standard
@c CANCEL button in this dialog. When the button with this id is @c CANCEL button in this dialog. When the button with this id is
clicked, the dialog is closed. Also, when the user presses @c ESC clicked, the dialog is closed. Also, when the user presses @c ESC
key in the dialog or closes the dialog using the close button in the title bar, key in the dialog or closes the dialog using the close button in the title bar,
this is mapped to the click of the button with the specified id. this is mapped to the click of the button with the specified id.
By default, the escape id is the special value @c wxID_ANY meaning that By default, the escape id is the special value @c wxID_ANY meaning that
@c wxID_CANCEL button is used if it's present in the dialog and @c wxID_CANCEL button is used if it's present in the dialog and
otherwise the button with GetAffirmativeId() otherwise the button with GetAffirmativeId()
is used. Another special value for @e id is @c wxID_NONE meaning that is used. Another special value for @e id is @c wxID_NONE meaning that
@c ESC presses should be ignored. If any other value is given, it @c ESC presses should be ignored. If any other value is given, it
is interpreted as the id of the button to map the escape key to. is interpreted as the id of the button to map the escape key to.
@@ -413,7 +413,7 @@ public:
/** /**
Sets the icon for this dialog. Sets the icon for this dialog.
@param icon @param icon
The icon to associate with this dialog. The icon to associate with this dialog.
*/ */
void SetIcon(const wxIcon& icon); void SetIcon(const wxIcon& icon);
@@ -421,7 +421,7 @@ public:
/** /**
Sets the icons for this dialog. Sets the icons for this dialog.
@param icons @param icons
The icons to associate with this dialog. The icons to associate with this dialog.
*/ */
void SetIcons(const wxIconBundle& icons); void SetIcons(const wxIconBundle& icons);
@@ -472,7 +472,7 @@ public:
control control
until the dialog is hidden) or modeless (control returns immediately). until the dialog is hidden) or modeless (control returns immediately).
@param flag @param flag
If @true, the dialog will be modal, otherwise it will be modeless. If @true, the dialog will be modal, otherwise it will be modeless.
*/ */
void SetModal(bool flag); void SetModal(bool flag);
@@ -480,7 +480,7 @@ public:
/** /**
Sets the return code for this window. Sets the return code for this window.
@param retCode @param retCode
The integer return code, usually a control identifier. The integer return code, usually a control identifier.
@remarks A return code is normally associated with a modal dialog, where @remarks A return code is normally associated with a modal dialog, where
@@ -495,7 +495,7 @@ public:
/** /**
Hides or shows the dialog. Hides or shows the dialog.
@param show @param show
If @true, the dialog box is shown and brought to the front; If @true, the dialog box is shown and brought to the front;
otherwise the box is hidden. If @false and the dialog is otherwise the box is hidden. If @false and the dialog is
modal, control is returned to the calling program. modal, control is returned to the calling program.
@@ -519,25 +519,25 @@ public:
/** /**
@class wxDialogLayoutAdapter @class wxDialogLayoutAdapter
@wxheader{dialog.h} @wxheader{dialog.h}
This abstract class is the base for classes that help wxWidgets peform run-time This abstract class is the base for classes that help wxWidgets peform run-time
layout adaptation of dialogs. Principally, layout adaptation of dialogs. Principally,
this is to cater for small displays by making part of the dialog scroll, but this is to cater for small displays by making part of the dialog scroll, but
the application developer may find other the application developer may find other
uses for layout adaption. uses for layout adaption.
By default, there is one instance of wxStandardDialogLayoutAdapter By default, there is one instance of wxStandardDialogLayoutAdapter
which can perform adaptation for most custom dialogs and dialogs with book which can perform adaptation for most custom dialogs and dialogs with book
controls controls
such as wxPropertySheetDialog. such as wxPropertySheetDialog.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_autoscrollingdialogs "Automatic scrolling dialogs" @ref overview_autoscrollingdialogs "Automatic scrolling dialogs"
*/ */
class wxDialogLayoutAdapter class wxDialogLayoutAdapter
{ {
public: public:
/** /**
@@ -552,7 +552,7 @@ public:
/** /**
Override this to perform layout adaptation, such as making parts of the dialog Override this to perform layout adaptation, such as making parts of the dialog
scroll and resizing the dialog to fit the display. scroll and resizing the dialog to fit the display.
Normally this function will be called just before the dialog is shown. Normally this function will be called just before the dialog is shown.
*/ */
bool DoLayoutAdaptation(wxDialog* dialog); bool DoLayoutAdaptation(wxDialog* dialog);

View File

@@ -9,30 +9,30 @@
/** /**
@class wxDialUpManager @class wxDialUpManager
@wxheader{dialup.h} @wxheader{dialup.h}
This class encapsulates functions dealing with verifying the connection status This class encapsulates functions dealing with verifying the connection status
of the workstation (connected to the Internet via a direct connection, of the workstation (connected to the Internet via a direct connection,
connected through a modem or not connected at all) and to establish this connected through a modem or not connected at all) and to establish this
connection if possible/required (i.e. in the case of the modem). connection if possible/required (i.e. in the case of the modem).
The program may also wish to be notified about the change in the connection The program may also wish to be notified about the change in the connection
status (for example, to perform some action when the user connects to the status (for example, to perform some action when the user connects to the
network the next time or, on the contrary, to stop receiving data from the net network the next time or, on the contrary, to stop receiving data from the net
when the user hangs up the modem). For this, you need to use one of the event when the user hangs up the modem). For this, you need to use one of the event
macros described below. macros described below.
This class is different from other wxWidgets classes in that there is at most This class is different from other wxWidgets classes in that there is at most
one instance of this class in the program accessed via one instance of this class in the program accessed via
wxDialUpManager::Create and you can't wxDialUpManager::Create and you can't
create the objects of this class directly. create the objects of this class directly.
@library{wxcore} @library{wxcore}
@category{net} @category{net}
@seealso @seealso
@ref overview_sampledialup "dialup sample", wxDialUpEvent @ref overview_sampledialup "dialup sample", wxDialUpEvent
*/ */
class wxDialUpManager class wxDialUpManager
{ {
public: public:
/** /**
@@ -41,7 +41,7 @@ public:
~wxDialUpManager(); ~wxDialUpManager();
/** /**
Cancel dialing the number initiated with Dial() Cancel dialing the number initiated with Dial()
with async parameter equal to @true. with async parameter equal to @true.
Note that this won't result in DISCONNECTED event being sent. Note that this won't result in DISCONNECTED event being sent.
@@ -60,7 +60,7 @@ public:
/** /**
Dial the given ISP, use @e username and @e password to authenticate. Dial the given ISP, use @e username and @e password to authenticate.
The parameters are only used under Windows currently, for Unix you should use The parameters are only used under Windows currently, for Unix you should use
SetConnectCommand() to customize this SetConnectCommand() to customize this
functions behaviour. functions behaviour.
@@ -88,7 +88,7 @@ public:
void DisableAutoCheckOnlineStatus(); void DisableAutoCheckOnlineStatus();
/** /**
Enable automatic checks for the connection status and sending of Enable automatic checks for the connection status and sending of
@c wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval @c wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval
parameter is only for Unix where we do the check manually and specifies how parameter is only for Unix where we do the check manually and specifies how
often should we repeat the check (each minute by default). Under Windows, the often should we repeat the check (each minute by default). Under Windows, the
@@ -141,7 +141,7 @@ public:
/** /**
Returns @true if the computer is connected to the network: under Windows, Returns @true if the computer is connected to the network: under Windows,
this just means that a RAS connection exists, under Unix we check that this just means that a RAS connection exists, under Unix we check that
the "well-known host" (as specified by the "well-known host" (as specified by
wxDialUpManager::SetWellKnownHost) is reachable. wxDialUpManager::SetWellKnownHost) is reachable.
*/ */
bool IsOnline(); bool IsOnline();
@@ -179,10 +179,10 @@ public:
/** /**
@class wxDialUpEvent @class wxDialUpEvent
@wxheader{dialup.h} @wxheader{dialup.h}
This is the event class for the dialup events sent by This is the event class for the dialup events sent by
wxDialUpManager. wxDialUpManager.
@library{wxcore} @library{wxcore}
@category{events} @category{events}
*/ */

View File

@@ -9,49 +9,49 @@
/** /**
@class wxDirTraverser @class wxDirTraverser
@wxheader{dir.h} @wxheader{dir.h}
wxDirTraverser is an abstract interface which must be implemented by objects wxDirTraverser is an abstract interface which must be implemented by objects
passed to wxDir::Traverse function. passed to wxDir::Traverse function.
Example of use (this works almost like wxDir::GetAllFiles): Example of use (this works almost like wxDir::GetAllFiles):
@code @code
class wxDirTraverserSimple : public wxDirTraverser class wxDirTraverserSimple : public wxDirTraverser
{ {
public: public:
wxDirTraverserSimple(wxArrayString& files) : m_files(files) { } wxDirTraverserSimple(wxArrayString& files) : m_files(files) { }
virtual wxDirTraverseResult OnFile(const wxString& filename) virtual wxDirTraverseResult OnFile(const wxString& filename)
{ {
m_files.Add(filename); m_files.Add(filename);
return wxDIR_CONTINUE; return wxDIR_CONTINUE;
} }
virtual wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname)) virtual wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname))
{ {
return wxDIR_CONTINUE; return wxDIR_CONTINUE;
} }
private: private:
wxArrayString& m_files; wxArrayString& m_files;
}; };
// get the names of all files in the array // get the names of all files in the array
wxArrayString files; wxArrayString files;
wxDirTraverserSimple traverser(files); wxDirTraverserSimple traverser(files);
wxDir dir(dirname); wxDir dir(dirname);
dir.Traverse(traverser); dir.Traverse(traverser);
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{file} @category{file}
*/ */
class wxDirTraverser class wxDirTraverser
{ {
public: public:
/** /**
This function is called for each directory. It may return @c wxSIR_STOP This function is called for each directory. It may return @c wxSIR_STOP
to abort traversing completely, @c wxDIR_IGNORE to skip this directory but to abort traversing completely, @c wxDIR_IGNORE to skip this directory but
continue with others or @c wxDIR_CONTINUE to enumerate all files and continue with others or @c wxDIR_CONTINUE to enumerate all files and
subdirectories in this directory. subdirectories in this directory.
@@ -62,7 +62,7 @@ public:
/** /**
This function is called for each file. It may return @c wxDIR_STOP to abort This function is called for each file. It may return @c wxDIR_STOP to abort
traversing (for example, if the file being searched is found) or traversing (for example, if the file being searched is found) or
@c wxDIR_CONTINUE to proceed. @c wxDIR_CONTINUE to proceed.
This is a pure virtual function and must be implemented in the derived class. This is a pure virtual function and must be implemented in the derived class.
@@ -72,7 +72,7 @@ public:
/** /**
This function is called for each directory which we failed to open for This function is called for each directory which we failed to open for
enumerating. It may return @c wxSIR_STOP to abort traversing completely, enumerating. It may return @c wxSIR_STOP to abort traversing completely,
@c wxDIR_IGNORE to skip this directory but continue with others or @c wxDIR_IGNORE to skip this directory but continue with others or
@c wxDIR_CONTINUE to retry opening this directory once again. @c wxDIR_CONTINUE to retry opening this directory once again.
The base class version always returns @c wxDIR_IGNORE. The base class version always returns @c wxDIR_IGNORE.
@@ -84,53 +84,53 @@ public:
/** /**
@class wxDir @class wxDir
@wxheader{dir.h} @wxheader{dir.h}
wxDir is a portable equivalent of Unix open/read/closedir functions which wxDir is a portable equivalent of Unix open/read/closedir functions which
allow enumerating of the files in a directory. wxDir allows to enumerate files allow enumerating of the files in a directory. wxDir allows to enumerate files
as well as directories. as well as directories.
wxDir also provides a flexible way to enumerate files recursively using wxDir also provides a flexible way to enumerate files recursively using
wxDir::Traverse or a simpler wxDir::Traverse or a simpler
wxDir::GetAllFiles function. wxDir::GetAllFiles function.
Example of use: Example of use:
@code @code
wxDir dir(wxGetCwd()); wxDir dir(wxGetCwd());
if ( !dir.IsOpened() ) if ( !dir.IsOpened() )
{ {
// deal with the error here - wxDir would already log an error message // deal with the error here - wxDir would already log an error message
// explaining the exact reason of the failure // explaining the exact reason of the failure
return; return;
} }
puts("Enumerating object files in current directory:"); puts("Enumerating object files in current directory:");
wxString filename; wxString filename;
bool cont = dir.GetFirst(, filespec, flags); bool cont = dir.GetFirst(, filespec, flags);
while ( cont ) while ( cont )
{ {
printf("%s\n", filename.c_str()); printf("%s\n", filename.c_str());
cont = dir.GetNext(); cont = dir.GetNext();
} }
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{file} @category{file}
*/ */
class wxDir class wxDir
{ {
public: public:
//@{ //@{
/** /**
Opens the directory for enumeration, use IsOpened() Opens the directory for enumeration, use IsOpened()
to test for errors. to test for errors.
*/ */
wxDir(); wxDir();
wxDir(const wxString& dir); wxDir(const wxString& dir);
//@} //@}
/** /**
@@ -149,7 +149,7 @@ public:
or an empty string if there are no files matching it. or an empty string if there are no files matching it.
The @e flags parameter may or may not include @c wxDIR_FILES, the The @e flags parameter may or may not include @c wxDIR_FILES, the
function always behaves as if it were specified. By default, @e flags function always behaves as if it were specified. By default, @e flags
includes @c wxDIR_DIRS and so the function recurses into the subdirectories includes @c wxDIR_DIRS and so the function recurses into the subdirectories
but if this flag is not specified, the function restricts the search only to but if this flag is not specified, the function restricts the search only to
the directory @e dirname itself. the directory @e dirname itself.
@@ -161,7 +161,7 @@ public:
int flags = wxDIR_DEFAULT); int flags = wxDIR_DEFAULT);
/** /**
The function appends the names of all the files under directory @e dirname The function appends the names of all the files under directory @e dirname
to the array @e files (note that its old content is preserved). Only files to the array @e files (note that its old content is preserved). Only files
matching the @e filespec are taken, with empty spec matching all the files. matching the @e filespec are taken, with empty spec matching all the files.
@@ -218,7 +218,7 @@ public:
wxArrayString* filesSkipped = @NULL); wxArrayString* filesSkipped = @NULL);
/** /**
Returns @true if the directory contains any files matching the given Returns @true if the directory contains any files matching the given
@e filespec. If @e filespec is empty, look for any files at all. In any @e filespec. If @e filespec is empty, look for any files at all. In any
case, even hidden files are taken into account. case, even hidden files are taken into account.
*/ */
@@ -232,7 +232,7 @@ public:
bool HasSubDirs(const wxString& dirspec = wxEmptyString); bool HasSubDirs(const wxString& dirspec = wxEmptyString);
/** /**
Returns @true if the directory was successfully opened by a previous call to Returns @true if the directory was successfully opened by a previous call to
Open(). Open().
*/ */
bool IsOpened(); bool IsOpened();
@@ -245,10 +245,10 @@ public:
/** /**
Enumerate all files and directories under the given directory recursively Enumerate all files and directories under the given directory recursively
calling the element of the provided wxDirTraverser calling the element of the provided wxDirTraverser
object for each of them. object for each of them.
More precisely, the function will really recurse into subdirectories if More precisely, the function will really recurse into subdirectories if
@e flags contains @c wxDIR_DIRS flag. It will ignore the files (but @e flags contains @c wxDIR_DIRS flag. It will ignore the files (but
still possibly recurse into subdirectories) if @c wxDIR_FILES flag is still possibly recurse into subdirectories) if @c wxDIR_FILES flag is
given. given.

View File

@@ -9,13 +9,13 @@
/** /**
@class wxGenericDirCtrl @class wxGenericDirCtrl
@wxheader{dirctrl.h} @wxheader{dirctrl.h}
This control can be used to place a directory listing (with optional files) on This control can be used to place a directory listing (with optional files) on
an arbitrary window. an arbitrary window.
The control contains a wxTreeCtrl window representing the directory The control contains a wxTreeCtrl window representing the directory
hierarchy, and optionally, a wxChoice window containing a list of filters. hierarchy, and optionally, a wxChoice window containing a list of filters.
@library{wxbase} @library{wxbase}
@category{ctrl} @category{ctrl}
@appearance{genericdirctrl.png} @appearance{genericdirctrl.png}
@@ -27,46 +27,46 @@ public:
/** /**
Main constructor. Main constructor.
@param parent @param parent
Parent window. Parent window.
@param id @param id
Window identifier. Window identifier.
@param dir @param dir
Initial folder. Initial folder.
@param pos @param pos
Position. Position.
@param size @param size
Size. Size.
@param style @param style
Window style. Please see wxGenericDirCtrl for a list of possible styles. Window style. Please see wxGenericDirCtrl for a list of possible styles.
@param filter @param filter
A filter string, using the same syntax as that for wxFileDialog. This may be A filter string, using the same syntax as that for wxFileDialog. This may be
empty if filters empty if filters
are not being used. are not being used.
Example: "All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg" Example: "All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg"
@param defaultFilter @param defaultFilter
The zero-indexed default filter setting. The zero-indexed default filter setting.
@param name @param name
The window name. The window name.
*/ */
wxGenericDirCtrl(); wxGenericDirCtrl();
wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1, wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1,
const wxString& dir = wxDirDialogDefaultFolderStr, const wxString& dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDIRCTRL_3D_INTERNAL|wxBORDER_SUNKEN, long style = wxDIRCTRL_3D_INTERNAL|wxBORDER_SUNKEN,
const wxString& filter = wxEmptyString, const wxString& filter = wxEmptyString,
int defaultFilter = 0, int defaultFilter = 0,
const wxString& name = wxTreeCtrlNameStr); const wxString& name = wxTreeCtrlNameStr);
//@} //@}
/** /**
@@ -176,7 +176,7 @@ public:
void SetPath(const wxString& path); void SetPath(const wxString& path);
/** /**
@param show @param show
If @true, hidden folders and files will be displayed by the If @true, hidden folders and files will be displayed by the
control. If @false, they will not be displayed. control. If @false, they will not be displayed.
*/ */

View File

@@ -9,9 +9,9 @@
/** /**
@class wxDirDialog @class wxDirDialog
@wxheader{dirdlg.h} @wxheader{dirdlg.h}
This class represents the directory chooser dialog. This class represents the directory chooser dialog.
@beginStyleTable @beginStyleTable
@style{wxDD_DEFAULT_STYLE}: @style{wxDD_DEFAULT_STYLE}:
Equivalent to a combination of wxDEFAULT_DIALOG_STYLE and Equivalent to a combination of wxDEFAULT_DIALOG_STYLE and
@@ -25,10 +25,10 @@
Change the current working directory to the directory chosen by the Change the current working directory to the directory chosen by the
user. user.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxdirdialogoverview "wxDirDialog overview", wxFileDialog @ref overview_wxdirdialogoverview "wxDirDialog overview", wxFileDialog
*/ */
@@ -39,25 +39,25 @@ public:
Constructor. Use ShowModal() to show Constructor. Use ShowModal() to show
the dialog. the dialog.
@param parent @param parent
Parent window. Parent window.
@param message @param message
Message to show on the dialog. Message to show on the dialog.
@param defaultPath @param defaultPath
The default path, or the empty string. The default path, or the empty string.
@param style @param style
The dialog style. See wxDirDialog The dialog style. See wxDirDialog
@param pos @param pos
Dialog position. Ignored under Windows. Dialog position. Ignored under Windows.
@param size @param size
Dialog size. Ignored under Windows. Dialog size. Ignored under Windows.
@param name @param name
The dialog name, not used. The dialog name, not used.
*/ */
wxDirDialog(wxWindow* parent, wxDirDialog(wxWindow* parent,
@@ -109,7 +109,7 @@ public:
Pops up a directory selector dialog. The arguments have the same meaning as Pops up a directory selector dialog. The arguments have the same meaning as
those of wxDirDialog::wxDirDialog(). The message is displayed at the top, those of wxDirDialog::wxDirDialog(). The message is displayed at the top,
and the default_path, if specified, is set as the initial selection. and the default_path, if specified, is set as the initial selection.
The application must check for an empty return value (if the user pressed The application must check for an empty return value (if the user pressed
Cancel). For example: Cancel). For example:
@code @code

View File

@@ -9,22 +9,22 @@
/** /**
@class wxDisplay @class wxDisplay
@wxheader{display.h} @wxheader{display.h}
Determines the sizes and locations of displays connected to the system. Determines the sizes and locations of displays connected to the system.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxClientDisplayRect, wxDisplaySize, wxDisplaySizeMM wxClientDisplayRect, wxDisplaySize, wxDisplaySizeMM
*/ */
class wxDisplay class wxDisplay
{ {
public: public:
/** /**
Constructor, setting up a wxDisplay instance with the specified display. Constructor, setting up a wxDisplay instance with the specified display.
@param index @param index
The index of the display to use. This must be non-negative The index of the display to use. This must be non-negative
and lower than the value returned by GetCount(). and lower than the value returned by GetCount().
*/ */
@@ -41,13 +41,13 @@ public:
If wxDefaultVideoMode is passed in as the mode parameter, If wxDefaultVideoMode is passed in as the mode parameter,
the defined behaviour is that wxDisplay will reset the video the defined behaviour is that wxDisplay will reset the video
mode to the default mode used by the display. On Windows, mode to the default mode used by the display. On Windows,
the behavior is normal. However, there are differences on other the behavior is normal. However, there are differences on other
platforms. On Unix variations using X11 extensions it should platforms. On Unix variations using X11 extensions it should
behave as defined, but some irregularities may occur. behave as defined, but some irregularities may occur.
On wxMac passing in wxDefaultVideoMode as the mode On wxMac passing in wxDefaultVideoMode as the mode
parameter does nothing. This happens because carbon parameter does nothing. This happens because carbon
no longer has access to DMUseScreenPrefs, an undocumented no longer has access to DMUseScreenPrefs, an undocumented
function that changed the video mode to the system function that changed the video mode to the system
default by using the system's 'scrn' resource. default by using the system's 'scrn' resource.
@@ -78,10 +78,10 @@ public:
int GetDepth(); int GetDepth();
/** /**
Returns the index of the display on which the given point lies. Returns 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. @c wxNOT_FOUND if the point is not on any connected display.
@param pt @param pt
The point to locate. The point to locate.
*/ */
static int GetFromPoint(const wxPoint& pt); static int GetFromPoint(const wxPoint& pt);
@@ -94,7 +94,7 @@ public:
Returns @c wxNOT_FOUND if the window is not on any connected display. Returns @c wxNOT_FOUND if the window is not on any connected display.
@param win @param win
The window to locate. The window to locate.
*/ */
static int GetFromWindow(const wxWindow* win); static int GetFromWindow(const wxWindow* win);
@@ -107,7 +107,7 @@ public:
/** /**
Fills and returns an array with all the video modes that Fills and returns an array with all the video modes that
are supported by this display, or video modes that are are supported by this display, or video modes that are
supported by this display and match the mode parameter supported by this display and match the mode parameter
(if mode is not wxDefaultVideoMode). (if mode is not wxDefaultVideoMode).
*/ */

View File

@@ -9,12 +9,12 @@
/** /**
@class wxTextDropTarget @class wxTextDropTarget
@wxheader{dnd.h} @wxheader{dnd.h}
A predefined drop target for dealing with text data. A predefined drop target for dealing with text data.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDropSource, @ref overview_wxdndoverview "Drag and drop overview", wxDropSource,
wxDropTarget, wxFileDropTarget wxDropTarget, wxFileDropTarget
@@ -36,13 +36,13 @@ public:
/** /**
Override this function to receive dropped text. Override this function to receive dropped text.
@param x @param x
The x coordinate of the mouse. The x coordinate of the mouse.
@param y @param y
The y coordinate of the mouse. The y coordinate of the mouse.
@param data @param data
The data being dropped: a wxString. The data being dropped: a wxString.
*/ */
virtual bool OnDropText(wxCoord x, wxCoord y, virtual bool OnDropText(wxCoord x, wxCoord y,
@@ -53,14 +53,14 @@ public:
/** /**
@class wxDropTarget @class wxDropTarget
@wxheader{dnd.h} @wxheader{dnd.h}
This class represents a target for a drag and drop operation. A wxDataObject This class represents a target for a drag and drop operation. A wxDataObject
can be associated with it and by default, this object will be filled with the can be associated with it and by default, this object will be filled with the
data from the data from the
drag source, if the data formats supported by the data object match the drag drag source, if the data formats supported by the data object match the drag
source data source data
format. format.
There are various virtual handler functions defined in this class which may be There are various virtual handler functions defined in this class which may be
overridden overridden
to give visual feedback or react in a more fine-tuned way, e.g. by not to give visual feedback or react in a more fine-tuned way, e.g. by not
@@ -69,18 +69,18 @@ public:
calls is calls is
wxDropTarget::OnEnter, possibly many times wxDropTarget::OnDragOver, wxDropTarget::OnEnter, possibly many times wxDropTarget::OnDragOver,
wxDropTarget::OnDrop and finally wxDropTarget::OnData. wxDropTarget::OnDrop and finally wxDropTarget::OnData.
See @ref overview_wxdndoverview "Drag and drop overview" and @ref See @ref overview_wxdndoverview "Drag and drop overview" and @ref
overview_wxdataobjectoverview "wxDataObject overview" overview_wxdataobjectoverview "wxDataObject overview"
for more information. for more information.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
wxDropSource, wxTextDropTarget, wxFileDropTarget, wxDataFormat, wxDataObject wxDropSource, wxTextDropTarget, wxFileDropTarget, wxDataFormat, wxDataObject
*/ */
class wxDropTarget class wxDropTarget
{ {
public: public:
/** /**
@@ -95,7 +95,7 @@ public:
/** /**
This method may only be called from within OnData(). This method may only be called from within OnData().
By default, this method copies the data from the drop source to the By default, this method copies the data from the drop source to the
wxDataObject associated with this drop target, wxDataObject associated with this drop target,
calling its wxDataObject::SetData method. calling its wxDataObject::SetData method.
*/ */
@@ -110,16 +110,16 @@ public:
wxDragResult def); wxDragResult def);
/** /**
Called when the mouse is being dragged over the drop target. By default, Called when the mouse is being dragged over the drop target. By default,
this calls functions return the suggested return value @e def. this calls functions return the suggested return value @e def.
@param x @param x
The x coordinate of the mouse. The x coordinate of the mouse.
@param y @param y
The y coordinate of the mouse. The y coordinate of the mouse.
@param def @param def
Suggested value for return value. Determined by SHIFT or CONTROL key states. Suggested value for return value. Determined by SHIFT or CONTROL key states.
@returns Returns the desired operation or wxDragNone. This is used for @returns Returns the desired operation or wxDragNone. This is used for
@@ -133,10 +133,10 @@ public:
Called when the user drops a data object on the target. Return @false to veto Called when the user drops a data object on the target. Return @false to veto
the operation. the operation.
@param x @param x
The x coordinate of the mouse. The x coordinate of the mouse.
@param y @param y
The y coordinate of the mouse. The y coordinate of the mouse.
@returns Return @true to accept the data, @false to veto the operation. @returns Return @true to accept the data, @false to veto the operation.
@@ -147,13 +147,13 @@ public:
Called when the mouse enters the drop target. By default, this calls Called when the mouse enters the drop target. By default, this calls
OnDragOver(). OnDragOver().
@param x @param x
The x coordinate of the mouse. The x coordinate of the mouse.
@param y @param y
The y coordinate of the mouse. The y coordinate of the mouse.
@param def @param def
Suggested default for return value. Determined by SHIFT or CONTROL key states. Suggested default for return value. Determined by SHIFT or CONTROL key states.
@returns Returns the desired operation or wxDragNone. This is used for @returns Returns the desired operation or wxDragNone. This is used for
@@ -169,7 +169,7 @@ public:
virtual void OnLeave(); virtual void OnLeave();
/** /**
Sets the data wxDataObject associated with the Sets the data wxDataObject associated with the
drop target and deletes any previously associated data object. drop target and deletes any previously associated data object.
*/ */
void SetDataObject(wxDataObject* data); void SetDataObject(wxDataObject* data);
@@ -179,27 +179,27 @@ public:
/** /**
@class wxDropSource @class wxDropSource
@wxheader{dnd.h} @wxheader{dnd.h}
This class represents a source for a drag and drop operation. This class represents a source for a drag and drop operation.
See @ref overview_wxdndoverview "Drag and drop overview" and @ref See @ref overview_wxdndoverview "Drag and drop overview" and @ref
overview_wxdataobjectoverview "wxDataObject overview" overview_wxdataobjectoverview "wxDataObject overview"
for more information. for more information.
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
wxDropTarget, wxTextDropTarget, wxFileDropTarget wxDropTarget, wxTextDropTarget, wxFileDropTarget
*/ */
class wxDropSource class wxDropSource
{ {
public: public:
//@{ //@{
/** /**
The constructors for wxDataObject. The constructors for wxDataObject.
If you use the constructor without @e data parameter you must call If you use the constructor without @e data parameter you must call
SetData() later. SetData() later.
Note that the exact type of @e iconCopy and subsequent parameters differs Note that the exact type of @e iconCopy and subsequent parameters differs
@@ -207,26 +207,26 @@ public:
You should use the macro wxDROP_ICON in portable You should use the macro wxDROP_ICON in portable
programs instead of directly using either of these types. programs instead of directly using either of these types.
@param win @param win
The window which initiates the drag and drop operation. The window which initiates the drag and drop operation.
@param iconCopy @param iconCopy
The icon or cursor used for feedback for copy operation. The icon or cursor used for feedback for copy operation.
@param iconMove @param iconMove
The icon or cursor used for feedback for move operation. The icon or cursor used for feedback for move operation.
@param iconNone @param iconNone
The icon or cursor used for feedback when operation can't be done. The icon or cursor used for feedback when operation can't be done.
*/ */
wxDropSource(wxWindow* win = @NULL, wxDropSource(wxWindow* win = @NULL,
const wxIconOrCursor& iconCopy = wxNullIconOrCursor, const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
const wxIconOrCursor& iconMove = wxNullIconOrCursor, const wxIconOrCursor& iconMove = wxNullIconOrCursor,
const wxIconOrCursor& iconNone = wxNullIconOrCursor); const wxIconOrCursor& iconNone = wxNullIconOrCursor);
wxDropSource(wxDataObject& data, wxWindow* win = @NULL, wxDropSource(wxDataObject& data, wxWindow* win = @NULL,
const wxIconOrCursor& iconCopy = wxNullIconOrCursor, const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
const wxIconOrCursor& iconMove = wxNullIconOrCursor, const wxIconOrCursor& iconMove = wxNullIconOrCursor,
const wxIconOrCursor& iconNone = wxNullIconOrCursor); const wxIconOrCursor& iconNone = wxNullIconOrCursor);
//@} //@}
/** /**
@@ -239,13 +239,13 @@ public:
the drag-and-drop operation which will terminate when the user releases the the drag-and-drop operation which will terminate when the user releases the
mouse. mouse.
@param flags @param flags
If wxDrag_AllowMove is included in the flags, data may If wxDrag_AllowMove is included in the flags, data may
be moved and not only copied (default). If wxDrag_DefaultMove is be moved and not only copied (default). If wxDrag_DefaultMove is
specified (which includes the previous flag), this is even the default specified (which includes the previous flag), this is even the default
operation operation
@returns Returns the operation requested by the user, may be wxDragCopy, @returns Returns the operation requested by the user, may be wxDragCopy,
wxDragMove, wxDragLink, wxDragCancel or wxDragNone if wxDragMove, wxDragLink, wxDragCancel or wxDragNone if
an error occurred. an error occurred.
*/ */
@@ -263,11 +263,11 @@ public:
not be too not be too
slow. slow.
@param effect @param effect
The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and
wxDragNone. wxDragNone.
@param scrolling @param scrolling
@true if the window is scrolling. MSW only. @true if the window is scrolling. MSW only.
@returns Return @false if you want default feedback, or @true if you @returns Return @false if you want default feedback, or @true if you
@@ -279,16 +279,16 @@ public:
/** /**
Set the icon to use for a certain drag result. Set the icon to use for a certain drag result.
@param res @param res
The drag result to set the icon for. The drag result to set the icon for.
@param cursor @param cursor
The ion to show when this drag result occurs. The ion to show when this drag result occurs.
*/ */
void SetCursor(wxDragResult res, const wxCursor& cursor); void SetCursor(wxDragResult res, const wxCursor& cursor);
/** /**
Sets the data wxDataObject associated with the Sets the data wxDataObject associated with the
drop source. This will not delete any previously associated data. drop source. This will not delete any previously associated data.
*/ */
void SetData(wxDataObject& data); void SetData(wxDataObject& data);
@@ -298,13 +298,13 @@ public:
/** /**
@class wxFileDropTarget @class wxFileDropTarget
@wxheader{dnd.h} @wxheader{dnd.h}
This is a @ref overview_wxdroptarget "drop target" which accepts files (dragged This is a @ref overview_wxdroptarget "drop target" which accepts files (dragged
from File Manager or Explorer). from File Manager or Explorer).
@library{wxcore} @library{wxcore}
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDropSource, @ref overview_wxdndoverview "Drag and drop overview", wxDropSource,
wxDropTarget, wxTextDropTarget wxDropTarget, wxTextDropTarget
@@ -326,13 +326,13 @@ public:
/** /**
Override this function to receive dropped files. Override this function to receive dropped files.
@param x @param x
The x coordinate of the mouse. The x coordinate of the mouse.
@param y @param y
The y coordinate of the mouse. The y coordinate of the mouse.
@param filenames @param filenames
An array of filenames. An array of filenames.
*/ */
virtual bool OnDropFiles(wxCoord x, wxCoord y, virtual bool OnDropFiles(wxCoord x, wxCoord y,
@@ -348,7 +348,7 @@ public:
This macro creates either a cursor (MSW) or an icon (elsewhere) with the given This macro creates either a cursor (MSW) or an icon (elsewhere) with the given
name. Under MSW, the cursor is loaded from the resource file and the icon is name. Under MSW, the cursor is loaded from the resource file and the icon is
loaded from XPM file under other platforms. loaded from XPM file under other platforms.
This macro should be used with This macro should be used with
@ref wxDropSource::wxdropsource "wxDropSource constructor". @ref wxDropSource::wxdropsource "wxDropSource constructor".
*/ */

View File

@@ -9,19 +9,19 @@
/** /**
@class wxDocMDIParentFrame @class wxDocMDIParentFrame
@wxheader{docmdi.h} @wxheader{docmdi.h}
The wxDocMDIParentFrame class provides a default top-level frame for The wxDocMDIParentFrame class provides a default top-level frame for
applications using the document/view framework. This class can only be used for applications using the document/view framework. This class can only be used for
MDI parent frames. MDI parent frames.
It cooperates with the wxView, wxDocument, It cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplates classes. wxDocManager and wxDocTemplates classes.
See the example application in @c samples/docview. See the example application in @c samples/docview.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxMDIParentFrame @ref overview_docviewoverview "Document/view overview", wxMDIParentFrame
*/ */
@@ -33,13 +33,13 @@ public:
Constructor. Constructor.
*/ */
wxDocMDIParentFrame(); wxDocMDIParentFrame();
wxDocMDIParentFrame(wxDocManager* manager, wxFrame * parent, wxDocMDIParentFrame(wxDocManager* manager, wxFrame * parent,
wxWindowID id, wxWindowID id,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = "frame"); const wxString& name = "frame");
//@} //@}
/** /**
@@ -71,19 +71,19 @@ public:
/** /**
@class wxDocMDIChildFrame @class wxDocMDIChildFrame
@wxheader{docmdi.h} @wxheader{docmdi.h}
The wxDocMDIChildFrame class provides a default frame for displaying documents The wxDocMDIChildFrame class provides a default frame for displaying documents
on separate windows. This class can only be used for MDI child frames. on separate windows. This class can only be used for MDI child frames.
The class is part of the document/view framework supported by wxWidgets, The class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument, and cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplate classes. wxDocManager and wxDocTemplate classes.
See the example application in @c samples/docview. See the example application in @c samples/docview.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxMDIChildFrame @ref overview_docviewoverview "Document/view overview", wxMDIChildFrame
*/ */

View File

@@ -9,13 +9,13 @@
/** /**
@class wxDocTemplate @class wxDocTemplate
@wxheader{docview.h} @wxheader{docview.h}
The wxDocTemplate class is used to model the relationship between a The wxDocTemplate class is used to model the relationship between a
document class and a view class. document class and a view class.
@library{wxcore} @library{wxcore}
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_wxdoctemplateoverview "wxDocTemplate overview", wxDocument, wxView @ref overview_wxdoctemplateoverview "wxDocTemplate overview", wxDocument, wxView
*/ */
@@ -287,15 +287,15 @@ public:
/** /**
@class wxDocManager @class wxDocManager
@wxheader{docview.h} @wxheader{docview.h}
The wxDocManager class is part of the document/view framework supported by The wxDocManager class is part of the document/view framework supported by
wxWidgets, wxWidgets,
and cooperates with the wxView, wxDocument and cooperates with the wxView, wxDocument
and wxDocTemplate classes. and wxDocTemplate classes.
@library{wxcore} @library{wxcore}
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_wxdocmanageroverview "wxDocManager overview", wxDocument, wxView, @ref overview_wxdocmanageroverview "wxDocManager overview", wxDocument, wxView,
wxDocTemplate, wxFileHistory wxDocTemplate, wxFileHistory
@@ -393,7 +393,7 @@ public:
Appends the files in the history list, to the given menu only. Appends the files in the history list, to the given menu only.
*/ */
void FileHistoryAddFilesToMenu(); void FileHistoryAddFilesToMenu();
void FileHistoryAddFilesToMenu(wxMenu* menu); void FileHistoryAddFilesToMenu(wxMenu* menu);
//@} //@}
/** /**
@@ -570,16 +570,16 @@ public:
template). template).
This function is used in CreateDocument(). This function is used in CreateDocument().
@param templates @param templates
Pointer to an array of templates from which to choose a desired template. Pointer to an array of templates from which to choose a desired template.
@param noTemplates @param noTemplates
Number of templates being pointed to by the templates pointer. Number of templates being pointed to by the templates pointer.
@param sort @param sort
If more than one template is passed in in templates, If more than one template is passed in in templates,
then this parameter indicates whether the list of templates that the user 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. will have to choose from is sorted or not when shown the choice box dialog.
Default is @false. Default is @false.
*/ */
wxDocTemplate * SelectDocumentType(wxDocTemplate ** templates, wxDocTemplate * SelectDocumentType(wxDocTemplate ** templates,
@@ -594,16 +594,16 @@ public:
those relevant to the document in question, and often there will only be one those relevant to the document in question, and often there will only be one
such. such.
@param templates @param templates
Pointer to an array of templates from which to choose a desired template. Pointer to an array of templates from which to choose a desired template.
@param noTemplates @param noTemplates
Number of templates being pointed to by the templates pointer. Number of templates being pointed to by the templates pointer.
@param sort @param sort
If more than one template is passed in in templates, If more than one template is passed in in templates,
then this parameter indicates whether the list of templates that the user 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. will have to choose from is sorted or not when shown the choice box dialog.
Default is @false. Default is @false.
*/ */
wxDocTemplate * SelectViewType(wxDocTemplate ** templates, wxDocTemplate * SelectViewType(wxDocTemplate ** templates,
@@ -681,16 +681,16 @@ public:
/** /**
@class wxView @class wxView
@wxheader{docview.h} @wxheader{docview.h}
The view class can be used to model the viewing and editing component of The view 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, supported by wxWidgets,
and cooperates with the wxDocument, wxDocTemplate and cooperates with the wxDocument, wxDocTemplate
and wxDocManager classes. and wxDocManager classes.
@library{wxcore} @library{wxcore}
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_wxviewoverview "wxView overview", wxDocument, wxDocTemplate, @ref overview_wxviewoverview "wxView overview", wxDocument, wxDocTemplate,
wxDocManager wxDocManager
@@ -874,19 +874,19 @@ public:
/** /**
@class wxDocChildFrame @class wxDocChildFrame
@wxheader{docview.h} @wxheader{docview.h}
The wxDocChildFrame class provides a default frame for displaying documents The wxDocChildFrame class provides a default frame for displaying documents
on separate windows. This class can only be used for SDI (not MDI) child frames. on separate windows. This class can only be used for SDI (not MDI) child frames.
The class is part of the document/view framework supported by wxWidgets, The class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument, and cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplate classes. wxDocManager and wxDocTemplate classes.
See the example application in @c samples/docview. See the example application in @c samples/docview.
@library{wxcore} @library{wxcore}
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxFrame @ref overview_docviewoverview "Document/view overview", wxFrame
*/ */
@@ -959,19 +959,19 @@ public:
/** /**
@class wxDocParentFrame @class wxDocParentFrame
@wxheader{docview.h} @wxheader{docview.h}
The wxDocParentFrame class provides a default top-level frame for The wxDocParentFrame class provides a default top-level frame for
applications using the document/view framework. This class can only be used for applications using the document/view framework. This class can only be used for
SDI (not MDI) parent frames. SDI (not MDI) parent frames.
It cooperates with the wxView, wxDocument, It cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplates classes. wxDocManager and wxDocTemplates classes.
See the example application in @c samples/docview. See the example application in @c samples/docview.
@library{wxcore} @library{wxcore}
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxFrame @ref overview_docviewoverview "Document/view overview", wxFrame
*/ */
@@ -983,13 +983,13 @@ public:
Constructor. Constructor.
*/ */
wxDocParentFrame(); wxDocParentFrame();
wxDocParentFrame(wxDocManager* manager, wxFrame * parent, wxDocParentFrame(wxDocManager* manager, wxFrame * parent,
wxWindowID id, wxWindowID id,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = "frame"); const wxString& name = "frame");
//@} //@}
/** /**
@@ -1026,15 +1026,15 @@ public:
/** /**
@class wxDocument @class wxDocument
@wxheader{docview.h} @wxheader{docview.h}
The document class can be used to model an application's file-based The document class can be used to model an application's file-based
data. It is part of the document/view framework supported by wxWidgets, data. It is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocTemplate and cooperates with the wxView, wxDocTemplate
and wxDocManager classes. and wxDocManager classes.
@library{wxcore} @library{wxcore}
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_wxdocumentoverview "wxDocument overview", wxView, wxDocTemplate, @ref overview_wxdocumentoverview "wxDocument overview", wxView, wxDocTemplate,
wxDocManager wxDocManager
@@ -1162,7 +1162,7 @@ public:
was configured. was configured.
*/ */
virtual istream LoadObject(istream& stream); virtual istream LoadObject(istream& stream);
virtual wxInputStream LoadObject(wxInputStream& stream); virtual wxInputStream LoadObject(wxInputStream& stream);
//@} //@}
/** /**
@@ -1267,7 +1267,7 @@ public:
was configured. was configured.
*/ */
virtual ostream SaveObject(ostream& stream); virtual ostream SaveObject(ostream& stream);
virtual wxOutputStream SaveObject(wxOutputStream& stream); virtual wxOutputStream SaveObject(wxOutputStream& stream);
//@} //@}
/** /**
@@ -1376,19 +1376,19 @@ public:
/** /**
@class wxFileHistory @class wxFileHistory
@wxheader{docview.h} @wxheader{docview.h}
The wxFileHistory encapsulates a user interface convenience, the The wxFileHistory encapsulates a user interface convenience, the
list of most recently visited files as shown on a menu (usually the File menu). list of most recently visited files as shown on a menu (usually the File menu).
wxFileHistory can manage one or more file menus. More than one menu may be wxFileHistory can manage one or more file menus. More than one menu may be
required required
in an MDI application, where the file history should appear on each MDI child in an MDI application, where the file history should appear on each MDI child
menu menu
as well as the MDI parent frame. as well as the MDI parent frame.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxfilehistoryoverview "wxFileHistory overview", wxDocManager @ref overview_wxfilehistoryoverview "wxFileHistory overview", wxDocManager
*/ */
@@ -1423,7 +1423,7 @@ public:
Appends the files in the history list, to the given menu only. Appends the files in the history list, to the given menu only.
*/ */
void AddFilesToMenu(); void AddFilesToMenu();
void AddFilesToMenu(wxMenu* menu); void AddFilesToMenu(wxMenu* menu);
//@} //@}
/** /**

View File

@@ -9,18 +9,18 @@
/** /**
@class wxDragImage @class wxDragImage
@wxheader{dragimag.h} @wxheader{dragimag.h}
This class is used when you wish to drag an object on the screen, This class is used when you wish to drag an object on the screen,
and a simple cursor is not enough. and a simple cursor is not enough.
On Windows, the Win32 API is used to achieve smooth dragging. On other On Windows, the Win32 API is used to achieve smooth dragging. On other
platforms, platforms,
wxGenericDragImage is used. Applications may also prefer to use wxGenericDragImage is used. Applications may also prefer to use
wxGenericDragImage on Windows, too. wxGenericDragImage on Windows, too.
@b wxPython note: wxPython uses wxGenericDragImage on all platforms, but @b wxPython note: wxPython uses wxGenericDragImage on all platforms, but
uses the wxDragImage name. uses the wxDragImage name.
To use this class, when you wish to start dragging an image, create a To use this class, when you wish to start dragging an image, create a
wxDragImage wxDragImage
object and store it somewhere you can access it as the drag progresses. object and store it somewhere you can access it as the drag progresses.
@@ -29,18 +29,18 @@
during the drag (for example, highlight an item as in the dragimag sample), during the drag (for example, highlight an item as in the dragimag sample),
first call Hide, first call Hide,
update the screen, call Move, and then call Show. update the screen, call Move, and then call Show.
You can drag within one window, or you can use full-screen dragging You can drag within one window, or you can use full-screen dragging
either across the whole screen, or just restricted to one area either across the whole screen, or just restricted to one area
of the screen to save resources. If you want the user to drag between of the screen to save resources. If you want the user to drag between
two windows, then you will need to use full-screen dragging. two windows, then you will need to use full-screen dragging.
If you wish to draw the image yourself, use wxGenericDragImage and If you wish to draw the image yourself, use wxGenericDragImage and
override wxDragImage::DoDrawImage and override wxDragImage::DoDrawImage and
wxDragImage::GetImageRect. wxDragImage::GetImageRect.
Please see @c samples/dragimag for an example. Please see @c samples/dragimag for an example.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
*/ */
@@ -56,38 +56,38 @@ public:
wxGenericDragImage, and can be used when the application wxGenericDragImage, and can be used when the application
supplies DoDrawImage() and GetImageRect(). supplies DoDrawImage() and GetImageRect().
@param image @param image
Icon or bitmap to be used as the drag image. The bitmap can Icon or bitmap to be used as the drag image. The bitmap can
have a mask. have a mask.
@param text @param text
Text used to construct a drag image. Text used to construct a drag image.
@param cursor @param cursor
Optional cursor to combine with the image. Optional cursor to combine with the image.
@param hotspot @param hotspot
This parameter is deprecated. This parameter is deprecated.
@param treeCtrl @param treeCtrl
Tree control for constructing a tree drag image. Tree control for constructing a tree drag image.
@param listCtrl @param listCtrl
List control for constructing a list drag image. List control for constructing a list drag image.
@param id @param id
Tree or list control item id. Tree or list control item id.
*/ */
wxDragImage(); wxDragImage();
wxDragImage(const wxBitmap& image, wxDragImage(const wxBitmap& image,
const wxCursor& cursor = wxNullCursor); const wxCursor& cursor = wxNullCursor);
wxDragImage(const wxIcon& image, wxDragImage(const wxIcon& image,
const wxCursor& cursor = wxNullCursor); const wxCursor& cursor = wxNullCursor);
wxDragImage(const wxString& text, wxDragImage(const wxString& text,
const wxCursor& cursor = wxNullCursor); const wxCursor& cursor = wxNullCursor);
wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id); wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
wxDragImage(const wxListCtrl& treeCtrl, long id); wxDragImage(const wxListCtrl& treeCtrl, long id);
wxDragImage(const wxCursor& cursor = wxNullCursor); wxDragImage(const wxCursor& cursor = wxNullCursor);
//@} //@}
//@{ //@{
@@ -97,32 +97,32 @@ public:
to specify the bounding area. This form is equivalent to using the first form, to specify the bounding area. This form is equivalent to using the first form,
but more convenient than working out the bounding rectangle explicitly. but more convenient than working out the bounding rectangle explicitly.
You need to then call Show() You need to then call Show()
and Move() to show the image on the screen. and Move() to show the image on the screen.
Call EndDrag() when the drag has finished. Call EndDrag() when the drag has finished.
Note that this call automatically calls CaptureMouse. Note that this call automatically calls CaptureMouse.
@param hotspot @param hotspot
The location of the drag position relative to the upper-left corner The location of the drag position relative to the upper-left corner
of the image. of the image.
@param window @param window
The window that captures the mouse, and within which the dragging The window that captures the mouse, and within which the dragging
is limited unless fullScreen is @true. is limited unless fullScreen is @true.
@param boundingWindow @param boundingWindow
In the second form of the function, specifies the In the second form of the function, specifies the
area within which the drag occurs. area within which the drag occurs.
@param fullScreen @param fullScreen
If @true, specifies that the drag will be visible over the full If @true, specifies that the drag will be visible over the full
screen, or over as much of the screen as is specified by rect. Note that the screen, or over as much of the screen as is specified by rect. Note that the
mouse will mouse will
still be captured in window. still be captured in window.
@param rect @param rect
If non-@NULL, specifies the rectangle (in screen coordinates) that If non-@NULL, specifies the rectangle (in screen coordinates) that
bounds the dragging operation. Specifying this can make the operation more bounds the dragging operation. Specifying this can make the operation more
efficient efficient
@@ -133,8 +133,8 @@ public:
bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
bool fullScreen = @false, bool fullScreen = @false,
wxRect* rect = @NULL); wxRect* rect = @NULL);
bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
wxWindow* boundingWindow); wxWindow* boundingWindow);
//@} //@}
/** /**
@@ -162,20 +162,20 @@ public:
top-left corner at the given point. top-left corner at the given point.
This function is available in wxGenericDragImage only, and may be overridden This function is available in wxGenericDragImage only, and may be overridden
(together with (together with
wxDragImage::DoDrawImage) to provide a virtual drawing capability. wxDragImage::DoDrawImage) to provide a virtual drawing capability.
*/ */
virtual wxRect GetImageRect(const wxPoint& pos); virtual wxRect GetImageRect(const wxPoint& pos);
/** /**
Hides the image. You may wish to call this before updating the window Hides the image. You may wish to call this before updating the window
contents (perhaps highlighting an item). Then call Move() contents (perhaps highlighting an item). Then call Move()
and Show(). and Show().
*/ */
bool Hide(); bool Hide();
/** /**
Call this to move the image to a new position. The image will only be shown if Call this to move the image to a new position. The image will only be shown if
Show() has been called previously (for example Show() has been called previously (for example
at the start of the drag). at the start of the drag).

View File

@@ -9,7 +9,7 @@
/** /**
@class wxArrayT @class wxArrayT
@wxheader{dynarray.h} @wxheader{dynarray.h}
This section describes the so called @e dynamic arrays. This is a C This section describes the so called @e dynamic arrays. This is a C
array-like type safe data structure i.e. the member access time is constant array-like type safe data structure i.e. the member access time is constant
(and not (and not
@@ -25,7 +25,7 @@
automatically expand the array but provokes an assertion failure instead in automatically expand the array but provokes an assertion failure instead in
debug build and does nothing (except possibly crashing your program) in the debug build and does nothing (except possibly crashing your program) in the
release build. release build.
The array classes were designed to be reasonably efficient, both in terms of The array classes were designed to be reasonably efficient, both in terms of
run-time speed and memory consumption and the executable size. The speed of run-time speed and memory consumption and the executable size. The speed of
array item access is, of course, constant (independent of the number of array item access is, of course, constant (independent of the number of
@@ -37,7 +37,7 @@
you may find some useful hints about optimizing wxArray memory usage. As for you may find some useful hints about optimizing wxArray memory usage. As for
executable size, all executable size, all
wxArray functions are inline, so they do not take @e any space at all. wxArray functions are inline, so they do not take @e any space at all.
wxWidgets has three different kinds of array. All of them derive from wxWidgets has three different kinds of array. All of them derive from
wxBaseArray class which works with untyped data and can not be used directly. wxBaseArray class which works with untyped data and can not be used directly.
The standard macros WX_DEFINE_ARRAY(), WX_DEFINE_SORTED_ARRAY() and The standard macros WX_DEFINE_ARRAY(), WX_DEFINE_SORTED_ARRAY() and
@@ -48,7 +48,7 @@
with a new name. In fact, these names are "template" names and each usage of one with a new name. In fact, these names are "template" names and each usage of one
of the macros mentioned above creates a template specialization for the given of the macros mentioned above creates a template specialization for the given
element type. element type.
wxArray is suitable for storing integer types and pointers which it does not wxArray is suitable for storing integer types and pointers which it does not
treat as objects in any way, i.e. the element pointed to by the pointer is not treat as objects in any way, i.e. the element pointed to by the pointer is not
deleted when the element is removed from the array. It should be noted that deleted when the element is removed from the array. It should be noted that
@@ -62,7 +62,7 @@
runtime assertion failure, however declaring a wxArray of floats will not (on runtime assertion failure, however declaring a wxArray of floats will not (on
the machines where sizeof(float) = sizeof(long)), yet it will @b not work, the machines where sizeof(float) = sizeof(long)), yet it will @b not work,
please use wxObjArray for storing floats and doubles. please use wxObjArray for storing floats and doubles.
wxSortedArray is a wxArray variant which should be used when searching in the wxSortedArray is a wxArray variant which should be used when searching in the
array is a frequently used operation. It requires you to define an additional array is a frequently used operation. It requires you to define an additional
function for comparing two elements of the array element type and always stores function for comparing two elements of the array element type and always stores
@@ -75,7 +75,7 @@
huge performance improvements compared to wxArray. Finally, it should be huge performance improvements compared to wxArray. Finally, it should be
noticed that, as wxArray, wxSortedArray can be only used for storing integral noticed that, as wxArray, wxSortedArray can be only used for storing integral
types or pointers. types or pointers.
wxObjArray class treats its elements like "objects". It may delete them when wxObjArray class treats its elements like "objects". It may delete them when
they are removed from the array (invoking the correct destructor) and copies they are removed from the array (invoking the correct destructor) and copies
them using the objects copy constructor. In order to implement this behaviour them using the objects copy constructor. In order to implement this behaviour
@@ -86,74 +86,74 @@
from a point where the full (as opposed to 'forward') declaration of the array from a point where the full (as opposed to 'forward') declaration of the array
elements class is in scope. As it probably sounds very complicated here is an elements class is in scope. As it probably sounds very complicated here is an
example: example:
@code @code
#include wx/dynarray.h #include wx/dynarray.h
// we must forward declare the array because it is used inside the class // we must forward declare the array because it is used inside the class
// declaration // declaration
class MyDirectory; class MyDirectory;
class MyFile; class MyFile;
// this defines two new types: ArrayOfDirectories and ArrayOfFiles which can be // this defines two new types: ArrayOfDirectories and ArrayOfFiles which can be
// now used as shown below // now used as shown below
WX_DECLARE_OBJARRAY(MyDirectory, ArrayOfDirectories); WX_DECLARE_OBJARRAY(MyDirectory, ArrayOfDirectories);
WX_DECLARE_OBJARRAY(MyFile, ArrayOfFiles); WX_DECLARE_OBJARRAY(MyFile, ArrayOfFiles);
class MyDirectory class MyDirectory
{ {
... ...
ArrayOfDirectories m_subdirectories; // all subdirectories ArrayOfDirectories m_subdirectories; // all subdirectories
ArrayOfFiles m_files; // all files in this directory ArrayOfFiles m_files; // all files in this directory
}; };
... ...
// now that we have MyDirectory declaration in scope we may finish the // now that we have MyDirectory declaration in scope we may finish the
// definition of ArrayOfDirectories -- note that this expands into some C++ // definition of ArrayOfDirectories -- note that this expands into some C++
// code and so should only be compiled once (i.e., don't put this in the // code and so should only be compiled once (i.e., don't put this in the
// header, but into a source file or you will get linking errors) // header, but into a source file or you will get linking errors)
#include wx/arrimpl.cpp // this is a magic incantation which must be done! #include wx/arrimpl.cpp // this is a magic incantation which must be done!
WX_DEFINE_OBJARRAY(ArrayOfDirectories); WX_DEFINE_OBJARRAY(ArrayOfDirectories);
// that's all! // that's all!
@endcode @endcode
It is not as elegant as writing It is not as elegant as writing
@code @code
typedef std::vectorMyDirectory ArrayOfDirectories; typedef std::vectorMyDirectory ArrayOfDirectories;
@endcode @endcode
but is not that complicated and allows the code to be compiled with any, however but is not that complicated and allows the code to be compiled with any, however
dumb, C++ compiler in the world. dumb, C++ compiler in the world.
Remember to include wx/arrimpl.cpp just before each WX_DEFINE_OBJARRAY Remember to include wx/arrimpl.cpp just before each WX_DEFINE_OBJARRAY
ocurrence in your code, even if you have several in the same file. ocurrence in your code, even if you have several in the same file.
Things are much simpler for wxArray and wxSortedArray however: it is enough Things are much simpler for wxArray and wxSortedArray however: it is enough
just to write just to write
@code @code
WX_DEFINE_ARRAY_INT(int, ArrayOfInts); WX_DEFINE_ARRAY_INT(int, ArrayOfInts);
WX_DEFINE_SORTED_ARRAY_INT(int, ArrayOfSortedInts); WX_DEFINE_SORTED_ARRAY_INT(int, ArrayOfSortedInts);
@endcode @endcode
i.e. there is only one @c DEFINE macro and no need for separate i.e. there is only one @c DEFINE macro and no need for separate
@c DECLARE one. For the arrays of the primitive types, the macros @c DECLARE one. For the arrays of the primitive types, the macros
@c WX_DEFINE_ARRAY_CHAR/SHORT/INT/SIZE_T/LONG/DOUBLE should be used @c WX_DEFINE_ARRAY_CHAR/SHORT/INT/SIZE_T/LONG/DOUBLE should be used
depending on the sizeof of the values (notice that storing values of smaller depending on the sizeof of the values (notice that storing values of smaller
type, e.g. shorts, in an array of larger one, e.g. @c ARRAY_INT, does type, e.g. shorts, in an array of larger one, e.g. @c ARRAY_INT, does
not work on all architectures!). not work on all architectures!).
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxcontaineroverview "Container classes overview", wxListT, @ref overview_wxcontaineroverview "Container classes overview", wxListT,
wxVectorT wxVectorT
*/ */
class wxArray<T> class wxArray<T>
{ {
public: public:
//@{ //@{
@@ -178,9 +178,9 @@ public:
append a lot of items. append a lot of items.
*/ */
void Add(T item, size_t copies = 1); void Add(T item, size_t copies = 1);
size_t Add(T item); size_t Add(T item);
void Add(T * item); void Add(T * item);
void Add(T & item, size_t copies = 1); void Add(T & item, size_t copies = 1);
//@} //@}
/** /**
@@ -190,7 +190,7 @@ public:
Be aware that you will set out the order of the array if you give a wrong Be aware that you will set out the order of the array if you give a wrong
position. position.
This function is useful in conjunction with This function is useful in conjunction with
wxArray::IndexForInsert for a common operation wxArray::IndexForInsert for a common operation
of "insert only if not found". of "insert only if not found".
*/ */
@@ -255,9 +255,9 @@ public:
should return a negative, zero or positive value according to whether the first should return a negative, zero or positive value according to whether the first
element passed to it is less than, equal to or greater than the second one. element passed to it is less than, equal to or greater than the second one.
*/ */
wxArray(); wxArray();
wxObjArray(); wxObjArray();
wxSortedArray(); wxSortedArray();
//@} //@}
/** /**
@@ -301,7 +301,7 @@ public:
in the array. in the array.
*/ */
int Index(T& item, bool searchFromEnd = @false); int Index(T& item, bool searchFromEnd = @false);
int Index(T& item); int Index(T& item);
//@} //@}
/** /**
@@ -312,7 +312,7 @@ public:
You have to do extra work to know if the @e item already exists in array. You have to do extra work to know if the @e item already exists in array.
This function is useful in conjunction with This function is useful in conjunction with
wxArray::AddAt for a common operation wxArray::AddAt for a common operation
of "insert only if not found". of "insert only if not found".
*/ */
@@ -331,8 +331,8 @@ public:
between the overloaded versions of this function. between the overloaded versions of this function.
*/ */
void Insert(T item, size_t n, size_t copies = 1); void Insert(T item, size_t n, size_t copies = 1);
void Insert(T * item, size_t n); void Insert(T * item, size_t n);
void Insert(T & item, size_t n, size_t copies = 1); void Insert(T & item, size_t n, size_t copies = 1);
//@} //@}
/** /**
@@ -475,7 +475,7 @@ public:
See also WX_CLEAR_ARRAY macro which deletes all See also WX_CLEAR_ARRAY macro which deletes all
elements of a wxArray (supposed to contain pointers). elements of a wxArray (supposed to contain pointers).
*/ */
Remove(T item); Remove(T item);
/** /**
Removes @e count elements starting at @e index from the array. When an Removes @e count elements starting at @e index from the array. When an
@@ -486,7 +486,7 @@ public:
See also WX_CLEAR_ARRAY macro which deletes all See also WX_CLEAR_ARRAY macro which deletes all
elements of a wxArray (supposed to contain pointers). elements of a wxArray (supposed to contain pointers).
*/ */
RemoveAt(size_t index, size_t count = 1); RemoveAt(size_t index, size_t count = 1);
/** /**
WX_CLEAR_ARRAY WX_CLEAR_ARRAY
@@ -567,9 +567,9 @@ public:
You must use WX_DEFINE_OBJARRAY macro to define You must use WX_DEFINE_OBJARRAY macro to define
the array class - otherwise you would get link errors. the array class - otherwise you would get link errors.
*/ */
WX_DECLARE_OBJARRAY(T, name); WX_DECLARE_OBJARRAY(T, name);
WX_DECLARE_EXPORTED_OBJARRAY(T, name); WX_DECLARE_EXPORTED_OBJARRAY(T, name);
WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name); WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name);
//@} //@}
//@{ //@{
@@ -584,9 +584,9 @@ public:
wxArrayInt, wxArrayInt,
@b wxArrayLong, @b wxArrayShort, @b wxArrayDouble, @b wxArrayPtrVoid. @b wxArrayLong, @b wxArrayShort, @b wxArrayDouble, @b wxArrayPtrVoid.
*/ */
WX_DEFINE_ARRAY(T, name); WX_DEFINE_ARRAY(T, name);
WX_DEFINE_EXPORTED_ARRAY(T, name); WX_DEFINE_EXPORTED_ARRAY(T, name);
WX_DEFINE_USER_EXPORTED_ARRAY(T, name, exportspec); WX_DEFINE_USER_EXPORTED_ARRAY(T, name, exportspec);
//@} //@}
//@{ //@{
@@ -603,9 +603,9 @@ public:
Example of usage: Example of usage:
*/ */
WX_DEFINE_OBJARRAY(name); WX_DEFINE_OBJARRAY(name);
WX_DEFINE_EXPORTED_OBJARRAY(name); WX_DEFINE_EXPORTED_OBJARRAY(name);
WX_DEFINE_USER_EXPORTED_OBJARRAY(name); WX_DEFINE_USER_EXPORTED_OBJARRAY(name);
//@} //@}
//@{ //@{
@@ -619,9 +619,9 @@ public:
You will have to initialize the objects of this class by passing a comparison You will have to initialize the objects of this class by passing a comparison
function to the array object constructor like this: function to the array object constructor like this:
*/ */
WX_DEFINE_SORTED_ARRAY(T, name); WX_DEFINE_SORTED_ARRAY(T, name);
WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name); WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name);
WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name); WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name);
//@} //@}
/** /**
@@ -637,12 +637,12 @@ public:
the items of pointer type) for wxArray and wxSortedArray and a deep copy (i.e. the items of pointer type) for wxArray and wxSortedArray and a deep copy (i.e.
the array element are copied too) for wxObjArray. the array element are copied too) for wxObjArray.
*/ */
wxArray(const wxArray& array); wxArray(const wxArray& array);
wxSortedArray(const wxSortedArray& array); wxSortedArray(const wxSortedArray& array);
wxObjArray(const wxObjArray& array); wxObjArray(const wxObjArray& array);
wxArray operator=(const wxArray& array); wxArray operator=(const wxArray& array);
wxSortedArray operator=(const wxSortedArray& array); wxSortedArray operator=(const wxSortedArray& array);
wxObjArray operator=(const wxObjArray& array); wxObjArray operator=(const wxObjArray& array);
//@} //@}
//@{ //@{
@@ -651,8 +651,8 @@ public:
done by wxArray and wxSortedArray versions - you may use done by wxArray and wxSortedArray versions - you may use
WX_CLEAR_ARRAY macro for this. WX_CLEAR_ARRAY macro for this.
*/ */
~wxArray(); ~wxArray();
~wxSortedArray(); ~wxSortedArray();
~wxObjArray(); ~wxObjArray();
//@} //@}
}; };

View File

@@ -9,27 +9,27 @@
/** /**
@class wxDynamicLibraryDetails @class wxDynamicLibraryDetails
@wxheader{dynlib.h} @wxheader{dynlib.h}
This class is used for the objects returned by This class is used for the objects returned by
wxDynamicLibrary::ListLoaded method and wxDynamicLibrary::ListLoaded method and
contains the information about a single module loaded into the address space of contains the information about a single module loaded into the address space of
the current process. A module in this context may be either a dynamic library the current process. A module in this context may be either a dynamic library
or the main program itself. or the main program itself.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
class wxDynamicLibraryDetails class wxDynamicLibraryDetails
{ {
public: public:
/** /**
Retrieves the load address and the size of this module. Retrieves the load address and the size of this module.
@param addr @param addr
the pointer to the location to return load address in, may be the pointer to the location to return load address in, may be
@NULL @NULL
@param len @param len
pointer to the location to return the size of this module in pointer to the location to return the size of this module in
memory in, may be @NULL memory in, may be @NULL
@@ -39,20 +39,20 @@ public:
bool GetAddress(void ** addr, size_t len); bool GetAddress(void ** addr, size_t len);
/** /**
Returns the base name of this module, e.g. @c kernel32.dll or Returns the base name of this module, e.g. @c kernel32.dll or
@c libc-2.3.2.so. @c libc-2.3.2.so.
*/ */
wxString GetName(); wxString GetName();
/** /**
Returns the full path of this module if available, e.g. Returns the full path of this module if available, e.g.
@c c:\windows\system32\kernel32.dll or @c c:\windows\system32\kernel32.dll or
@c /lib/libc-2.3.2.so. @c /lib/libc-2.3.2.so.
*/ */
wxString GetPath(); wxString GetPath();
/** /**
Returns the version of this module, e.g. @c 5.2.3790.0 or Returns the version of this module, e.g. @c 5.2.3790.0 or
@c 2.3.2. The returned string is empty if the version information is not @c 2.3.2. The returned string is empty if the version information is not
available. available.
*/ */
@@ -63,26 +63,26 @@ public:
/** /**
@class wxDllLoader @class wxDllLoader
@wxheader{dynlib.h} @wxheader{dynlib.h}
@b Deprecation note: This class is deprecated since version 2.4 and is @b Deprecation note: This class is deprecated since version 2.4 and is
not compiled in by default in version 2.6 and will be removed in 2.8. Please not compiled in by default in version 2.6 and will be removed in 2.8. Please
use wxDynamicLibrary instead. use wxDynamicLibrary instead.
wxDllLoader is a class providing an interface similar to Unix's @c dlopen(). It wxDllLoader is a class providing an interface similar to Unix's @c dlopen(). It
is used by the wxLibrary framework and manages the actual is used by the wxLibrary framework and manages the actual
loading of shared libraries and the resolving of symbols in them. There are no loading of shared libraries and the resolving of symbols in them. There are no
instances of this class, it simply serves as a namespace for its static member instances of this class, it simply serves as a namespace for its static member
functions. functions.
Please note that class wxDynamicLibrary provides Please note that class wxDynamicLibrary provides
alternative, friendlier interface to wxDllLoader. alternative, friendlier interface to wxDllLoader.
The terms @e DLL and @e shared library/object will both be used in the The terms @e DLL and @e shared library/object will both be used in the
documentation to refer to the same thing: a @c .dll file under Windows or documentation to refer to the same thing: a @c .dll file under Windows or
@c .so or @c .sl one under Unix. @c .so or @c .sl one under Unix.
Example of using this class to dynamically load the @c strlen() function: Example of using this class to dynamically load the @c strlen() function:
@code @code
#if defined(__WXMSW__) #if defined(__WXMSW__)
static const wxChar *LIB_NAME = _T("kernel32"); static const wxChar *LIB_NAME = _T("kernel32");
@@ -91,7 +91,7 @@ public:
static const wxChar *LIB_NAME = _T("/lib/libc-2.0.7.so"); static const wxChar *LIB_NAME = _T("/lib/libc-2.0.7.so");
static const wxChar *FUNC_NAME = _T("strlen"); static const wxChar *FUNC_NAME = _T("strlen");
#endif #endif
wxDllType dllHandle = wxDllLoader::LoadLibrary(LIB_NAME); wxDllType dllHandle = wxDllLoader::LoadLibrary(LIB_NAME);
if ( !dllHandle ) if ( !dllHandle )
{ {
@@ -117,22 +117,22 @@ public:
... ok! ... ... ok! ...
} }
} }
wxDllLoader::UnloadLibrary(dllHandle); wxDllLoader::UnloadLibrary(dllHandle);
} }
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{appmanagement} @category{appmanagement}
*/ */
class wxDllLoader class wxDllLoader
{ {
public: public:
/** /**
Returns the string containing the usual extension for shared libraries for the Returns the string containing the usual extension for shared libraries for the
given systems (including the leading dot if not empty). given systems (including the leading dot if not empty).
For example, this function will return @c ".dll" under Windows or (usually) For example, this function will return @c ".dll" under Windows or (usually)
@c ".so" under Unix. @c ".so" under Unix.
*/ */
static wxString GetDllExt(); static wxString GetDllExt();
@@ -154,11 +154,11 @@ public:
Returned value will be @NULL if the symbol was not found in the DLL or if Returned value will be @NULL if the symbol was not found in the DLL or if
an error occurred. an error occurred.
@param dllHandle @param dllHandle
Valid handle previously returned by Valid handle previously returned by
LoadLibrary LoadLibrary
@param name @param name
Name of the symbol. Name of the symbol.
*/ */
void * GetSymbol(wxDllType dllHandle, const wxString& name); void * GetSymbol(wxDllType dllHandle, const wxString& name);
@@ -171,13 +171,13 @@ public:
searched in all standard locations. searched in all standard locations.
Returns a handle to the loaded DLL. Use @e success parameter to test if it Returns a handle to the loaded DLL. Use @e success parameter to test if it
is valid. If the handle is valid, the library must be unloaded later with is valid. If the handle is valid, the library must be unloaded later with
UnloadLibrary(). UnloadLibrary().
@param libname @param libname
Name of the shared object to load. Name of the shared object to load.
@param success @param success
May point to a bool variable which will be set to @true or May point to a bool variable which will be set to @true or
@false; may also be @NULL. @false; may also be @NULL.
*/ */
@@ -195,19 +195,19 @@ public:
/** /**
@class wxDynamicLibrary @class wxDynamicLibrary
@wxheader{dynlib.h} @wxheader{dynlib.h}
wxDynamicLibrary is a class representing dynamically loadable library wxDynamicLibrary is a class representing dynamically loadable library
(Windows DLL, shared library under Unix etc.). Just create an object of (Windows DLL, shared library under Unix etc.). Just create an object of
this class to load a library and don't worry about unloading it -- it will be this class to load a library and don't worry about unloading it -- it will be
done in the objects destructor automatically. done in the objects destructor automatically.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxDynamicLibrary::CanonicalizePluginName wxDynamicLibrary::CanonicalizePluginName
*/ */
class wxDynamicLibrary class wxDynamicLibrary
{ {
public: public:
//@{ //@{
@@ -215,25 +215,25 @@ public:
Constructor. Second form calls Load(). Constructor. Second form calls Load().
*/ */
wxDynamicLibrary(); wxDynamicLibrary();
wxDynamicLibrary(const wxString& name, wxDynamicLibrary(const wxString& name,
int flags = wxDL_DEFAULT); int flags = wxDL_DEFAULT);
//@} //@}
/** /**
Returns the platform-specific full name for the library called @e name. E.g. Returns the platform-specific full name for the library called @e name. E.g.
it adds a @c ".dll" extension under Windows and @c "lib" prefix and it adds a @c ".dll" extension under Windows and @c "lib" prefix and
@c ".so", @c ".sl" or maybe @c ".dylib" extension under Unix. @c ".so", @c ".sl" or maybe @c ".dylib" extension under Unix.
The possible values for @e cat are: The possible values for @e cat are:
wxDL_LIBRARY wxDL_LIBRARY
normal library normal library
wxDL_MODULE wxDL_MODULE
@@ -247,7 +247,7 @@ public:
wxDynamicLibraryCategory cat = wxDL_LIBRARY); wxDynamicLibraryCategory cat = wxDL_LIBRARY);
/** /**
This function does the same thing as This function does the same thing as
CanonicalizeName() but for wxWidgets CanonicalizeName() but for wxWidgets
plugins. The only difference is that compiler and version information are added plugins. The only difference is that compiler and version information are added
to the name to ensure that the plugin which is going to be loaded will be to the name to ensure that the plugin which is going to be loaded will be
@@ -255,14 +255,14 @@ public:
The possible values for @e cat are: The possible values for @e cat are:
wxDL_PLUGIN_GUI wxDL_PLUGIN_GUI
plugin which uses GUI classes (default) plugin which uses GUI classes (default)
wxDL_PLUGIN_BASE wxDL_PLUGIN_BASE
@@ -380,7 +380,7 @@ public:
the handle somewhere and call this static method later to unload it. the handle somewhere and call this static method later to unload it.
*/ */
void Unload(); void Unload();
static void Unload(wxDllType handle); static void Unload(wxDllType handle);
//@} //@}
}; };
@@ -394,21 +394,21 @@ public:
@c void * pointer to the correct type and, even more annoyingly, you have to @c void * pointer to the correct type and, even more annoyingly, you have to
repeat this type twice if you want to declare and define a function pointer all repeat this type twice if you want to declare and define a function pointer all
in one line in one line
This macro makes this slightly less painful by allowing you to specify the This macro makes this slightly less painful by allowing you to specify the
type only once, as the first parameter, and creating a variable of this type type only once, as the first parameter, and creating a variable of this type
named after the function but with @c pfn prefix and initialized with the named after the function but with @c pfn prefix and initialized with the
function @e name from the wxDynamicLibrary function @e name from the wxDynamicLibrary
@e dynlib. @e dynlib.
@param type @param type
the type of the function the type of the function
@param name @param name
the name of the function to load, not a string (without quotes, the name of the function to load, not a string (without quotes,
it is quoted automatically by the macro) it is quoted automatically by the macro)
@param dynlib @param dynlib
the library to load the function from the library to load the function from
*/ */
#define wxDYNLIB_FUNCTION(type, name, dynlib) /* implementation is private */ #define wxDYNLIB_FUNCTION(type, name, dynlib) /* implementation is private */

View File

@@ -9,10 +9,10 @@
/** /**
@class wxEditableListBox @class wxEditableListBox
@wxheader{editlbox.h} @wxheader{editlbox.h}
An editable listbox is composite control that lets the An editable listbox is composite control that lets the
user easily enter, delete and reorder a list of strings. user easily enter, delete and reorder a list of strings.
@beginStyleTable @beginStyleTable
@style{wxEL_ALLOW_NEW}: @style{wxEL_ALLOW_NEW}:
Allows the user to enter new strings. Allows the user to enter new strings.
@@ -25,10 +25,10 @@
@style{wxEL_DEFAULT_STYLE}: @style{wxEL_DEFAULT_STYLE}:
wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE
@endStyleTable @endStyleTable
@library{wxadv} @library{wxadv}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxListBox wxListBox
*/ */
@@ -39,37 +39,37 @@ public:
/** /**
Constructor, creating and showing a list box. Constructor, creating and showing a list box.
@param parent @param parent
Parent window. Must not be @NULL. Parent window. Must not be @NULL.
@param id @param id
Window identifier. The value wxID_ANY indicates a default value. Window identifier. The value wxID_ANY indicates a default value.
@param label @param label
The text shown just before the list control. The text shown just before the list control.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. If wxDefaultSize is specified then the window is sized Window size. If wxDefaultSize is specified then the window is sized
appropriately. appropriately.
@param style @param style
Window style. See wxEditableListBox. Window style. See wxEditableListBox.
@param name @param name
Window name. Window name.
@sa Create() @sa Create()
*/ */
wxEditableListBox(); wxEditableListBox();
wxEditableListBox(wxWindow* parent, wxWindowID id, wxEditableListBox(wxWindow* parent, wxWindowID id,
const wxString& label, const wxString& label,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxEL_DEFAULT_STYLE, long style = wxEL_DEFAULT_STYLE,
const wxString& name = "editableListBox"); const wxString& name = "editableListBox");
//@} //@}
/** /**

View File

@@ -9,17 +9,17 @@
/** /**
@class wxEncodingConverter @class wxEncodingConverter
@wxheader{encconv.h} @wxheader{encconv.h}
This class is capable of converting strings between two This class is capable of converting strings between two
8-bit encodings/charsets. It can also convert from/to Unicode (but only 8-bit encodings/charsets. It can also convert from/to Unicode (but only
if you compiled wxWidgets with wxUSE_WCHAR_T set to 1). Only a limited subset if you compiled wxWidgets with wxUSE_WCHAR_T set to 1). Only a limited subset
of encodings is supported by wxEncodingConverter: of encodings is supported by wxEncodingConverter:
@c wxFONTENCODING_ISO8859_1..15, @c wxFONTENCODING_CP1250..1257 and @c wxFONTENCODING_ISO8859_1..15, @c wxFONTENCODING_CP1250..1257 and
@c wxFONTENCODING_KOI8. @c wxFONTENCODING_KOI8.
@library{wxbase} @library{wxbase}
@category{misc} @category{misc}
@seealso @seealso
wxFontMapper, wxMBConv, @ref overview_nonenglishoverview "Writing non-English wxFontMapper, wxMBConv, @ref overview_nonenglishoverview "Writing non-English
applications" applications"
@@ -48,18 +48,18 @@ public:
Convert wxString and return new wxString object. Convert wxString and return new wxString object.
*/ */
bool Convert(const char* input, char* output); bool Convert(const char* input, char* output);
bool Convert(const wchar_t* input, wchar_t* output); bool Convert(const wchar_t* input, wchar_t* output);
bool Convert(const char* input, wchar_t* output); bool Convert(const char* input, wchar_t* output);
bool Convert(const wchar_t* input, char* output); bool Convert(const wchar_t* input, char* output);
bool Convert(char* str); bool Convert(char* str);
bool Convert(wchar_t* str); bool Convert(wchar_t* str);
wxString Convert(const wxString& input); wxString Convert(const wxString& input);
//@} //@}
/** /**
Similar to Similar to
GetPlatformEquivalents(), GetPlatformEquivalents(),
but this one will return ALL but this one will return ALL
equivalent encodings, regardless of the platform, and including itself. equivalent encodings, regardless of the platform, and including itself.
This platform's encodings are before others in the array. And again, if @e enc This platform's encodings are before others in the array. And again, if @e enc
@@ -93,16 +93,16 @@ public:
encodings. (It usually returns only one encoding.) encodings. (It usually returns only one encoding.)
*/ */
static wxFontEncodingArray GetPlatformEquivalents(wxFontEncoding enc, static wxFontEncodingArray GetPlatformEquivalents(wxFontEncoding enc,
int platform = wxPLATFORM_CURRENT); int platform = wxPLATFORM_CURRENT);
/** /**
Initialize conversion. Both output or input encoding may Initialize conversion. Both output or input encoding may
be wxFONTENCODING_UNICODE, but only if wxUSE_ENCODING is set to 1. be wxFONTENCODING_UNICODE, but only if wxUSE_ENCODING is set to 1.
All subsequent calls to Convert() All subsequent calls to Convert()
will interpret its argument will interpret its argument
as a string in @e input_enc encoding and will output string in as a string in @e input_enc encoding and will output string in
@e output_enc encoding. @e output_enc encoding.
You must call this method before calling Convert. You may call You must call this method before calling Convert. You may call
it more than once in order to switch to another conversion. it more than once in order to switch to another conversion.
@e Method affects behaviour of Convert() in case input character @e Method affects behaviour of Convert() in case input character
cannot be converted because it does not exist in output encoding: cannot be converted because it does not exist in output encoding:
@@ -111,13 +111,13 @@ public:
follow behaviour of GNU Recode - follow behaviour of GNU Recode -
just copy unconvertible characters to output and don't change them just copy unconvertible characters to output and don't change them
(its integer value will stay the same) (its integer value will stay the same)
@b wxCONVERT_SUBSTITUTE @b wxCONVERT_SUBSTITUTE
try some (lossy) substitutions try some (lossy) substitutions
- e.g. replace unconvertible latin capitals with acute by ordinary - e.g. replace unconvertible latin capitals with acute by ordinary
capitals, replace en-dash or em-dash by '-' etc. capitals, replace en-dash or em-dash by '-' etc.

File diff suppressed because it is too large Load Diff

View File

@@ -9,9 +9,9 @@
/** /**
@class wxFindDialogEvent @class wxFindDialogEvent
@wxheader{fdrepdlg.h} @wxheader{fdrepdlg.h}
wxFindReplaceDialog events wxFindReplaceDialog events
@library{wxcore} @library{wxcore}
@category{events} @category{events}
*/ */
@@ -51,17 +51,17 @@ public:
/** /**
@class wxFindReplaceData @class wxFindReplaceData
@wxheader{fdrepdlg.h} @wxheader{fdrepdlg.h}
wxFindReplaceData holds the data for wxFindReplaceData holds the data for
wxFindReplaceDialog. It is used to initialize wxFindReplaceDialog. It is used to initialize
the dialog with the default values and will keep the last values from the the dialog with the default values and will keep the last values from the
dialog when it is closed. It is also updated each time a dialog when it is closed. It is also updated each time a
wxFindDialogEvent is generated so instead of wxFindDialogEvent is generated so instead of
using the wxFindDialogEvent methods you can also directly query this object. using the wxFindDialogEvent methods you can also directly query this object.
Note that all @c SetXXX() methods may only be called before showing the Note that all @c SetXXX() methods may only be called before showing the
dialog and calling them has no effect later. dialog and calling them has no effect later.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
*/ */
@@ -108,7 +108,7 @@ public:
/** /**
@class wxFindReplaceDialog @class wxFindReplaceDialog
@wxheader{fdrepdlg.h} @wxheader{fdrepdlg.h}
wxFindReplaceDialog is a standard modeless dialog which is used to allow the wxFindReplaceDialog is a standard modeless dialog which is used to allow the
user to search for some text (and possibly replace it with something else). user to search for some text (and possibly replace it with something else).
The actual searching is supposed to be done in the owner window which is the The actual searching is supposed to be done in the owner window which is the
@@ -116,9 +116,9 @@ public:
dialogs this one @b must have a parent window. Also note that there is no dialogs this one @b must have a parent window. Also note that there is no
way to use this dialog in a modal way; it is always, by design and way to use this dialog in a modal way; it is always, by design and
implementation, modeless. implementation, modeless.
Please see the dialogs sample for an example of using it. Please see the dialogs sample for an example of using it.
@library{wxcore} @library{wxcore}
@category{cmndlg} @category{cmndlg}
*/ */
@@ -127,16 +127,16 @@ class wxFindReplaceDialog : public wxDialog
public: public:
//@{ //@{
/** /**
After using default constructor Create() After using default constructor Create()
must be called. must be called.
The @e parent and @e data parameters must be non-@NULL. The @e parent and @e data parameters must be non-@NULL.
*/ */
wxFindReplaceDialog(); wxFindReplaceDialog();
wxFindReplaceDialog(wxWindow * parent, wxFindReplaceDialog(wxWindow * parent,
wxFindReplaceData* data, wxFindReplaceData* data,
const wxString& title, const wxString& title,
int style = 0); int style = 0);
//@} //@}
/** /**

View File

@@ -9,41 +9,41 @@
/** /**
@class wxFFile @class wxFFile
@wxheader{ffile.h} @wxheader{ffile.h}
wxFFile implements buffered file I/O. This is a very small class designed to wxFFile implements buffered file I/O. This is a very small class designed to
minimize the overhead of using it - in fact, there is hardly any overhead at minimize the overhead of using it - in fact, there is hardly any overhead at
all, but using it brings you automatic error checking and hides differences all, but using it brings you automatic error checking and hides differences
between platforms and compilers. It wraps inside it a @c FILE * handle used between platforms and compilers. It wraps inside it a @c FILE * handle used
by standard C IO library (also known as @c stdio). by standard C IO library (also known as @c stdio).
@library{wxbase} @library{wxbase}
@category{file} @category{file}
@seealso @seealso
wxFFile::IsOpened wxFFile::IsOpened
*/ */
class wxFFile class wxFFile
{ {
public: public:
//@{ //@{
/** /**
Opens a file with the given file pointer, which has already been opened. Opens a file with the given file pointer, which has already been opened.
@param filename @param filename
The filename. The filename.
@param mode @param mode
The mode in which to open the file using standard C strings. The mode in which to open the file using standard C strings.
Note that you should use "b" flag if you use binary files under Windows Note that you should use "b" flag if you use binary files under Windows
or the results might be unexpected due to automatic newline conversion done or the results might be unexpected due to automatic newline conversion done
for the text files. for the text files.
@param fp @param fp
An existing file descriptor, such as stderr. An existing file descriptor, such as stderr.
*/ */
wxFFile(); wxFFile();
wxFFile(const wxString& filename, const wxString& mode = "r"); wxFFile(const wxString& filename, const wxString& mode = "r");
wxFFile(FILE* fp); wxFFile(FILE* fp);
//@} //@}
/** /**
@@ -75,7 +75,7 @@ public:
/** /**
Returns @true if the an attempt has been made to read @e past Returns @true if the an attempt has been made to read @e past
the end of the file. the end of the file.
Note that the behaviour of the file descriptor based class Note that the behaviour of the file descriptor based class
wxFile is different as wxFile::Eof wxFile is different as wxFile::Eof
@@ -125,10 +125,10 @@ public:
/** /**
Opens the file, returning @true if successful. Opens the file, returning @true if successful.
@param filename @param filename
The filename. The filename.
@param mode @param mode
The mode in which to open the file. The mode in which to open the file.
*/ */
bool Open(const wxString& filename, const wxString& mode = "r"); bool Open(const wxString& filename, const wxString& mode = "r");
@@ -137,10 +137,10 @@ public:
Reads the specified number of bytes into a buffer, returning the actual number Reads the specified number of bytes into a buffer, returning the actual number
read. read.
@param buffer @param buffer
A buffer to receive the data. A buffer to receive the data.
@param count @param count
The number of bytes to read. The number of bytes to read.
@returns The number of bytes read. @returns The number of bytes read.
@@ -152,10 +152,10 @@ public:
Reads the entire contents of the file into a string. Reads the entire contents of the file into a string.
@param str @param str
String to read data into. String to read data into.
@param conv @param conv
Conversion object to use in Unicode build; by default supposes Conversion object to use in Unicode build; by default supposes
that file contents is encoded in UTF-8. that file contents is encoded in UTF-8.
@@ -166,10 +166,10 @@ public:
/** /**
Seeks to the specified position and returns @true on success. Seeks to the specified position and returns @true on success.
@param ofs @param ofs
Offset to seek to. Offset to seek to.
@param mode @param mode
One of wxFromStart, wxFromEnd, wxFromCurrent. One of wxFromStart, wxFromEnd, wxFromCurrent.
*/ */
bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart); bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
@@ -179,7 +179,7 @@ public:
file file
and returns @true on success. and returns @true on success.
@param ofs @param ofs
Number of bytes before the end of the file. Number of bytes before the end of the file.
*/ */
bool SeekEnd(wxFileOffset ofs = 0); bool SeekEnd(wxFileOffset ofs = 0);

View File

@@ -9,11 +9,11 @@
/** /**
@class wxTempFile @class wxTempFile
@wxheader{file.h} @wxheader{file.h}
wxTempFile provides a relatively safe way to replace the contents of the wxTempFile provides a relatively safe way to replace the contents of the
existing file. The name is explained by the fact that it may be also used as existing file. The name is explained by the fact that it may be also used as
just a temporary file if you don't replace the old file contents. just a temporary file if you don't replace the old file contents.
Usually, when a program replaces the contents of some file it first opens it for Usually, when a program replaces the contents of some file it first opens it for
writing, thus losing all of the old data and then starts recreating it. This writing, thus losing all of the old data and then starts recreating it. This
approach is not very safe because during the regeneration of the file bad things approach is not very safe because during the regeneration of the file bad things
@@ -22,35 +22,35 @@
generation takes long time) and, finally, any other external interrupts (power generation takes long time) and, finally, any other external interrupts (power
supply failure or a disk error) will leave you without either the original file supply failure or a disk error) will leave you without either the original file
or the new one. or the new one.
wxTempFile addresses this problem by creating a temporary file which is meant to wxTempFile addresses this problem by creating a temporary file which is meant to
replace the original file - but only after it is fully written. So, if the user replace the original file - but only after it is fully written. So, if the user
interrupts the program during the file generation, the old file won't be lost. interrupts the program during the file generation, the old file won't be lost.
Also, if the program discovers itself that it doesn't want to replace the old Also, if the program discovers itself that it doesn't want to replace the old
file there is no problem - in fact, wxTempFile will @b not replace the old file there is no problem - in fact, wxTempFile will @b not replace the old
file by default, you should explicitly call wxTempFile::Commit file by default, you should explicitly call wxTempFile::Commit
to do it. Calling wxTempFile::Discard explicitly discards any to do it. Calling wxTempFile::Discard explicitly discards any
modifications: it closes and deletes the temporary file and leaves the original modifications: it closes and deletes the temporary file and leaves the original
file unchanged. If you don't call neither of Commit() and Discard(), the file unchanged. If you don't call neither of Commit() and Discard(), the
destructor will call Discard() automatically. destructor will call Discard() automatically.
To summarize: if you want to replace another file, create an instance of To summarize: if you want to replace another file, create an instance of
wxTempFile passing the name of the file to be replaced to the constructor (you wxTempFile passing the name of the file to be replaced to the constructor (you
may also use default constructor and pass the file name to may also use default constructor and pass the file name to
wxTempFile::Open). Then you can wxTempFile::write wxTempFile::Open). Then you can wxTempFile::write
to wxTempFile using wxFile-like functions and later call to wxTempFile using wxFile-like functions and later call
Commit() to replace the old file (and close this one) or call Discard() to Commit() to replace the old file (and close this one) or call Discard() to
cancel cancel
the modifications. the modifications.
@library{wxbase} @library{wxbase}
@category{file} @category{file}
*/ */
class wxTempFile class wxTempFile
{ {
public: public:
/** /**
Associates wxTempFile with the file to be replaced and opens it. You should use Associates wxTempFile with the file to be replaced and opens it. You should use
IsOpened() to verify if the constructor succeeded. IsOpened() to verify if the constructor succeeded.
*/ */
wxTempFile(const wxString& strName); wxTempFile(const wxString& strName);
@@ -91,7 +91,7 @@ public:
occurred. occurred.
@e strName is the name of file to be replaced. The temporary file is always @e strName is the name of file to be replaced. The temporary file is always
created in the directory where @e strName is. In particular, if created in the directory where @e strName is. In particular, if
@e strName doesn't include the path, it is created in the current directory @e strName doesn't include the path, it is created in the current directory
and the program should have write access to it for the function to succeed. and the program should have write access to it for the function to succeed.
*/ */
@@ -124,24 +124,24 @@ public:
/** /**
@class wxFile @class wxFile
@wxheader{file.h} @wxheader{file.h}
A wxFile performs raw file I/O. This is a very small class designed to A wxFile performs raw file I/O. This is a very small class designed to
minimize the overhead of using it - in fact, there is hardly any overhead at minimize the overhead of using it - in fact, there is hardly any overhead at
all, but using it brings you automatic error checking and hides differences all, but using it brings you automatic error checking and hides differences
between platforms and compilers. wxFile also automatically closes the file in between platforms and compilers. wxFile also automatically closes the file in
its destructor making it unnecessary to worry about forgetting to do it. its destructor making it unnecessary to worry about forgetting to do it.
wxFile is a wrapper around @c file descriptor. - see also wxFile is a wrapper around @c file descriptor. - see also
wxFFile for a wrapper around @c FILE structure. wxFFile for a wrapper around @c FILE structure.
@c wxFileOffset is used by the wxFile functions which require offsets as @c wxFileOffset is used by the wxFile functions which require offsets as
parameter or return them. If the platform supports it, wxFileOffset is a typedef parameter or return them. If the platform supports it, wxFileOffset is a typedef
for a native 64 bit integer, otherwise a 32 bit integer is used for for a native 64 bit integer, otherwise a 32 bit integer is used for
wxFileOffset. wxFileOffset.
@library{wxbase} @library{wxbase}
@category{file} @category{file}
*/ */
class wxFile class wxFile
{ {
public: public:
//@{ //@{
@@ -149,21 +149,21 @@ public:
Associates the file with the given file descriptor, which has already been Associates the file with the given file descriptor, which has already been
opened. opened.
@param filename @param filename
The filename. The filename.
@param mode @param mode
The mode in which to open the file. May be one of read(), write() and The mode in which to open the file. May be one of read(), write() and
wxFile::read_write. wxFile::read_write.
@param fd @param fd
An existing file descriptor (see Attach() for the list of predefined An existing file descriptor (see Attach() for the list of predefined
descriptors) descriptors)
*/ */
wxFile(); wxFile();
wxFile(const wxString& filename, wxFile(const wxString& filename,
wxFile::OpenMode mode = wxFile::read); wxFile::OpenMode mode = wxFile::read);
wxFile(int fd); wxFile(int fd);
//@} //@}
/** /**
@@ -214,9 +214,9 @@ public:
/** /**
Returns @true if the end of the file has been reached. Returns @true if the end of the file has been reached.
Note that the behaviour of the file pointer based class Note that the behaviour of the file pointer based class
wxFFile is different as wxFFile::Eof wxFFile is different as wxFFile::Eof
will return @true here only if an attempt has been made to read will return @true here only if an attempt has been made to read
@e past the last byte of the file, while wxFile::Eof() will return @true @e past the last byte of the file, while wxFile::Eof() will return @true
even before such attempt is made if the file pointer is at the last position even before such attempt is made if the file pointer is at the last position
in the file. in the file.
@@ -224,7 +224,7 @@ public:
Note also that this function doesn't work on unseekable file descriptors Note also that this function doesn't work on unseekable file descriptors
(examples include pipes, terminals and sockets under Unix) and an attempt to (examples include pipes, terminals and sockets under Unix) and an attempt to
use it will result in an error message in such case. So, to read the entire use it will result in an error message in such case. So, to read the entire
file into memory, you should write a loop which uses file into memory, you should write a loop which uses
Read() repeatedly and tests its return condition instead Read() repeatedly and tests its return condition instead
of using Eof() as this will not work for special files under Unix. of using Eof() as this will not work for special files under Unix.
*/ */
@@ -263,10 +263,10 @@ public:
/** /**
Opens the file, returning @true if successful. Opens the file, returning @true if successful.
@param filename @param filename
The filename. The filename.
@param mode @param mode
The mode in which to open the file. May be one of read(), write() and The mode in which to open the file. May be one of read(), write() and
wxFile::read_write. wxFile::read_write.
*/ */
@@ -278,17 +278,17 @@ public:
if there was an error. if there was an error.
*/ */
size_t Read(void* buffer, size_t count); size_t Read(void* buffer, size_t count);
Parameters Return value Parameters Return value
The number of bytes read, or the symbol wxInvalidOffset(); The number of bytes read, or the symbol wxInvalidOffset();
//@} //@}
/** /**
Seeks to the specified position. Seeks to the specified position.
@param ofs @param ofs
Offset to seek to. Offset to seek to.
@param mode @param mode
One of wxFromStart, wxFromEnd, wxFromCurrent. One of wxFromStart, wxFromEnd, wxFromCurrent.
@returns The actual offset position achieved, or wxInvalidOffset on @returns The actual offset position achieved, or wxInvalidOffset on
@@ -302,7 +302,7 @@ The number of bytes read, or the symbol wxInvalidOffset();
the file. For example, @c SeekEnd(-5) would position the pointer 5 the file. For example, @c SeekEnd(-5) would position the pointer 5
bytes before the end. bytes before the end.
@param ofs @param ofs
Number of bytes before the end of the file. Number of bytes before the end of the file.
@returns The actual offset position achieved, or wxInvalidOffset on @returns The actual offset position achieved, or wxInvalidOffset on
@@ -324,7 +324,7 @@ The number of bytes read, or the symbol wxInvalidOffset();
@e conv is used to convert @e s to multibyte representation. @e conv is used to convert @e s to multibyte representation.
Note that this method only works with @c NUL-terminated strings, if you want Note that this method only works with @c NUL-terminated strings, if you want
to write data with embedded @c NULs to the file you should use the other to write data with embedded @c NULs to the file you should use the other
@ref write() "Write() overload". @ref write() "Write() overload".
*/ */
bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8); bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8);

View File

@@ -9,20 +9,20 @@
/** /**
@class wxFileConfig @class wxFileConfig
@wxheader{fileconf.h} @wxheader{fileconf.h}
wxFileConfig implements wxConfigBase interface for wxFileConfig implements wxConfigBase interface for
storing and retrieving configuration information using plain text files. The storing and retrieving configuration information using plain text files. The
files have a simple format reminiscent of Windows INI files with lines of the files have a simple format reminiscent of Windows INI files with lines of the
form @c key = value defining the keys and lines of special form form @c key = value defining the keys and lines of special form
@c [group] indicating the start of each group. @c [group] indicating the start of each group.
This class is used by default for wxConfig on Unix platforms but may also be This class is used by default for wxConfig on Unix platforms but may also be
used explicitly if you want to use files and not the registry even under used explicitly if you want to use files and not the registry even under
Windows. Windows.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxFileConfig::Save wxFileConfig::Save
*/ */
@@ -52,7 +52,7 @@ public:
user-specific, file if it were constructed with @e basename as "local user-specific, file if it were constructed with @e basename as "local
filename'' parameter in the constructor. filename'' parameter in the constructor.
@e style has the same meaning as in @ref wxConfigBase::ctor constructor @e style has the same meaning as in @ref wxConfigBase::ctor constructor
and can contain any combination of styles but only wxCONFIG_USE_SUBDIR bit is and can contain any combination of styles but only wxCONFIG_USE_SUBDIR bit is
examined by this function. examined by this function.
@@ -81,7 +81,7 @@ public:
/** /**
Allows to set the mode to be used for the config file creation. For example, to Allows to set the mode to be used for the config file creation. For example, to
create a config file which is not readable by other users (useful if it stores create a config file which is not readable by other users (useful if it stores
some sensitive information, such as passwords), you could use some sensitive information, such as passwords), you could use
@c SetUmask(0077). @c SetUmask(0077).
This function doesn't do anything on non-Unix platforms. This function doesn't do anything on non-Unix platforms.

View File

@@ -9,11 +9,11 @@
/** /**
@class wxFileCtrl @class wxFileCtrl
@wxheader{filectrl.h} @wxheader{filectrl.h}
This control allows the user to select a file. two implemetations exist, one This control allows the user to select a file. two implemetations exist, one
for Gtk and another generic one for anything other than Gtk. for Gtk and another generic one for anything other than Gtk.
It is only available if @c wxUSE_FILECTRL is set to 1. It is only available if @c wxUSE_FILECTRL is set to 1.
@beginStyleTable @beginStyleTable
@style{wxFC_DEFAULT_STYLE}: @style{wxFC_DEFAULT_STYLE}:
The default style: wxFC_OPEN The default style: wxFC_OPEN
@@ -29,10 +29,10 @@
@style{wxFC_NOSHOWHIDDEN}: @style{wxFC_NOSHOWHIDDEN}:
Hides the "Show Hidden Files" checkbox (Generic only) Hides the "Show Hidden Files" checkbox (Generic only)
@endStyleTable @endStyleTable
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxGenericDirCtrl wxGenericDirCtrl
*/ */
@@ -41,48 +41,48 @@ class wxFileCtrl : public wxWindow
public: public:
//@{ //@{
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param defaultDirectory @param defaultDirectory
The initial directory shown in the control. Must be The initial directory shown in the control. Must be
a valid path to a directory or the empty string. a valid path to a directory or the empty string.
In case it is the empty string, the current working directory is used. In case it is the empty string, the current working directory is used.
@param defaultFilename @param defaultFilename
The default filename, or the empty string. The default filename, or the empty string.
@param wildcard @param wildcard
A wildcard specifying which files can be selected, A wildcard specifying which files can be selected,
such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif". such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
@param style @param style
The window style, see wxFC_* flags. The window style, see wxFC_* flags.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
creation failed. creation failed.
*/ */
wxFileCtrl(); wxFileCtrl();
wxFileCtrl(wxWindow * parent, wxWindowID id, wxFileCtrl(wxWindow * parent, wxWindowID id,
const wxString& defaultDirectory = wxEmptyString, const wxString& defaultDirectory = wxEmptyString,
const wxString& defaultFilename = wxEmptyString, const wxString& defaultFilename = wxEmptyString,
const wxPoint& wildCard = wxFileSelectorDefaultWildcardStr, const wxPoint& wildCard = wxFileSelectorDefaultWildcardStr,
long style = wxFC_DEFAULT_STYLE, long style = wxFC_DEFAULT_STYLE,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
const wxString& name = "filectrl"); const wxString& name = "filectrl");
//@} //@}
/** /**
@@ -182,10 +182,10 @@ public:
/** /**
@class wxFileCtrlEvent @class wxFileCtrlEvent
@wxheader{filectrl.h} @wxheader{filectrl.h}
A file control event holds information about events associated with A file control event holds information about events associated with
wxFileCtrl objects. wxFileCtrl objects.
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
*/ */
@@ -219,5 +219,5 @@ public:
/** /**
Sets the files changed by this event. Sets the files changed by this event.
*/ */
wxFileCtrlEvent::SetFiles(const wxArrayString files); wxFileCtrlEvent::SetFiles(const wxArrayString files);
}; };

View File

@@ -9,9 +9,9 @@
/** /**
@class wxFileDialog @class wxFileDialog
@wxheader{filedlg.h} @wxheader{filedlg.h}
This class represents the file chooser dialog. This class represents the file chooser dialog.
@beginStyleTable @beginStyleTable
@style{wxFD_DEFAULT_STYLE}: @style{wxFD_DEFAULT_STYLE}:
Equivalent to wxFD_OPEN. Equivalent to wxFD_OPEN.
@@ -37,10 +37,10 @@
Show the preview of the selected files (currently only supported by Show the preview of the selected files (currently only supported by
wxGTK using GTK+ 2.4 or later). wxGTK using GTK+ 2.4 or later).
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxfiledialogoverview "wxFileDialog overview", wxFileSelector @ref overview_wxfiledialogoverview "wxFileDialog overview", wxFileSelector
*/ */
@@ -50,34 +50,34 @@ public:
/** /**
Constructor. Use ShowModal() to show the dialog. Constructor. Use ShowModal() to show the dialog.
@param parent @param parent
Parent window. Parent window.
@param message @param message
Message to show on the dialog. Message to show on the dialog.
@param defaultDir @param defaultDir
The default directory, or the empty string. The default directory, or the empty string.
@param defaultFile @param defaultFile
The default filename, or the empty string. The default filename, or the empty string.
@param wildcard @param wildcard
A wildcard, such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif". A wildcard, such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
Note that the native Motif dialog has some limitations with respect to Note that the native Motif dialog has some limitations with respect to
wildcards; see the Remarks section above. wildcards; see the Remarks section above.
@param style @param style
A dialog style. See wxFD_* styles for more info. A dialog style. See wxFD_* styles for more info.
@param pos @param pos
Dialog position. Not implemented. Dialog position. Not implemented.
@param size @param size
Dialog size. Not implemented. Dialog size. Not implemented.
@param name @param name
Dialog name. Not implemented. Dialog name. Not implemented.
*/ */
wxFileDialog(wxWindow* parent, wxFileDialog(wxWindow* parent,
@@ -101,7 +101,7 @@ public:
wxString GetDirectory(); wxString GetDirectory();
/** /**
If functions If functions
SetExtraControlCreator() SetExtraControlCreator()
and ShowModal() were called, and ShowModal() were called,
returns the extra window. Otherwise returns @NULL. returns the extra window. Otherwise returns @NULL.
@@ -229,18 +229,18 @@ public:
wxFD_MULTIPLE wxFD_MULTIPLE
can only be used with wxFileDialog and not here as this can only be used with wxFileDialog and not here as this
function only returns a single file name. function only returns a single file name.
Both the Unix and Windows versions implement a wildcard filter. Typing a Both the Unix and Windows versions implement a wildcard filter. Typing a
filename containing wildcards (*, ?) in the filename text item, and filename containing wildcards (*, ?) in the filename text item, and
clicking on Ok, will result in only those files matching the pattern being clicking on Ok, will result in only those files matching the pattern being
displayed. displayed.
The wildcard may be a specification for multiple types of file The wildcard may be a specification for multiple types of file
with a description for each, such as: with a description for each, such as:
@code @code
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
@endcode @endcode
The application must check for an empty return value (the user pressed The application must check for an empty return value (the user pressed
Cancel). For example: Cancel). For example:
@code @code

View File

@@ -9,18 +9,18 @@
/** /**
@class wxPathList @class wxPathList
@wxheader{filefn.h} @wxheader{filefn.h}
The path list is a convenient way of storing a number of directories, and The path list is a convenient way of storing a number of directories, and
when presented with a filename without a directory, searching for an existing when presented with a filename without a directory, searching for an existing
file file
in those directories. in those directories.
Be sure to look also at wxStandardPaths if you only Be sure to look also at wxStandardPaths if you only
want to search files in some standard paths. want to search files in some standard paths.
@library{wxbase} @library{wxbase}
@category{file} @category{file}
@seealso @seealso
wxArrayString, wxStandardPaths, wxFileName wxArrayString, wxStandardPaths, wxFileName
*/ */
@@ -32,7 +32,7 @@ public:
Constructs the object calling the Add() function. Constructs the object calling the Add() function.
*/ */
wxPathList(); wxPathList();
wxPathList(const wxArrayString& arr); wxPathList(const wxArrayString& arr);
//@} //@}
//@{ //@{
@@ -54,7 +54,7 @@ public:
(this is why FindValidPath() may return relative paths). (this is why FindValidPath() may return relative paths).
*/ */
bool Add(const wxString& path); bool Add(const wxString& path);
void Add(const wxArrayString& arr); void Add(const wxArrayString& arr);
//@} //@}
/** /**
@@ -129,7 +129,7 @@ wxString wxGetOSDirectory();
On platforms where native dialogs handle only one filter per entry, On platforms where native dialogs handle only one filter per entry,
entries in arrays are automatically adjusted. entries in arrays are automatically adjusted.
@e wildCard is in the form: @e wildCard is in the form:
@code @code
"All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png" "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
@endcode @endcode
@@ -140,7 +140,7 @@ int wxParseCommonDialogsFilter(const wxString& wildCard,
/** /**
This function is deprecated, use wxFileName instead. This function is deprecated, use wxFileName instead.
Converts a Unix to a DOS filename by replacing forward Converts a Unix to a DOS filename by replacing forward
slashes with backslashes. slashes with backslashes.
*/ */
@@ -154,7 +154,7 @@ bool wxDirExists(const wxString& dirname);
/** /**
@b NB: This function is obsolete, please use @b NB: This function is obsolete, please use
wxFileName::SplitPath instead. wxFileName::SplitPath instead.
This function splits a full file name into components: the path (including This function splits a full file name into components: the path (including
possible disk/drive possible disk/drive
specification under Windows), the base name and the extension. Any of the specification under Windows), the base name and the extension. Any of the
@@ -162,15 +162,15 @@ bool wxDirExists(const wxString& dirname);
(@e path, @e name or @e ext) may be @NULL if you are not interested in the value (@e path, @e name or @e ext) may be @NULL if you are not interested in the value
of of
a particular component. a particular component.
wxSplitPath() will correctly handle filenames with both DOS and Unix path wxSplitPath() will correctly handle filenames with both DOS and Unix path
separators under separators under
Windows, however it will not consider backslashes as path separators under Unix Windows, however it will not consider backslashes as path separators under Unix
(where backslash (where backslash
is a valid character in a filename). is a valid character in a filename).
On entry, @e fullname should be non-@NULL (it may be empty though). On entry, @e fullname should be non-@NULL (it may be empty though).
On return, @e path contains the file path (without the trailing separator), @e On return, @e path contains the file path (without the trailing separator), @e
name name
contains the file name and @e ext contains the file extension without leading contains the file name and @e ext contains the file extension without leading
@@ -190,14 +190,14 @@ void wxSplitPath(const wxString& fullname, wxString * path,
unless it is equal to -1 in which case nothing is done, and restores it to unless it is equal to -1 in which case nothing is done, and restores it to
the original value on scope exit. It works by declaring a variable which sets the original value on scope exit. It works by declaring a variable which sets
umask to @e mask in its constructor and restores it in its destructor. umask to @e mask in its constructor and restores it in its destructor.
Under other platforms this macro expands to nothing. Under other platforms this macro expands to nothing.
*/ */
#define wxCHANGE_UMASK(int mask) /* implementation is private */ #define wxCHANGE_UMASK(int mask) /* implementation is private */
/** /**
Returns time of last modification of given file. Returns time of last modification of given file.
The function returns @c (time_t)-1 if an error occurred (e.g. file not The function returns @c (time_t)-1 if an error occurred (e.g. file not
found). found).
*/ */
@@ -207,17 +207,17 @@ time_t wxFileModificationTime(const wxString& filename);
/** /**
@b NB: This function is obsolete, please use @b NB: This function is obsolete, please use
wxFileName::SplitPath instead. wxFileName::SplitPath instead.
Returns the filename for a full path. The second form returns a pointer to Returns the filename for a full path. The second form returns a pointer to
temporary storage that should not be deallocated. temporary storage that should not be deallocated.
*/ */
wxString wxFileNameFromPath(const wxString& path); wxString wxFileNameFromPath(const wxString& path);
char * wxFileNameFromPath(char * path); char * wxFileNameFromPath(char * path);
//@} //@}
/** /**
Renames @e file1 to @e file2, returning @true if successful. Renames @e file1 to @e file2, returning @true if successful.
If @e overwrite parameter is @true (default), the destination file is If @e overwrite parameter is @true (default), the destination file is
overwritten if it exists, but if @e overwrite is @false, the functions fails overwritten if it exists, but if @e overwrite is @false, the functions fails
in this case. in this case.
@@ -230,7 +230,7 @@ bool wxRenameFile(const wxString& file1, const wxString& file2,
@e overwrite parameter is @true (default), the destination file is overwritten @e overwrite parameter is @true (default), the destination file is overwritten
if it exists, but if @e overwrite is @false, the functions fails in this if it exists, but if @e overwrite is @false, the functions fails in this
case. case.
This function supports resources forks under Mac OS. This function supports resources forks under Mac OS.
*/ */
bool wxCopyFile(const wxString& file1, const wxString& file2, bool wxCopyFile(const wxString& file1, const wxString& file2,
@@ -251,11 +251,11 @@ bool wxMatchWild(const wxString& pattern, const wxString& text,
/** /**
@b NB: This function is deprecated: use wxGetCwd instead. @b NB: This function is deprecated: use wxGetCwd instead.
Copies the current working directory into the buffer if supplied, or Copies the current working directory into the buffer if supplied, or
copies the working directory into new storage (which you must delete copies the working directory into new storage (which you must delete
yourself) if the buffer is @NULL. yourself) if the buffer is @NULL.
@e sz is the size of the buffer if supplied. @e sz is the size of the buffer if supplied.
*/ */
wxString wxGetWorkingDirectory(char * buf=@NULL, int sz=1000); wxString wxGetWorkingDirectory(char * buf=@NULL, int sz=1000);
@@ -302,7 +302,7 @@ bool wxSetWorkingDirectory(const wxString& dir);
/** /**
Makes the directory @e dir, returning @true if successful. Makes the directory @e dir, returning @true if successful.
@e perm is the access mask for the directory for the systems on which it is @e perm is the access mask for the directory for the systems on which it is
supported (Unix) and doesn't have any effect on the other ones. supported (Unix) and doesn't have any effect on the other ones.
*/ */
@@ -316,7 +316,7 @@ bool wxIsAbsolutePath(const wxString& filename);
/** /**
Returns the next file that matches the path passed to wxFindFirstFile. Returns the next file that matches the path passed to wxFindFirstFile.
See wxFindFirstFile for an example. See wxFindFirstFile for an example.
*/ */
wxString wxFindNextFile(); wxString wxFindNextFile();
@@ -343,7 +343,7 @@ wxString wxFindFirstFile(const wxString& spec, int flags = 0);
@endcode @endcode
*/ */
wxFileKind wxGetFileKind(int fd); wxFileKind wxGetFileKind(int fd);
wxFileKind wxGetFileKind(FILE * fp); wxFileKind wxGetFileKind(FILE * fp);
//@} //@}
//@{ //@{
@@ -353,15 +353,15 @@ wxFileKind wxGetFileKind(int fd);
instead. instead.
*/ */
char * wxGetTempFileName(const wxString& prefix, char * buf=@NULL); char * wxGetTempFileName(const wxString& prefix, char * buf=@NULL);
bool wxGetTempFileName(const wxString& prefix, wxString& buf); bool wxGetTempFileName(const wxString& prefix, wxString& buf);
//@} //@}
/** /**
Removes the directory @e dir, returning @true if successful. Does not work under Removes the directory @e dir, returning @true if successful. Does not work under
VMS. VMS.
The @e flags parameter is reserved for future use. The @e flags parameter is reserved for future use.
Please notice that there is also a wxRmDir() function which simply wraps the Please notice that there is also a wxRmDir() function which simply wraps the
standard POSIX rmdir() function and so return an integer error code instead of standard POSIX rmdir() function and so return an integer error code instead of
a boolean value (but otherwise is currently identical to wxRmdir), don't a boolean value (but otherwise is currently identical to wxRmdir), don't

View File

@@ -9,7 +9,7 @@
/** /**
@class wxFileName @class wxFileName
@wxheader{filename.h} @wxheader{filename.h}
wxFileName encapsulates a file name. This class serves two purposes: first, it wxFileName encapsulates a file name. This class serves two purposes: first, it
provides the functions to split the file names into components and to recombine provides the functions to split the file names into components and to recombine
these components in the full file name which can then be passed to the OS file these components in the full file name which can then be passed to the OS file
@@ -17,29 +17,29 @@
Second, it includes the functions for working with the files itself. Note that Second, it includes the functions for working with the files itself. Note that
to change the file data you should use wxFile class instead. to change the file data you should use wxFile class instead.
wxFileName provides functions for working with the file attributes. wxFileName provides functions for working with the file attributes.
When working with directory names (i.e. without filename and extension) When working with directory names (i.e. without filename and extension)
make sure not to misuse the file name part of this class with the last make sure not to misuse the file name part of this class with the last
directory. Instead initialize the wxFileName instance like this: directory. Instead initialize the wxFileName instance like this:
@code @code
wxFileName dirname( "C:\mydir", "" ); wxFileName dirname( "C:\mydir", "" );
MyMethod( dirname.GetPath() ); MyMethod( dirname.GetPath() );
@endcode @endcode
The same can be done using the static method wxFileName::DirName: The same can be done using the static method wxFileName::DirName:
@code @code
wxFileName dirname = wxFileName::DirName( "C:\mydir" ); wxFileName dirname = wxFileName::DirName( "C:\mydir" );
MyMethod( dirname.GetPath() ); MyMethod( dirname.GetPath() );
@endcode @endcode
Accordingly, methods dealing with directories or directory names Accordingly, methods dealing with directories or directory names
like wxFileName::IsDirReadable use like wxFileName::IsDirReadable use
wxFileName::GetPath whereas methods dealing wxFileName::GetPath whereas methods dealing
with file names like wxFileName::IsFileReadable with file names like wxFileName::IsFileReadable
use wxFileName::GetFullPath. use wxFileName::GetFullPath.
If it is not known wether a string contains a directory name or If it is not known wether a string contains a directory name or
a complete file name (such as when interpreting user input) you need to use a complete file name (such as when interpreting user input) you need to use
the static function wxFileName::DirExists the static function wxFileName::DirExists
@@ -47,25 +47,25 @@
wxDirExists) and construct the wxFileName wxDirExists) and construct the wxFileName
instance accordingly. This will only work if the directory actually exists, instance accordingly. This will only work if the directory actually exists,
of course: of course:
@code @code
wxString user_input; wxString user_input;
// get input from user // get input from user
wxFileName fname; wxFileName fname;
if (wxDirExists(user_input)) if (wxDirExists(user_input))
fname.AssignDir( user_input ); fname.AssignDir( user_input );
else else
fname.Assign( user_input ); fname.Assign( user_input );
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{file} @category{file}
@seealso @seealso
wxFileName::GetCwd wxFileName::GetCwd
*/ */
class wxFileName class wxFileName
{ {
public: public:
//@{ //@{
@@ -73,18 +73,18 @@ public:
Constructor from a volume name, a directory name, base file name and extension. Constructor from a volume name, a directory name, base file name and extension.
*/ */
wxFileName(); wxFileName();
wxFileName(const wxFileName& filename); wxFileName(const wxFileName& filename);
wxFileName(const wxString& fullpath, wxFileName(const wxString& fullpath,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
wxFileName(const wxString& path, const wxString& name, wxFileName(const wxString& path, const wxString& name,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
wxFileName(const wxString& path, const wxString& name, wxFileName(const wxString& path, const wxString& name,
const wxString& ext, const wxString& ext,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
wxFileName(const wxString& volume, const wxString& path, wxFileName(const wxString& volume, const wxString& path,
const wxString& name, const wxString& name,
const wxString& ext, const wxString& ext,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
//@} //@}
/** /**
@@ -100,22 +100,22 @@ public:
Creates the file name from various combinations of data. Creates the file name from various combinations of data.
*/ */
void Assign(const wxFileName& filepath); void Assign(const wxFileName& filepath);
void Assign(const wxString& fullpath, void Assign(const wxString& fullpath,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
void Assign(const wxString& volume, const wxString& path, void Assign(const wxString& volume, const wxString& path,
const wxString& name, const wxString& name,
const wxString& ext, const wxString& ext,
bool hasExt, bool hasExt,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
void Assign(const wxString& volume, const wxString& path, void Assign(const wxString& volume, const wxString& path,
const wxString& name, const wxString& name,
const wxString& ext, const wxString& ext,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
void Assign(const wxString& path, const wxString& name, void Assign(const wxString& path, const wxString& name,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
void Assign(const wxString& path, const wxString& name, void Assign(const wxString& path, const wxString& name,
const wxString& ext, const wxString& ext,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
//@} //@}
/** /**
@@ -153,7 +153,7 @@ public:
void Clear(); void Clear();
/** /**
Removes the extension from the file name resulting in a Removes the extension from the file name resulting in a
file name with no trailing dot. file name with no trailing dot.
@sa SetExt(), SetEmptyExt() @sa SetExt(), SetEmptyExt()
@@ -176,10 +176,10 @@ public:
Under Unix, the temporary file will have read and write permissions for the Under Unix, the temporary file will have read and write permissions for the
owner only to minimize the security problems. owner only to minimize the security problems.
@param prefix @param prefix
Prefix to use for the temporary file name construction Prefix to use for the temporary file name construction
@param fileTemp @param fileTemp
The file to open or @NULL to just get the name The file to open or @NULL to just get the name
@returns The full temporary file name or an empty string on error. @returns The full temporary file name or an empty string on error.
@@ -192,7 +192,7 @@ public:
Returns @true if the directory with this name exists. Returns @true if the directory with this name exists.
*/ */
bool DirExists(); bool DirExists();
static bool DirExists(const wxString& dir); static bool DirExists(const wxString& dir);
//@} //@}
/** /**
@@ -288,7 +288,7 @@ public:
question is to use IsAbsolute() or question is to use IsAbsolute() or
IsRelative() method. Note that on Windows, "X:" IsRelative() method. Note that on Windows, "X:"
refers to the current working directory on drive X. Therefore, a wxFileName refers to the current working directory on drive X. Therefore, a wxFileName
instance constructed from for example "X:dir/file.ext" treats the portion instance constructed from for example "X:dir/file.ext" treats the portion
beyond drive separator as being relative to that directory. beyond drive separator as being relative to that directory.
To ensure that the filename is absolute, you may use To ensure that the filename is absolute, you may use
@@ -333,7 +333,7 @@ public:
@sa DirExists() @sa DirExists()
*/ */
bool FileExists(); bool FileExists();
static bool FileExists(const wxString& file); static bool FileExists(const wxString& file);
//@} //@}
/** /**
@@ -414,9 +414,9 @@ public:
*/ */
wxString GetHumanReadableSize(const wxString& failmsg = "Not available", wxString GetHumanReadableSize(const wxString& failmsg = "Not available",
int precision = 1); int precision = 1);
static wxString GetHumanReadableSize(const wxULongLong& bytes, static wxString GetHumanReadableSize(const wxULongLong& bytes,
const wxString& nullsize = "Not available", const wxString& nullsize = "Not available",
int precision = 1); int precision = 1);
//@} //@}
/** /**
@@ -459,7 +459,7 @@ public:
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
/** /**
Returns the usually used path separator for this format. For all formats but Returns the usually used path separator for this format. For all formats but
@c wxPATH_DOS there is only one path separator anyhow, but for DOS there @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 are two of them and the native one, i.e. the backslash is returned by this
method. method.
@@ -508,7 +508,7 @@ public:
by another process) the returned value is @c wxInvalidSize. by another process) the returned value is @c wxInvalidSize.
*/ */
wxULongLong GetSize(); wxULongLong GetSize();
static wxULongLong GetSize(const wxString& filename); static wxULongLong GetSize(const wxString& filename);
//@} //@}
/** /**
@@ -585,8 +585,8 @@ public:
/** /**
Returns @true if this object represents a directory, @false otherwise Returns @true if this object represents a directory, @false otherwise
(i.e. if it is a file). Note that this method doesn't test whether the (i.e. if it is a file). Note that this method doesn't test whether the
directory or file really exists, you should use directory or file really exists, you should use
DirExists() or DirExists() or
FileExists() for this. FileExists() for this.
*/ */
bool IsDir(); bool IsDir();
@@ -600,7 +600,7 @@ public:
doesn't imply that you have read permissions on the files contained. doesn't imply that you have read permissions on the files contained.
*/ */
bool IsDirReadable(); bool IsDirReadable();
static bool IsDirReadable(const wxString& dir); static bool IsDirReadable(const wxString& dir);
//@} //@}
//@{ //@{
@@ -611,7 +611,7 @@ public:
directory. directory.
*/ */
bool IsDirWritable(); bool IsDirWritable();
static bool IsDirWritable(const wxString& dir); static bool IsDirWritable(const wxString& dir);
//@} //@}
//@{ //@{
@@ -620,7 +620,7 @@ public:
permissions on it. permissions on it.
*/ */
bool IsFileExecutable(); bool IsFileExecutable();
static bool IsFileExecutable(const wxString& file); static bool IsFileExecutable(const wxString& file);
//@} //@}
//@{ //@{
@@ -629,7 +629,7 @@ public:
permissions on it. permissions on it.
*/ */
bool IsFileReadable(); bool IsFileReadable();
static bool IsFileReadable(const wxString& file); static bool IsFileReadable(const wxString& file);
//@} //@}
//@{ //@{
@@ -638,7 +638,7 @@ public:
permissions on it. permissions on it.
*/ */
bool IsFileWritable(); bool IsFileWritable();
static bool IsFileWritable(const wxString& file); static bool IsFileWritable(const wxString& file);
//@} //@}
/** /**
@@ -664,16 +664,16 @@ public:
On Mac OS, gets the common type and creator for the given extension. On Mac OS, gets the common type and creator for the given extension.
*/ */
static bool MacFindDefaultTypeAndCreator(const wxString& ext, static bool MacFindDefaultTypeAndCreator(const wxString& ext,
wxUint32* type, wxUint32* type,
wxUint32* creator); wxUint32* creator);
/** /**
On Mac OS, registers application defined extensions and their default type and On Mac OS, registers application defined extensions and their default type and
creator. creator.
*/ */
static void MacRegisterDefaultTypeAndCreator(const wxString& ext, static void MacRegisterDefaultTypeAndCreator(const wxString& ext,
wxUint32 type, wxUint32 type,
wxUint32 creator); wxUint32 creator);
/** /**
On Mac OS, looks up the appropriate type and creator from the registration and On Mac OS, looks up the appropriate type and creator from the registration and
@@ -692,17 +692,17 @@ public:
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
/** /**
This function tries to put this file name in a form relative to This function tries to put this file name in a form relative to
@param pathBase. @param pathBase.
In other words, it returns the file name which should be used to access this In other words, it returns the file name which should be used to access this
file if the current directory were pathBase. file if the current directory were pathBase.
pathBase pathBase
the directory to use as root, current directory is used by the directory to use as root, current directory is used by
default default
@param format @param format
the file name format, native by default the file name format, native by default
@returns @true if the file name has been changed, @false if we failed to do @returns @true if the file name has been changed, @false if we failed to do
@@ -717,13 +717,13 @@ public:
//@{ //@{
/** /**
@param dir @param dir
the directory to create the directory to create
@param parm @param parm
the permissions for the newly created directory the permissions for the newly created directory
@param flags @param flags
if the flags contain wxPATH_MKDIR_FULL flag, if the flags contain wxPATH_MKDIR_FULL flag,
try to create each directory in the path and also don't return an error try to create each directory in the path and also don't return an error
if the target directory already exists. if the target directory already exists.
@@ -732,8 +732,8 @@ public:
otherwise. otherwise.
*/ */
bool Mkdir(int perm = 0777, int flags = 0); bool Mkdir(int perm = 0777, int flags = 0);
static bool Mkdir(const wxString& dir, int perm = 0777, static bool Mkdir(const wxString& dir, int perm = 0777,
int flags = 0); int flags = 0);
//@} //@}
/** /**
@@ -741,7 +741,7 @@ public:
made absolute, without any ".." and "." and all environment made absolute, without any ".." and "." and all environment
variables will be expanded in it. variables will be expanded in it.
@param flags @param flags
The kind of normalization to do with the file name. It can be The kind of normalization to do with the file name. It can be
any or-combination of the following constants: any or-combination of the following constants:
@@ -786,11 +786,11 @@ public:
all of previous flags except wxPATH_NORM_CASE all of previous flags except wxPATH_NORM_CASE
@param cwd @param cwd
If not empty, this directory will be used instead of current If not empty, this directory will be used instead of current
working directory in normalization (see wxPATH_NORM_ABSOLUTE). working directory in normalization (see wxPATH_NORM_ABSOLUTE).
@param format @param format
The file name format to use when processing the paths, native by default. The file name format to use when processing the paths, native by default.
@returns @true if normalization was successfully or @false otherwise. @returns @true if normalization was successfully or @false otherwise.
@@ -823,7 +823,7 @@ public:
/** /**
Prepends a directory to the file path. Please see Prepends a directory to the file path. Please see
AppendDir() for important notes. AppendDir() for important notes.
*/ */
void PrependDir(const wxString& dir); void PrependDir(const wxString& dir);
@@ -845,7 +845,7 @@ public:
Deletes the specified directory from the file system. Deletes the specified directory from the file system.
*/ */
bool Rmdir(); bool Rmdir();
static bool Rmdir(const wxString& dir); static bool Rmdir(const wxString& dir);
//@} //@}
/** /**
@@ -859,12 +859,12 @@ public:
Changes the current working directory. Changes the current working directory.
*/ */
bool SetCwd(); bool SetCwd();
static bool SetCwd(const wxString& cwd); static bool SetCwd(const wxString& cwd);
//@} //@}
/** /**
Sets the extension of the file name to be an empty extension. Sets the extension of the file name to be an empty extension.
This is different from having no extension at all as the file This is different from having no extension at all as the file
name will have a trailing dot after a call to this method. name will have a trailing dot after a call to this method.
@sa SetExt(), ClearExt() @sa SetExt(), ClearExt()
@@ -873,8 +873,8 @@ public:
/** /**
Sets the extension of the file name. Setting an empty string Sets the extension of the file name. Setting an empty string
as the extension will remove the extension resulting in a file as the extension will remove the extension resulting in a file
name without a trailing dot, unlike a call to name without a trailing dot, unlike a call to
SetEmptyExt(). SetEmptyExt().
@sa SetEmptyExt(), ClearExt() @sa SetEmptyExt(), ClearExt()
@@ -910,18 +910,18 @@ public:
/** /**
This function splits a full file name into components: the volume (with the This function splits a full file name into components: the volume (with the
first version) path (including the volume in the second version), the base name first version) path (including the volume in the second version), the base name
and the extension. Any of the output parameters (@e volume, @e path, and the extension. Any of the output parameters (@e volume, @e path,
@e name or @e ext) may be @NULL if you are not interested in the @e name or @e ext) may be @NULL if you are not interested in the
value of a particular component. Also, @e fullpath may be empty on entry. value of a particular component. Also, @e fullpath may be empty on entry.
On return, @e path contains the file path (without the trailing separator), On return, @e path contains the file path (without the trailing separator),
@e name contains the file name and @e ext contains the file extension @e name contains the file name and @e ext contains the file extension
without leading dot. All three of them may be empty if the corresponding without leading dot. All three of them may be empty if the corresponding
component is. The old contents of the strings pointed to by these parameters component is. The old contents of the strings pointed to by these parameters
will be overwritten in any case (if the pointers are not @NULL). will be overwritten in any case (if the pointers are not @NULL).
Note that for a filename "foo.'' the extension is present, as indicated by the Note that for a filename "foo.'' the extension is present, as indicated by the
trailing dot, but empty. If you need to cope with such cases, you should use trailing dot, but empty. If you need to cope with such cases, you should use
@e hasExt instead of relying on testing whether @e ext is empty or not. @e hasExt instead of relying on testing whether @e ext is empty or not.
*/ */
static void SplitPath(const wxString& fullpath, wxString* volume, static void SplitPath(const wxString& fullpath, wxString* volume,
@@ -930,17 +930,17 @@ public:
wxString* ext, wxString* ext,
bool hasExt = @NULL, bool hasExt = @NULL,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
static void SplitPath(const wxString& fullpath, static void SplitPath(const wxString& fullpath,
wxString* volume, wxString* volume,
wxString* path, wxString* path,
wxString* name, wxString* name,
wxString* ext, wxString* ext,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
static void SplitPath(const wxString& fullpath, static void SplitPath(const wxString& fullpath,
wxString* path, wxString* path,
wxString* name, wxString* name,
wxString* ext, wxString* ext,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
//@} //@}
/** /**
@@ -965,7 +965,7 @@ public:
is interpreted as a path in the native filename format. is interpreted as a path in the native filename format.
*/ */
bool operator operator!=(const wxFileName& filename); bool operator operator!=(const wxFileName& filename);
bool operator operator!=(const wxString& filename); bool operator operator!=(const wxString& filename);
//@} //@}
//@{ //@{
@@ -973,7 +973,7 @@ public:
Assigns the new value to this filename object. Assigns the new value to this filename object.
*/ */
wxFileName& operator operator=(const wxFileName& filename); wxFileName& operator operator=(const wxFileName& filename);
wxFileName& operator operator=(const wxString& filename); wxFileName& operator operator=(const wxString& filename);
//@} //@}
//@{ //@{
@@ -982,6 +982,6 @@ public:
interpreted as a path in the native filename format. interpreted as a path in the native filename format.
*/ */
bool operator operator==(const wxFileName& filename); bool operator operator==(const wxFileName& filename);
bool operator operator==(const wxString& filename); bool operator operator==(const wxString& filename);
//@} //@}
}; };

View File

@@ -9,14 +9,14 @@
/** /**
@class wxFilePickerCtrl @class wxFilePickerCtrl
@wxheader{filepicker.h} @wxheader{filepicker.h}
This control allows the user to select a file. The generic implementation is This control allows the user to select a file. The generic implementation is
a button which brings up a wxFileDialog when clicked. Native implementation a button which brings up a wxFileDialog when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the may differ but this is usually a (small) widget which give access to the
file-chooser file-chooser
dialog. dialog.
It is only available if @c wxUSE_FILEPICKERCTRL is set to 1 (the default). It is only available if @c wxUSE_FILEPICKERCTRL is set to 1 (the default).
@beginStyleTable @beginStyleTable
@style{wxFLP_DEFAULT_STYLE}: @style{wxFLP_DEFAULT_STYLE}:
The default style: includes wxFLP_OPEN | wxFLP_FILE_MUST_EXIST and, The default style: includes wxFLP_OPEN | wxFLP_FILE_MUST_EXIST and,
@@ -40,11 +40,11 @@
@style{wxFLP_CHANGE_DIR}: @style{wxFLP_CHANGE_DIR}:
Change current working directory on each user file selection change. Change current working directory on each user file selection change.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{miscpickers} @category{miscpickers}
@appearance{filepickerctrl.png} @appearance{filepickerctrl.png}
@seealso @seealso
wxFileDialog, wxFileDirPickerEvent wxFileDialog, wxFileDirPickerEvent
*/ */
@@ -66,36 +66,36 @@ public:
const wxString& name = "filepickerctrl"); const wxString& name = "filepickerctrl");
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param path @param path
The initial file shown in the control. Must be a valid path to a file or the The initial file shown in the control. Must be a valid path to a file or the
empty string. empty string.
@param message @param message
The message shown to the user in the wxFileDialog shown by the control. The message shown to the user in the wxFileDialog shown by the control.
@param wildcard @param wildcard
A wildcard which defines user-selectable files (use the same syntax as for A wildcard which defines user-selectable files (use the same syntax as for
wxFileDialog's wildcards). wxFileDialog's wildcards).
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param style @param style
The window style, see wxFLP_* flags. The window style, see wxFLP_* flags.
@param validator @param validator
Validator which can be used for additional date checks. Validator which can be used for additional date checks.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
@@ -140,7 +140,7 @@ public:
/** /**
@class wxDirPickerCtrl @class wxDirPickerCtrl
@wxheader{filepicker.h} @wxheader{filepicker.h}
This control allows the user to select a directory. The generic implementation This control allows the user to select a directory. The generic implementation
is is
a button which brings up a wxDirDialog when clicked. Native implementation a button which brings up a wxDirDialog when clicked. Native implementation
@@ -148,7 +148,7 @@ public:
dir-chooser dir-chooser
dialog. dialog.
It is only available if @c wxUSE_DIRPICKERCTRL is set to 1 (the default). It is only available if @c wxUSE_DIRPICKERCTRL is set to 1 (the default).
@beginStyleTable @beginStyleTable
@style{wxDIRP_DEFAULT_STYLE}: @style{wxDIRP_DEFAULT_STYLE}:
The default style: includes wxDIRP_DIR_MUST_EXIST and, under wxMSW The default style: includes wxDIRP_DIR_MUST_EXIST and, under wxMSW
@@ -167,11 +167,11 @@ public:
Change current working directory on each user directory selection Change current working directory on each user directory selection
change. change.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{miscpickers} @category{miscpickers}
@appearance{dirpickerctrl.png} @appearance{dirpickerctrl.png}
@seealso @seealso
wxDirDialog, wxFileDirPickerEvent wxDirDialog, wxFileDirPickerEvent
*/ */
@@ -192,32 +192,32 @@ public:
const wxString& name = "dirpickerctrl"); const wxString& name = "dirpickerctrl");
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param path @param path
The initial directory shown in the control. Must be a valid path to a directory The initial directory shown in the control. Must be a valid path to a directory
or the empty string. or the empty string.
@param message @param message
The message shown to the user in the wxDirDialog shown by the control. The message shown to the user in the wxDirDialog shown by the control.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param style @param style
The window style, see wxDIRP_* flags. The window style, see wxDIRP_* flags.
@param validator @param validator
Validator which can be used for additional date checks. Validator which can be used for additional date checks.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
@@ -262,13 +262,13 @@ public:
/** /**
@class wxFileDirPickerEvent @class wxFileDirPickerEvent
@wxheader{filepicker.h} @wxheader{filepicker.h}
This event class is used for the events generated by This event class is used for the events generated by
wxFilePickerCtrl and by wxDirPickerCtrl. wxFilePickerCtrl and by wxDirPickerCtrl.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxfilepickerctrl wxfilepickerctrl
*/ */

View File

@@ -9,15 +9,15 @@
/** /**
@class wxFileSystem @class wxFileSystem
@wxheader{filesys.h} @wxheader{filesys.h}
This class provides an interface for opening files on different This class provides an interface for opening files on different
file systems. It can handle absolute and/or local filenames. file systems. It can handle absolute and/or local filenames.
It uses a system of handlers to It uses a system of handlers to
provide access to user-defined virtual file systems. provide access to user-defined virtual file systems.
@library{wxbase} @library{wxbase}
@category{vfs} @category{vfs}
@seealso @seealso
wxFileSystemHandler, wxFSFile, Overview wxFileSystemHandler, wxFSFile, Overview
*/ */
@@ -30,7 +30,7 @@ public:
wxFileSystem(); wxFileSystem();
/** /**
This static function adds new handler into the list of This static function adds new handler into the list of
handlers which provide access to virtual FS. handlers which provide access to virtual FS.
Note that if two handlers for the same protocol are added, the last one added Note that if two handlers for the same protocol are added, the last one added
takes precedence. takes precedence.
@@ -38,18 +38,18 @@ public:
static void AddHandler(wxFileSystemHandler handler); static void AddHandler(wxFileSystemHandler handler);
/** /**
Sets the current location. @e location parameter passed to Sets the current location. @e location parameter passed to
OpenFile() is relative to this path. OpenFile() is relative to this path.
@b Caution! Unless @e is_dir is @true the @e location parameter @b Caution! Unless @e is_dir is @true the @e location parameter
is not the directory name but the name of the file in this directory. All these is not the directory name but the name of the file in this directory. All these
commands change the path to "dir/subdir/": commands change the path to "dir/subdir/":
@param location @param location
the new location. Its meaning depends on the value of is_dir the new location. Its meaning depends on the value of is_dir
@param is_dir @param is_dir
if @true location is new directory. If @false (default) if @true location is new directory. If @false (default)
location is file in the new directory. location is file in the new directory.
*/ */
void ChangePathTo(const wxString& location, bool is_dir = @false); void ChangePathTo(const wxString& location, bool is_dir = @false);
@@ -65,16 +65,16 @@ public:
Looks for the file with the given name @e file in a colon or semi-colon Looks for the file with the given name @e file in a colon or semi-colon
(depending on the current platform) separated list of directories in (depending on the current platform) separated list of directories in
@e path. If the file is found in any directory, returns @true and the full @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 path of the file in @e str, otherwise returns @false and doesn't modify
@e str. @e str.
@param str @param str
Receives the full path of the file, must not be @NULL Receives the full path of the file, must not be @NULL
@param path @param path
wxPATH_SEP-separated list of directories wxPATH_SEP-separated list of directories
@param file @param file
the name of the file to look for the name of the file to look for
*/ */
bool FindFileInPath(wxString str, const wxString& path, bool FindFileInPath(wxString str, const wxString& path,
@@ -110,7 +110,7 @@ public:
or @NULL if failed. It first tries to open the file in relative scope or @NULL if failed. It first tries to open the file in relative scope
(based on value passed to ChangePathTo() method) and then as an (based on value passed to ChangePathTo() method) and then as an
absolute path. Note that the user is responsible for deleting the returned absolute path. Note that the user is responsible for deleting the returned
wxFSFile. wxFSFile.
@e flags can be one or more of the following bit values ored together: @e 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 A stream opened with just the default @e wxFS_READ flag may
@@ -123,7 +123,7 @@ public:
int flags = wxFS_READ); int flags = wxFS_READ);
/** /**
Converts URL into a well-formed filename. The URL must use the @c file Converts URL into a well-formed filename. The URL must use the @c file
protocol. protocol.
*/ */
static wxFileName URLToFileName(const wxString& url); static wxFileName URLToFileName(const wxString& url);
@@ -133,20 +133,20 @@ public:
/** /**
@class wxFSFile @class wxFSFile
@wxheader{filesys.h} @wxheader{filesys.h}
This class represents a single file opened by wxFileSystem. This class represents a single file opened by wxFileSystem.
It provides more information than wxWindow's input stream It provides more information than wxWindow's input stream
(stream, filename, mime type, anchor). (stream, filename, mime type, anchor).
@b Note: Any pointer returned by a method of wxFSFile is valid @b Note: Any pointer returned by a method of wxFSFile is valid
only as long as the wxFSFile object exists. For example a call to GetStream() only as long as the wxFSFile object exists. For example a call to GetStream()
doesn't @e create the stream but only returns the pointer to it. In doesn't @e create the stream but only returns the pointer to it. In
other words after 10 calls to GetStream() you will have obtained ten identical other words after 10 calls to GetStream() you will have obtained ten identical
pointers. pointers.
@library{wxbase} @library{wxbase}
@category{vfs} @category{vfs}
@seealso @seealso
wxFileSystemHandler, wxFileSystem, Overview wxFileSystemHandler, wxFileSystem, Overview
*/ */
@@ -156,18 +156,18 @@ public:
/** /**
Constructor. You probably won't use it. See Notes for details. Constructor. You probably won't use it. See Notes for details.
@param stream @param stream
The input stream that will be used to access data The input stream that will be used to access data
@param location @param location
The full location (aka filename) of the file The full location (aka filename) of the file
@param mimetype @param mimetype
MIME type of this file. It may be left empty, in which MIME type of this file. It may be left empty, in which
case the type will be determined from file's extension (location must case the type will be determined from file's extension (location must
not be empty in this case). not be empty in this case).
@param anchor @param anchor
Anchor. See GetAnchor() for details. Anchor. See GetAnchor() for details.
*/ */
wxFSFile(wxInputStream stream, const wxString& loc, wxFSFile(wxInputStream stream, const wxString& loc,
@@ -193,7 +193,7 @@ public:
const wxString GetAnchor(); const wxString GetAnchor();
/** /**
Returns full location of the file, including path and protocol. Returns full location of the file, including path and protocol.
Examples : Examples :
*/ */
const wxString GetLocation(); const wxString GetLocation();
@@ -225,26 +225,26 @@ public:
/** /**
@class wxFileSystemHandler @class wxFileSystemHandler
@wxheader{filesys.h} @wxheader{filesys.h}
Classes derived from wxFileSystemHandler are used Classes derived from wxFileSystemHandler are used
to access virtual file systems. Its public interface consists to access virtual file systems. Its public interface consists
of two methods: wxFileSystemHandler::CanOpen of two methods: wxFileSystemHandler::CanOpen
and wxFileSystemHandler::OpenFile. and wxFileSystemHandler::OpenFile.
It provides additional protected methods to simplify the process It provides additional protected methods to simplify the process
of opening the file: GetProtocol, GetLeftLocation, GetRightLocation, of opening the file: GetProtocol, GetLeftLocation, GetRightLocation,
GetAnchor, GetMimeTypeFromExt. GetAnchor, GetMimeTypeFromExt.
Please have a look at overview if you don't know how locations Please have a look at overview if you don't know how locations
are constructed. are constructed.
Also consult @ref overview_fs "list of available handlers". Also consult @ref overview_fs "list of available handlers".
@b wxPerl note: In wxPerl, you need to derive your file system handler class @b wxPerl note: In wxPerl, you need to derive your file system handler class
from Wx::PlFileSystemHandler. from Wx::PlFileSystemHandler.
@library{wxbase} @library{wxbase}
@category{vfs} @category{vfs}
@seealso @seealso
wxFileSystem, wxFSFile, Overview wxFileSystem, wxFSFile, Overview
*/ */
@@ -294,7 +294,7 @@ public:
wxString GetAnchor(const wxString& location); wxString GetAnchor(const wxString& location);
/** /**
Returns the left location string extracted from @e location. Returns the left location string extracted from @e location.
Example: GetLeftLocation("file:myzipfile.zip#zip:index.htm") == Example: GetLeftLocation("file:myzipfile.zip#zip:index.htm") ==
"file:myzipfile.zip" "file:myzipfile.zip"
@@ -311,14 +311,14 @@ public:
wxString GetMimeTypeFromExt(const wxString& location); wxString GetMimeTypeFromExt(const wxString& location);
/** /**
Returns the protocol string extracted from @e location. Returns the protocol string extracted from @e location.
Example: GetProtocol("file:myzipfile.zip#zip:index.htm") == "zip" Example: GetProtocol("file:myzipfile.zip#zip:index.htm") == "zip"
*/ */
wxString GetProtocol(const wxString& location); wxString GetProtocol(const wxString& location);
/** /**
Returns the right location string extracted from @e location. Returns the right location string extracted from @e location.
Example : GetRightLocation("file:myzipfile.zip#zip:index.htm") == "index.htm" Example : GetRightLocation("file:myzipfile.zip#zip:index.htm") == "index.htm"
*/ */
@@ -329,11 +329,11 @@ public:
Must be overridden in derived handlers. Must be overridden in derived handlers.
@param fs @param fs
Parent FS (the FS from that OpenFile was called). See ZIP handler Parent FS (the FS from that OpenFile was called). See ZIP handler
for details of how to use it. for details of how to use it.
@param location @param location
The absolute location of file. The absolute location of file.
*/ */
virtual wxFSFile* OpenFile(wxFileSystem& fs, virtual wxFSFile* OpenFile(wxFileSystem& fs,

View File

@@ -9,37 +9,37 @@
/** /**
@class wxFont @class wxFont
@wxheader{font.h} @wxheader{font.h}
A font is an object which determines the appearance of text. Fonts are A font is an object which determines the appearance of text. Fonts are
used for drawing text to a device context, and setting the appearance of used for drawing text to a device context, and setting the appearance of
a window's text. a window's text.
This class uses @ref overview_trefcount "reference counting and copy-on-write" This class uses @ref overview_trefcount "reference counting and copy-on-write"
internally so that assignments between two instances of this class are very internally so that assignments between two instances of this class are very
cheap. You can therefore use actual objects instead of pointers without cheap. You can therefore use actual objects instead of pointers without
efficiency problems. If an instance of this class is changed it will create efficiency problems. If an instance of this class is changed it will create
its own data internally so that other instances, which previously shared the its own data internally so that other instances, which previously shared the
data using the reference counting, are not affected. data using the reference counting, are not affected.
You can retrieve the current system font settings with wxSystemSettings. You can retrieve the current system font settings with wxSystemSettings.
wxSystemSettings wxSystemSettings
@library{wxcore} @library{wxcore}
@category{gdi} @category{gdi}
@stdobjects @stdobjects
Objects: Objects:
wxNullFont wxNullFont
Pointers: Pointers:
wxNORMAL_FONT wxNORMAL_FONT
wxSMALL_FONT wxSMALL_FONT
wxITALIC_FONT wxITALIC_FONT
wxSWISS_FONT wxSWISS_FONT
@seealso @seealso
@ref overview_wxfontoverview "wxFont overview", wxDC::SetFont, wxDC::DrawText, @ref overview_wxfontoverview "wxFont overview", wxDC::SetFont, wxDC::DrawText,
wxDC::GetTextExtent, wxFontDialog, wxSystemSettings wxDC::GetTextExtent, wxFontDialog, wxSystemSettings
@@ -51,16 +51,16 @@ public:
/** /**
Creates a font object with the specified attributes. Creates a font object with the specified attributes.
@param pointSize @param pointSize
Size in points. Size in points.
@param pixelSize @param pixelSize
Size in pixels: this is directly supported only under MSW Size in pixels: this is directly supported only under MSW
currently where this constructor can be used directly, under other platforms a currently where this constructor can be used directly, under other platforms a
font with the closest size to the given one is found using binary search and font with the closest size to the given one is found using binary search and
the static New method must be used. the static New method must be used.
@param family @param family
Font family, a generic way of referring to fonts without specifying actual Font family, a generic way of referring to fonts without specifying actual
facename. One of: facename. One of:
@@ -100,10 +100,10 @@ public:
A teletype font. A teletype font.
@param style @param style
One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC. One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC.
@param weight @param weight
Font weight, sometimes also referred to as font boldness. One of: Font weight, sometimes also referred to as font boldness. One of:
@@ -122,16 +122,16 @@ public:
Bold font. Bold font.
@param underline @param underline
The value can be @true or @false. At present this has an effect on Windows and The value can be @true or @false. At present this has an effect on Windows and
Motif 2.x only. Motif 2.x only.
@param faceName @param faceName
An optional string specifying the actual typeface to be used. If it is an empty An optional string specifying the actual typeface to be used. If it is an empty
string, string,
a default typeface will be chosen based on the family. a default typeface will be chosen based on the family.
@param encoding @param encoding
An encoding which may be one of An encoding which may be one of
wxFONTENCODING_SYSTEM wxFONTENCODING_SYSTEM
@@ -171,17 +171,17 @@ public:
are used. are used.
*/ */
wxFont(); wxFont();
wxFont(const wxFont& font); wxFont(const wxFont& font);
wxFont(int pointSize, wxFontFamily family, int style, wxFont(int pointSize, wxFontFamily family, int style,
wxFontWeight weight, wxFontWeight weight,
const bool underline = @false, const bool underline = @false,
const wxString& faceName = "", const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
wxFont(const wxSize& pixelSize, wxFontFamily family, wxFont(const wxSize& pixelSize, wxFontFamily family,
int style, wxFontWeight weight, int style, wxFontWeight weight,
const bool underline = @false, const bool underline = @false,
const wxString& faceName = "", const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
//@} //@}
/** /**
@@ -299,22 +299,22 @@ public:
const bool underline = @false, const bool underline = @false,
const wxString& faceName = "", const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
static wxFont * New(int pointSize, wxFontFamily family, static wxFont * New(int pointSize, wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT, int flags = wxFONTFLAG_DEFAULT,
const wxString& faceName = "", const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
static wxFont * New(const wxSize& pixelSize, static wxFont * New(const wxSize& pixelSize,
wxFontFamily family, wxFontFamily family,
int style, int style,
wxFontWeight weight, wxFontWeight weight,
const bool underline = @false, const bool underline = @false,
const wxString& faceName = "", const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
static wxFont * New(const wxSize& pixelSize, static wxFont * New(const wxSize& pixelSize,
wxFontFamily family, wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT, int flags = wxFONTFLAG_DEFAULT,
const wxString& faceName = "", const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
//@} //@}
/** /**
@@ -329,7 +329,7 @@ public:
Sets the facename for the font. Sets the facename for the font.
Returns @true if the given face name exists; @false otherwise. Returns @true if the given face name exists; @false otherwise.
@param faceName @param faceName
A valid facename, which should be on the end-user's system. A valid facename, which should be on the end-user's system.
@remarks To avoid portability problems, don't rely on a specific face, @remarks To avoid portability problems, don't rely on a specific face,
@@ -346,7 +346,7 @@ public:
/** /**
Sets the font family. Sets the font family.
@param family @param family
One of: One of:
@@ -442,7 +442,7 @@ public:
/** /**
Sets the point size. Sets the point size.
@param pointSize @param pointSize
Size in points. Size in points.
@sa GetPointSize() @sa GetPointSize()
@@ -452,7 +452,7 @@ public:
/** /**
Sets the font style. Sets the font style.
@param style @param style
One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC. One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC.
@sa GetStyle() @sa GetStyle()
@@ -462,7 +462,7 @@ public:
/** /**
Sets underlining. Sets underlining.
@param underlining @param underlining
@true to underline, @false otherwise. @true to underline, @false otherwise.
@sa GetUnderlined() @sa GetUnderlined()
@@ -472,7 +472,7 @@ public:
/** /**
Sets the font weight. Sets the font weight.
@param weight @param weight
One of: One of:

View File

@@ -9,12 +9,12 @@
/** /**
@class wxFontDialog @class wxFontDialog
@wxheader{fontdlg.h} @wxheader{fontdlg.h}
This class represents the font chooser dialog. This class represents the font chooser dialog.
@library{wxcore} @library{wxcore}
@category{cmndlg} @category{cmndlg}
@seealso @seealso
Overview, wxFontData, wxGetFontFromUser Overview, wxFontData, wxGetFontFromUser
*/ */
@@ -23,15 +23,15 @@ class wxFontDialog : public wxDialog
public: public:
//@{ //@{
/** /**
Constructor. Pass a parent window, and optionally the Constructor. Pass a parent window, and optionally the
@ref overview_wxfontdata "font data" object to be used to initialize the dialog @ref overview_wxfontdata "font data" object to be used to initialize the dialog
controls. If the default constructor is used, controls. If the default constructor is used,
Create() must be called before the dialog can be Create() must be called before the dialog can be
shown. shown.
*/ */
wxFontDialog(); wxFontDialog();
wxFontDialog(wxWindow* parent); wxFontDialog(wxWindow* parent);
wxFontDialog(wxWindow* parent, const wxFontData& data); wxFontDialog(wxWindow* parent, const wxFontData& data);
//@} //@}
//@{ //@{
@@ -41,7 +41,7 @@ public:
occurred. occurred.
*/ */
bool Create(wxWindow* parent); bool Create(wxWindow* parent);
bool Create(wxWindow* parent, const wxFontData& data); bool Create(wxWindow* parent, const wxFontData& data);
//@} //@}
//@{ //@{
@@ -50,11 +50,11 @@ public:
dialog. dialog.
*/ */
const wxFontData GetFontData(); const wxFontData GetFontData();
wxFontData GetFontData(); wxFontData GetFontData();
//@} //@}
/** /**
Shows the dialog, returning @c wxID_OK if the user pressed Ok, and Shows the dialog, returning @c wxID_OK if the user pressed Ok, and
@c wxID_CANCEL otherwise. @c wxID_CANCEL otherwise.
If the user cancels the dialog (ShowModal returns @c wxID_CANCEL), no font If the user cancels the dialog (ShowModal returns @c wxID_CANCEL), no font
@@ -73,14 +73,14 @@ public:
Shows the font selection dialog and returns the font selected by user or Shows the font selection dialog and returns the font selected by user or
invalid font (use @ref wxFont::isok wxFont:IsOk to test whether a font invalid font (use @ref wxFont::isok wxFont:IsOk to test whether a font
is valid) if the dialog was cancelled. is valid) if the dialog was cancelled.
@param parent @param parent
The parent window for the font selection dialog The parent window for the font selection dialog
@param fontInit @param fontInit
If given, this will be the font initially selected in the dialog. If given, this will be the font initially selected in the dialog.
@param caption @param caption
If given, this will be used for the dialog caption. If given, this will be used for the dialog caption.
*/ */
wxFont wxGetFontFromUser(wxWindow * parent, wxFont wxGetFontFromUser(wxWindow * parent,

View File

@@ -9,28 +9,28 @@
/** /**
@class wxFontEnumerator @class wxFontEnumerator
@wxheader{fontenum.h} @wxheader{fontenum.h}
wxFontEnumerator enumerates either all available fonts on the system or only wxFontEnumerator enumerates either all available fonts on the system or only
the ones with given attributes - either only fixed-width (suited for use in the ones with given attributes - either only fixed-width (suited for use in
programs such as terminal emulators and the like) or the fonts available in programs such as terminal emulators and the like) or the fonts available in
the given encoding. the given encoding.
To do this, you just have to call one of EnumerateXXX() functions - either To do this, you just have to call one of EnumerateXXX() functions - either
wxFontEnumerator::EnumerateFacenames or wxFontEnumerator::EnumerateFacenames or
wxFontEnumerator::EnumerateEncodings and the wxFontEnumerator::EnumerateEncodings and the
corresponding callback (wxFontEnumerator::OnFacename or corresponding callback (wxFontEnumerator::OnFacename or
wxFontEnumerator::OnFontEncoding) will be called wxFontEnumerator::OnFontEncoding) will be called
repeatedly until either all fonts satisfying the specified criteria are repeatedly until either all fonts satisfying the specified criteria are
exhausted or the callback returns @false. exhausted or the callback returns @false.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxfontencodingoverview "Font encoding overview", @ref @ref overview_wxfontencodingoverview "Font encoding overview", @ref
overview_samplefont "Font sample", wxFont, wxFontMapper overview_samplefont "Font sample", wxFont, wxFontMapper
*/ */
class wxFontEnumerator class wxFontEnumerator
{ {
public: public:
/** /**
@@ -52,13 +52,13 @@ public:
bool fixedWidthOnly = @false); bool fixedWidthOnly = @false);
/** /**
Return array of strings containing all encodings found by Return array of strings containing all encodings found by
EnumerateEncodings(). EnumerateEncodings().
*/ */
static wxArrayString GetEncodings(const wxString& facename = ""); static wxArrayString GetEncodings(const wxString& facename = "");
/** /**
Return array of strings containing all facenames found by Return array of strings containing all facenames found by
EnumerateFacenames(). EnumerateFacenames().
*/ */
static wxArrayString GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, static wxArrayString GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM,

View File

@@ -9,33 +9,33 @@
/** /**
@class wxFontMapper @class wxFontMapper
@wxheader{fontmap.h} @wxheader{fontmap.h}
wxFontMapper manages user-definable correspondence between logical font wxFontMapper manages user-definable correspondence between logical font
names and the fonts present on the machine. names and the fonts present on the machine.
The default implementations of all functions will ask the user if they are The default implementations of all functions will ask the user if they are
not capable of finding the answer themselves and store the answer in a not capable of finding the answer themselves and store the answer in a
config file (configurable via SetConfigXXX functions). This behaviour may config file (configurable via SetConfigXXX functions). This behaviour may
be disabled by giving the value of @false to "interactive" parameter. be disabled by giving the value of @false to "interactive" parameter.
However, the functions will always consult the config file to allow the However, the functions will always consult the config file to allow the
user-defined values override the default logic and there is no way to user-defined values override the default logic and there is no way to
disable this - which shouldn't be ever needed because if "interactive" was disable this - which shouldn't be ever needed because if "interactive" was
never @true, the config file is never created anyhow. never @true, the config file is never created anyhow.
In case everything else fails (i.e. there is no record in config file In case everything else fails (i.e. there is no record in config file
and "interactive" is @false or user denied to choose any replacement), and "interactive" is @false or user denied to choose any replacement),
the class queries wxEncodingConverter the class queries wxEncodingConverter
for "equivalent" encodings (e.g. iso8859-2 and cp1250) and tries them. for "equivalent" encodings (e.g. iso8859-2 and cp1250) and tries them.
@library{wxcore} @library{wxcore}
@category{misc} @category{misc}
@seealso @seealso
wxEncodingConverter, @ref overview_nonenglishoverview "Writing non-English wxEncodingConverter, @ref overview_nonenglishoverview "Writing non-English
applications" applications"
*/ */
class wxFontMapper class wxFontMapper
{ {
public: public:
/** /**
@@ -73,7 +73,7 @@ public:
/** /**
Returns the array of all possible names for the given encoding. The array is Returns the array of all possible names for the given encoding. The array is
@NULL-terminated. IF it isn't empty, the first name in it is the canonical @NULL-terminated. IF it isn't empty, the first name in it is the canonical
encoding name, i.e. the same string as returned by encoding name, i.e. the same string as returned by
GetEncodingName(). GetEncodingName().
*/ */
static const wxChar** GetAllEncodingNames(wxFontEncoding encoding); static const wxChar** GetAllEncodingNames(wxFontEncoding encoding);
@@ -93,15 +93,15 @@ public:
wxNativeEncodingInfo* info, wxNativeEncodingInfo* info,
const wxString& facename = wxEmptyString, const wxString& facename = wxEmptyString,
bool interactive = @true); bool interactive = @true);
bool GetAltForEncoding(wxFontEncoding encoding, bool GetAltForEncoding(wxFontEncoding encoding,
wxFontEncoding* alt_encoding, wxFontEncoding* alt_encoding,
const wxString& facename = wxEmptyString, const wxString& facename = wxEmptyString,
bool interactive = @true); bool interactive = @true);
//@} //@}
/** /**
Returns the @e n-th supported encoding. Together with Returns the @e n-th supported encoding. Together with
GetSupportedEncodingsCount() GetSupportedEncodingsCount()
this method may be used to get all supported encodings. this method may be used to get all supported encodings.
*/ */
static wxFontEncoding GetEncoding(size_t n); static wxFontEncoding GetEncoding(size_t n);
@@ -114,16 +114,16 @@ public:
/** /**
Return the encoding corresponding to the given internal name. This function is Return the encoding corresponding to the given internal name. This function is
the inverse of GetEncodingName() and is the inverse of GetEncodingName() and is
intentionally less general than intentionally less general than
CharsetToEncoding(), i.e. it doesn't CharsetToEncoding(), i.e. it doesn't
try to make any guesses nor ever asks the user. It is meant just as a way of try to make any guesses nor ever asks the user. It is meant just as a way of
restoring objects previously serialized using restoring objects previously serialized using
GetEncodingName(). GetEncodingName().
*/ */
static wxFontEncoding GetEncodingFromName(const wxString& encoding); static wxFontEncoding GetEncodingFromName(const wxString& encoding);
/** /**
Return internal string identifier for the encoding (see also Return internal string identifier for the encoding (see also
wxFontMapper::GetEncodingDescription) wxFontMapper::GetEncodingDescription)
@sa GetEncodingFromName() @sa GetEncodingFromName()
@@ -131,7 +131,7 @@ public:
static wxString GetEncodingName(wxFontEncoding encoding); static wxString GetEncodingName(wxFontEncoding encoding);
/** /**
Returns the number of the font encodings supported by this class. Together with Returns the number of the font encodings supported by this class. Together with
GetEncoding() this method may be used to get GetEncoding() this method may be used to get
all supported encodings. all supported encodings.
*/ */
@@ -156,7 +156,7 @@ public:
/** /**
Set the config object to use (may be @NULL to use default). Set the config object to use (may be @NULL to use default).
By default, the global one (from wxConfigBase::Get() will be used) By default, the global one (from wxConfigBase::Get() will be used)
and the default root path for the config settings is the string returned by and the default root path for the config settings is the string returned by
GetDefaultConfigPath(). GetDefaultConfigPath().
*/ */

View File

@@ -9,14 +9,14 @@
/** /**
@class wxFontPickerCtrl @class wxFontPickerCtrl
@wxheader{fontpicker.h} @wxheader{fontpicker.h}
This control allows the user to select a font. The generic implementation is This control allows the user to select a font. The generic implementation is
a button which brings up a wxFontDialog when clicked. Native implementation a button which brings up a wxFontDialog when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the may differ but this is usually a (small) widget which give access to the
font-chooser font-chooser
dialog. dialog.
It is only available if @c wxUSE_FONTPICKERCTRL is set to 1 (the default). It is only available if @c wxUSE_FONTPICKERCTRL is set to 1 (the default).
@beginStyleTable @beginStyleTable
@style{wxFNTP_DEFAULT_STYLE}: @style{wxFNTP_DEFAULT_STYLE}:
The default style: wxFNTP_FONTDESC_AS_LABEL | The default style: wxFNTP_FONTDESC_AS_LABEL |
@@ -35,11 +35,11 @@
@style{wxFNTP_USEFONT_FOR_LABEL}: @style{wxFNTP_USEFONT_FOR_LABEL}:
Uses the currently selected font to draw the label of the button. Uses the currently selected font to draw the label of the button.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{miscpickers} @category{miscpickers}
@appearance{fontpickerctrl.png} @appearance{fontpickerctrl.png}
@seealso @seealso
wxFontDialog, wxFontPickerEvent wxFontDialog, wxFontPickerEvent
*/ */
@@ -59,29 +59,29 @@ public:
const wxString& name = "fontpickerctrl"); const wxString& name = "fontpickerctrl");
/** /**
@param parent @param parent
Parent window, must not be non-@NULL. Parent window, must not be non-@NULL.
@param id @param id
The identifier for the control. The identifier for the control.
@param font @param font
The initial font shown in the control. If wxNullFont The initial font shown in the control. If wxNullFont
is given, the default font is used. is given, the default font is used.
@param pos @param pos
Initial position. Initial position.
@param size @param size
Initial size. Initial size.
@param style @param style
The window style, see wxFNTP_* flags. The window style, see wxFNTP_* flags.
@param validator @param validator
Validator which can be used for additional date checks. Validator which can be used for additional date checks.
@param name @param name
Control name. Control name.
@returns @true if the control was successfully created or @false if @returns @true if the control was successfully created or @false if
@@ -129,13 +129,13 @@ public:
/** /**
@class wxFontPickerEvent @class wxFontPickerEvent
@wxheader{fontpicker.h} @wxheader{fontpicker.h}
This event class is used for the events generated by This event class is used for the events generated by
wxFontPickerCtrl. wxFontPickerCtrl.
@library{wxcore} @library{wxcore}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxFontPickerCtrl wxFontPickerCtrl
*/ */

View File

@@ -9,20 +9,20 @@
/** /**
@class wxFrame @class wxFrame
@wxheader{frame.h} @wxheader{frame.h}
A frame is a window whose size and position can (usually) be changed by the A frame is a window whose size and position can (usually) be changed by the
user. It usually has thick borders and a title bar, and can optionally contain user. It usually has thick borders and a title bar, and can optionally contain
a menu bar, toolbar and status bar. A frame can contain any window that is not a menu bar, toolbar and status bar. A frame can contain any window that is not
a frame or dialog. a frame or dialog.
A frame that has a status bar and toolbar created via the A frame that has a status bar and toolbar created via the
CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the
value returned by GetClientSize to reflect the remaining size available to value returned by GetClientSize to reflect the remaining size available to
application windows. application windows.
@beginStyleTable @beginStyleTable
@style{wxDEFAULT_FRAME_STYLE}: @style{wxDEFAULT_FRAME_STYLE}:
Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER | Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER |
wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN. wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN.
@style{wxICONIZE}: @style{wxICONIZE}:
Display the frame iconized (minimized). Windows only. Display the frame iconized (minimized). Windows only.
@@ -53,7 +53,7 @@
desktop window under Windows which may seem strange to the users desktop window under Windows which may seem strange to the users
and thus it might be better to use this style only without and thus it might be better to use this style only without
wxMINIMIZE_BOX style). In wxGTK, the flag is respected only if GTK+ wxMINIMIZE_BOX style). In wxGTK, the flag is respected only if GTK+
is at least version 2.2 and the window manager supports is at least version 2.2 and the window manager supports
_NET_WM_STATE_SKIP_TASKBAR hint. Has no effect under other _NET_WM_STATE_SKIP_TASKBAR hint. Has no effect under other
platforms. platforms.
@style{wxFRAME_FLOAT_ON_PARENT}: @style{wxFRAME_FLOAT_ON_PARENT}:
@@ -78,10 +78,10 @@
On Mac OS X, frames with this style will be shown with a metallic On Mac OS X, frames with this style will be shown with a metallic
look. This is an extra style. look. This is an extra style.
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{managedwnd} @category{managedwnd}
@seealso @seealso
wxMDIParentFrame, wxMDIChildFrame, wxMiniFrame, wxDialog wxMDIParentFrame, wxMDIChildFrame, wxMiniFrame, wxDialog
*/ */
@@ -92,28 +92,28 @@ public:
/** /**
Constructor, creating the window. Constructor, creating the window.
@param parent @param parent
The window parent. This may be @NULL. If it is non-@NULL, the frame will 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. always be displayed on top of the parent window on Windows.
@param id @param id
The window identifier. It may take a value of -1 to indicate a default value. The window identifier. It may take a value of -1 to indicate a default value.
@param title @param title
The caption to be displayed on the frame's title bar. The caption to be displayed on the frame's title bar.
@param pos @param pos
The window position. The value wxDefaultPosition indicates a default position, chosen by The window position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform. either the windowing system or wxWidgets, depending on platform.
@param size @param size
The window size. The value wxDefaultSize indicates a default size, chosen by The window size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform. either the windowing system or wxWidgets, depending on platform.
@param style @param style
The window style. See wxFrame. The window style. See wxFrame.
@param name @param name
The name of the window. This parameter is used to associate a name with the The name of the window. This parameter is used to associate a name with the
item, item,
allowing the application user to set Motif resource values for allowing the application user to set Motif resource values for
@@ -126,12 +126,12 @@ public:
@sa Create() @sa Create()
*/ */
wxFrame(); wxFrame();
wxFrame(wxWindow* parent, wxWindowID id, wxFrame(wxWindow* parent, wxWindowID id,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE, long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = "frame"); const wxString& name = "frame");
//@} //@}
/** /**
@@ -142,7 +142,7 @@ public:
/** /**
Centres the frame on the display. Centres the frame on the display.
@param direction @param direction
The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH. The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH.
*/ */
void Centre(int direction = wxBOTH); void Centre(int direction = wxBOTH);
@@ -161,19 +161,19 @@ public:
/** /**
Creates a status bar at the bottom of the frame. Creates a status bar at the bottom of the frame.
@param number @param number
The number of fields to create. Specify a The number of fields to create. Specify a
value greater than 1 to create a multi-field status bar. value greater than 1 to create a multi-field status bar.
@param style @param style
The status bar style. See wxStatusBar for a list The status bar style. See wxStatusBar for a list
of valid styles. of valid styles.
@param id @param id
The status bar window identifier. If -1, an identifier will be chosen by The status bar window identifier. If -1, an identifier will be chosen by
wxWidgets. wxWidgets.
@param name @param name
The status bar window name. The status bar window name.
@returns A pointer to the status bar if it was created successfully, @NULL @returns A pointer to the status bar if it was created successfully, @NULL
@@ -194,15 +194,15 @@ public:
/** /**
Creates a toolbar at the top or left of the frame. Creates a toolbar at the top or left of the frame.
@param style @param style
The toolbar style. See wxToolBar for a list The toolbar style. See wxToolBar for a list
of valid styles. of valid styles.
@param id @param id
The toolbar window identifier. If -1, an identifier will be chosen by The toolbar window identifier. If -1, an identifier will be chosen by
wxWidgets. wxWidgets.
@param name @param name
The toolbar window name. The toolbar window name.
@returns A pointer to the toolbar if it was created successfully, @NULL @returns A pointer to the toolbar if it was created successfully, @NULL
@@ -258,18 +258,18 @@ public:
/** /**
Virtual function called when a status bar is requested by CreateStatusBar(). Virtual function called when a status bar is requested by CreateStatusBar().
@param number @param number
The number of fields to create. The number of fields to create.
@param style @param style
The window style. See wxStatusBar for a list The window style. See wxStatusBar for a list
of valid styles. of valid styles.
@param id @param id
The window identifier. If -1, an identifier will be chosen by The window identifier. If -1, an identifier will be chosen by
wxWidgets. wxWidgets.
@param name @param name
The window name. The window name.
@returns A status bar object. @returns A status bar object.
@@ -287,15 +287,15 @@ public:
/** /**
Virtual function called when a toolbar is requested by CreateToolBar(). Virtual function called when a toolbar is requested by CreateToolBar().
@param style @param style
The toolbar style. See wxToolBar for a list The toolbar style. See wxToolBar for a list
of valid styles. of valid styles.
@param id @param id
The toolbar window identifier. If -1, an identifier will be chosen by The toolbar window identifier. If -1, an identifier will be chosen by
wxWidgets. wxWidgets.
@param name @param name
The toolbar window name. The toolbar window name.
@returns A toolbar object. @returns A toolbar object.
@@ -312,7 +312,7 @@ public:
/** /**
Simulate a menu command. Simulate a menu command.
@param id @param id
The identifier for a menu item. The identifier for a menu item.
*/ */
void ProcessCommand(int id); void ProcessCommand(int id);
@@ -332,7 +332,7 @@ public:
/** /**
Tells the frame to show the given menu bar. Tells the frame to show the given menu bar.
@param menuBar @param menuBar
The menu bar to associate with the frame. The menu bar to associate with the frame.
@remarks If the frame is destroyed, the menu bar and its menus will be @remarks If the frame is destroyed, the menu bar and its menus will be
@@ -360,10 +360,10 @@ public:
/** /**
Sets the status bar text and redraws the status bar. Sets the status bar text and redraws the status bar.
@param text @param text
The text for the status field. The text for the status field.
@param number @param number
The status field (starting from zero). The status field (starting from zero).
@remarks Use an empty string to clear the status bar. @remarks Use an empty string to clear the status bar.
@@ -375,11 +375,11 @@ public:
/** /**
Sets the widths of the fields in the status bar. Sets the widths of the fields in the status bar.
@param n @param n
The number of fields in the status bar. It must be the The number of fields in the status bar. It must be the
same used in CreateStatusBar. same used in CreateStatusBar.
@param widths @param widths
Must contain an array of n integers, each of which is a status field width Must contain an array of n integers, each of which is a status field width
in pixels. A value of -1 indicates that the field is variable width; at least in pixels. A value of -1 indicates that the field is variable width; at least
one one

View File

@@ -9,58 +9,58 @@
/** /**
@class wxMemoryFSHandler @class wxMemoryFSHandler
@wxheader{fs_mem.h} @wxheader{fs_mem.h}
This wxFileSystem handler can store arbitrary This wxFileSystem handler can store arbitrary
data in memory stream and make them accessible via URL. It is particularly data in memory stream and make them accessible via URL. It is particularly
suitable for storing bitmaps from resources or included XPM files so that suitable for storing bitmaps from resources or included XPM files so that
they can be used with wxHTML. they can be used with wxHTML.
Filenames are prefixed with "memory:", e.g. "memory:myfile.html". Filenames are prefixed with "memory:", e.g. "memory:myfile.html".
Example: Example:
@code @code
#ifndef __WXMSW__ #ifndef __WXMSW__
#include "logo.xpm" #include "logo.xpm"
#endif #endif
void MyFrame::OnAbout(wxCommandEvent&) void MyFrame::OnAbout(wxCommandEvent&)
{ {
wxBusyCursor bcur; wxBusyCursor bcur;
wxFileSystem::AddHandler(new wxMemoryFSHandler); wxFileSystem::AddHandler(new wxMemoryFSHandler);
wxMemoryFSHandler::AddFile("logo.pcx", wxBITMAP(logo), wxBITMAP_TYPE_PCX); wxMemoryFSHandler::AddFile("logo.pcx", wxBITMAP(logo), wxBITMAP_TYPE_PCX);
wxMemoryFSHandler::AddFile("about.htm", wxMemoryFSHandler::AddFile("about.htm",
"htmlbodyAbout: " "htmlbodyAbout: "
"img src=\"memory:logo.pcx\"/body/html"); "img src=\"memory:logo.pcx\"/body/html");
wxDialog dlg(this, -1, wxString(_("About"))); wxDialog dlg(this, -1, wxString(_("About")));
wxBoxSizer *topsizer; wxBoxSizer *topsizer;
wxHtmlWindow *html; wxHtmlWindow *html;
topsizer = new wxBoxSizer(wxVERTICAL); topsizer = new wxBoxSizer(wxVERTICAL);
html = new wxHtmlWindow(, -1, wxDefaultPosition, html = new wxHtmlWindow(, -1, wxDefaultPosition,
wxSize(380, 160), wxHW_SCROLLBAR_NEVER); wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
html-SetBorders(0); html-SetBorders(0);
html-LoadPage("memory:about.htm"); html-LoadPage("memory:about.htm");
html-SetSize(html-GetInternalRepresentation()-GetWidth(), html-SetSize(html-GetInternalRepresentation()-GetWidth(),
html-GetInternalRepresentation()-GetHeight()); html-GetInternalRepresentation()-GetHeight());
topsizer-Add(html, 1, wxALL, 10); topsizer-Add(html, 1, wxALL, 10);
topsizer-Add(new wxStaticLine(, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10); topsizer-Add(new wxStaticLine(, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
topsizer-Add(new wxButton(, wxID_OK, "Ok"), topsizer-Add(new wxButton(, wxID_OK, "Ok"),
0, wxALL | wxALIGN_RIGHT, 15); 0, wxALL | wxALIGN_RIGHT, 15);
dlg.SetAutoLayout(@true); dlg.SetAutoLayout(@true);
dlg.SetSizer(topsizer); dlg.SetSizer(topsizer);
topsizer-Fit(); topsizer-Fit();
dlg.Centre(); dlg.Centre();
dlg.ShowModal(); dlg.ShowModal();
wxMemoryFSHandler::RemoveFile("logo.pcx"); wxMemoryFSHandler::RemoveFile("logo.pcx");
wxMemoryFSHandler::RemoveFile("about.htm"); wxMemoryFSHandler::RemoveFile("about.htm");
} }
@endcode @endcode
@library{wxbase} @library{wxbase}
@category{FIXME} @category{FIXME}
@seealso @seealso
wxMemoryFSHandler::AddFileWithMimeType wxMemoryFSHandler::AddFileWithMimeType
*/ */
@@ -74,9 +74,9 @@ public:
//@{ //@{
/** /**
Add file to list of files stored in memory. Stored Add file to list of files stored in memory. Stored
data (bitmap, text or raw data) data (bitmap, text or raw data)
will be copied into private memory stream and available under will be copied into private memory stream and available under
name "memory:" + @e filename. name "memory:" + @e filename.
The @e type argument is one of @c wxBITMAP_TYPE_XXX constants. The @e type argument is one of @c wxBITMAP_TYPE_XXX constants.
@@ -88,9 +88,9 @@ public:
*/ */
static void AddFile(const wxString& filename, wxImage& image, static void AddFile(const wxString& filename, wxImage& image,
long type); long type);
static void AddFile(const wxString& filename, static void AddFile(const wxString& filename,
const wxBitmap& bitmap, const wxBitmap& bitmap,
long type); long type);
//@} //@}
//@{ //@{
@@ -106,10 +106,10 @@ public:
static void AddFileWithMimeType(const wxString& filename, static void AddFileWithMimeType(const wxString& filename,
const wxString& textdata, const wxString& textdata,
const wxString& mimetype); const wxString& mimetype);
static void AddFileWithMimeType(const wxString& filename, static void AddFileWithMimeType(const wxString& filename,
const void* binarydata, const void* binarydata,
size_t size, size_t size,
const wxString& mimetype); const wxString& mimetype);
//@} //@}
/** /**

View File

@@ -9,11 +9,11 @@
/** /**
@class wxGauge @class wxGauge
@wxheader{gauge.h} @wxheader{gauge.h}
A gauge is a horizontal or vertical bar which shows a quantity (often time). A gauge is a horizontal or vertical bar which shows a quantity (often time).
wxGauge supports two working modes: determinate and indeterminate progress. wxGauge supports two working modes: determinate and indeterminate progress.
The first is the usual working mode (see wxGauge::SetValue The first is the usual working mode (see wxGauge::SetValue
and wxGauge::SetRange) while the second can be used when and wxGauge::SetRange) while the second can be used when
the program is doing some processing but you don't know how much progress is the program is doing some processing but you don't know how much progress is
@@ -21,11 +21,11 @@
In this case, you can periodically call the wxGauge::Pulse In this case, you can periodically call the wxGauge::Pulse
function to make the progress bar switch to indeterminate mode (graphically function to make the progress bar switch to indeterminate mode (graphically
it's usually a set of blocks which move or bounce in the bar control). it's usually a set of blocks which move or bounce in the bar control).
wxGauge supports dynamic switch between these two work modes. wxGauge supports dynamic switch between these two work modes.
There are no user commands for the gauge. There are no user commands for the gauge.
@beginStyleTable @beginStyleTable
@style{wxGA_HORIZONTAL}: @style{wxGA_HORIZONTAL}:
Creates a horizontal gauge. Creates a horizontal gauge.
@@ -35,11 +35,11 @@
Creates smooth progress bar with one pixel wide update step (not Creates smooth progress bar with one pixel wide update step (not
supported by all platforms). supported by all platforms).
@endStyleTable @endStyleTable
@library{wxcore} @library{wxcore}
@category{ctrl} @category{ctrl}
@appearance{gauge.png} @appearance{gauge.png}
@seealso @seealso
wxSlider, wxScrollBar wxSlider, wxScrollBar
*/ */
@@ -50,37 +50,37 @@ public:
/** /**
Constructor, creating and showing a gauge. Constructor, creating and showing a gauge.
@param parent @param parent
Window parent. Window parent.
@param id @param id
Window identifier. Window identifier.
@param range @param range
Integer range (maximum value) of the gauge. It is ignored when the gauge is Integer range (maximum value) of the gauge. It is ignored when the gauge is
used in indeterminate mode. used in indeterminate mode.
@param pos @param pos
Window position. Window position.
@param size @param size
Window size. Window size.
@param style @param style
Gauge style. See wxGauge. Gauge style. See wxGauge.
@param name @param name
Window name. Window name.
@sa Create() @sa Create()
*/ */
wxGauge(); wxGauge();
wxGauge(wxWindow* parent, wxWindowID id, int range, wxGauge(wxWindow* parent, wxWindowID id, int range,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxGA_HORIZONTAL, long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = "gauge"); const wxString& name = "gauge");
//@} //@}
/** /**
@@ -132,7 +132,7 @@ public:
int GetValue(); int GetValue();
/** /**
Returns @true if the gauge is vertical (has @c wxGA_VERTICAL style) and Returns @true if the gauge is vertical (has @c wxGA_VERTICAL style) and
@false otherwise. @false otherwise.
*/ */
bool IsVertical(); bool IsVertical();
@@ -180,7 +180,7 @@ public:
This function makes the gauge switch to determinate mode, if it was in This function makes the gauge switch to determinate mode, if it was in
indeterminate mode before. indeterminate mode before.
@param pos @param pos
Position for the gauge level. Position for the gauge level.
@sa GetValue() @sa GetValue()

Some files were not shown because too many files have changed in this diff Show More