removed @NULL,@true,@false tags from the function prototypes; fixed * and & displacing in the prototypes; changed @param as discussed on wx-dev; use @see instead of @sa; better indentation for @returns,@remarks,@see paragraphs; other misc fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-09 12:33:59 +00:00
parent 0aaf0255e4
commit 4cc4bfafe5
256 changed files with 8880 additions and 10701 deletions

View File

@@ -44,52 +44,54 @@ 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(), SetCopyright() and SetDescription(). you should call at least SetVersion(),
SetCopyright() and
SetDescription().
*/ */
wxAboutDialogInfo(); wxAboutDialogInfo();
/** /**
Adds an artist name to be shown in the program credits. Adds an artist name to be shown in the program credits.
@sa SetArtists() @see SetArtists()
*/ */
void AddArtist(const wxString& artist); void AddArtist(const wxString& artist);
/** /**
Adds a developer name to be shown in the program credits. Adds a developer name to be shown in the program credits.
@sa SetDevelopers() @see SetDevelopers()
*/ */
void AddDeveloper(const wxString& developer); void AddDeveloper(const wxString& developer);
/** /**
Adds a documentation writer name to be shown in the program credits. Adds a documentation writer name to be shown in the program credits.
@sa SetDocWriters() @see SetDocWriters()
*/ */
void AddDocWriter(const wxString& docwriter); void AddDocWriter(const wxString& docwriter);
/** /**
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 will try to use the translator names are specified explicitely, wxAboutBox
translation of the string @c translator-credits from the currently used message will try to use the translation of the string @c translator-credits from
catalog -- this can be used to show just the name of the translator of the the currently used message catalog -- this can be used to show just the name of
program in the current language. the translator of the program in the current language.
@sa SetTranslators() @see SetTranslators()
*/ */
void AddTranslator(const wxString& translator); void AddTranslator(const wxString& translator);
/** /**
Sets the the list of artists to be shown in the program credits. Sets the the list of artists to be shown in the program credits.
@sa AddArtist() @see AddArtist()
*/ */
void SetArtists(const wxArrayString& artists); void SetArtists(const wxArrayString& artists);
/** /**
Set the short string containing the program copyright information. Notice Set the short string containing the program copyright information. Notice that
that any occurrences of @c "(C)" in @e copyright will be replaced by the any occurrences of @c "(C)" in @a 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,
*/ */
@@ -103,14 +105,14 @@ public:
/** /**
Set the list of developers of the program. Set the list of developers of the program.
@sa AddDeveloper() @see AddDeveloper()
*/ */
void SetDevelopers(const wxArrayString& developers); void SetDevelopers(const wxArrayString& developers);
/** /**
Set the list of documentation writers. Set the list of documentation writers.
@sa AddDocWriter() @see AddDocWriter()
*/ */
void SetDocWriters(const wxArrayString& docwriters); void SetDocWriters(const wxArrayString& docwriters);
@@ -125,7 +127,6 @@ public:
/** /**
Set the long, multiline string containing the text of the program licence. Set the long, multiline string containing the text of the program licence.
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
@@ -146,21 +147,22 @@ public:
void SetName(const wxString& name); void SetName(const wxString& name);
/** /**
Set the list of translators. Please see AddTranslator() for additional Set the list of translators. Please see
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" word. necessarily in the @c x.y.z form but it shouldn't contain the "version"
word.
*/ */
void SetVersion(const wxString& version); void SetVersion(const wxString& version);
/** /**
Set the web site for the program and its description (which defaults to URL Set the web site for the program and its description (which defaults to URL
itself if empty). itself if empty).
Please notice that only GTK+ version currently supports showing the link in the Please notice that only GTK+ version currently supports showing the link in the
native about dialog so if this method is called, the generic version will be native about dialog so if this method is called, the generic version will be
used under all the other platforms. used under all the other platforms.
@@ -180,7 +182,6 @@ 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
@@ -208,11 +209,11 @@ 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 customization. dialog
customization.
@sa wxAboutDialogInfo @see wxAboutDialogInfo
*/ */
void wxGenericAboutBox(const wxAboutDialogInfo& info); void wxGenericAboutBox(const wxAboutDialogInfo& info);

View File

@@ -27,14 +27,13 @@ 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.
which modifier key is held down. Indicates
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);
@@ -59,16 +58,15 @@ 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.
which modifier key is held down. Indicates
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 */ void Set(int flags, int keyCode, int cmd);
}; };
@@ -104,13 +102,11 @@ 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);
@@ -128,13 +124,13 @@ public:
/** /**
Returns @true if the accelerator table is valid. Returns @true if the accelerator table is valid.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
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

@@ -50,7 +50,7 @@ public:
Constructor, taking an optional window. The object can be associated with Constructor, taking an optional window. The object can be associated with
a window later. a window later.
*/ */
wxAccessible(wxWindow* win = @NULL); wxAccessible(wxWindow* win = NULL);
/** /**
Destructor. Destructor.
@@ -58,7 +58,7 @@ public:
~wxAccessible(); ~wxAccessible();
/** /**
Performs the default action for the object. @e childId is 0 (the action for Performs the default action for the object. @a childId is 0 (the action for
this object) this object)
or greater than 0 (the action for a child). Return wxACC_NOT_SUPPORTED if there or greater than 0 (the action for a child). Return wxACC_NOT_SUPPORTED if there
is no default action for this window (e.g. an edit control). is no default action for this window (e.g. an edit control).
@@ -66,7 +66,7 @@ public:
virtual wxAccStatus DoDefaultAction(int childId); virtual wxAccStatus DoDefaultAction(int childId);
/** /**
Gets the specified child (starting from 1). If @e child is @NULL and the return Gets the specified child (starting from 1). If @a child is @NULL and the return
value is wxACC_OK, value is wxACC_OK,
this means that the child is a simple element and not an accessible object. this means that the child is a simple element and not an accessible object.
*/ */
@@ -79,7 +79,7 @@ public:
/** /**
Gets the default action for this object (0) or a child (greater than 0). Gets the default action for this object (0) or a child (greater than 0).
Return wxACC_OK even if there is no action. @e actionName is the action, or the Return wxACC_OK even if there is no action. @a actionName is the action, or the
empty empty
string if there is no action. The retrieved string describes the action that is string if there is no action. The retrieved string describes the action that is
performed on an object, performed on an object,
@@ -119,7 +119,7 @@ public:
/** /**
Returns the rectangle for this object (id is 0) or a child element (id is Returns the rectangle for this object (id is 0) or a child element (id is
greater than 0). greater than 0).
@e rect is in screen coordinates. @a rect is in screen coordinates.
*/ */
virtual wxAccStatus GetLocation(wxRect& rect, int elementId); virtual wxAccStatus GetLocation(wxRect& rect, int elementId);
@@ -142,9 +142,7 @@ public:
/** /**
Gets a variant representing the selected children Gets a variant representing the selected children
of this object. of this object.
Acceptable values are: Acceptable values are:
a null variant (IsNull() returns TRUE) a null variant (IsNull() returns TRUE)
a list variant (GetType() == wxT("list")) a list variant (GetType() == wxT("list"))
an integer representing the selected child element, an integer representing the selected child element,
@@ -175,14 +173,13 @@ public:
this or this or
a child object. Can return either a child object, or an integer a child object. Can return either a child object, or an integer
representing the child element, starting from 1. representing the child element, starting from 1.
@a pt is in screen coordinates.
@e pt is in screen coordinates.
*/ */
virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, virtual wxAccStatus HitTest(const wxPoint& pt, int* childId,
wxAccessible** childObject); wxAccessible** childObject);
/** /**
Navigates from @e fromId to @e toId/@e toObject. Navigates from @a fromId to @e toId/@e toObject.
*/ */
virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, virtual wxAccStatus Navigate(wxNavDir navDir, int fromId,
int* toId, int* toId,

View File

@@ -42,7 +42,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxAnimationCtrl(wxWindow * parent, wxWindowID id, wxAnimationCtrl(wxWindow* parent, wxWindowID id,
const wxAnimation& anim, const wxAnimation& anim,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -56,30 +56,24 @@ public:
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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxAnimation& anim, const wxAnimation& anim,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -106,7 +100,7 @@ public:
Loads the animation from the given file and calls SetAnimation(). Loads the animation from the given file and calls SetAnimation().
See wxAnimation::LoadFile for more info. See wxAnimation::LoadFile for more info.
*/ */
bool LoadFile(const wxString & file, bool LoadFile(const wxString& file,
wxAnimationType animType = wxANIMATION_TYPE_ANY); wxAnimationType animType = wxANIMATION_TYPE_ANY);
/** /**
@@ -122,12 +116,11 @@ public:
/** /**
Sets the animation to play in this control. Sets the animation to play in this control.
If the previous animation is being played, it's @ref stop() Stopped. If the previous animation is being played, it's @ref stop() Stopped.
Until Play() isn't called, a static image, the first Until Play() isn't called, a static image, the first
frame of the given animation or the background colour will be shown frame of the given animation or the background colour will be shown
(see SetInactiveBitmap() for more info). (see SetInactiveBitmap() for more info).
*/ */
void SetAnimation(const wxAnimation & anim); void SetAnimation(const wxAnimation& anim);
/** /**
Sets the bitmap to show on the control when it's not playing an animation. Sets the bitmap to show on the control when it's not playing an animation.
@@ -137,12 +130,10 @@ public:
if there's no valid animation associated with the control (see if there's no valid animation associated with the control (see
wxAnimationCtrl::SetAnimation), wxAnimationCtrl::SetAnimation),
then the background colour of the window is shown. then the background colour of the window is shown.
If the control is not playing the animation, the given bitmap will be If the control is not playing the animation, the given bitmap will be
immediately immediately
shown, otherwise it will be shown as soon as Stop() shown, otherwise it will be shown as soon as Stop()
is called. is called.
Note that the inactive bitmap, if smaller than the control's size, will be Note that the inactive bitmap, if smaller than the control's size, will be
centered in centered in
the control; if bigger, it will be stretched to fit it. the control; if bigger, it will be stretched to fit it.
@@ -185,10 +176,9 @@ 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);
@@ -227,32 +217,50 @@ public:
/** /**
Returns @true if animation data is present. Returns @true if animation data is present.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
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:
wxANIMATION_TYPE_GIF
Load an animated GIF file.
wxANIMATION_TYPE_ANI
Load an ANI file.
wxANIMATION_TYPE_ANY wxANIMATION_TYPE_GIF
Try to autodetect the filetype.
Load an animated GIF file.
wxANIMATION_TYPE_ANI
Load an ANI file.
wxANIMATION_TYPE_ANY
Try to autodetect the filetype.
@returns @true if the operation succeeded, @false otherwise. @returns @true if the operation succeeded, @false otherwise.
*/ */
@@ -263,26 +271,44 @@ 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:
wxANIMATION_TYPE_GIF
Load an animated GIF file.
wxANIMATION_TYPE_ANI
Load an ANI file.
wxANIMATION_TYPE_ANY wxANIMATION_TYPE_GIF
Try to autodetect the filetype.
Load an animated GIF file.
wxANIMATION_TYPE_ANI
Load an ANI file.
wxANIMATION_TYPE_ANY
Try to autodetect the filetype.
@returns @true if the operation succeeded, @false otherwise. @returns @true if the operation succeeded, @false otherwise.
*/ */

View File

@@ -51,7 +51,7 @@ public:
Creates a wxLog class for the application to use for logging errors. The default Creates a wxLog class for the application to use for logging errors. The default
implementation returns a new wxLogGui class. implementation returns a new wxLogGui class.
@sa wxLog @see wxLog
*/ */
virtual wxLog* CreateLogTarget(); virtual wxLog* CreateLogTarget();
@@ -59,16 +59,15 @@ public:
Creates the wxAppTraits object when GetTraits() Creates the wxAppTraits object when GetTraits()
needs it for the first time. needs it for the first time.
@sa wxAppTraits @see wxAppTraits
*/ */
virtual wxAppTraits * CreateTraits(); virtual wxAppTraits* CreateTraits();
/** /**
Dispatches the next event in the windowing system event queue. Dispatches the next event in the windowing system event queue.
This can be used for programming event loops, e.g. This can be used for programming event loops, e.g.
@sa Pending() @see Pending()
*/ */
virtual void Dispatch(); virtual void Dispatch();
@@ -95,9 +94,7 @@ public:
is meant to be shown to the user and so should be used for the window titles, is meant to be shown to the user and so should be used for the window titles,
page headers and so on while the other one should be only used internally, e.g. page headers and so on while the other one should be only used internally, e.g.
for the file names or configuration file keys. for the file names or configuration file keys.
By default, returns the same string as GetAppName(). By default, returns the same string as GetAppName().
This function is new since wxWidgets version 2.9.0 This function is new since wxWidgets version 2.9.0
*/ */
wxString GetAppDisplayName(); wxString GetAppDisplayName();
@@ -106,10 +103,9 @@ public:
Returns the application name. Returns the application name.
@remarks wxWidgets sets this to a reasonable default before calling @remarks wxWidgets sets this to a reasonable default before calling
OnInit(), but the application can reset it at OnInit(), but the application can reset it at will.
will.
@sa GetAppDisplayName() @see GetAppDisplayName()
*/ */
wxString GetAppName(); wxString GetAppName();
@@ -118,7 +114,7 @@ public:
platform specific platform specific
manner to refer to the application. manner to refer to the application.
@sa SetClassName() @see SetClassName()
*/ */
wxString GetClassName(); wxString GetClassName();
@@ -127,8 +123,8 @@ public:
@false @false
otherwise. otherwise.
@sa SetExitOnFrameDelete(), @ref overview_wxappshutdownoverview "wxApp @see SetExitOnFrameDelete(), @ref overview_wxappshutdownoverview "wxApp
shutdown overview" shutdown overview"
*/ */
bool GetExitOnFrameDelete(); bool GetExitOnFrameDelete();
@@ -136,33 +132,33 @@ public:
Returns the one and only global application object. Returns the one and only global application object.
Usually @c wxTheApp is usead instead. Usually @c wxTheApp is usead instead.
@sa SetInstance() @see SetInstance()
*/ */
static wxAppConsole * GetInstance(); static wxAppConsole* GetInstance();
/** /**
Returns a pointer to the top window. Returns a pointer to the top window.
@remarks If the top window hasn't been set using SetTopWindow(), @remarks If the top window hasn't been set using SetTopWindow(),
this function will find the first top-level window this function will find the first top-level window
(frame or dialog) and return that. (frame or dialog) and return that.
@sa SetTopWindow() @see SetTopWindow()
*/ */
virtual wxWindow * GetTopWindow(); virtual wxWindow* GetTopWindow();
/** /**
Returns a pointer to the wxAppTraits object for the application. Returns a pointer to the wxAppTraits object for the application.
If you want to customize the wxAppTraits object, you must override the If you want to customize the wxAppTraits object, you must override the
CreateTraits() function. CreateTraits() function.
*/ */
wxAppTraits * GetTraits(); wxAppTraits* GetTraits();
/** /**
Returns @true if the application will use the best visual on systems that support Returns @true if the application will use the best visual on systems that support
different visuals, @false otherwise. different visuals, @false otherwise.
@sa SetUseBestVisual() @see SetUseBestVisual()
*/ */
bool GetUseBestVisual(); bool GetUseBestVisual();
@@ -172,9 +168,7 @@ public:
is meant to be shown to the user and so should be used for the window titles, is meant to be shown to the user and so should be used for the window titles,
page headers and so on while the other one should be only used internally, e.g. page headers and so on while the other one should be only used internally, e.g.
for the file names or configuration file keys. for the file names or configuration file keys.
By default, returns the same string as GetVendorName(). By default, returns the same string as GetVendorName().
This function is new since wxWidgets version 2.9.0 This function is new since wxWidgets version 2.9.0
*/ */
wxString GetVendorDisplayName(); wxString GetVendorDisplayName();
@@ -185,8 +179,8 @@ public:
wxString GetVendorName(); wxString GetVendorName();
/** /**
This function simply invokes the given method @e func of the specified This function simply invokes the given method @a func of the specified
event handler @e handler with the @e event as parameter. It exists solely event handler @a handler with the @a event as parameter. It exists solely
to allow to catch the C++ exceptions which could be thrown by all event to allow to catch the C++ exceptions which could be thrown by all event
handlers in the application in one place: if you want to do this, override this handlers in the application in one place: if you want to do this, override this
function in your wxApp-derived class and add try/catch clause(s) to it. function in your wxApp-derived class and add try/catch clause(s) to it.
@@ -207,7 +201,6 @@ public:
/** /**
Returns @true if the main event loop is currently running, i.e. if the Returns @true if the main event loop is currently running, i.e. if the
application is inside OnRun(). application is inside OnRun().
This can be useful to test whether events can be dispatched. For example, This can be useful to test whether events can be dispatched. For example,
if this function returns @false, non-blocking sockets cannot be used because if this function returns @false, non-blocking sockets cannot be used because
the events from them would never be processed. the events from them would never be processed.
@@ -249,7 +242,7 @@ public:
to provide your own (environment-dependent) main loop. to provide your own (environment-dependent) main loop.
@returns Returns 0 under X, and the wParam of the WM_QUIT message under @returns Returns 0 under X, and the wParam of the WM_QUIT message under
Windows. Windows.
*/ */
virtual int MainLoop(); virtual int MainLoop();
@@ -258,28 +251,23 @@ public:
specified in wxASSERT macro evaluated to @false. specified in wxASSERT macro evaluated to @false.
It is only called in debug mode (when @c __WXDEBUG__ is defined) as It is only called in debug mode (when @c __WXDEBUG__ is defined) as
asserts are not left in the release code at all. asserts are not left in the release code at all.
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,
const wxChar func, const wxChar func,
@@ -290,22 +278,20 @@ public:
Called when command line parsing fails (i.e. an incorrect command line option Called when command line parsing fails (i.e. an incorrect command line option
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() @see OnInitCmdLine()
*/ */
bool OnCmdLineError(wxCmdLineParser& parser); bool OnCmdLineError(wxCmdLineParser& parser);
/** /**
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() @see OnInitCmdLine()
*/ */
bool OnCmdLineHelp(wxCmdLineParser& parser); bool OnCmdLineHelp(wxCmdLineParser& parser);
@@ -313,14 +299,12 @@ public:
Called after the command line had been successfully parsed. You may override Called after the command line had been successfully parsed. You may override
this method to test for the values of the various parameters which could be this method to test for the values of the various parameters which could be
set from the command line. set from the command line.
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() @see OnInitCmdLine()
*/ */
bool OnCmdLineParsed(wxCmdLineParser& parser); bool OnCmdLineParsed(wxCmdLineParser& parser);
@@ -330,12 +314,10 @@ public:
continue running the loop or @false to exit the loop and terminate the continue running the loop or @false to exit the loop and terminate the
program. In the latter case it can also use C++ @c throw keyword to program. In the latter case it can also use C++ @c throw keyword to
rethrow the current exception. rethrow the current exception.
The default behaviour of this function is the latter in all ports except under The default behaviour of this function is the latter in all ports except under
Windows where a dialog is shown to the user which allows him to choose between Windows where a dialog is shown to the user which allows him to choose between
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().
*/ */
@@ -347,7 +329,6 @@ public:
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
as returned by the base class method if you override it. as returned by the base class method if you override it.
*/ */
@@ -358,12 +339,11 @@ public:
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
return. You may attempt to save unsaved data but this is not guaranteed to return. You may attempt to save unsaved data but this is not guaranteed to
work and, in fact, probably won't. work and, in fact, probably won't.
@sa wxHandleFatalExceptions @see wxHandleFatalExceptions
*/ */
void OnFatalException(); void OnFatalException();
@@ -373,11 +353,9 @@ public:
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.
Notice that if you want to to use the command line processing provided by Notice that if you want to to use the command line processing provided by
wxWidgets you have to call the base class version in the derived class wxWidgets you have to call the base class version in the derived class
OnInit(). OnInit().
Return @true to continue processing, @false to exit the application Return @true to continue processing, @false to exit the application
immediately. immediately.
*/ */
@@ -398,7 +376,6 @@ public:
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).
The return value of this function becomes the exit code of the program, so it The return value of this function becomes the exit code of the program, so it
should return 0 in case of successful termination. should return 0 in case of successful termination.
*/ */
@@ -411,7 +388,6 @@ public:
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
prevent this from happening (i.e. continue running after catching an exception) prevent this from happening (i.e. continue running after catching an exception)
you need to override OnExceptionInMainLoop(). you need to override OnExceptionInMainLoop().
The default implementation shows information about the exception in debug build The default implementation shows information about the exception in debug build
but does nothing in the release build. but does nothing in the release build.
*/ */
@@ -420,7 +396,7 @@ public:
/** /**
Returns @true if unprocessed events are in the window system event queue. Returns @true if unprocessed events are in the window system event queue.
@sa Dispatch() @see Dispatch()
*/ */
virtual bool Pending(); virtual bool Pending();
@@ -434,19 +410,18 @@ public:
to allow co-existence with the Microsoft Foundation Classes, override to allow co-existence with the Microsoft Foundation Classes, override
the PreTranslateMessage function: the PreTranslateMessage function:
*/ */
bool ProcessMessage(WXMSG * msg); bool ProcessMessage(WXMSG* msg);
/** /**
Sends idle events to a window and its children. Sends idle events to a window and its children.
Please note that this function is internal to wxWidgets and shouldn't be used Please note that this function is internal to wxWidgets and shouldn't be used
by user code. by user code.
@remarks These functions poll the top-level windows, and their children, @remarks These functions poll the top-level windows, and their children,
for idle event processing. If @true is returned, more for idle event processing. If @true is returned, more
OnIdle processing is requested by one or more window. OnIdle processing is requested by one or more window.
@sa wxIdleEvent @see wxIdleEvent
*/ */
bool SendIdleEvents(wxWindow* win, wxIdleEvent& event); bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
@@ -462,10 +437,9 @@ public:
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.
@sa GetAppName() @see GetAppName()
*/ */
void SetAppName(const wxString& name); void SetAppName(const wxString& name);
@@ -473,7 +447,7 @@ public:
Sets the class name of the application. This may be used in a platform specific Sets the class name of the application. This may be used in a platform specific
manner to refer to the application. manner to refer to the application.
@sa GetClassName() @see GetClassName()
*/ */
void SetClassName(const wxString& name); void SetClassName(const wxString& name);
@@ -482,11 +456,11 @@ public:
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.
@sa GetExitOnFrameDelete(), @ref overview_wxappshutdownoverview "wxApp @see GetExitOnFrameDelete(), @ref overview_wxappshutdownoverview "wxApp
shutdown overview" shutdown overview"
*/ */
void SetExitOnFrameDelete(bool flag); void SetExitOnFrameDelete(bool flag);
@@ -495,20 +469,19 @@ public:
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() @see GetInstance()
*/ */
static void SetInstance(wxAppConsole* app); static void SetInstance(wxAppConsole* app);
/** /**
Allows runtime switching of the UI environment theme. Currently implemented for Allows runtime switching of the UI environment theme. Currently implemented for
wxGTK2-only. wxGTK2-only.
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();
@@ -525,9 +498,9 @@ public:
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() @see GetTopWindow(), OnInit()
*/ */
void SetTopWindow(wxWindow* window); void SetTopWindow(wxWindow* window);
@@ -539,19 +512,16 @@ public:
case under Solaris and IRIX, where the default visual is only 8-bit whereas case under Solaris and IRIX, where the default visual is only 8-bit whereas
certain certain
applications are supposed to run in TrueColour mode. applications are supposed to run in TrueColour mode.
If @a 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);
/** /**
Set the vendor name to be used in the user-visible places. See Set the vendor name to be used in the user-visible places. See
@@ -565,7 +535,7 @@ public:
in registry access. A default name is set by in registry access. A default name is set by
wxWidgets. wxWidgets.
@sa GetVendorName() @see GetVendorName()
*/ */
void SetVendorName(const wxString& name); void SetVendorName(const wxString& name);
@@ -575,42 +545,36 @@ public:
time-consuming process writes to a text window. Without an occasional time-consuming process writes to a text window. Without an occasional
yield, the text window will not be updated properly, and on systems with yield, the text window will not be updated properly, and on systems with
cooperative multitasking, such as Windows 3.1 other processes will not respond. cooperative multitasking, such as Windows 3.1 other processes will not respond.
Caution should be exercised, however, since yielding may allow the Caution should be exercised, however, since yielding may allow the
user to perform actions which are not compatible with the current task. user to perform actions which are not compatible with the current task.
Disabling menu items or whole menus during processing can avoid unwanted Disabling menu items or whole menus during processing can avoid unwanted
reentrance of code: see ::wxSafeYield for a better reentrance of code: see ::wxSafeYield for a better
function. function.
Note that Yield() will not flush the message logs. This is intentional as Note that Yield() will not flush the message logs. This is intentional as
calling Yield() is usually done to quickly update the screen and popping up a calling Yield() is usually done to quickly update the screen and popping up a
message box dialog may be undesirable. If you do wish to flush the log message box dialog may be undesirable. If you do wish to flush the log
messages immediately (otherwise it will be done during the next idle loop messages immediately (otherwise it will be done during the next idle loop
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 @a onlyIfNeeded parameter is @true, the method will just silently
return @false instead. return @false instead.
*/ */
bool Yield(bool onlyIfNeeded = @false); bool Yield(bool onlyIfNeeded = false);
/** /**
int argc int argc
Number of command line arguments (after environment-specific processing). Number of command line arguments (after environment-specific processing).
*/ */
/** /**
wxChar ** argv wxChar ** argv
Command line arguments (after environment-specific processing). Command line arguments (after environment-specific processing).
Under Windows and Linux/Unix, you should parse the command line Under Windows and Linux/Unix, you should parse the command line
arguments and check for files to be opened when starting your arguments and check for files to be opened when starting your
application. Under OS X, you need to override MacOpenFile() application. Under OS X, you need to override MacOpenFile()
since command line arguments are used differently there. since command line arguments are used differently there.
You may use the wxCmdLineParser to You may use the wxCmdLineParser to
parse command line arguments. parse command line arguments.
*/ */
@@ -626,8 +590,8 @@ public:
For all normal, informational messages. They also appear in a message box by For all normal, informational messages. They also appear in a message box by
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);
//@} //@}
//@{ //@{
@@ -637,8 +601,8 @@ void wxVLogMessage(const char * formatString, va_list argPtr);
progress (another, but possibly confusing name for the same function is @b progress (another, but possibly confusing name for the same function is @b
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,8 +610,8 @@ void wxVLogVerbose(const char * formatString, va_list argPtr);
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)
@endcode @endcode
@@ -667,8 +631,8 @@ void wxExit();
For warnings - they are also normally shown to the user, but don't interrupt For warnings - they are also normally shown to the user, but don't interrupt
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);
//@} //@}
//@{ //@{
@@ -677,38 +641,38 @@ void wxVLogWarning(const char * formatString, va_list argPtr);
terminates the program with the exit code 3. Using @e abort() standard terminates the program with the exit code 3. Using @e abort() standard
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);
//@} //@}
/** /**
If @e doIt is @true, the fatal exceptions (also known as general protection If @a doIt is @true, the fatal exceptions (also known as general protection
faults under Windows or segmentation violations in the Unix world) will be faults under Windows or segmentation violations in the Unix world) will be
caught and passed to wxApp::OnFatalException. caught and passed to wxApp::OnFatalException.
By default, i.e. before this function is called, they will be handled in the By default, i.e. before this function is called, they will be handled in the
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 @a 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.
*/ */
bool wxHandleFatalExceptions(bool doIt = @true); 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
@@ -721,18 +685,18 @@ 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 @see wxSysErrorMsg, wxLogSysError
*/ */
unsigned long wxSysErrorCode(); unsigned long wxSysErrorCode();
/** /**
In a GUI application, this function posts @e event to the specified @e dest In a GUI application, this function posts @a event to the specified @e dest
object using wxEvtHandler::AddPendingEvent. object using wxEvtHandler::AddPendingEvent.
Otherwise, it dispatches @e event immediately using Otherwise, it dispatches @a event immediately using
wxEvtHandler::ProcessEvent. wxEvtHandler::ProcessEvent.
See the respective documentation for details (and caveats). See the respective documentation for details (and caveats).
*/ */
void wxPostEvent(wxEvtHandler * dest, wxEvent& event); void wxPostEvent(wxEvtHandler* dest, wxEvent& event);
//@{ //@{
/** /**
@@ -740,8 +704,8 @@ void wxPostEvent(wxEvtHandler * dest, wxEvent& event);
to the user. The default processing is to pop up a message box to inform the to the user. The default processing is to pop up a message box to inform the
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 +714,22 @@ void wxVLogError(const char * formatString, va_list argPtr);
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 @a 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,41 +737,39 @@ void wxVLogError(const char * formatString, va_list argPtr);
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 @a 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
wxTraceRefCount: trace various ref counting operations wxTraceRefCount: trace various ref counting operations
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 @a errCode is 0 (default), the last error code (as returned by
wxSysErrorCode) is used. wxSysErrorCode) is used.
@sa wxSysErrorCode, wxLogSysError @see wxSysErrorCode, wxLogSysError
*/ */
const wxChar * wxSysErrorMsg(unsigned long errCode = 0); const wxChar* wxSysErrorMsg(unsigned long errCode = 0);
/** /**
This function is for use in console (wxBase) programs only. It must be called This function is for use in console (wxBase) programs only. It must be called
@@ -825,8 +783,8 @@ void wxUninitialize();
mode (when the preprocessor symbol __WXDEBUG__ is defined) and expand to mode (when the preprocessor symbol __WXDEBUG__ is defined) and expand to
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 +792,6 @@ void wxVLogDebug(const char * formatString, va_list argPtr);
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
@@ -844,29 +801,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 @a 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,8 +832,8 @@ 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)
@endcode @endcode
@@ -888,7 +842,6 @@ 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.
*/ */
@@ -902,10 +855,10 @@ bool wxYield();
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 @see 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 +868,22 @@ void wxVLogSysError(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 @a 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 @see 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

@@ -40,32 +40,31 @@ public:
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.
*/ */
virtual wxConfigBase * CreateConfig(); virtual wxConfigBase* CreateConfig();
/** /**
Creates the global font mapper object used for encodings/charset mapping. Creates the global font mapper object used for encodings/charset mapping.
*/ */
virtual wxFontMapper * CreateFontMapper(); virtual wxFontMapper* CreateFontMapper();
/** /**
Creates the default log target for the application. Creates the default log target for the application.
*/ */
virtual wxLog * CreateLogTarget(); virtual wxLog* CreateLogTarget();
/** /**
Creates the global object used for printing out messages. Creates the global object used for printing out messages.
*/ */
virtual wxMessageOutput * CreateMessageOutput(); virtual wxMessageOutput* CreateMessageOutput();
/** /**
Returns the renderer to use for drawing the generic controls (return value may Returns the renderer to use for drawing the generic controls (return value may
be @NULL be @NULL
in which case the default renderer for the current platform is used); in which case the default renderer for the current platform is used);
this is used in GUI mode only and always returns @NULL in console. this is used in GUI mode only and always returns @NULL in console.
NOTE: returned pointer will be deleted by the caller. NOTE: returned pointer will be deleted by the caller.
*/ */
virtual wxRendererNative * CreateRenderer(); virtual wxRendererNative* CreateRenderer();
/** /**
This method returns the name of the desktop environment currently This method returns the name of the desktop environment currently
@@ -89,15 +88,13 @@ public:
of the native toolkit currently used. of the native toolkit currently used.
The version numbers returned are thus detected at run-time and not compile-time The version numbers returned are thus detected at run-time and not compile-time
(except when this is not possible e.g. wxMotif). (except when this is not possible e.g. wxMotif).
E.g. if your program is using wxGTK port this function will return wxPORT_GTK E.g. if your program is using wxGTK port this function will return wxPORT_GTK
and and
put in given pointers the versions of the GTK library in use. put in given pointers the versions of the GTK library in use.
See wxPlatformInfo for more details. See wxPlatformInfo for more details.
*/ */
virtual wxPortId GetToolkitVersion(int * major = @NULL, virtual wxPortId GetToolkitVersion(int* major = NULL,
int * minor = @NULL); int* minor = NULL);
/** /**
Returns @true if @c fprintf(stderr) goes somewhere, @false otherwise. Returns @true if @c fprintf(stderr) goes somewhere, @false otherwise.
@@ -113,8 +110,7 @@ public:
/** /**
Shows the assert dialog with the specified message in GUI mode or just prints Shows the assert dialog with the specified message in GUI mode or just prints
the string to stderr in console mode. the string to stderr in console mode.
Returns @true to suppress subsequent asserts, @false to continue as before. Returns @true to suppress subsequent asserts, @false to continue as before.
*/ */
virtual bool ShowAssertDialog(const wxString & msg); virtual bool ShowAssertDialog(const wxString& msg);
}; };

View File

@@ -47,8 +47,7 @@ public:
/** /**
Closes the current entry if one is open, then opens the entry specified Closes the current entry if one is open, then opens the entry specified
by the wxArchiveEntry object. by the wxArchiveEntry object.
@a entry must be from the same archive file that this
@e entry must be from the same archive file that this
wxArchiveInputStream is reading, and it must be reading it from a wxArchiveInputStream is reading, and it must be reading it from a
seekable stream. seekable stream.
*/ */
@@ -103,13 +102,11 @@ public:
as a whole. For example in the case of zip there is a comment, which as a whole. For example in the case of zip there is a comment, which
is stored at the end of the zip file. CopyArchiveMetaData() can be used is stored at the end of the zip file. CopyArchiveMetaData() can be used
to transfer such information when writing a modified copy of an archive. to transfer such information when writing a modified copy of an archive.
Since the position of the meta-data can vary between the various archive Since the position of the meta-data can vary between the various archive
formats, it is best to call CopyArchiveMetaData() before transferring formats, it is best to call CopyArchiveMetaData() before transferring
the entries. The wxArchiveOutputStream the entries. The wxArchiveOutputStream
will then hold on to the meta-data and write it at the correct point in will then hold on to the meta-data and write it at the correct point in
the output file. the output file.
When the input archive is being read from a non-seekable stream, the When the input archive is being read from a non-seekable stream, the
meta-data may not be available when CopyArchiveMetaData() is called, meta-data may not be available when CopyArchiveMetaData() is called,
in which case the two streams set up a link and transfer the data in which case the two streams set up a link and transfer the data
@@ -118,16 +115,14 @@ public:
bool CopyArchiveMetaData(wxArchiveInputStream& stream); bool CopyArchiveMetaData(wxArchiveInputStream& stream);
/** /**
Takes ownership of @e entry and uses it to create a new entry in the Takes ownership of @a entry and uses it to create a new entry in the
archive. @e entry is then opened in the input stream @e stream archive. @a entry is then opened in the input stream @e stream
and its contents copied to this stream. and its contents copied to this stream.
For archive types which compress entry data, CopyEntry() is likely to be For archive types which compress entry data, CopyEntry() is likely to be
much more efficient than transferring the data using Read() and Write() much more efficient than transferring the data using Read() and Write()
since it will copy them without decompressing and recompressing them. since it will copy them without decompressing and recompressing them.
@a entry must be from the same archive file that @a stream is
@e entry must be from the same archive file that @e stream is accessing. For non-seekable streams, @a entry must also be the last
accessing. For non-seekable streams, @e entry must also be the last
thing read from @e stream. thing read from @e stream.
*/ */
bool CopyEntry(wxArchiveEntry* entry, bool CopyEntry(wxArchiveEntry* entry,
@@ -135,11 +130,9 @@ public:
/** /**
) )
Create a new directory entry Create a new directory entry
(see wxArchiveEntry::IsDir) (see wxArchiveEntry::IsDir)
with the given name and timestamp. with the given name and timestamp.
PutNextEntry() can PutNextEntry() can
also be used to create directory entries, by supplying a name with also be used to create directory entries, by supplying a name with
a trailing path separator. a trailing path separator.
@@ -149,7 +142,6 @@ public:
//@{ //@{
/** /**
, @b off_t@e size = wxInvalidOffset) , @b off_t@e size = wxInvalidOffset)
Create a new entry with the given name, timestamp and size. The entry's Create a new entry with the given name, timestamp and size. The entry's
data can then be written by writing to this wxArchiveOutputStream. data can then be written by writing to this wxArchiveOutputStream.
*/ */
@@ -195,10 +187,8 @@ public:
/** /**
The entry's name, by default in the native format. The name can include The entry's name, by default in the native format. The name can include
directory components, i.e. it can be a full path. directory components, i.e. it can be a full path.
If this is a directory entry, (i.e. if IsDir() If this is a directory entry, (i.e. if IsDir()
is @true) then GetName() returns the name with a trailing path separator. is @true) then GetName() returns the name with a trailing path separator.
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);
@@ -224,11 +214,10 @@ public:
Returns the entry's filename in the internal format used within the Returns the entry's filename in the internal format used within the
archive. The name can include directory components, i.e. it can be a archive. The name can include directory components, i.e. it can be a
full path. full path.
The names of directory entries are returned without any trailing path The names of directory entries are returned without any trailing path
separator. This gives a canonical name that can be used in comparisons. separator. This gives a canonical name that can be used in comparisons.
@sa @ref overview_wxarcbyname "Looking up an archive entry by name" @see @ref overview_wxarcbyname "Looking up an archive entry by name"
*/ */
wxString GetInternalName(); wxString GetInternalName();
@@ -240,17 +229,15 @@ public:
//@{ //@{
/** /**
True if this is a directory entry. True if this is a directory entry.
Directory entries are entries with no data, which are used to store Directory entries are entries with no data, which are used to store
the meta-data of directories. They also make it possible for completely the meta-data of directories. They also make it possible for completely
empty directories to be stored. empty directories to be stored.
The names of entries within an archive can be complete paths, and The names of entries within an archive can be complete paths, and
unarchivers typically create whatever directories are necessary as they unarchivers typically create whatever directories are necessary as they
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 +245,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);
//@} //@}
//@{ //@{
@@ -268,7 +255,6 @@ public:
this entry, it will then invoke the associated this entry, it will then invoke the associated
notifier's wxArchiveNotifier::OnEntryUpdated notifier's wxArchiveNotifier::OnEntryUpdated
method. method.
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).
@@ -313,7 +299,6 @@ public:
/** /**
Returns @true if this factory can handle the given protocol, MIME type Returns @true if this factory can handle the given protocol, MIME type
or file extension. or file extension.
When using wxSTREAM_FILEEXT for the second parameter, the first parameter When using wxSTREAM_FILEEXT for the second parameter, the first parameter
can be a complete filename rather than just an extension. can be a complete filename rather than just an extension.
*/ */
@@ -324,7 +309,6 @@ public:
A static member that finds a factory that can handle a given protocol, MIME A static member that finds a factory that can handle a given protocol, MIME
type or file extension. Returns a pointer to the class factory if found, or type or file extension. Returns a pointer to the class factory if found, or
@NULL otherwise. It does not give away ownership of the factory. @NULL otherwise. It does not give away ownership of the factory.
When using wxSTREAM_FILEEXT for the second parameter, the first parameter When using wxSTREAM_FILEEXT for the second parameter, the first parameter
can be a complete filename rather than just an extension. can be a complete filename rather than just an extension.
*/ */
@@ -344,8 +328,8 @@ public:
//@{ //@{
/** /**
GetFirst and GetNext can be used to enumerate the available factories. GetFirst and GetNext can be used to enumerate the available factories.
For example, to list them: For example, to list them:
GetFirst()/GetNext() return a pointer to a factory or @NULL if no more GetFirst()/GetNext() return a pointer to a factory or @NULL if no more
are available. They do not give away ownership of the factory. are available. They do not give away ownership of the factory.
*/ */
@@ -371,10 +355,9 @@ public:
Returns the protocols, MIME types or file extensions supported by this Returns the protocols, MIME types or file extensions supported by this
factory, as an array of null terminated strings. It does not give away factory, as an array of null terminated strings. It does not give away
ownership of the array or strings. ownership of the array or strings.
For example, to list the file extensions a factory supports: For example, to list the file extensions a factory supports:
*/ */
const wxChar * const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL); const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL);
/** /**
Create a new wxArchiveEntry object of the Create a new wxArchiveEntry object of the
@@ -385,7 +368,6 @@ public:
//@{ //@{
/** /**
Create a new input or output stream to read or write an archive. Create a new input or output stream to read or write an archive.
If the parent stream is passed as a pointer then the new archive stream If the parent stream is passed as a pointer then the new archive stream
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.
*/ */
@@ -398,15 +380,12 @@ public:
/** /**
Adds this class factory to the list returned Adds this class factory to the list returned
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,
bringing it to the front. This isn't a thread safe operation bringing it to the front. This isn't a thread safe operation
so can't be done when other threads are running that will be using the list. so can't be done when other threads are running that will be using the list.
The list does not take ownership of the factory. The list does not take ownership of the factory.
*/ */
void PushFront(); void PushFront();
@@ -414,10 +393,8 @@ public:
/** /**
Removes this class factory from the list returned Removes this class factory from the list returned
by @ref getfirst() GetFirst()/GetNext. by @ref getfirst() GetFirst()/GetNext.
Removing from the list isn't a thread safe operation Removing from the list isn't a thread safe operation
so can't be done when other threads are running that will be using the list. so can't be done when other threads are running that will be using the list.
The list does not own the factories, so removing a factory does not delete it. The list does not own the factories, so removing a factory does not delete it.
*/ */
void Remove(); void Remove();
@@ -478,112 +455,112 @@ public:
// 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
/* ... */ The first template parameter should be the type of archive input stream
}; (e.g. wxArchiveInputStream) and the
@endcode second can either be a pointer to an entry
(e.g. wxArchiveEntry*), or a string/pointer pair
(e.g. std::pairwxString, wxArchiveEntry*).
The first template parameter should be the type of archive input stream The @c wx/archive.h header defines the following typedefs:
(e.g. wxArchiveInputStream) and the
second can either be a pointer to an entry
(e.g. wxArchiveEntry*), or a string/pointer pair
(e.g. std::pairwxString, wxArchiveEntry*).
The @c wx/archive.h header defines the following typedefs: @code
typedef wxArchiveIteratorwxArchiveInputStream wxArchiveIter;
@code typedef wxArchiveIteratorwxArchiveInputStream,
typedef wxArchiveIteratorwxArchiveInputStream wxArchiveIter; std::pairwxString, wxArchiveEntry* wxArchivePairIter;
@endcode
typedef wxArchiveIteratorwxArchiveInputStream, The header for any implementation of this interface should define similar
std::pairwxString, wxArchiveEntry* wxArchivePairIter; typedefs for its types, for example in @c wx/zipstrm.h there is:
@endcode
The header for any implementation of this interface should define similar @code
typedefs for its types, for example in @c wx/zipstrm.h there is: typedef wxArchiveIteratorwxZipInputStream wxZipIter;
@code typedef wxArchiveIteratorwxZipInputStream,
typedef wxArchiveIteratorwxZipInputStream wxZipIter; std::pairwxString, wxZipEntry* wxZipPairIter;
@endcode
typedef wxArchiveIteratorwxZipInputStream, Transferring the catalogue of an archive @e arc to a vector @e cat,
std::pairwxString, wxZipEntry* wxZipPairIter; can then be done something like this:
@endcode
Transferring the catalogue of an archive @e arc to a vector @e cat, @code
can then be done something like this: std::vectorwxArchiveEntry* cat((wxArchiveIter)arc, wxArchiveIter());
@endcode
@code When the iterator is dereferenced, it gives away ownership of an entry
std::vectorwxArchiveEntry* cat((wxArchiveIter)arc, wxArchiveIter()); object. So in the above example, when you have finished with @e cat
@endcode you must delete the pointers it contains.
When the iterator is dereferenced, it gives away ownership of an entry If you have smart pointers with normal copy semantics (i.e. not auto_ptr
object. So in the above example, when you have finished with @e cat or wxScopedPtr), then you can create an iterator
you must delete the pointers it contains. which uses them instead. For example, with a smart pointer class for
zip entries @e ZipEntryPtr:
If you have smart pointers with normal copy semantics (i.e. not auto_ptr @code
or wxScopedPtr), then you can create an iterator typedef std::vectorZipEntryPtr ZipCatalog;
which uses them instead. For example, with a smart pointer class for typedef wxArchiveIteratorwxZipInputStream, ZipEntryPtr ZipIter;
zip entries @e ZipEntryPtr: ZipCatalog cat((ZipIter)zip, ZipIter());
@endcode
@code Iterators that return std::pair objects can be used to
typedef std::vectorZipEntryPtr ZipCatalog; populate a std::multimap, to allow entries to be looked
typedef wxArchiveIteratorwxZipInputStream, ZipEntryPtr ZipIter; up by name. The string is initialised using the wxArchiveEntry object's
ZipCatalog cat((ZipIter)zip, ZipIter()); wxArchiveEntry::GetInternalName function.
@endcode
Iterators that return std::pair objects can be used to @code
populate a std::multimap, to allow entries to be looked typedef std::multimapwxString, wxZipEntry* ZipCatalog;
up by name. The string is initialised using the wxArchiveEntry object's ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter());
wxArchiveEntry::GetInternalName function. @endcode
@code
typedef std::multimapwxString, wxZipEntry* ZipCatalog;
ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter());
@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

@@ -60,7 +60,7 @@ class wxArrayString : public wxArray
public: public:
//@{ //@{
/** /**
Constructor from a wxString array. Pass a size @e sz and array @e arr. Constructor from a wxString array. Pass a size @a sz and array @e arr.
*/ */
wxArrayString(); wxArrayString();
wxArrayString(const wxArrayString& array); wxArrayString(const wxArrayString& array);
@@ -76,30 +76,26 @@ public:
~wxArrayString(); ~wxArrayString();
/** /**
Appends the given number of @e copies of the new item @e str to the Appends the given number of @a copies of the new item @a str to the
array and returns the index of the first new item in the array. array and returns the index of the first new item in the array.
@b Warning: For sorted arrays, the index of the inserted item will not be, @b Warning: For sorted arrays, the index of the inserted item will not be,
in general, equal to GetCount() - 1 because in general, equal to GetCount() - 1 because
the item is inserted at the correct position to keep the array sorted and not the item is inserted at the correct position to keep the array sorted and not
appended. appended.
See also: Insert() See also: Insert()
*/ */
#define size_t Add(const wxString& str, size_t copies = 1) /* implementation is private */ size_t Add(const wxString& str, size_t copies = 1);
/** /**
Preallocates enough memory to store @e nCount items. This function may be Preallocates enough memory to store @a nCount items. This function may be
used to improve array class performance before adding a known number of items used to improve array class performance before adding a known number of items
consecutively. consecutively.
See also: @ref wxArray::memorymanagement "Dynamic array memory management" See also: @ref wxArray::memorymanagement "Dynamic array memory management"
*/ */
void Alloc(size_t nCount); void Alloc(size_t nCount);
/** /**
Clears the array contents and frees memory. Clears the array contents and frees memory.
See also: Empty() See also: Empty()
*/ */
void Clear(); void Clear();
@@ -121,25 +117,23 @@ public:
/** /**
Search the element in the array, starting from the beginning if Search the element in the array, starting from the beginning if
@e bFromEnd is @false or from end otherwise. If @e bCase, comparison is @a bFromEnd is @false or from end otherwise. If @e bCase, comparison is
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 @a bCase and @a 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.
*/ */
int Index(const wxString& sz, bool bCase = @true, int Index(const wxString& sz, bool bCase = true,
bool bFromEnd = @false); bool bFromEnd = false);
/** /**
Insert the given number of @e copies of the new element in the array before the Insert the given number of @a 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
Add().
If @a nIndex is equal to @e GetCount() this function behaves as
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!
@@ -157,7 +151,6 @@ public:
Return the array element at position @e nIndex. An assert failure will Return the array element at position @e nIndex. An assert failure will
result from an attempt to access an element beyond the end of array in debug result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode. mode, but no check is done in release mode.
See also @ref operatorindex() operator[] for the operator See also @ref operatorindex() operator[] for the operator
version. version.
*/ */
@@ -173,20 +166,18 @@ public:
/** /**
Removes the first item matching this value. An assert failure is provoked by Removes the first item matching this value. An assert failure is provoked by
an attempt to remove an element which does not exist in debug build. an attempt to remove an element which does not exist in debug build.
See also: Index() See also: Index()
*/ */
void Remove(const wxString& sz); void Remove(const wxString& sz);
/** /**
Removes @e count items starting at position @e nIndex from the array. Removes @a count items starting at position @a nIndex from the array.
*/ */
void RemoveAt(size_t nIndex, size_t count = 1); void RemoveAt(size_t nIndex, size_t count = 1);
/** /**
Releases the extra memory allocated by the array. This function is useful to Releases the extra memory allocated by the array. This function is useful to
minimize the array memory consumption. minimize the array memory consumption.
See also: Alloc(), @ref wxArray::memorymanagement "Dynamic array memory See also: Alloc(), @ref wxArray::memorymanagement "Dynamic array memory
management" management"
*/ */
@@ -194,13 +185,13 @@ public:
//@{ //@{
/** /**
Sorts the array using the specified @e compareFunction for item comparison. Sorts the array using the specified @a compareFunction for item comparison.
@e CompareFunction is defined as a function taking two @e const @e CompareFunction is defined as a function taking two @e const
wxString parameters and returning an @e int value less than, equal to or wxString parameters and returning an @e int value less than, equal to or
greater than 0 if the first string is less than, equal to or greater than the greater than 0 if the first string is less than, equal to or greater than the
second one. second one.
*/ */
void Sort(bool reverseOrder = @false); void Sort(bool reverseOrder = false);
Warning: Warning:
void Sort(CompareFunction compareFunction); void Sort(CompareFunction compareFunction);
//@} //@}
@@ -226,7 +217,6 @@ Warning:
Return the array element at position @e nIndex. An assert failure will Return the array element at position @e nIndex. An assert failure will
result from an attempt to access an element beyond the end of array in debug result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode. mode, but no check is done in release mode.
This is the operator version of Item() method. This is the operator version of Item() method.
*/ */
wxString operator[](size_t nIndex); wxString operator[](size_t nIndex);
@@ -238,30 +228,27 @@ Warning:
// ============================================================================ // ============================================================================
/** /**
Splits the given wxString object using the separator @e sep and returns the Splits the given wxString object using the separator @a sep and returns the
result as a wxArrayString. result as a wxArrayString.
If the @a escape character is non-@NULL, then the occurrences of @a 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 @a 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 @see 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 @a
sep and returns sep and returns
the result as a wxString. the result as a wxString.
If the @a 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 @a arr before joining them which is necessary
in order to be able to recover the original array contents from the string in order to be able to recover the original array contents from the string
later using wxSplit. later using wxSplit.
*/ */

View File

@@ -144,7 +144,6 @@ 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
wxART_MENU wxART_MENU
wxART_BUTTON wxART_BUTTON
@@ -154,7 +153,6 @@ public:
wxART_MESSAGE_BOX wxART_MESSAGE_BOX
wxART_OTHER (used for all requests that don't fit into any of the categories wxART_OTHER (used for all requests that don't fit into any of the categories
above) above)
Client ID servers as a hint to wxArtProvider that is supposed to help it to Client ID servers as a hint to wxArtProvider that is supposed to help it to
choose the best looking bitmap. For example it is often desirable to use choose the best looking bitmap. For example it is often desirable to use
slightly different icons in menus and toolbars even though they represent the slightly different icons in menus and toolbars even though they represent the
@@ -163,7 +161,7 @@ public:
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. @see See the artprov sample for an example of wxArtProvider usage.
*/ */
@@ -174,17 +172,15 @@ public:
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.
@sa CreateIconBundle() @see CreateIconBundle()
*/ */
wxBitmap CreateBitmap(const wxArtID& id, wxBitmap CreateBitmap(const wxArtID& id,
const wxArtClient& client, const wxArtClient& client,
@@ -206,16 +202,14 @@ 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
wxNullBitmap otherwise. wxNullBitmap otherwise.
*/ */
static wxBitmap GetBitmap(const wxArtID& id, static wxBitmap GetBitmap(const wxArtID& id,
const wxArtClient& client = wxART_OTHER, const wxArtClient& client = wxART_OTHER,
@@ -224,7 +218,7 @@ 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, @a 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
@@ -234,20 +228,20 @@ public:
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
or wxNullIconBundle otherwise. or wxNullIconBundle otherwise.
*/ */
static wxIconBundle GetIconBundle(const wxArtID& id, static wxIconBundle GetIconBundle(const wxArtID& id,
const wxArtClient& client = wxART_OTHER); const wxArtClient& client = wxART_OTHER);
@@ -307,7 +301,6 @@ public:
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
Push() may be used. Push() may be used.
*/ */
@@ -317,20 +310,20 @@ public:
Register new art provider and add it to the bottom of providers stack (i.e. Register new art provider and add it to the bottom of providers stack (i.e.
it will be queried as the last one). it will be queried as the last one).
@sa Push() @see Push()
*/ */
static void Insert(wxArtProvider* provider); static void Insert(wxArtProvider* provider);
/** /**
Remove latest added provider and delete it. Remove latest added provider and delete it.
*/ */
#define static bool Pop() /* implementation is private */ static bool Pop();
/** /**
Register new art provider and add it to the top of providers stack (i.e. it Register new art provider and add it to the top of providers stack (i.e. it
will be queried as the first provider). will be queried as the first provider).
@sa Insert() @see Insert()
*/ */
static void Push(wxArtProvider* provider); static void Push(wxArtProvider* provider);

View File

@@ -7,7 +7,7 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** /**
This function increments @e value in an atomic manner. This function increments @a value in an atomic manner.
*/ */
void wxAtomicInc(wxAtomicInt& value); void wxAtomicInc(wxAtomicInt& value);

View File

@@ -12,7 +12,7 @@
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.
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
@@ -56,11 +56,11 @@ class wxAuiManager : public wxEvtHandler
{ {
public: public:
/** /**
Constructor. @e managed_wnd specifies the wxFrame which should be managed. Constructor. @a managed_wnd specifies the wxFrame which should be managed.
@e flags specifies options which allow the frame management behavior @a flags specifies options which allow the frame management behavior
to be modified. to be modified.
*/ */
wxAuiManager(wxWindow* managed_wnd = @NULL, wxAuiManager(wxWindow* managed_wnd = NULL,
unsigned int flags = wxAUI_MGR_DEFAULT); unsigned int flags = wxAUI_MGR_DEFAULT);
/** /**
@@ -95,7 +95,6 @@ public:
/** /**
Returns the current art provider being used. Returns the current art provider being used.
See also: wxAuiDockArt. See also: wxAuiDockArt.
*/ */
wxAuiDockArt* GetArtProvider(); wxAuiDockArt* GetArtProvider();
@@ -117,11 +116,11 @@ public:
wxWindow* GetManagedWindow(); wxWindow* GetManagedWindow();
/** /**
Calling this method will return the wxAuiManager for a given window. The @e Calling this method will return the wxAuiManager for a given window. The @a
window parameter should window parameter should
specify any child window or sub-child window of the frame or window managed by specify any child window or sub-child window of the frame or window managed by
wxAuiManager. wxAuiManager.
The @e window parameter need not be managed by the manager itself, nor does it The @a window parameter need not be managed by the manager itself, nor does it
even need to be a child even need to be a child
or sub-child of a managed window. It must however be inside the window or sub-child of a managed window. It must however be inside the window
hierarchy underneath the managed hierarchy underneath the managed
@@ -154,9 +153,9 @@ public:
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 @a 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 @a insert_level parameter is used to disambiguate this. The
parameter @e insert_level can take a value of wxAUI_INSERT_PANE, parameter @a insert_level can take a value of wxAUI_INSERT_PANE,
wxAUI_INSERT_ROW wxAUI_INSERT_ROW
or wxAUI_INSERT_DOCK. or wxAUI_INSERT_DOCK.
*/ */
@@ -175,7 +174,7 @@ public:
is automatically invoked, thus realizing the saved perspective on screen. is automatically invoked, thus realizing the saved perspective on screen.
*/ */
bool LoadPerspective(const wxString& perspective, bool LoadPerspective(const wxString& perspective,
bool update = @true); bool update = true);
/** /**
ProcessDockResult() is a protected member of the wxAUI layout manager. It can ProcessDockResult() is a protected member of the wxAUI layout manager. It can
@@ -200,10 +199,9 @@ public:
/** /**
Instructs wxAuiManager to use art provider specified by parameter Instructs wxAuiManager to use art provider specified by parameter
@e art_provider for all drawing calls. This allows plugable @a art_provider for all drawing calls. This allows plugable
look-and-feel features. The previous art provider object, if any, look-and-feel features. The previous art provider object, if any,
will be deleted by wxAuiManager. will be deleted by wxAuiManager.
See also: wxAuiDockArt. See also: wxAuiDockArt.
*/ */
void SetArtProvider(wxAuiDockArt* art_provider); void SetArtProvider(wxAuiDockArt* art_provider);
@@ -265,7 +263,7 @@ public:
@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.
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
@@ -310,7 +308,7 @@ public:
BottomDockable() indicates whether a pane can be docked at the bottom of the BottomDockable() indicates whether a pane can be docked at the bottom of the
frame. frame.
*/ */
wxAuiPaneInfo BottomDockable(bool b = @true); wxAuiPaneInfo BottomDockable(bool b = true);
/** /**
Caption() sets the caption of the pane. Caption() sets the caption of the pane.
@@ -321,14 +319,13 @@ public:
CaptionVisible indicates that a pane caption should be visible. If @false, no CaptionVisible indicates that a pane caption should be visible. If @false, no
pane caption is drawn. pane caption is drawn.
*/ */
wxAuiPaneInfo CaptionVisible(bool visible = @true); wxAuiPaneInfo CaptionVisible(bool visible = true);
//@{ //@{
/** /**
Center() sets the pane dock position to the left side of the frame. Center() sets the pane dock position to the left side of the frame.
The centre pane is the space in the middle after all border panes (left, top, The centre pane is the space in the middle after all border panes (left, top,
right, bottom) are subtracted from the layout. right, bottom) are subtracted from the layout.
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();
@@ -347,7 +344,7 @@ public:
/** /**
CloseButton() indicates that a close button should be drawn for the pane. CloseButton() indicates that a close button should be drawn for the pane.
*/ */
wxAuiPaneInfo CloseButton(bool visible = @true); wxAuiPaneInfo CloseButton(bool visible = true);
/** /**
DefaultPane() specifies that the pane should adopt the default pane settings. DefaultPane() specifies that the pane should adopt the default pane settings.
@@ -358,7 +355,7 @@ public:
DestroyOnClose() indicates whether a pane should be detroyed when it is closed. DestroyOnClose() indicates whether a pane should be detroyed when it is closed.
Normally a pane is simply hidden when the close button is clicked. Setting DestroyOnClose to @true will cause the window to be destroyed when the user clicks the pane's close button. Normally a pane is simply hidden when the close button is clicked. Setting DestroyOnClose to @true will cause the window to be destroyed when the user clicks the pane's close button.
*/ */
wxAuiPaneInfo DestroyOnClose(bool b = @true); wxAuiPaneInfo DestroyOnClose(bool b = true);
/** /**
Direction() determines the direction of the docked pane. It is functionally the Direction() determines the direction of the docked pane. It is functionally the
@@ -375,13 +372,13 @@ public:
DockFixed() causes the containing dock to have no resize sash. This is useful DockFixed() causes the containing dock to have no resize sash. This is useful
for creating panes that span the entire width or height of a dock, but should not be resizable in the other direction. for creating panes that span the entire width or height of a dock, but should not be resizable in the other direction.
*/ */
wxAuiPaneInfo DockFixed(bool b = @true); wxAuiPaneInfo DockFixed(bool b = true);
/** /**
Dockable() specifies whether a frame can be docked or not. It is the same as Dockable() specifies whether a frame can be docked or not. It is the same as
specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b). specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b).
*/ */
wxAuiPaneInfo Dockable(bool b = @true); wxAuiPaneInfo Dockable(bool b = true);
/** /**
Fixed() forces a pane to be fixed size so that it cannot be resized. After Fixed() forces a pane to be fixed size so that it cannot be resized. After
@@ -398,7 +395,7 @@ public:
Floatable() sets whether the user will be able to undock a pane and turn it Floatable() sets whether the user will be able to undock a pane and turn it
into a floating window. into a floating window.
*/ */
wxAuiPaneInfo Floatable(bool b = @true); wxAuiPaneInfo Floatable(bool b = true);
//@{ //@{
/** /**
@@ -419,12 +416,12 @@ public:
/** /**
Gripper() indicates that a gripper should be drawn for the pane. Gripper() indicates that a gripper should be drawn for the pane.
*/ */
wxAuiPaneInfo Gripper(bool visible = @true); wxAuiPaneInfo Gripper(bool visible = true);
/** /**
GripperTop() indicates that a gripper should be drawn at the top of the pane. GripperTop() indicates that a gripper should be drawn at the top of the pane.
*/ */
wxAuiPaneInfo GripperTop(bool attop = @true); wxAuiPaneInfo GripperTop(bool attop = true);
/** /**
HasBorder() returns @true if the pane displays a border. HasBorder() returns @true if the pane displays a border.
@@ -522,7 +519,7 @@ public:
IsOk() returns @true if the wxAuiPaneInfo structure is valid. A pane structure IsOk() returns @true if the wxAuiPaneInfo structure is valid. A pane structure
is valid if it has an associated window. is valid if it has an associated window.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
IsResizable() returns @true if the pane can be resized. IsResizable() returns @true if the pane can be resized.
@@ -566,7 +563,7 @@ public:
/** /**
LeftDockable() indicates whether a pane can be docked on the left of the frame. LeftDockable() indicates whether a pane can be docked on the left of the frame.
*/ */
wxAuiPaneInfo LeftDockable(bool b = @true); wxAuiPaneInfo LeftDockable(bool b = true);
//@{ //@{
/** /**
@@ -579,7 +576,7 @@ public:
/** /**
MaximizeButton() indicates that a maximize button should be drawn for the pane. MaximizeButton() indicates that a maximize button should be drawn for the pane.
*/ */
wxAuiPaneInfo MaximizeButton(bool visible = @true); wxAuiPaneInfo MaximizeButton(bool visible = true);
//@{ //@{
/** /**
@@ -593,12 +590,12 @@ public:
/** /**
MinimizeButton() indicates that a minimize button should be drawn for the pane. MinimizeButton() indicates that a minimize button should be drawn for the pane.
*/ */
wxAuiPaneInfo MinimizeButton(bool visible = @true); wxAuiPaneInfo MinimizeButton(bool visible = true);
/** /**
Movable indicates whether a frame can be moved. Movable indicates whether a frame can be moved.
*/ */
wxAuiPaneInfo Movable(bool b = @true); wxAuiPaneInfo Movable(bool b = true);
/** /**
Name() sets the name of the pane so it can be referenced in lookup functions. Name() sets the name of the pane so it can be referenced in lookup functions.
@@ -609,12 +606,12 @@ public:
/** /**
PaneBorder indicates that a border should be drawn for the pane. PaneBorder indicates that a border should be drawn for the pane.
*/ */
wxAuiPaneInfo PaneBorder(bool visible = @true); wxAuiPaneInfo PaneBorder(bool visible = true);
/** /**
PinButton() indicates that a pin button should be drawn for the pane. PinButton() indicates that a pin button should be drawn for the pane.
*/ */
wxAuiPaneInfo PinButton(bool visible = @true); wxAuiPaneInfo PinButton(bool visible = true);
/** /**
Position() determines the position of the docked pane. Position() determines the position of the docked pane.
@@ -625,7 +622,7 @@ public:
Resizable() allows a pane to be resized if the parameter is @true, and forces it Resizable() allows a pane to be resized if the parameter is @true, and forces it
to be a fixed size if the parameter is @false. This is simply an antonym for Fixed(). to be a fixed size if the parameter is @false. This is simply an antonym for Fixed().
*/ */
wxAuiPaneInfo Resizable(bool resizable = @true); wxAuiPaneInfo Resizable(bool resizable = true);
/** /**
Right() sets the pane dock position to the right side of the frame. Right() sets the pane dock position to the right side of the frame.
@@ -636,12 +633,12 @@ public:
RightDockable() indicates whether a pane can be docked on the right of the RightDockable() indicates whether a pane can be docked on the right of the
frame. frame.
*/ */
wxAuiPaneInfo RightDockable(bool b = @true); wxAuiPaneInfo RightDockable(bool b = true);
/** /**
Row() determines the row of the docked pane. Row() determines the row of the docked pane.
*/ */
#define wxAuiPaneInfo Row(int row) /* implementation is private */ wxAuiPaneInfo Row(int row);
/** /**
Write the safe parts of a newly loaded PaneInfo structure "source" into "this" Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
@@ -658,7 +655,7 @@ public:
/** /**
Show() indicates that a pane should be shown. Show() indicates that a pane should be shown.
*/ */
wxAuiPaneInfo Show(bool show = @true); wxAuiPaneInfo Show(bool show = true);
/** /**
ToolbarPane() specifies that the pane should adopt the default toolbar pane ToolbarPane() specifies that the pane should adopt the default toolbar pane
@@ -669,12 +666,12 @@ public:
/** /**
Top() sets the pane dock position to the top of the frame. Top() sets the pane dock position to the top of the frame.
*/ */
#define wxAuiPaneInfo Top() /* implementation is private */ wxAuiPaneInfo Top();
/** /**
TopDockable() indicates whether a pane can be docked at the top of the frame. TopDockable() indicates whether a pane can be docked at the top of the frame.
*/ */
wxAuiPaneInfo TopDockable(bool b = @true); wxAuiPaneInfo TopDockable(bool b = true);
/** /**
Window() assigns the window pointer that the wxAuiPaneInfo should use. This Window() assigns the window pointer that the wxAuiPaneInfo should use. This

View File

@@ -11,7 +11,7 @@
@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.
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.
@@ -74,17 +74,17 @@ public:
//@} //@}
/** /**
Adds a page. If the @e select parameter is @true, calling this will generate a Adds a page. If the @a select parameter is @true, calling this will generate a
page change event. page change event.
*/ */
bool AddPage(wxWindow* page, const wxString& caption, bool AddPage(wxWindow* page, const wxString& caption,
bool select = @false, bool select = false,
const wxBitmap& bitmap = wxNullBitmap); const wxBitmap& bitmap = wxNullBitmap);
/** /**
Sets the selection to the next or previous page. Sets the selection to the next or previous page.
*/ */
void AdvanceSelection(bool forward = @true); void AdvanceSelection(bool forward = true);
/** /**
Creates the notebook window. Creates the notebook window.
@@ -151,12 +151,12 @@ public:
/** /**
InsertPage() is similar to AddPage, but allows the ability to specify the InsertPage() is similar to AddPage, but allows the ability to specify the
insert location. insert location.
If the @e select parameter is @true, calling this will generate a page change If the @a select parameter is @true, calling this will generate a page change
event. event.
*/ */
bool InsertPage(size_t page_idx, wxWindow* page, bool InsertPage(size_t page_idx, wxWindow* page,
const wxString& caption, const wxString& caption,
bool select = @false, bool select = false,
const wxBitmap& bitmap = wxNullBitmap); const wxBitmap& bitmap = wxNullBitmap);
/** /**
@@ -219,11 +219,11 @@ public:
//@{ //@{
/** /**
Split performs a split operation programmatically. The argument @e page Split performs a split operation programmatically. The argument @a page
indicates indicates
the page that will be split off. This page will also become the active page the page that will be split off. This page will also become the active page
after the after the
split. The @e direction argument specifies where the pane should go, it should split. The @a direction argument specifies where the pane should go, it should
be one be one
of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT. of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.
*/ */

View File

@@ -11,7 +11,7 @@
@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.
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
@@ -75,10 +75,8 @@ public:
/** /**
Draws a button in the pane's title bar. Draws a button in the pane's title bar.
@a button can be one of the values of @b wxAuiButtonId.
@e button can be one of the values of @b wxAuiButtonId. @a button_state can be one of the values of @b wxAuiPaneButtonState.
@e button_state can be one of the values of @b wxAuiPaneButtonState.
*/ */
virtual void DrawPaneButton(wxDC& dc, wxWindow* window, virtual void DrawPaneButton(wxDC& dc, wxWindow* window,
int button, int button,
@@ -100,8 +98,7 @@ public:
/** /**
Get the colour of a certain setting. Get the colour of a certain setting.
@a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
@e id can be one of the colour values of @b wxAuiPaneDockArtSetting.
*/ */
virtual wxColour GetColour(int id); virtual wxColour GetColour(int id);
@@ -112,8 +109,7 @@ public:
/** /**
Get the value of a certain setting. Get the value of a certain setting.
@a id can be one of the size values of @b wxAuiPaneDockArtSetting.
@e id can be one of the size values of @b wxAuiPaneDockArtSetting.
*/ */
virtual int GetMetric(int id); virtual int GetMetric(int id);
@@ -124,8 +120,7 @@ public:
/** /**
Set a certain setting with the value @e colour. Set a certain setting with the value @e colour.
@a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
@e id can be one of the colour values of @b wxAuiPaneDockArtSetting.
*/ */
virtual void SetColour(int id, const wxColor& colour); virtual void SetColour(int id, const wxColor& colour);
@@ -136,8 +131,7 @@ public:
/** /**
Set a certain setting with the value @e new_val. Set a certain setting with the value @e new_val.
@a id can be one of the size values of @b wxAuiPaneDockArtSetting.
@e id can be one of the size values of @b wxAuiPaneDockArtSetting.
*/ */
virtual void SetMetric(int id, int new_val); virtual void SetMetric(int id, int new_val);
}; };

View File

@@ -14,25 +14,22 @@
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. @a 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);
//@} //@}
@@ -54,58 +51,54 @@ 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 @a 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 @a 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
decoding with error. If the mode is wxBase64DecodeMode_SkipWS, then the white the
space characters are silently skipped instead. And if it is decoding with error. If the mode is wxBase64DecodeMode_SkipWS, then the
wxBase64DecodeMode_Relaxed, then all invalid characters are skipped. white
space characters are silently skipped instead. And if it is
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.
*/ */
size_t wxBase64Decode(void * dst, size_t dstLen, size_t wxBase64Decode(void* dst, size_t dstLen,
const char * src, 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 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

@@ -43,27 +43,22 @@ public:
/** /**
Creates a bitmap from the given data, which can be of arbitrary type. The Creates a bitmap from the given data, which can be of arbitrary type. The
wxBitmap object @e bitmap is wxBitmap object @a 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.
@returns @true if the call succeeded, @false otherwise (the default). @returns @true if the call succeeded, @false otherwise (the default).
*/ */
@@ -92,18 +87,16 @@ public:
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.
@sa wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile() @see wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile()
*/ */
bool LoadFile(wxBitmap* bitmap, const wxString& name, long type); bool LoadFile(wxBitmap* bitmap, const wxString& name, long type);
@@ -111,29 +104,26 @@ 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.
@sa wxBitmap::LoadFile, wxBitmap::SaveFile, LoadFile() @see wxBitmap::LoadFile, wxBitmap::SaveFile, LoadFile()
*/ */
bool SaveFile(wxBitmap* bitmap, const wxString& name, int type, bool SaveFile(wxBitmap* bitmap, const wxString& name, int type,
wxPalette* palette = @NULL); wxPalette* palette = NULL);
/** /**
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);
@@ -141,7 +131,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);
@@ -149,7 +139,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);
}; };
@@ -183,92 +173,127 @@ public:
The resulting bitmap will use the provided colour depth (or that of the The resulting bitmap will use the provided colour depth (or that of the
current system if depth is -1) which entails that a colour reduction has current system if depth is -1) which entails that a colour reduction has
to take place. to take place.
When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube
created created
on program start-up to look up colors. This ensures a very fast conversion, but on program start-up to look up colors. This ensures a very fast conversion, but
the image quality won't be perfect (and could be better for photo images using the image quality won't be perfect (and could be better for photo images using
more more
sophisticated dithering algorithms). sophisticated dithering algorithms).
On Windows, if there is a palette present (set with SetPalette), it will be On Windows, if there is a palette present (set with SetPalette), it will be
used when used when
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
screen is used. the
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:
wxBITMAP_TYPE_BMP
Load a Windows bitmap file.
wxBITMAP_TYPE_BMP_RESOURCE
Load a Windows bitmap resource from the executable. Windows only.
wxBITMAP_TYPE_PICT_RESOURCE wxBITMAP_TYPE_BMP
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file. Load a Windows bitmap file.
wxBITMAP_TYPE_XBM
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets configuration. wxBITMAP_TYPE_BMP_RESOURCE
If all possible wxWidgets settings are used, the Windows platform supports BMP
file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data,
XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
In addition, wxBitmap can read all formats that wxImage can, which currently
include
wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_TIF, wxBITMAP_TYPE_PNG, wxBITMAP_TYPE_GIF,
wxBITMAP_TYPE_PCX,
and wxBITMAP_TYPE_PNM. Of course, you must have wxImage handlers loaded.
Load a Windows bitmap resource from the executable. Windows only.
wxBITMAP_TYPE_PICT_RESOURCE
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file.
wxBITMAP_TYPE_XBM
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets
configuration.
If all possible wxWidgets settings are used, the Windows platform supports
BMP file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM
data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM
file.
In addition, wxBitmap can read all formats that wxImage can, which
currently include
wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_TIF, wxBITMAP_TYPE_PNG,
wxBITMAP_TYPE_GIF, wxBITMAP_TYPE_PCX,
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
assignment or another member function such as Create assignment or another member function such as Create or
or LoadFile must be called subsequently. LoadFile must be called subsequently.
@sa LoadFile() @see LoadFile()
*/ */
wxBitmap(); wxBitmap();
wxBitmap(const wxBitmap& bitmap); wxBitmap(const wxBitmap& bitmap);
@@ -286,10 +311,8 @@ public:
Destructor. Destructor.
See @ref overview_refcountdestruct "reference-counted object destruction" for See @ref overview_refcountdestruct "reference-counted object destruction" for
more info. more info.
If the application omits to delete the bitmap explicitly, the bitmap will be If the application omits to delete the bitmap explicitly, the bitmap will be
destroyed automatically by wxWidgets when the application exits. destroyed automatically by wxWidgets when the application exits.
Do not delete a bitmap that is selected into a memory device context. Do not delete a bitmap that is selected into a memory device context.
*/ */
~wxBitmap(); ~wxBitmap();
@@ -298,16 +321,15 @@ 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.
@sa wxBitmapHandler @see wxBitmapHandler
*/ */
static void AddHandler(wxBitmapHandler* handler); static void AddHandler(wxBitmapHandler* handler);
/** /**
Deletes all bitmap handlers. Deletes all bitmap handlers.
This function is called by wxWidgets on exit. This function is called by wxWidgets on exit.
*/ */
static void CleanUpHandlers(); static void CleanUpHandlers();
@@ -329,27 +351,23 @@ 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.
@returns @true if the call succeeded, @false otherwise. @returns @true if the call succeeded, @false otherwise.
@remarks The first form works on all platforms. The portability of the @remarks The first form works on all platforms. The portability of the
second form depends on the type of data. second form depends on the type of data.
@sa wxBitmap() @see 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,
@@ -362,17 +380,15 @@ public:
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.
@sa wxBitmapHandler @see 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,
@@ -389,7 +405,7 @@ public:
/** /**
Returns the static list of bitmap format handlers. Returns the static list of bitmap format handlers.
@sa wxBitmapHandler @see wxBitmapHandler
*/ */
static wxList GetHandlers(); static wxList GetHandlers();
@@ -402,7 +418,7 @@ public:
Gets the associated mask (if any) which may have been loaded from a file Gets the associated mask (if any) which may have been loaded from a file
or set for the bitmap. or set for the bitmap.
@sa SetMask(), wxMask @see SetMask(), wxMask
*/ */
wxMask* GetMask(); wxMask* GetMask();
@@ -410,7 +426,7 @@ public:
Gets the associated palette (if any) which may have been loaded from a file Gets the associated palette (if any) which may have been loaded from a file
or set for the bitmap. or set for the bitmap.
@sa wxPalette @see wxPalette
*/ */
wxPalette* GetPalette(); wxPalette* GetPalette();
@@ -423,7 +439,7 @@ public:
/** /**
Gets the width of the bitmap in pixels. Gets the width of the bitmap in pixels.
@sa GetHeight() @see GetHeight()
*/ */
int GetWidth(); int GetWidth();
@@ -431,10 +447,9 @@ public:
Adds the standard bitmap format handlers, which, depending on wxWidgets Adds the standard bitmap format handlers, which, depending on wxWidgets
configuration, can be handlers for Windows bitmap, Windows bitmap resource, and configuration, can be handlers for Windows bitmap, Windows bitmap resource, and
XPM. XPM.
This function is called by wxWidgets on startup. This function is called by wxWidgets on startup.
@sa wxBitmapHandler @see wxBitmapHandler
*/ */
static void InitStandardHandlers(); static void InitStandardHandlers();
@@ -442,74 +457,114 @@ 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.
@sa wxBitmapHandler @see wxBitmapHandler
*/ */
static void InsertHandler(wxBitmapHandler* handler); static void InsertHandler(wxBitmapHandler* handler);
/** /**
Returns @true if bitmap data is present. Returns @true if bitmap data is present.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
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:
wxBITMAP_TYPE_BMP
Load a Windows bitmap file.
wxBITMAP_TYPE_BMP_RESOURCE
Load a Windows bitmap resource from the executable.
wxBITMAP_TYPE_PICT_RESOURCE wxBITMAP_TYPE_BMP
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file. Load a Windows bitmap file.
wxBITMAP_TYPE_XBM
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets configuration. wxBITMAP_TYPE_BMP_RESOURCE
In addition, wxBitmap can read all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG, wxBITMAP_TYPE_GIF, wxBITMAP_TYPE_PCX,
wxBITMAP_TYPE_PNM).
(Of course you must have wxImage handlers loaded.) Load a Windows bitmap resource from the executable.
wxBITMAP_TYPE_PICT_RESOURCE
Load a PICT image resource from the executable. Mac OS only.
wxBITMAP_TYPE_GIF
Load a GIF bitmap file.
wxBITMAP_TYPE_XBM
Load an X bitmap file.
wxBITMAP_TYPE_XPM
Load an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets
configuration.
In addition, wxBitmap can read all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG, wxBITMAP_TYPE_GIF,
wxBITMAP_TYPE_PCX, wxBITMAP_TYPE_PNM).
(Of course you must have wxImage handlers loaded.)
@returns @true if the operation succeeded, @false otherwise. @returns @true if the operation succeeded, @false otherwise.
@remarks A palette may be associated with the bitmap if one exists @remarks A palette may be associated with the bitmap if one exists
(especially for colour Windows bitmaps), and if the (especially for colour Windows bitmaps), and if the
code supports it. You can check if one has been code supports it. You can check if one has been created
created by using the GetPalette member. by using the GetPalette member.
@sa SaveFile() @see SaveFile()
*/ */
bool LoadFile(const wxString& name, wxBitmapType type); bool LoadFile(const wxString& name, wxBitmapType type);
@@ -518,11 +573,11 @@ public:
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.
@sa wxBitmapHandler @see wxBitmapHandler
*/ */
static bool RemoveHandler(const wxString& name); static bool RemoveHandler(const wxString& name);
@@ -530,56 +585,83 @@ 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:
wxBITMAP_TYPE_BMP
Save a Windows bitmap file.
wxBITMAP_TYPE_GIF
Save a GIF bitmap file.
wxBITMAP_TYPE_XBM wxBITMAP_TYPE_BMP
Save an X bitmap file.
wxBITMAP_TYPE_XPM
Save an XPM bitmap file. Save a Windows bitmap file.
The validity of these flags depends on the platform and wxWidgets configuration.
In addition, wxBitmap can save all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG).
(Of course you must have wxImage handlers loaded.)
wxBITMAP_TYPE_GIF
Save a GIF bitmap file.
wxBITMAP_TYPE_XBM
Save an X bitmap file.
wxBITMAP_TYPE_XPM
Save an XPM bitmap file.
The validity of these flags depends on the platform and wxWidgets
configuration.
In addition, wxBitmap can save all formats that wxImage can
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG).
(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.
@remarks Depending on how wxWidgets has been configured, not all formats @remarks Depending on how wxWidgets has been configured, not all formats
may be available. may be available.
@sa LoadFile() @see LoadFile()
*/ */
bool SaveFile(const wxString& name, wxBitmapType type, bool SaveFile(const wxString& name, wxBitmapType type,
wxPalette* palette = @NULL); wxPalette* palette = NULL);
/** /**
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);
@@ -587,7 +669,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);
@@ -596,7 +678,7 @@ public:
@remarks The bitmap object owns the mask once this has been called. @remarks The bitmap object owns the mask once this has been called.
@sa GetMask(), wxMask @see GetMask(), wxMask
*/ */
void SetMask(wxMask* mask); void SetMask(wxMask* mask);
@@ -604,9 +686,9 @@ 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 @see wxPalette
*/ */
void SetPalette(const wxPalette& palette); void SetPalette(const wxPalette& palette);
@@ -614,7 +696,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);
@@ -622,7 +704,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);
}; };
@@ -655,13 +737,11 @@ public:
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);
@@ -682,13 +762,11 @@ public:
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);

View File

@@ -31,7 +31,7 @@
@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
@@ -51,39 +51,32 @@ 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
appropriately for the bitmap. sized
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
provide, and wxWidgets will draw the button correctly provide, and wxWidgets will draw the button correctly
in its different states. If you want more control, in its different states. If you want more control, call
call any of the functions any of the functions SetBitmapSelected(),
SetBitmapSelected(), SetBitmapFocus(),
SetBitmapFocus(), SetBitmapDisabled().
SetBitmapDisabled().
@sa Create(), wxValidator @see Create(), wxValidator
*/ */
wxBitmapButton(); wxBitmapButton();
wxBitmapButton(wxWindow* parent, wxWindowID id, wxBitmapButton(wxWindow* parent, wxWindowID id,
@@ -118,7 +111,7 @@ public:
@returns A reference to the disabled state bitmap. @returns A reference to the disabled state bitmap.
@sa SetBitmapDisabled() @see SetBitmapDisabled()
*/ */
const wxBitmap GetBitmapDisabled(); const wxBitmap GetBitmapDisabled();
wxBitmap GetBitmapDisabled(); wxBitmap GetBitmapDisabled();
@@ -130,7 +123,7 @@ public:
@returns A reference to the focused state bitmap. @returns A reference to the focused state bitmap.
@sa SetBitmapFocus() @see SetBitmapFocus()
*/ */
const wxBitmap GetBitmapFocus(); const wxBitmap GetBitmapFocus();
wxBitmap GetBitmapFocus(); wxBitmap GetBitmapFocus();
@@ -140,7 +133,7 @@ public:
/** /**
Returns the bitmap used when the mouse is over the button, may be invalid. Returns the bitmap used when the mouse is over the button, may be invalid.
@sa SetBitmapHover() @see SetBitmapHover()
*/ */
const wxBitmap GetBitmapHover(); const wxBitmap GetBitmapHover();
wxBitmap GetBitmapHover(); wxBitmap GetBitmapHover();
@@ -152,7 +145,7 @@ public:
@returns A reference to the button's label bitmap. @returns A reference to the button's label bitmap.
@sa SetBitmapLabel() @see SetBitmapLabel()
*/ */
const wxBitmap GetBitmapLabel(); const wxBitmap GetBitmapLabel();
wxBitmap GetBitmapLabel(); wxBitmap GetBitmapLabel();
@@ -163,7 +156,7 @@ public:
@returns A reference to the selected state bitmap. @returns A reference to the selected state bitmap.
@sa SetBitmapSelected() @see SetBitmapSelected()
*/ */
wxBitmap GetBitmapSelected(); wxBitmap GetBitmapSelected();
@@ -171,10 +164,10 @@ 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(), @see GetBitmapDisabled(), SetBitmapLabel(),
SetBitmapSelected(), SetBitmapFocus() SetBitmapSelected(), SetBitmapFocus()
*/ */
void SetBitmapDisabled(const wxBitmap& bitmap); void SetBitmapDisabled(const wxBitmap& bitmap);
@@ -182,20 +175,19 @@ 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(), @see GetBitmapFocus(), SetBitmapLabel(),
SetBitmapSelected(), SetBitmapDisabled() SetBitmapSelected(), SetBitmapDisabled()
*/ */
void SetBitmapFocus(const wxBitmap& bitmap); void SetBitmapFocus(const wxBitmap& bitmap);
/** /**
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() @see GetBitmapHover()
*/ */
void SetBitmapHover(const wxBitmap& bitmap); void SetBitmapHover(const wxBitmap& bitmap);
@@ -203,12 +195,12 @@ 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
other states if no other bitmaps are provided. other states if no other bitmaps are provided.
@sa GetBitmapLabel() @see GetBitmapLabel()
*/ */
void SetBitmapLabel(const wxBitmap& bitmap); void SetBitmapLabel(const wxBitmap& bitmap);
@@ -216,7 +208,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

@@ -28,13 +28,13 @@
@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
the list is selected. the list is selected.
@event{EVT_TEXT(id\, func)}: @event{EVT_TEXT(id, func)}:
Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text
changes. changes.
@event{EVT_TEXT_ENTER(id\, func)}: @event{EVT_TEXT_ENTER(id, func)}:
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
@@ -54,37 +54,29 @@ 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
appropriately. sized
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 @see Create(), wxValidator
*/ */
wxBitmapComboBox(); wxBitmapComboBox();
wxBitmapComboBox(wxWindow* parent, wxWindowID id, wxBitmapComboBox(wxWindow* parent, wxWindowID id,
@@ -92,7 +84,7 @@ public:
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");
@@ -119,9 +111,9 @@ 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);
//@} //@}
//@{ //@{
@@ -168,10 +160,10 @@ public:
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

@@ -52,69 +52,120 @@ 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
Transparent (no fill).
wxSOLID
Solid.
wxSTIPPLE
Uses a bitmap as a stipple. wxTRANSPARENT
wxBDIAGONAL_HATCH
Backward diagonal hatch.
wxCROSSDIAG_HATCH
Cross-diagonal hatch. Transparent (no fill).
wxFDIAGONAL_HATCH
Forward diagonal hatch.
wxCROSS_HATCH
Cross hatch.
wxHORIZONTAL_HATCH wxSOLID
Horizontal hatch.
wxVERTICAL_HATCH
Vertical hatch. Solid.
wxSTIPPLE
Uses a bitmap as a stipple.
wxBDIAGONAL_HATCH
Backward diagonal hatch.
wxCROSSDIAG_HATCH
Cross-diagonal hatch.
wxFDIAGONAL_HATCH
Forward diagonal hatch.
wxCROSS_HATCH
Cross hatch.
wxHORIZONTAL_HATCH
Horizontal hatch.
wxVERTICAL_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
wxSTIPPLE. wxSTIPPLE.
@sa wxBrushList, wxColour, wxColourDatabase @see wxBrushList, wxColour, wxColourDatabase
*/ */
wxBrush(); wxBrush();
wxBrush(const wxColour& colour, int style = wxSOLID); wxBrush(const wxColour& colour, int style = wxSOLID);
@@ -129,18 +180,18 @@ public:
more info. more info.
@remarks Although all remaining brushes are deleted when the application @remarks Although all remaining brushes are deleted when the application
exits, the application should try to clean up all exits, the application should try to clean up all
brushes itself. This is because wxWidgets cannot know brushes itself. This is because wxWidgets cannot know
if a pointer to the brush object is stored in an if a pointer to the brush object is stored in an
application data structure, and there is a risk of application data structure, and there is a risk of
double deletion. double deletion.
*/ */
~wxBrush(); ~wxBrush();
/** /**
Returns a reference to the brush colour. Returns a reference to the brush colour.
@sa SetColour() @see SetColour()
*/ */
wxColour GetColour(); wxColour GetColour();
@@ -150,72 +201,61 @@ public:
this bitmap may be non-@NULL but uninitialised (@ref wxBitmap::isok this bitmap may be non-@NULL but uninitialised (@ref wxBitmap::isok
wxBitmap:IsOk returns @false). wxBitmap:IsOk returns @false).
@sa SetStipple() @see SetStipple()
*/ */
wxBitmap * GetStipple(); wxBitmap* GetStipple();
/** /**
Returns the brush style, one of: Returns the brush style, one of:
@b wxTRANSPARENT @b wxTRANSPARENT
Transparent (no fill). Transparent (no fill).
@b wxSOLID @b wxSOLID
Solid. Solid.
@b wxBDIAGONAL_HATCH @b wxBDIAGONAL_HATCH
Backward diagonal hatch. Backward diagonal hatch.
@b wxCROSSDIAG_HATCH @b wxCROSSDIAG_HATCH
Cross-diagonal hatch. Cross-diagonal hatch.
@b wxFDIAGONAL_HATCH @b wxFDIAGONAL_HATCH
Forward diagonal hatch. Forward diagonal hatch.
@b wxCROSS_HATCH @b wxCROSS_HATCH
Cross hatch. Cross hatch.
@b wxHORIZONTAL_HATCH @b wxHORIZONTAL_HATCH
Horizontal hatch. Horizontal hatch.
@b wxVERTICAL_HATCH @b wxVERTICAL_HATCH
Vertical hatch. Vertical hatch.
@b wxSTIPPLE @b wxSTIPPLE
Stippled using a bitmap. Stippled using a bitmap.
@b wxSTIPPLE_MASK_OPAQUE @b wxSTIPPLE_MASK_OPAQUE
Stippled using a bitmap's mask. Stippled using a bitmap's mask.
@see SetStyle(), SetColour(), SetStipple()
@sa SetStyle(), SetColour(), SetStipple()
*/ */
int GetStyle(); int GetStyle();
/** /**
Returns @true if the style of the brush is any of hatched fills. Returns @true if the style of the brush is any of hatched fills.
@sa GetStyle() @see GetStyle()
*/ */
bool IsHatch(); bool IsHatch();
@@ -224,13 +264,13 @@ public:
constructor has been used (for example, the brush is a member of a class, or constructor has been used (for example, the brush is a member of a class, or
@NULL has been assigned to it). @NULL has been assigned to it).
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
//@{ //@{
/** /**
Sets the brush colour using red, green and blue values. Sets the brush colour using red, green and blue values.
@sa GetColour() @see GetColour()
*/ */
void SetColour(wxColour& colour); void SetColour(wxColour& colour);
void SetColour(const wxString& colourName); void SetColour(const wxString& colourName);
@@ -242,13 +282,13 @@ public:
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
associated to it, in which case the style will be set associated to it, in which case the style will be set
to wxSTIPPLE_MASK_OPAQUE. to wxSTIPPLE_MASK_OPAQUE.
@sa wxBitmap @see wxBitmap
*/ */
void SetStipple(const wxBitmap& bitmap); void SetStipple(const wxBitmap& bitmap);
@@ -256,59 +296,120 @@ public:
Sets the brush style. Sets the brush style.
@param style @param style
One of: One of:
wxTRANSPARENT
Transparent (no fill).
wxSOLID
Solid.
wxBDIAGONAL_HATCH
Backward diagonal hatch. wxTRANSPARENT
wxCROSSDIAG_HATCH
Cross-diagonal hatch.
wxFDIAGONAL_HATCH
Forward diagonal hatch. Transparent (no fill).
wxCROSS_HATCH
Cross hatch.
wxHORIZONTAL_HATCH
Horizontal hatch.
wxVERTICAL_HATCH wxSOLID
Vertical hatch.
wxSTIPPLE
Stippled using a bitmap. Solid.
wxSTIPPLE_MASK_OPAQUE
Stippled using a bitmap's mask.
@sa GetStyle()
wxBDIAGONAL_HATCH
Backward diagonal hatch.
wxCROSSDIAG_HATCH
Cross-diagonal hatch.
wxFDIAGONAL_HATCH
Forward diagonal hatch.
wxCROSS_HATCH
Cross hatch.
wxHORIZONTAL_HATCH
Horizontal hatch.
wxVERTICAL_HATCH
Vertical hatch.
wxSTIPPLE
Stippled using a bitmap.
wxSTIPPLE_MASK_OPAQUE
Stippled using a bitmap's mask.
@see GetStyle()
*/ */
void SetStyle(int style); void SetStyle(int style);

View File

@@ -27,7 +27,7 @@ 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);
@@ -37,7 +37,7 @@ public:
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);
@@ -48,10 +48,10 @@ public:
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
*/ */
void * GetAppendBuf(size_t sizeNeeded); void* GetAppendBuf(size_t sizeNeeded);
/** /**
Returns the size of the buffer. Returns the size of the buffer.
@@ -71,12 +71,12 @@ public:
/** /**
Ensure the buffer is big enough and return a pointer to the Ensure the buffer is big enough and return a pointer to the
buffer which can be used to directly write into the buffer buffer which can be used to directly write into the buffer
up to @e sizeNeeded bytes. up to @a sizeNeeded bytes.
*/ */
void * GetWriteBuf(size_t sizeNeeded); void* GetWriteBuf(size_t sizeNeeded);
/** /**
Ensures the buffer has at least @e size bytes available. Ensures the buffer has at least @a size bytes available.
*/ */
void SetBufSize(size_t size); void SetBufSize(size_t size);
@@ -85,8 +85,8 @@ public:
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
*/ */
void SetDataLen(size_t size); void SetDataLen(size_t size);
@@ -95,8 +95,8 @@ public:
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);
@@ -105,8 +105,8 @@ public:
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
*/ */
void UngetWriteBuf(size_t sizeUsed); void UngetWriteBuf(size_t sizeUsed);
}; };

View File

@@ -58,13 +58,12 @@ class wxBusyInfo
{ {
public: public:
/** /**
Constructs a busy info window as child of @e parent and displays @e msg Constructs a busy info window as child of @a parent and displays @e msg
in it. in it.
@b NB: If @a parent is not @NULL you must ensure that it is not
@b NB: If @e parent is not @NULL you must ensure that it is not
closed while the busy info is shown. closed while the busy info is shown.
*/ */
wxBusyInfo(const wxString& msg, wxWindow* parent = @NULL); wxBusyInfo(const wxString& msg, wxWindow* parent = NULL);
/** /**
Hides and closes the window containing the information text. Hides and closes the window containing the information text.

View File

@@ -32,7 +32,7 @@
@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
@@ -50,39 +50,31 @@ public:
//@{ //@{
/** /**
Constructor, creating and showing a button. Constructor, creating and showing a button.
The preferred way to create standard buttons is to use default value of The preferred way to create standard buttons is to use default value of
@e label. If no label is supplied and @e id is one of standard IDs from @e label. If no label is supplied and @a id is one of standard IDs from
@ref overview_stockitems "this list", standard label will be used. In addition @ref overview_stockitems "this list", standard label will be used. In addition
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 @see Create(), wxValidator
*/ */
wxButton(); wxButton();
wxButton(wxWindow* parent, wxWindowID id, wxButton(wxWindow* parent, wxWindowID id,
@@ -123,7 +115,7 @@ public:
@returns The button's label. @returns The button's label.
@sa SetLabel() @see SetLabel()
*/ */
wxString GetLabel(); wxString GetLabel();
@@ -132,11 +124,11 @@ public:
box. box.
@remarks Under Windows, only dialog box buttons respond to this function. @remarks Under Windows, only dialog box buttons respond to this function.
As normal under Windows and Motif, pressing return As normal under Windows and Motif, pressing return
causes the default button to be depressed when the causes the default button to be depressed when the
return key is pressed. See also wxWindow::SetFocus return key is pressed. See also wxWindow::SetFocus
which sets the keyboard focus for windows and text which sets the keyboard focus for windows and text
panel items, and wxTopLevelWindow::SetDefaultItem. panel items, and wxTopLevelWindow::SetDefaultItem.
*/ */
void SetDefault(); void SetDefault();
@@ -144,7 +136,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

@@ -249,7 +249,7 @@ public:
style bit directly. It enables or disables the special highlighting of the style bit directly. It enables or disables the special highlighting of the
holidays. holidays.
*/ */
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
@@ -257,21 +257,20 @@ public:
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.
*/ */
void EnableMonthChange(bool enable = @true); void EnableMonthChange(bool enable = true);
/** /**
This function should be used instead of changing @c wxCAL_NO_YEAR_CHANGE This function should be used instead of changing @c wxCAL_NO_YEAR_CHANGE
style bit directly. It allows or disallows the user to change the year style bit directly. It allows or disallows the user to change the year
interactively. interactively.
*/ */
void EnableYearChange(bool enable = @true); void EnableYearChange(bool enable = true);
/** /**
Returns the attribute for the given date (should be in the range 1...31). Returns the attribute for the given date (should be in the range 1...31).
The returned pointer may be @NULL. The returned pointer may be @NULL.
*/ */
wxCalendarDateAttr * GetAttr(size_t day); wxCalendarDateAttr* GetAttr(size_t day);
/** /**
Gets the currently selected date. Gets the currently selected date.
@@ -281,53 +280,53 @@ public:
/** /**
Gets the background colour of the header part of the calendar window. Gets the background colour of the header part of the calendar window.
@sa SetHeaderColours() @see SetHeaderColours()
*/ */
const wxColour GetHeaderColourBg(); const wxColour GetHeaderColourBg();
/** /**
Gets the foreground colour of the header part of the calendar window. Gets the foreground colour of the header part of the calendar window.
@sa SetHeaderColours() @see SetHeaderColours()
*/ */
const wxColour GetHeaderColourFg(); const wxColour GetHeaderColourFg();
/** /**
Gets the background highlight colour. Gets the background highlight colour.
@sa SetHighlightColours() @see SetHighlightColours()
*/ */
const wxColour GetHighlightColourBg(); const wxColour GetHighlightColourBg();
/** /**
Gets the foreground highlight colour. Gets the foreground highlight colour.
@sa SetHighlightColours() @see SetHighlightColours()
*/ */
const wxColour GetHighlightColourFg(); const wxColour GetHighlightColourFg();
/** /**
Return the background colour currently used for holiday highlighting. Return the background colour currently used for holiday highlighting.
@sa SetHolidayColours() @see SetHolidayColours()
*/ */
const wxColour GetHolidayColourBg(); const wxColour GetHolidayColourBg();
/** /**
Return the foreground colour currently used for holiday highlighting. Return the foreground colour currently used for holiday highlighting.
@sa SetHolidayColours() @see SetHolidayColours()
*/ */
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 @a date or
@e wd pointer with the corresponding value depending on the hit test code. @a wd pointer with the corresponding value depending on the hit test code.
*/ */
wxCalendarHitTestResult HitTest(const wxPoint& pos, wxCalendarHitTestResult HitTest(const wxPoint& pos,
wxDateTime* date = @NULL, wxDateTime* date = NULL,
wxDateTime::WeekDay* wd = @NULL); wxDateTime::WeekDay* wd = NULL);
/** /**
Clears any attributes associated with the given day (in the range Clears any attributes associated with the given day (in the range
@@ -337,7 +336,6 @@ public:
/** /**
Associates the attribute with the specified date (in the range 1...31). Associates the attribute with the specified date (in the range 1...31).
If the pointer is @NULL, the items attribute is cleared. If the pointer is @NULL, the items attribute is cleared.
*/ */
void SetAttr(size_t day, wxCalendarDateAttr* attr); void SetAttr(size_t day, wxCalendarDateAttr* attr);

View File

@@ -60,16 +60,12 @@ public:
/** /**
Get the caret position (in pixels). Get the caret position (in pixels).
@b GetPosition() @b GetPosition()
Returns a Wx::Point Returns a Wx::Point
@b GetPositionXY() @b GetPositionXY()
Returns a 2-element list Returns a 2-element list
@c ( x, y ) @c ( x, y )
*/ */
@@ -81,16 +77,12 @@ public:
/** /**
Get the caret size. Get the caret size.
@b GetSize() @b GetSize()
Returns a Wx::Size Returns a Wx::Size
@b GetSizeWH() @b GetSizeWH()
Returns a 2-element list Returns a 2-element list
@c ( width, height ) @c ( width, height )
*/ */
@@ -111,7 +103,7 @@ public:
/** /**
Returns @true if the caret was created successfully. Returns @true if the caret was created successfully.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Returns @true if the caret is visible and @false if it is permanently Returns @true if the caret is visible and @false if it is permanently
@@ -132,10 +124,10 @@ public:
Sets the blink time for all the carets. Sets the blink time for all the carets.
@remarks Under Windows, this function will change the blink time for all @remarks Under Windows, this function will change the blink time for all
carets permanently (until the next time it is carets permanently (until the next time it is called),
called), even for the carets in other applications. even for the carets in other applications.
@sa GetBlinkTime() @see GetBlinkTime()
*/ */
static void SetBlinkTime(int milliseconds); static void SetBlinkTime(int milliseconds);
@@ -151,5 +143,5 @@ public:
Shows or hides the caret. Notice that if the caret was hidden N times, it Shows or hides the caret. Notice that if the caret was hidden N times, it
must be shown N times as well to reappear on the screen. must be shown N times as well to reappear on the screen.
*/ */
void Show(bool show = @true); void Show(bool show = true);
}; };

View File

@@ -12,7 +12,6 @@
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:
@@ -25,7 +24,7 @@
@endcode @endcode
*/ */
wxChar wxT(char ch); wxChar wxT(char ch);
const wxChar * wxT(const char * s); const wxChar* wxT(const char* s);
//@} //@}
@@ -39,9 +38,9 @@ const wxChar * wxT(const char * s);
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 @see wxT
*/ */
wxStringCharType wxS(char ch); wxStringCharType wxS(char ch);
const wxStringCharType * wxS(const char * s); const wxStringCharType* wxS(const char* s);
//@} //@}

View File

@@ -30,7 +30,7 @@
@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
@@ -50,32 +50,25 @@ 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
chosen. size is 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 @see Create(), wxValidator
*/ */
wxCheckBox(); wxCheckBox();
wxCheckBox(wxWindow* parent, wxWindowID id, wxCheckBox(wxWindow* parent, wxWindowID id,
@@ -108,10 +101,10 @@ public:
Gets the state of a 3-state checkbox. Gets the state of a 3-state checkbox.
@returns Returns wxCHK_UNCHECKED when the checkbox is unchecked, @returns Returns wxCHK_UNCHECKED when the checkbox is unchecked,
wxCHK_CHECKED when it is checked and wxCHK_CHECKED when it is checked and
wxCHK_UNDETERMINED when it's in the undetermined wxCHK_UNDETERMINED when it's in the undetermined state.
state. Asserts when the function is used with a Asserts when the function is used with a 2-state
2-state checkbox. checkbox.
*/ */
wxCheckBoxState Get3StateValue(); wxCheckBoxState Get3StateValue();
@@ -126,7 +119,7 @@ public:
Returns whether or not the checkbox is a 3-state checkbox. Returns whether or not the checkbox is a 3-state checkbox.
@returns Returns @true if this checkbox is a 3-state checkbox, @false if @returns Returns @true if this checkbox is a 3-state checkbox, @false if
it's a 2-state checkbox. it's a 2-state checkbox.
*/ */
bool Is3State(); bool Is3State();
@@ -134,8 +127,8 @@ public:
Returns whether or not the user can set the checkbox to the third state. Returns whether or not the user can set the checkbox to the third state.
@returns Returns @true if the user can set the third state of this @returns Returns @true if the user can set the third state of this
checkbox, @false if it can only be set checkbox, @false if it can only be set programmatically
programmatically or if it's a 2-state checkbox. or if it's a 2-state checkbox.
*/ */
bool Is3rdStateAllowedForUser(); bool Is3rdStateAllowedForUser();
@@ -151,7 +144,7 @@ public:
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

@@ -21,7 +21,7 @@
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
@@ -41,39 +41,32 @@ 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
appropriately. sized
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");
@@ -96,10 +89,9 @@ public:
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

@@ -28,45 +28,62 @@ 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:
wxOK
Show an OK button.
wxCANCEL
Show a Cancel button.
wxCENTRE wxOK
Centre the message. Not Windows.
The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
wxOK | wxCANCEL | wxCENTRE.
Show an OK button.
wxCANCEL
Show a Cancel button.
wxCENTRE
Centre the message. Not Windows.
The default value is equivalent to wxDEFAULT_DIALOG_STYLE |
wxRESIZE_BORDER | 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.
*/ */
@@ -124,49 +141,65 @@ 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:
wxOK
Show an OK button.
wxCANCEL
Show a Cancel button.
wxCENTRE wxOK
Centre the message. Not Windows.
The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
wxOK | wxCANCEL | wxCENTRE.
Show an OK button.
wxCANCEL
Show a Cancel button.
wxCENTRE
Centre the message. Not Windows.
The default value is equivalent to wxDEFAULT_DIALOG_STYLE |
wxRESIZE_BORDER | 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.
*/ */
@@ -174,14 +207,14 @@ public:
const wxString& caption, const wxString& caption,
int n, int n,
const wxString* choices, const wxString* choices,
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);
//@} //@}
@@ -225,22 +258,22 @@ public:
int wxGetSingleChoiceIndex(const wxString& message, int wxGetSingleChoiceIndex(const wxString& message,
const wxString& caption, const wxString& caption,
const wxArrayString& aChoices, const wxArrayString& aChoices,
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);
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,33 +283,31 @@ 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 @a n strings for the listbox or by using a single
@e aChoices parameter of type wxArrayString. @a aChoices parameter of type wxArrayString.
If @a 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.
*/ */
wxString wxGetSingleChoice(const wxString& message, wxString wxGetSingleChoice(const wxString& message,
const wxString& caption, const wxString& caption,
const wxArrayString& aChoices, const wxArrayString& aChoices,
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);
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);
//@} //@}
//@{ //@{
@@ -290,23 +321,23 @@ wxString wxGetSingleChoiceData(const wxString& message,
const wxString& caption, const wxString& caption,
const wxArrayString& aChoices, const wxArrayString& aChoices,
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);
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,34 +347,32 @@ 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 @a n strings for the listbox or by using a single
@e aChoices parameter of type wxArrayString. @a aChoices parameter of type wxArrayString.
If @a 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.
*/ */
size_t wxGetMultipleChoices(wxArrayInt& selections, size_t wxGetMultipleChoices(wxArrayInt& selections,
const wxString& message, const wxString& message,
const wxString& caption, const wxString& caption,
const wxArrayString& aChoices, const wxArrayString& aChoices,
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);
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

@@ -20,7 +20,7 @@
@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
@@ -40,44 +40,37 @@ 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
appropriately. sized
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 @see 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,
@@ -95,13 +88,13 @@ public:
/** /**
Creates the choice for two-step construction. See wxChoice(). Creates the choice for two-step construction. See wxChoice().
*/ */
bool Create(wxWindow * parent, wxWindowID id, const wxPoint& pos, bool Create(wxWindow* parent, wxWindowID id, 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");
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,
@@ -114,7 +107,7 @@ public:
Gets the number of columns in this choice item. Gets the number of columns in this choice item.
@remarks This is implemented for Motif only and always returns 1 for the @remarks This is implemented for Motif only and always returns 1 for the
other platforms. other platforms.
*/ */
int GetColumns(); int GetColumns();
@@ -125,7 +118,6 @@ public:
That is, while the dropdown list is shown, it returns the currently selected That is, while the dropdown list is shown, it returns the currently selected
item in it. When it is not shown, its result is the same as for the other item in it. When it is not shown, its result is the same as for the other
function. function.
This function is new since wxWidgets version 2.6.2 (before this version This function is new since wxWidgets version 2.6.2 (before this version
wxControlWithItems::GetSelection itself behaved like wxControlWithItems::GetSelection itself behaved like
this). this).
@@ -136,7 +128,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

@@ -7,9 +7,9 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** /**
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 @a
formatName which is of maximum formatName which is of maximum
length @e maxCount. @e dataFormat must not specify a predefined clipboard length @e maxCount. @a dataFormat must not specify a predefined clipboard
format. format.
*/ */
bool wxGetClipboardFormatName(int dataFormat, bool wxGetClipboardFormatName(int dataFormat,
@@ -19,16 +19,13 @@ bool wxGetClipboardFormatName(int dataFormat,
/** /**
Gets data from the clipboard. Gets data from the clipboard.
@a 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);
/** /**
Returns @true if the given data format is available on the clipboard. Returns @true if the given data format is available on the clipboard.
@@ -65,15 +62,12 @@ 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.
@a 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 @a 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

@@ -18,8 +18,7 @@
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 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
@@ -58,7 +57,7 @@
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDataObject @ref overview_wxdndoverview, wxDataObject
*/ */
class wxClipboard : public wxObject class wxClipboard : public wxObject
{ {
@@ -76,12 +75,11 @@ public:
/** /**
Call this function to add the data object to the clipboard. You may call Call this function to add the data object to the clipboard. You may call
this function repeatedly after having cleared the clipboard using Clear(). this function repeatedly after having cleared the clipboard using Clear().
After this function has been called, the clipboard owns the data, so do not After this function has been called, the clipboard owns the data, so do not
delete delete
the data explicitly. the data explicitly.
@sa SetData() @see SetData()
*/ */
bool AddData(wxDataObject* data); bool AddData(wxDataObject* data);
@@ -104,7 +102,7 @@ public:
bool Flush(); bool Flush();
/** /**
Call this function to fill @e data with data on the clipboard, if available in Call this function to fill @a data with data on the clipboard, if available in
the required the required
format. Returns @true on success. format. Returns @true on success.
*/ */
@@ -131,10 +129,8 @@ public:
/** /**
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
should keep the clipboard open for only a very short time. should keep the clipboard open for only a very short time.
Returns @true on success. This should be tested (as in the sample shown above). Returns @true on success. This should be tested (as in the sample shown above).
*/ */
bool Open(); bool Open();
@@ -143,12 +139,11 @@ public:
Call this function to set the data object to the clipboard. This function will Call this function to set the data object to the clipboard. This function will
clear all previous contents in the clipboard, so calling it several times clear all previous contents in the clipboard, so calling it several times
does not make any sense. does not make any sense.
After this function has been called, the clipboard owns the data, so do not After this function has been called, the clipboard owns the data, so do not
delete delete
the data explicitly. the data explicitly.
@sa AddData() @see AddData()
*/ */
bool SetData(wxDataObject* data); bool SetData(wxDataObject* data);
@@ -157,7 +152,6 @@ public:
CLIPBOARD X11 selection by default. When this function is called with @true CLIPBOARD X11 selection by default. When this function is called with @true
argument, all subsequent clipboard operations will use PRIMARY selection until argument, all subsequent clipboard operations will use PRIMARY selection until
this function is called again with @false. this function is called again with @false.
On the other platforms, there is no PRIMARY selection and so all clipboard On the other platforms, there is no PRIMARY selection and so all clipboard
operations will fail. This allows to implement the standard X11 handling of the operations will fail. This allows to implement the standard X11 handling of the
clipboard which consists in copying data to the CLIPBOARD selection only when clipboard which consists in copying data to the CLIPBOARD selection only when
@@ -166,5 +160,5 @@ public:
automatically, without overwriting the normal clipboard contents with the automatically, without overwriting the normal clipboard contents with the
currently selected text on the other platforms. currently selected text on the other platforms.
*/ */
void UsePrimarySelection(bool primary = @true); void UsePrimarySelection(bool primary = true);
}; };

View File

@@ -45,7 +45,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxColourPickerCtrl(wxWindow * parent, wxWindowID id, wxColourPickerCtrl(wxWindow* parent, wxWindowID id,
const wxColour& colour = wxBLACK, const wxColour& colour = wxBLACK,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -55,33 +55,26 @@ 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 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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxColour& colour = wxBLACK, const wxColour& colour = wxBLACK,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -98,8 +91,8 @@ 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);
//@} //@}
}; };
@@ -123,7 +116,7 @@ public:
/** /**
The constructor is not normally used by the user code. The constructor is not normally used by the user code.
*/ */
wxColourPickerEvent(wxObject * generator, int id, wxColourPickerEvent(wxObject* generator, int id,
const wxColour& colour); const wxColour& colour);
/** /**
@@ -134,5 +127,5 @@ public:
/** /**
Set the colour associated with the event. Set the colour associated with the event.
*/ */
void SetColour(const wxColour & pos); void SetColour(const wxColour& pos);
}; };

View File

@@ -82,13 +82,12 @@ public:
/** /**
Frees resources allocated by the object. Frees resources allocated by the object.
@b NB: destructor is not virtual, don't use this class polymorphically. @b NB: destructor is not virtual, don't use this class polymorphically.
*/ */
~wxCmdLineParser(); ~wxCmdLineParser();
/** /**
Add an option @e name with an optional long name @e lng (no long name if Add an option @a name with an optional long name @a lng (no long name if
it is empty, which is default) taking a value of the given type (string by it is empty, which is default) taking a value of the given type (string by
default) to the command line description. default) to the command line description.
*/ */
@@ -99,15 +98,15 @@ public:
int flags = 0); int flags = 0);
/** /**
Add a parameter of the given @e type to the command line description. Add a parameter of the given @a type to the command line description.
*/ */
void AddParam(const wxString& desc = wxEmptyString, void AddParam(const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0); int flags = 0);
/** /**
Add a switch @e name with an optional long name @e lng (no long name if it Add a switch @a name with an optional long name @a lng (no long name if it
is empty, which is default), description @e desc and flags @e flags to the is empty, which is default), description @a desc and flags @a flags to the
command line description. command line description.
*/ */
void AddSwitch(const wxString& name, void AddSwitch(const wxString& name,
@@ -118,7 +117,7 @@ public:
/** /**
Returns @true if long options are enabled, otherwise @false. Returns @true if long options are enabled, otherwise @false.
@sa EnableLongOptions() @see EnableLongOptions()
*/ */
bool AreLongOptionsEnabled(); bool AreLongOptionsEnabled();
@@ -127,17 +126,14 @@ public:
parser object must have the command line to parse and also the rules saying parser object must have the command line to parse and also the rules saying
which switches, options and parameters are valid - this is called command line which switches, options and parameters are valid - this is called command line
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
@@ -145,7 +141,6 @@ public:
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
@@ -164,21 +159,18 @@ public:
wxCmdLineParser has several global options which may be changed by the wxCmdLineParser has several global options which may be changed by the
application. All of the functions described in this section should be called application. All of the functions described in this section should be called
before Parse(). before Parse().
First global option is the support for long (also known as GNU-style) options. First global option is the support for long (also known as GNU-style) options.
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
option (otherwise, the word on the command line is assumed to be a parameter). option (otherwise, the word on the command line is assumed to be a parameter).
Under Unix, @c '-' is always used, but Windows has at least two common Under Unix, @c '-' is always used, but Windows has at least two common
choices for this: @c '-' and @c '/'. Some programs also use @c '+'. choices for this: @c '-' and @c '/'. Some programs also use @c '+'.
The default is to use what suits most the current platform, but may be changed The default is to use what suits most the current platform, but may be changed
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.
@@ -192,13 +184,12 @@ public:
/** /**
Enable or disable support for the long options. Enable or disable support for the long options.
As long options are not (yet) POSIX-compliant, this option allows to disable As long options are not (yet) POSIX-compliant, this option allows to disable
them. them.
@sa Customization() and AreLongOptionsEnabled() @see Customization() and AreLongOptionsEnabled()
*/ */
void EnableLongOptions(bool enable = @true); void EnableLongOptions(bool enable = true);
//@{ //@{
/** /**
@@ -226,7 +217,6 @@ public:
After calling Parse() (and if it returned 0), After calling Parse() (and if it returned 0),
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()
@@ -242,13 +232,13 @@ public:
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
are given, use Usage to show the usage message are given, use Usage to show the usage message
from the caller if needed. from the caller if needed.
*/ */
int Parse(bool giveUsage = @true); int Parse(bool giveUsage = true);
/** /**
After the command line description was constructed and the desired options were After the command line description was constructed and the desired options were
@@ -257,7 +247,6 @@ public:
option was specified (this is a separate case as, normally, the program will option was specified (this is a separate case as, normally, the program will
terminate after this) or a positive number if there was an error during the terminate after this) or a positive number if there was an error during the
command line parsing. command line parsing.
In the latter case, the appropriate error message and usage information are In the latter case, the appropriate error message and usage information are
logged by wxCmdLineParser itself using the standard wxWidgets logging functions. logged by wxCmdLineParser itself using the standard wxWidgets logging functions.
*/ */
@@ -274,21 +263,19 @@ public:
/** /**
Construct the command line description Construct the command line description
Take the command line description from the wxCMD_LINE_NONE terminated table. Take the command line description from the wxCMD_LINE_NONE terminated table.
Example of usage: Example of usage:
*/ */
void SetDesc(const wxCmdLineEntryDesc* desc); void SetDesc(const wxCmdLineEntryDesc* desc);
/** /**
@e logo is some extra text which will be shown by @a logo is some extra text which will be shown by
Usage() method. Usage() method.
*/ */
void SetLogo(const wxString& logo); void SetLogo(const wxString& logo);
/** /**
@e switchChars contains all characters with which an option or switch may @a switchChars contains all characters with which an option or switch may
start. Default is @c "-" for Unix, @c "-/" for Windows. start. Default is @c "-" for Unix, @c "-/" for Windows.
*/ */
void SetSwitchChars(const wxString& switchChars); void SetSwitchChars(const wxString& switchChars);
@@ -298,7 +285,7 @@ public:
options and parameters descriptions specified earlier, so the resulting message options and parameters descriptions specified earlier, so the resulting message
will not be helpful to the user unless the descriptions were indeed specified. will not be helpful to the user unless the descriptions were indeed specified.
@sa SetLogo() @see SetLogo()
*/ */
void Usage(); void Usage();
}; };

View File

@@ -27,16 +27,14 @@ public:
/** /**
Constructor. wxCommand is an abstract class, so you will need to derive Constructor. wxCommand is an abstract class, so you will need to derive
a new class and call this constructor from your own constructor. a new class and call this constructor from your own constructor.
@a canUndo tells the command processor whether this command is undo-able. You
@e canUndo tells the command processor whether this command is undo-able. You
can achieve the same functionality by overriding the CanUndo member function can achieve the same functionality by overriding the CanUndo member function
(if for example (if for example
the criteria for undoability is context-dependent). the criteria for undoability is context-dependent).
@a name must be supplied for the command processor to display the command name
@e name must be supplied for the command processor to display the command name
in the application's edit menu. in the application's edit menu.
*/ */
wxCommand(bool canUndo = @false, const wxString& name = @NULL); wxCommand(bool canUndo = false, const wxString& name = NULL);
/** /**
Destructor. Destructor.
@@ -54,7 +52,7 @@ public:
Returning @false will indicate to the command processor that the action is Returning @false will indicate to the command processor that the action is
not undoable and should not be added to the command history. not undoable and should not be added to the command history.
*/ */
#define bool Do() /* implementation is private */ bool Do();
/** /**
Returns the command name. Returns the command name.
@@ -66,10 +64,8 @@ public:
Return @true to indicate that the action has taken place, @false otherwise. Return @true to indicate that the action has taken place, @false otherwise.
Returning @false will indicate to the command processor that the action is Returning @false will indicate to the command processor that the action is
not redoable and no change should be made to the command history. not redoable and no change should be made to the command history.
How you implement this command is totally application dependent, but typical How you implement this command is totally application dependent, but typical
strategies include: strategies include:
Perform an inverse operation on the last modified piece of Perform an inverse operation on the last modified piece of
data in the document. When redone, a copy of data stored in command data in the document. When redone, a copy of data stored in command
is pasted back or some operation reapplied. This relies on the fact that is pasted back or some operation reapplied. This relies on the fact that
@@ -78,7 +74,6 @@ public:
Restore the entire document state (perhaps using document transactioning). Restore the entire document state (perhaps using document transactioning).
Potentially very inefficient, but possibly easier to code if the user interface Potentially very inefficient, but possibly easier to code if the user interface
and data are complex, and an 'inverse execute' operation is hard to write. and data are complex, and an 'inverse execute' operation is hard to write.
The docview sample uses the first method, to remove or restore segments The docview sample uses the first method, to remove or restore segments
in the drawing. in the drawing.
*/ */
@@ -106,8 +101,7 @@ class wxCommandProcessor : public wxObject
public: public:
/** /**
Constructor. Constructor.
@a maxCommands may be set to a positive integer to limit the number of
@e maxCommands may be set to a positive integer to limit the number of
commands stored to it, otherwise (and by default) the list of commands can grow commands stored to it, otherwise (and by default) the list of commands can grow
arbitrarily. arbitrarily.
*/ */
@@ -222,11 +216,10 @@ public:
appropriately. If it fails, the command is deleted appropriately. If it fails, the command is deleted
immediately. Once Submit has been called, the passed command should not immediately. Once Submit has been called, the passed command should not
be deleted directly by the application. be deleted directly by the application.
@a storeIt indicates whether the successful command should be stored
@e storeIt indicates whether the successful command should be stored
in the history list. in the history list.
*/ */
virtual bool Submit(wxCommand * command, bool storeIt = @true); virtual bool Submit(wxCommand* command, bool storeIt = true);
/** /**
Undoes the command just executed. Undoes the command just executed.

View File

@@ -34,7 +34,6 @@ public:
Enables or disables 'effects' under MS Windows or generic only. This refers to Enables or disables 'effects' under MS Windows or generic only. This refers to
the the
controls for manipulating colour, strikeout and underline properties. controls for manipulating colour, strikeout and underline properties.
The default value is @true. The default value is @true.
*/ */
void EnableEffects(bool enable); void EnableEffects(bool enable);
@@ -43,7 +42,6 @@ public:
Under MS Windows, returns a flag determining whether symbol fonts can be Under MS Windows, returns a flag determining whether symbol fonts can be
selected. Has no selected. Has no
effect on other platforms. effect on other platforms.
The default value is @true. The default value is @true.
*/ */
bool GetAllowSymbols(); bool GetAllowSymbols();
@@ -56,7 +54,6 @@ public:
/** /**
Gets the colour associated with the font dialog. Gets the colour associated with the font dialog.
The default value is black. The default value is black.
*/ */
wxColour GetColour(); wxColour GetColour();
@@ -64,7 +61,6 @@ public:
/** /**
Determines whether 'effects' are enabled under Windows. This refers to the Determines whether 'effects' are enabled under Windows. This refers to the
controls for manipulating colour, strikeout and underline properties. controls for manipulating colour, strikeout and underline properties.
The default value is @true. The default value is @true.
*/ */
bool GetEnableEffects(); bool GetEnableEffects();
@@ -77,7 +73,6 @@ public:
/** /**
Returns @true if the Help button will be shown (Windows only). Returns @true if the Help button will be shown (Windows only).
The default value is @false. The default value is @false.
*/ */
bool GetShowHelp(); bool GetShowHelp();
@@ -85,7 +80,6 @@ public:
/** /**
Under MS Windows, determines whether symbol fonts can be selected. Has no Under MS Windows, determines whether symbol fonts can be selected. Has no
effect on other platforms. effect on other platforms.
The default value is @true. The default value is @true.
*/ */
void SetAllowSymbols(bool allowSymbols); void SetAllowSymbols(bool allowSymbols);
@@ -97,7 +91,6 @@ public:
/** /**
Sets the colour that will be used for the font foreground colour. Sets the colour that will be used for the font foreground colour.
The default colour is black. The default colour is black.
*/ */
void SetColour(const wxColour& colour); void SetColour(const wxColour& colour);
@@ -109,7 +102,6 @@ public:
/** /**
Sets the valid range for the font point size (Windows only). Sets the valid range for the font point size (Windows only).
The default is 0, 0 (unrestricted range). The default is 0, 0 (unrestricted range).
*/ */
void SetRange(int min, int max); void SetRange(int min, int max);
@@ -117,7 +109,6 @@ public:
/** /**
Determines whether the Help button will be displayed in the font dialog Determines whether the Help button will be displayed in the font dialog
(Windows only). (Windows only).
The default value is @false. The default value is @false.
*/ */
void SetShowHelp(bool showHelp); void SetShowHelp(bool showHelp);
@@ -252,7 +243,6 @@ public:
/** /**
Returns the paper id (stored in the internal wxPrintData object). Returns the paper id (stored in the internal wxPrintData object).
For further information, see wxPrintData::SetPaperId. For further information, see wxPrintData::SetPaperId.
*/ */
wxPaperSize GetPaperId(); wxPaperSize GetPaperId();
@@ -273,7 +263,7 @@ public:
This can return @false on Windows if the current printer is not set, for example. This can return @false on Windows if the current printer is not set, for example.
On all other platforms, it returns @true. On all other platforms, it returns @true.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Pass @true if the dialog will simply return default printer information (such as Pass @true if the dialog will simply return default printer information (such as
@@ -315,7 +305,6 @@ public:
/** /**
Sets the paper size id. For further information, see wxPrintData::SetPaperId. Sets the paper size id. For further information, see wxPrintData::SetPaperId.
Calling this function overrides the explicit paper dimensions passed in Calling this function overrides the explicit paper dimensions passed in
SetPaperSize(). SetPaperSize().
*/ */
@@ -378,22 +367,19 @@ public:
dialog dialog
will display full rgb colour picker or only available palette indexer. will display full rgb colour picker or only available palette indexer.
Has no meaning under other platforms. Has no meaning under other platforms.
The default value is @true. The default value is @true.
*/ */
bool GetChooseFull(); bool GetChooseFull();
/** /**
Gets the current colour associated with the colour dialog. Gets the current colour associated with the colour dialog.
The default colour is black. The default colour is black.
*/ */
wxColour GetColour(); wxColour GetColour();
/** /**
Gets the @e ith custom colour associated with the colour dialog. @e i should Gets the @e ith custom colour associated with the colour dialog. @a i should
be an integer between 0 and 15. be an integer between 0 and 15.
The default custom colours are invalid colours. The default custom colours are invalid colours.
*/ */
wxColour GetCustomColour(int i); wxColour GetCustomColour(int i);
@@ -401,22 +387,19 @@ public:
/** /**
Under Windows, tells the Windows colour dialog to display the full dialog Under Windows, tells the Windows colour dialog to display the full dialog
with custom colour selection controls. Under other platforms, has no effect. with custom colour selection controls. Under other platforms, has no effect.
The default value is @true. The default value is @true.
*/ */
void SetChooseFull(const bool flag); void SetChooseFull(const bool flag);
/** /**
Sets the default colour for the colour dialog. Sets the default colour for the colour dialog.
The default colour is black. The default colour is black.
*/ */
void SetColour(const wxColour& colour); void SetColour(const wxColour& colour);
/** /**
Sets the @e ith custom colour for the colour dialog. @e i should Sets the @e ith custom colour for the colour dialog. @a i should
be an integer between 0 and 15. be an integer between 0 and 15.
The default custom colours are invalid colours. The default custom colours are invalid colours.
*/ */
void SetCustomColour(int i, const wxColour& colour); void SetCustomColour(int i, const wxColour& colour);
@@ -464,7 +447,6 @@ public:
/** /**
Returns the current bin (papersource). By default, the system is left to select Returns the current bin (papersource). By default, the system is left to select
the bin (@c wxPRINTBIN_DEFAULT is returned). the bin (@c wxPRINTBIN_DEFAULT is returned).
See SetBin() for the full list of bin values. See SetBin() for the full list of bin values.
*/ */
wxPrintBin GetBin(); wxPrintBin GetBin();
@@ -511,6 +493,7 @@ public:
Returns the current print quality. This can be a positive integer, denoting the Returns the current print quality. This can be a positive integer, denoting the
number of dots per inch, or number of dots per inch, or
one of the following identifiers: one of the following identifiers:
On input you should pass one of these identifiers, but on return you may get On input you should pass one of these identifiers, but on return you may get
back a positive integer back a positive integer
indicating the current resolution setting. indicating the current resolution setting.
@@ -522,7 +505,7 @@ public:
This can return @false on Windows if the current printer is not set, for example. This can return @false on Windows if the current printer is not set, for example.
On all other platforms, it returns @true. On all other platforms, it returns @true.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Sets the current bin. Possible values are: Sets the current bin. Possible values are:
@@ -560,8 +543,7 @@ public:
between between
paper id, paper size and string name, see wxPrintPaperDatabase in @c paper.h paper id, paper size and string name, see wxPrintPaperDatabase in @c paper.h
(not yet documented). (not yet documented).
@a paperId can be one of:
@e paperId can be one of:
*/ */
void SetPaperId(wxPaperSize paperId); void SetPaperId(wxPaperSize paperId);
@@ -575,6 +557,7 @@ public:
Sets the desired print quality. This can be a positive integer, denoting the Sets the desired print quality. This can be a positive integer, denoting the
number of dots per inch, or number of dots per inch, or
one of the following identifiers: one of the following identifiers:
On input you should pass one of these identifiers, but on return you may get On input you should pass one of these identifiers, but on return you may get
back a positive integer back a positive integer
indicating the current resolution setting. indicating the current resolution setting.
@@ -701,7 +684,7 @@ public:
This can return @false on Windows if the current printer is not set, for example. This can return @false on Windows if the current printer is not set, for example.
On all other platforms, it returns @true. On all other platforms, it returns @true.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Sets the 'Collate' checkbox to @true or @false. Sets the 'Collate' checkbox to @true or @false.
@@ -748,7 +731,6 @@ public:
/** /**
Determines whether the dialog to be shown will be the Print dialog Determines whether the dialog to be shown will be the Print dialog
(pass @false) or Print Setup dialog (pass @true). (pass @false) or Print Setup dialog (pass @true).
This function has been deprecated since version 2.5.4. This function has been deprecated since version 2.5.4.
*/ */
void SetSetupDialog(bool flag); void SetSetupDialog(bool flag);

View File

@@ -25,7 +25,7 @@ public:
/** /**
The constructor is not normally used by the user code. The constructor is not normally used by the user code.
*/ */
wxCollapsiblePaneEvent(wxObject * generator, int id, wxCollapsiblePaneEvent(wxObject* generator, int id,
bool collapsed); bool collapsed);
/** /**
@@ -34,9 +34,9 @@ public:
bool GetCollapsed(); bool GetCollapsed();
/** /**
Sets this as a collapsed pane event (if @e collapsed is @true) or as an Sets this as a collapsed pane event (if @a collapsed is @true) or as an
expanded expanded
pane event (if @e collapsed is @false). pane event (if @a collapsed is @false).
*/ */
void SetCollapsed(bool collapsed); void SetCollapsed(bool collapsed);
}; };
@@ -106,7 +106,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxCollapsiblePane(wxWindow * parent, wxWindowID id, wxCollapsiblePane(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,
@@ -117,38 +117,31 @@ public:
/** /**
Collapses or expands the pane window. Collapses or expands the pane window.
*/ */
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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(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,
@@ -165,7 +158,7 @@ public:
Returns a pointer to the pane window. Add controls to the returned wxWindow Returns a pointer to the pane window. Add controls to the returned wxWindow
to make them collapsible. to make them collapsible.
*/ */
wxWindow * GetPane(); wxWindow* GetPane();
/** /**
Returns @true if the pane window is currently hidden. Returns @true if the pane window is currently hidden.

View File

@@ -30,9 +30,9 @@ public:
or replaced with white colour on platforms where custom colours palette has or replaced with white colour on platforms where custom colours palette has
fixed size (MSW). fixed size (MSW).
@sa wxColourData @see wxColourData
*/ */
wxColourDialog(wxWindow* parent, wxColourData* data = @NULL); wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
/** /**
Destructor. Destructor.
@@ -42,7 +42,7 @@ public:
/** /**
Same as @ref ctor() constructor. Same as @ref ctor() constructor.
*/ */
bool Create(wxWindow* parent, wxColourData* data = @NULL); bool Create(wxWindow* parent, wxColourData* data = NULL);
/** /**
Returns the @ref overview_wxcolourdata "colour data" associated with the colour Returns the @ref overview_wxcolourdata "colour data" associated with the colour
@@ -68,21 +68,19 @@ public:
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
used. are
used.
*/ */
wxColour wxGetColourFromUser(wxWindow * parent, wxColour wxGetColourFromUser(wxWindow* parent,
const wxColour& colInit, const wxColour& colInit,
const wxString& caption = wxEmptyString, const wxString& caption = wxEmptyString,
wxColourData * data = @NULL); wxColourData* data = NULL);

View File

@@ -52,30 +52,25 @@ 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 @see 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);
//@} //@}
@@ -95,7 +90,6 @@ public:
/** /**
is not is not
specified in flags. specified in flags.
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);
@@ -113,7 +107,6 @@ public:
Returns a pixel value which is platform-dependent. On Windows, a COLORREF is Returns a pixel value which is platform-dependent. On Windows, a COLORREF is
returned. returned.
On X, an allocated pixel value is returned. On X, an allocated pixel value is returned.
-1 is returned if the pixel is invalid (on X, unallocated). -1 is returned if the pixel is invalid (on X, unallocated).
*/ */
long GetPixel(); long GetPixel();
@@ -127,33 +120,30 @@ public:
Returns @true if the colour object is valid (the colour has been initialised Returns @true if the colour object is valid (the colour has been initialised
with RGB values). with RGB values).
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Returns the red intensity. Returns the red intensity.
*/ */
#define unsigned char Red() /* implementation is private */ unsigned char Red();
//@{ //@{
/** /**
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.
This function is new since wxWidgets version 2.7.0 This function is new since wxWidgets version 2.7.0
*/ */
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);
//@} //@}
/** /**
@@ -166,7 +156,7 @@ public:
/** /**
Assignment operator, using a colour name to be found in the colour database. Assignment operator, using a colour name to be found in the colour database.
@sa wxColourDatabase @see wxColourDatabase
*/ */
wxColour operator =(const wxColour& colour); wxColour operator =(const wxColour& colour);
wxColour operator =(const wxString& colourName); wxColour operator =(const wxString& colourName);

View File

@@ -48,15 +48,13 @@ public:
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.
@remarks Called each time popup is about to be shown. @remarks Called each time popup is about to be shown.
*/ */
@@ -85,7 +83,6 @@ public:
/** /**
Utility method that returns @true if Create has been called. Utility method that returns @true if Create has been called.
Useful in conjunction with LazyCreate(). Useful in conjunction with LazyCreate().
*/ */
bool IsCreated(); bool IsCreated();
@@ -110,7 +107,6 @@ public:
/** /**
The derived class may implement this to receive The derived class may implement this to receive
key events from the parent wxComboCtrl. key events from the parent wxComboCtrl.
Events not handled should be skipped, as usual. Events not handled should be skipped, as usual.
*/ */
void OnComboKeyEvent(wxKeyEvent& event); void OnComboKeyEvent(wxKeyEvent& event);
@@ -130,7 +126,6 @@ public:
/** /**
The derived class may implement this to paint The derived class may implement this to paint
the parent wxComboCtrl. the parent wxComboCtrl.
Default implementation draws value as string. Default implementation draws value as string.
*/ */
void PaintComboControl(wxDC& dc, const wxRect& rect); void PaintComboControl(wxDC& dc, const wxRect& rect);
@@ -143,7 +138,6 @@ public:
/** /**
wxComboCtrl m_combo wxComboCtrl m_combo
Parent wxComboCtrl. This is parameter has Parent wxComboCtrl. This is parameter has
been prepared before Init() is called. been prepared before Init() is called.
*/ */
@@ -179,9 +173,9 @@ public:
@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.
@event{EVT_TEXT_ENTER(id\, func)}: @event{EVT_TEXT_ENTER(id, func)}:
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
@@ -201,31 +195,25 @@ 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
appropriately. sized
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 @see Create(), wxValidator
*/ */
wxComboCtrl(); wxComboCtrl();
wxComboCtrl(wxWindow* parent, wxWindowID id, wxComboCtrl(wxWindow* parent, wxWindowID id,
@@ -248,8 +236,8 @@ public:
custom popup animation. custom popup animation.
@returns @true if animation finishes before the function returns. @false @returns @true if animation finishes before the function returns. @false
otherwise. In the latter case you need to manually otherwise. In the latter case you need to manually call
call DoShowPopup after the animation ends. DoShowPopup after the animation ends.
*/ */
virtual bool AnimateShow(const wxRect& rect, int flags); virtual bool AnimateShow(const wxRect& rect, int flags);
@@ -274,13 +262,12 @@ public:
/** /**
Copies the selected text to the clipboard and removes the selection. Copies the selected text to the clipboard and removes the selection.
*/ */
#define void Cut() /* implementation is private */ void Cut();
/** /**
This member function is not normally called in application code. This member function is not normally called in application code.
Instead, it can be implemented in a derived class to return Instead, it can be implemented in a derived class to return
default wxComboPopup, incase @c popup is @NULL. default wxComboPopup, incase @c popup is @NULL.
@b Note: If you have implemented OnButtonClick to do @b Note: If you have implemented OnButtonClick to do
something else than show the popup, then DoSetPopupControl something else than show the popup, then DoSetPopupControl
must always return @NULL. must always return @NULL.
@@ -295,10 +282,9 @@ public:
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);
@@ -306,7 +292,7 @@ public:
Enables or disables popup animation, if any, depending on the value of Enables or disables popup animation, if any, depending on the value of
the argument. the argument.
*/ */
void EnablePopupAnimation(bool enable = @true); void EnablePopupAnimation(bool enable = true);
/** /**
Returns disabled button bitmap that has been set with Returns disabled button bitmap that has been set with
@@ -348,7 +334,7 @@ public:
/** /**
Returns custom painted area in control. Returns custom painted area in control.
@sa SetCustomPaintWidth(). @see SetCustomPaintWidth().
*/ */
int GetCustomPaintWidth(); int GetCustomPaintWidth();
@@ -363,7 +349,6 @@ public:
/** /**
Returns the insertion point for the combo control's text field. Returns the insertion point for the combo control's text field.
@b Note: Under wxMSW, this function always returns 0 if the combo control @b Note: Under wxMSW, this function always returns 0 if the combo control
doesn't have the focus. doesn't have the focus.
*/ */
@@ -420,21 +405,17 @@ public:
Returns @true if the popup window is in the given state. Returns @true if the popup window is in the given state.
Possible values are: Possible values are:
@c Hidden() @c Hidden()
Popup window is hidden. Popup window is hidden.
@c Animating() @c Animating()
Popup window is being shown, but the Popup window is being shown, but the
popup animation has not yet finished. popup animation has not yet finished.
@c Visible() @c Visible()
Popup window is fully visible. Popup window is fully visible.
*/ */
bool IsPopupWindowState(int state); bool IsPopupWindowState(int state);
@@ -442,9 +423,7 @@ public:
/** /**
Implement in a derived class to define what happens on Implement in a derived class to define what happens on
dropdown button click. dropdown button click.
Default action is to show the popup. Default action is to show the popup.
@b Note: If you implement this to do something else than @b Note: If you implement this to do something else than
show the popup, you must then also implement show the popup, you must then also implement
DoSetPopupControl() to always DoSetPopupControl() to always
@@ -461,10 +440,9 @@ 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);
@@ -473,13 +451,11 @@ public:
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);
@@ -487,25 +463,21 @@ 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,
bool pushButtonBg = @false, bool pushButtonBg = false,
const wxBitmap& bmpPressed = wxNullBitmap, const wxBitmap& bmpPressed = wxNullBitmap,
const wxBitmap& bmpHover = wxNullBitmap, const wxBitmap& bmpHover = wxNullBitmap,
const wxBitmap& bmpDisabled = wxNullBitmap); const wxBitmap& bmpDisabled = wxNullBitmap);
@@ -514,17 +486,14 @@ 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,
int side = wxRIGHT, int side = wxRIGHT,
@@ -541,7 +510,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);
@@ -569,12 +538,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.
@remarks Popup minimum width may override arguments. @remarks Popup minimum width may override arguments.
*/ */
@@ -599,10 +567,9 @@ 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);
@@ -622,7 +589,6 @@ public:
/** /**
Sets the text for the combo control text field. Sets the text for the combo control text field.
@b NB: For a combo control with @c wxCB_READONLY style the @b NB: For a combo control with @c wxCB_READONLY style the
string must be accepted by the popup (for instance, exist in the dropdown string must be accepted by the popup (for instance, exist in the dropdown
list), otherwise the call to SetValue() is ignored list), otherwise the call to SetValue() is ignored
@@ -635,7 +601,7 @@ public:
if @c withEvent is @true. if @c withEvent is @true.
*/ */
void SetValueWithEvent(const wxString& value, void SetValueWithEvent(const wxString& value,
bool withEvent = @true); bool withEvent = true);
/** /**
Show the popup. Show the popup.
@@ -654,5 +620,5 @@ public:
and as such, when it is shown, its parent top-level window will appear and as such, when it is shown, its parent top-level window will appear
as if the focus has been lost from it. as if the focus has been lost from it.
*/ */
void UseAltPopupWindow(bool enable = @true); void UseAltPopupWindow(bool enable = true);
}; };

View File

@@ -41,14 +41,14 @@
@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
the list is selected. Note that calling GetValue returns the new the list is selected. Note that calling GetValue returns the new
value of selection. value of selection.
@event{EVT_TEXT(id\, func)}: @event{EVT_TEXT(id, func)}:
Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text
changes. changes.
@event{EVT_TEXT_ENTER(id\, func)}: @event{EVT_TEXT_ENTER(id, func)}:
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 (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).
@@ -69,37 +69,29 @@ 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
appropriately. sized
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 @see Create(), wxValidator
*/ */
wxComboBox(); wxComboBox();
wxComboBox(wxWindow* parent, wxWindowID id, wxComboBox(wxWindow* parent, wxWindowID id,
@@ -107,7 +99,7 @@ public:
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");
@@ -191,7 +183,7 @@ public:
/** /**
Copies the selected text to the clipboard and removes the selection. Copies the selected text to the clipboard and removes the selection.
*/ */
#define void Cut() /* implementation is private */ void Cut();
/** /**
This function does the same things as This function does the same things as
@@ -203,7 +195,6 @@ public:
/** /**
Returns the insertion point for the combobox's text field. Returns the insertion point for the combobox's text field.
@b Note: Under wxMSW, this function always returns 0 if the combobox @b Note: Under wxMSW, this function always returns 0 if the combobox
doesn't have the focus. doesn't have the focus.
*/ */
@@ -218,10 +209,9 @@ public:
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.
Currently this method is only implemented in wxMSW and wxGTK. Currently this method is only implemented in wxMSW and wxGTK.
*/ */
void GetSelection(long * from, long * to); void GetSelection(long* from, long* to);
/** /**
Returns the current value in the combobox text field. Returns the current value in the combobox text field.
@@ -242,10 +232,9 @@ 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);
@@ -254,13 +243,11 @@ public:
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);
@@ -268,7 +255,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);
@@ -281,21 +268,19 @@ 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);
/** /**
Sets the text for the combobox text field. Sets the text for the combobox text field.
@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

@@ -39,75 +39,70 @@ class wxConfigBase : public wxObject
public: 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
determine whether a local or global config file is created or used: if determine whether a local or global config file is created or used: if
wxCONFIG_USE_GLOBAL_FILE is used, then settings are read from the global wxCONFIG_USE_GLOBAL_FILE is used, then settings are read from the global
config file and if wxCONFIG_USE_LOCAL_FILE is used, settings are read from config file and if wxCONFIG_USE_LOCAL_FILE is used, settings are read from
and written to local config file (if they are both set, global file is read and written to local config file (if they are both set, global file is read
first, then local file, overwriting global settings). If the first, then local file, overwriting global settings). If the
flag is present but the parameter is empty, the parameter will be set to a flag is present but the parameter is empty, the parameter will be set to a
default. If the parameter is present but the style flag not, the relevant flag default. If the parameter is present but the style flag not, the relevant
will be added to the style. For wxRegConfig, thie GLOBAL flag refers to HKLM flag
key while LOCAL one is for the usual HKCU one. will be added to the style. For wxRegConfig, thie GLOBAL flag refers to HKLM
key while LOCAL one is for the usual HKCU one.
For wxFileConfig you can also add wxCONFIG_USE_RELATIVE_PATH by logically For wxFileConfig you can also add wxCONFIG_USE_RELATIVE_PATH by logically
or'ing it to either of the _FILE options to tell wxFileConfig to use relative or'ing it to either of the _FILE options to tell wxFileConfig to use
instead of absolute paths. relative
instead of absolute paths.
On non-VMS Unix systems, the default local configuration file is ~/.appname. On non-VMS Unix systems, the default local configuration file is ~/.appname.
However, this path may be also used as user data directory However, this path may be also used as user data directory
(see wxStandardPaths::GetUserDataDir) if (see wxStandardPaths::GetUserDataDir) if
the application has several data files. In this case wxCONFIG_USE_SUBDIR the application has several data files. In this case wxCONFIG_USE_SUBDIR
flag, which changes the default local configuration file to ~/.appname/appname flag, which changes the default local configuration file to
should be used. Notice that this flag is ignored if localFilename is ~/.appname/appname
provided. This function is new since wxWidgets version 2.8.2 should be used. Notice that this flag is ignored if localFilename is
provided. This function is new since wxWidgets version 2.8.2
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
file: for example a foo key with some backslash characters will be stored config
as foo=C:\mydir instead of the usual storage of file: for example a foo key with some backslash characters will be stored
foo=C:\\mydir. as foo=C:\mydir instead of the usual storage of
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.
@remarks By default, environment variable expansion is on and recording @remarks By default, environment variable expansion is on and recording
defaults is off. defaults is off.
*/ */
wxConfigBase(const wxString& appName = wxEmptyString, wxConfigBase(const wxString& appName = wxEmptyString,
const wxString& vendorName = wxEmptyString, const wxString& vendorName = wxEmptyString,
@@ -133,13 +128,12 @@ public:
near the definition of wxCONFIG_WIN32_NATIVE for details. It returns the near the definition of wxCONFIG_WIN32_NATIVE for details. It returns the
created object and also sets it as the current one. created object and also sets it as the current one.
*/ */
static wxConfigBase * Create(); static wxConfigBase* Create();
/** /**
The functions in this section delete entries and/or groups of entries from the The functions in this section delete entries and/or groups of entries from the
config file. @e DeleteAll() is especially useful if you want to erase all config file. @e DeleteAll() is especially useful if you want to erase all
traces of your program presence: for example, when you uninstall it. traces of your program presence: for example, when you uninstall it.
DeleteEntry() DeleteEntry()
DeleteGroup() DeleteGroup()
@@ -159,7 +153,7 @@ public:
in it and the second parameter is @true. in it and the second parameter is @true.
*/ */
bool DeleteEntry(const wxString& key, bool DeleteEntry(const wxString& key,
bool bDeleteGroupIfEmpty = @true); bool bDeleteGroupIfEmpty = true);
/** /**
Delete the group (with all subgroups). If the current path is under the group Delete the group (with all subgroups). If the current path is under the group
@@ -179,7 +173,6 @@ public:
/** /**
The functions in this section allow to enumerate all entries and groups in the The functions in this section allow to enumerate all entries and groups in the
config file. All functions here return @false when there are no more items. config file. All functions here return @false when there are no more items.
You must pass the same index to GetNext and GetFirst (don't modify it). You must pass the same index to GetNext and GetFirst (don't modify it).
Please note that it is @b not the index of the current item (you will have Please note that it is @b not the index of the current item (you will have
some great surprises with wxRegConfig if you assume this) and you shouldn't some great surprises with wxRegConfig if you assume this) and you shouldn't
@@ -187,11 +180,10 @@ public:
enumeration. It can't be stored inside the class because it would prevent you enumeration. It can't be stored inside the class because it would prevent you
from running several enumerations simultaneously, that's why you must pass it from running several enumerations simultaneously, that's why you must pass it
explicitly. explicitly.
Having said all this, enumerating the config entries/groups is very simple: Having said all this, enumerating the config entries/groups is very simple:
There are also functions to get the number of entries/subgroups without There are also functions to get the number of entries/subgroups without
actually enumerating them, but you will probably never need them. actually enumerating them, but you will probably never need them.
GetFirstGroup() GetFirstGroup()
GetNextGroup() GetNextGroup()
@@ -215,14 +207,14 @@ public:
permanently writes all changes (otherwise, they're only written from object's permanently writes all changes (otherwise, they're only written from object's
destructor) destructor)
*/ */
bool Flush(bool bCurrentOnly = @false); bool Flush(bool bCurrentOnly = false);
/** /**
Get the current config object. If there is no current object and Get the current config object. If there is no current object and
@e CreateOnDemand is @true, creates one @a CreateOnDemand is @true, creates one
(using @e Create) unless DontCreateOnDemand was called previously. (using @e Create) unless DontCreateOnDemand was called previously.
*/ */
#define static wxConfigBase * Get(bool CreateOnDemand = @true) /* implementation is private */ static wxConfigBase* Get(bool CreateOnDemand = true);
/** /**
Returns the application name. Returns the application name.
@@ -235,7 +227,6 @@ public:
be used because some of wxConfig implementations will complain about type be used because some of wxConfig implementations will complain about type
mismatch otherwise: e.g., an attempt to read a string value from an integer mismatch otherwise: e.g., an attempt to read a string value from an integer
key with wxRegConfig will fail. key with wxRegConfig will fail.
The result is an element of enum EntryType: The result is an element of enum EntryType:
*/ */
enum wxConfigBase::EntryType GetEntryType(const wxString& name); enum wxConfigBase::EntryType GetEntryType(const wxString& name);
@@ -263,13 +254,13 @@ public:
/** /**
*/ */
uint GetNumberOfEntries(bool bRecursive = @false); uint GetNumberOfEntries(bool bRecursive = false);
/** /**
Get number of entries/subgroups in the current group, with or without its Get number of entries/subgroups in the current group, with or without its
subgroups. subgroups.
*/ */
uint GetNumberOfGroups(bool bRecursive = @false); uint GetNumberOfGroups(bool bRecursive = false);
/** /**
Retrieve the current path (always as absolute path). Retrieve the current path (always as absolute path).
@@ -305,21 +296,17 @@ public:
These function are the core of wxConfigBase class: they allow you to read and These function are the core of wxConfigBase class: they allow you to read and
write config file data. All @e Read function take a default value which write config file data. All @e Read function take a default value which
will be returned if the specified key is not found in the config file. will be returned if the specified key is not found in the config file.
Currently, supported types of data are: Currently, supported types of data are:
wxString, @e long, @e double, @e bool, wxString, @e long, @e double, @e bool,
wxColour and any other types, wxColour and any other types,
for which functions wxToString for which functions wxToString
and wxFromString are defined. and wxFromString are defined.
Try not to read long values into string variables and vice versa: although it Try not to read long values into string variables and vice versa: although it
just might work with wxFileConfig, you will get a system error with just might work with wxFileConfig, you will get a system error with
wxRegConfig because in the Windows registry the different types of entries are wxRegConfig because in the Windows registry the different types of entries are
indeed used. indeed used.
Final remark: the @e szKey parameter for all these functions can contain an Final remark: the @e szKey parameter for all these functions can contain an
arbitrary path (either relative or absolute), not just the key name. arbitrary path (either relative or absolute), not just the key name.
Read() Read()
Write() Write()
@@ -342,18 +329,16 @@ public:
first of them is the expansion of environment variables in the string values first of them is the expansion of environment variables in the string values
read from the config file: for example, if you have the following in your read from the config file: for example, if you have the following in your
config file: config file:
the call to @c config-Read("UserData") will return something like the call to @c config-Read("UserData") will return something like
@c "/home/zeitlin/data" if you're lucky enough to run a Linux system ;-) @c "/home/zeitlin/data" if you're lucky enough to run a Linux system ;-)
Although this feature is very useful, it may be annoying if you read a value Although this feature is very useful, it may be annoying if you read a value
which containts '$' or '%' symbols (% is used for environment variables which containts '$' or '%' symbols (% is used for environment variables
expansion under Windows) which are not used for environment variable expansion under Windows) which are not used for environment variable
expansion. In this situation you may call SetExpandEnvVars(@false) just before expansion. In this situation you may call SetExpandEnvVars(@false) just before
reading this value and SetExpandEnvVars(@true) just after. Another solution reading this value and SetExpandEnvVars(@true) just after. Another solution
would be to prefix the offending symbols with a backslash. would be to prefix the offending symbols with a backslash.
The following functions control this option: The following functions control this option:
IsExpandingEnvVars() IsExpandingEnvVars()
SetExpandEnvVars() SetExpandEnvVars()
@@ -373,14 +358,16 @@ public:
which makes it possible to use the relative paths. To clarify all this, here which makes it possible to use the relative paths. To clarify all this, here
is an example (it is only for the sake of demonstration, it doesn't do anything is an example (it is only for the sake of demonstration, it doesn't do anything
sensible!): sensible!):
@e Warning: it is probably a good idea to always restore the path to its @e Warning: it is probably a good idea to always restore the path to its
old value on function exit: old value on function exit:
because otherwise the assert in the following example will surely fail because otherwise the assert in the following example will surely fail
(we suppose here that @e foo() function is the same as above except that it (we suppose here that @e foo() function is the same as above except that it
doesn't save and restore the path): doesn't save and restore the path):
Finally, the path separator in wxConfigBase and derived classes is always '/', Finally, the path separator in wxConfigBase and derived classes is always '/',
regardless of the platform (i.e. it is @b not '\\' under Windows). regardless of the platform (i.e. it is @b not '\\' under Windows).
SetPath() SetPath()
GetPath() GetPath()
@@ -392,30 +379,24 @@ public:
Reads a value of type T, for which function Reads a value of type T, for which function
wxFromString is defined, wxFromString is defined,
returning @true if the value was found. returning @true if the value was found.
If the value was not found, @e defaultVal is used instead. If the value was not found, @a defaultVal is used instead.
bool Read(const wxStringkey, T* value) const; bool Read(const wxStringkey, T* value) const;
@b Read(key, default="") @b Read(key, default="")
Returns a string Returns a string
@b ReadInt(key, default=0) @b ReadInt(key, default=0)
Returns an integer Returns an integer
@b ReadFloat(key, default=0.0) @b ReadFloat(key, default=0.0)
Returns a floating point number Returns a floating point number
@b ReadBool(key, default=0) @b ReadBool(key, default=0)
Returns a boolean Returns a boolean
*/ */
bool Read(const wxString& key, wxString* str); bool Read(const wxString& key, wxString* str);
@@ -437,19 +418,19 @@ public:
//@} //@}
/** /**
Reads a bool value from the key and returns it. @e defaultVal is returned Reads a bool value from the key and returns it. @a defaultVal is returned
if the key is not found. if the key is not found.
*/ */
long ReadBool(const wxString& key, bool defaultVal); long ReadBool(const wxString& key, bool defaultVal);
/** /**
Reads a double value from the key and returns it. @e defaultVal is returned Reads a double value from the key and returns it. @a defaultVal is returned
if the key is not found. if the key is not found.
*/ */
long ReadDouble(const wxString& key, double defaultVal); long ReadDouble(const wxString& key, double defaultVal);
/** /**
Reads a long value from the key and returns it. @e defaultVal is returned Reads a long value from the key and returns it. @a defaultVal is returned
if the key is not found. if the key is not found.
*/ */
long ReadLong(const wxString& key, long defaultVal); long ReadLong(const wxString& key, long defaultVal);
@@ -457,7 +438,7 @@ public:
/** /**
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. @a 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);
@@ -467,7 +448,6 @@ public:
entry/group with the original name doesn't exist, because the entry/group with entry/group with the original name doesn't exist, because the entry/group with
the new name already exists or because the function is not supported in this the new name already exists or because the function is not supported in this
wxConfig implementation. wxConfig implementation.
RenameEntry() RenameEntry()
RenameGroup() RenameGroup()
@@ -478,8 +458,7 @@ public:
Renames an entry in the current group. The entries names (both the old and Renames an entry in the current group. The entries names (both the old and
the new one) shouldn't contain backslashes, i.e. only simple names and not the new one) shouldn't contain backslashes, i.e. only simple names and not
arbitrary paths are accepted by this function. arbitrary paths are accepted by this function.
Returns @false if @a oldName doesn't exist or if @a newName already
Returns @false if @e oldName doesn't exist or if @e newName already
exists. exists.
*/ */
bool RenameEntry(const wxString& oldName, bool RenameEntry(const wxString& oldName,
@@ -489,8 +468,7 @@ public:
Renames a subgroup of the current group. The subgroup names (both the old and Renames a subgroup of the current group. The subgroup names (both the old and
the new one) shouldn't contain backslashes, i.e. only simple names and not the new one) shouldn't contain backslashes, i.e. only simple names and not
arbitrary paths are accepted by this function. arbitrary paths are accepted by this function.
Returns @false if @a oldName doesn't exist or if @a newName already
Returns @false if @e oldName doesn't exist or if @e newName already
exists. exists.
*/ */
bool RenameGroup(const wxString& oldName, bool RenameGroup(const wxString& oldName,
@@ -500,12 +478,12 @@ public:
Sets the config object as the current one, returns the pointer to the previous Sets the config object as the current one, returns the pointer to the previous
current object (both the parameter and returned value may be @NULL) current object (both the parameter and returned value may be @NULL)
*/ */
#define static wxConfigBase * Set(wxConfigBase * pConfig) /* implementation is private */ static wxConfigBase* Set(wxConfigBase* pConfig);
/** /**
Determine whether we wish to expand environment variables in key values. Determine whether we wish to expand environment variables in key values.
*/ */
void SetExpandEnvVars(bool bDoIt = @true); void SetExpandEnvVars(bool bDoIt = true);
/** /**
Set current path: if the first character is '/', it is the absolute path, Set current path: if the first character is '/', it is the absolute path,
@@ -517,12 +495,11 @@ public:
/** /**
Sets whether defaults are recorded to the config file whenever an attempt to Sets whether defaults are recorded to the config file whenever an attempt to
read the value which is not present in it is done. read the value which is not present in it is done.
If on (default is off) all default values for the settings used by the program If on (default is off) all default values for the settings used by the program
are written back to the config file. This allows the user to see what config are written back to the config file. This allows the user to see what config
options may be changed and is probably useful only for wxFileConfig. options may be changed and is probably useful only for wxFileConfig.
*/ */
void SetRecordDefaults(bool bDoIt = @true); void SetRecordDefaults(bool bDoIt = true);
/** /**
These functions deal with the "default" config object. Although its usage is These functions deal with the "default" config object. Although its usage is
@@ -536,17 +513,14 @@ public:
exists. Note that this implies that if you do delete this object yourself exists. Note that this implies that if you do delete this object yourself
(usually in wxApp::OnExit) you must use @e Set(@NULL) (usually in wxApp::OnExit) you must use @e Set(@NULL)
to prevent wxWidgets from deleting it the second time. to prevent wxWidgets from deleting it the second time.
As it happens, you may even further simplify the procedure described above: As it happens, you may even further simplify the procedure described above:
you may forget about calling @e Set(). When @e Get() is called and there you may forget about calling @e Set(). When @e Get() is called and there
is no current object, it will create one using @e Create() function. To is no current object, it will create one using @e Create() function. To
disable this behaviour @e DontCreateOnDemand() is provided. disable this behaviour @e DontCreateOnDemand() is provided.
@b Note: You should use either @e Set() or @e Get() because wxWidgets @b Note: You should use either @e Set() or @e Get() because wxWidgets
library itself would take advantage of it and could save various information library itself would take advantage of it and could save various information
in it. For example wxFontMapper or Unix version in it. For example wxFontMapper or Unix version
of wxFileDialog have the ability to use wxConfig class. of wxFileDialog have the ability to use wxConfig class.
Set() Set()
Get() Get()
@@ -575,25 +549,20 @@ public:
defined for type @e T. defined for type @e T.
@b Write(key, value) @b Write(key, value)
Writes a string Writes a string
@b WriteInt(key, value) @b WriteInt(key, value)
Writes an integer Writes an integer
@b WriteFloat(key, value) @b WriteFloat(key, value)
Writes a floating point number Writes a floating point number
@b WriteBool(key, value) @b WriteBool(key, value)
Writes a boolean Writes a boolean
*/ */
bool Write(const wxString& key, const wxString& value); bool Write(const wxString& key, const wxString& value);

View File

@@ -33,7 +33,6 @@ public:
/** /**
Returns the control's text. Returns the control's text.
Note that the returned string contains the mnemonics (@c characters) if Note that the returned string contains the mnemonics (@c characters) if
any, use GetLabelText() if they are any, use GetLabelText() if they are
undesired. undesired.
@@ -42,7 +41,7 @@ public:
//@{ //@{
/** /**
Returns the control's label, or the given @e label string for the static Returns the control's label, or the given @a label string for the static
version, without the mnemonics characters. version, without the mnemonics characters.
*/ */
const wxString GetLabelText(); const wxString GetLabelText();
@@ -51,8 +50,7 @@ public:
/** /**
Sets the item's text. Sets the item's text.
The @c characters in the @a 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

View File

@@ -52,7 +52,7 @@ public:
Constructs a new wxConvAuto instance. The object will try to detect the input Constructs a new wxConvAuto instance. The object will try to detect the input
of the multibyte text given to its wxMBConv::ToWChar method of the multibyte text given to its wxMBConv::ToWChar method
automatically but if the automatic detection of Unicode encodings fails, the automatically but if the automatic detection of Unicode encodings fails, the
fall-back encoding @e enc will be used to interpret it as multibyte text. fall-back encoding @a enc will be used to interpret it as multibyte text.
The default value of this parameter, @c wxFONTENCODING_DEFAULT means The default value of this parameter, @c wxFONTENCODING_DEFAULT means
that the global default value which can be set using that the global default value which can be set using
@ref setdefaultmbencoding() SetFallbackEncoding method should be @ref setdefaultmbencoding() SetFallbackEncoding method should be
@@ -87,9 +87,8 @@ public:
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 @a 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
parameter). However @c wxFONTENCODING_DEFAULT value cannot be used here. parameter). However @c wxFONTENCODING_DEFAULT value cannot be used here.

View File

@@ -12,10 +12,10 @@
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);
//@} //@}
@@ -23,11 +23,10 @@ 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 @see wxCONCAT
*/ */
#define wxSTRINGIZE(x) /* implementation is private */ #define wxSTRINGIZE(x) /* implementation is private */

View File

@@ -43,7 +43,7 @@ public:
Unlike some other classes, the help provider is not created on demand. Unlike some other classes, the help provider is not created on demand.
This must be explicitly done by the application. This must be explicitly done by the application.
*/ */
#define wxHelpProvider* Get() /* implementation is private */ wxHelpProvider* Get();
//@{ //@{
/** /**
@@ -67,13 +67,12 @@ public:
Get/set the current, application-wide help provider. Returns Get/set the current, application-wide help provider. Returns
the previous one. the previous one.
*/ */
#define wxHelpProvider* Set(wxHelpProvider* helpProvider) /* implementation is private */ wxHelpProvider* Set(wxHelpProvider* helpProvider);
/** /**
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
window. window.
*/ */
@@ -84,18 +83,15 @@ public:
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,
wxHelpEvent::Origin origin); wxHelpEvent::Origin origin);
@@ -134,7 +130,7 @@ public:
Note that the instance doesn't own the help controller. The help controller Note that the instance doesn't own the help controller. The help controller
should be deleted separately. should be deleted separately.
*/ */
wxHelpControllerHelpProvider(wxHelpControllerBase* hc = @NULL); wxHelpControllerHelpProvider(wxHelpControllerBase* hc = NULL);
/** /**
Returns the help controller associated with this help provider. Returns the help controller associated with this help provider.
@@ -192,11 +188,10 @@ class wxContextHelp : public wxObject
public: public:
/** /**
Constructs a context help object, calling BeginContextHelp() if Constructs a context help object, calling BeginContextHelp() if
@e doNow is @true (the default). @a doNow is @true (the default).
If @a window is @NULL, the top window is used.
If @e window is @NULL, the top window is used.
*/ */
wxContextHelp(wxWindow* window = @NULL, bool doNow = @true); wxContextHelp(wxWindow* window = NULL, bool doNow = true);
/** /**
Destroys the context help object. Destroys the context help object.
@@ -204,14 +199,13 @@ public:
~wxContextHelp(); ~wxContextHelp();
/** /**
Puts the application into context-sensitive help mode. @e window is the window Puts the application into context-sensitive help mode. @a window is the window
which will be used to catch events; if @NULL, the top window will be used. which will be used to catch events; if @NULL, the top window will be used.
Returns @true if the application was successfully put into context-sensitive Returns @true if the application was successfully put into context-sensitive
help mode. help mode.
This function only returns when the event loop has finished. This function only returns when the event loop has finished.
*/ */
bool BeginContextHelp(wxWindow* window = @NULL); bool BeginContextHelp(wxWindow* window = NULL);
/** /**
Ends context-sensitive help mode. Not normally called by the application. Ends context-sensitive help mode. Not normally called by the application.
@@ -249,20 +243,17 @@ 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
appropriately for the question mark bitmap. sized
appropriately for the question mark bitmap.
@param style @param style
Window style. Window style.
*/ */
wxContextHelpButton(); wxContextHelpButton();
wxContextHelpButton(wxWindow* parent, wxContextHelpButton(wxWindow* parent,

View File

@@ -48,39 +48,34 @@ public:
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
the newly added item which may be different from the the newly added item which may be different from the
last one if the control is sorted (e.g. has wxLB_SORT last one if the control is sorted (e.g. has wxLB_SORT
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);
//@} //@}
/** /**
Removes all items from the control. Removes all items from the control.
@e Clear() also deletes the client data of the existing items if it is owned @e Clear() also deletes the client data of the existing items if it is owned
by the control. by the control.
*/ */
@@ -89,15 +84,14 @@ public:
/** /**
Deletes an item from the control. The client data associated with the item Deletes an item from the control. The client data associated with the item
will be also deleted if it is owned by the control. will be also deleted if it is owned by the control.
Note that it is an error (signalled by an assert failure in debug builds) to Note that it is an error (signalled by an assert failure in debug builds) to
remove an item with the index negative or greater or equal than the number of 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() @see Clear()
*/ */
void Delete(unsigned int n); void Delete(unsigned int n);
@@ -105,16 +99,15 @@ 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
string was not found. string was not found.
*/ */
int FindString(const wxString& string, int FindString(const wxString& string,
bool caseSensitive = @false); bool caseSensitive = false);
/** /**
Returns a pointer to the client data associated with the given item (if any). Returns a pointer to the client data associated with the given item (if any).
@@ -123,11 +116,11 @@ public:
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.
*/ */
void * GetClientData(unsigned int n); void* GetClientData(unsigned int n);
/** /**
Returns a pointer to the client data associated with the given item (if any). Returns a pointer to the client data associated with the given item (if any).
@@ -136,16 +129,16 @@ public:
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.
*/ */
wxClientData * GetClientObject(unsigned int n); wxClientData* GetClientObject(unsigned int n);
/** /**
Returns the number of items in the control. Returns the number of items in the control.
@sa IsEmpty() @see IsEmpty()
*/ */
unsigned int GetCount(); unsigned int GetCount();
@@ -156,10 +149,10 @@ public:
@returns The position of the current selection. @returns The position of the current selection.
@remarks This method can be used with single selection list boxes only, @remarks This method can be used with single selection list boxes only,
you should use wxListBox::GetSelections for the list you should use wxListBox::GetSelections for the list
boxes with wxLB_MULTIPLE style. boxes with wxLB_MULTIPLE style.
@sa SetSelection(), GetStringSelection() @see SetSelection(), GetStringSelection()
*/ */
int GetSelection(); int GetSelection();
@@ -167,10 +160,10 @@ 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
invalid. invalid.
*/ */
wxString GetString(unsigned int n); wxString GetString(unsigned int n);
@@ -178,7 +171,7 @@ public:
Returns the label of the selected item or an empty string if no item is Returns the label of the selected item or an empty string if no item is
selected. selected.
@sa GetSelection() @see GetSelection()
*/ */
wxString GetStringSelection(); wxString GetStringSelection();
@@ -195,47 +188,42 @@ public:
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);
//@} //@}
/** /**
Returns @true if the control is empty or @false if it has some items. Returns @true if the control is empty or @false if it has some items.
@sa GetCount() @see GetCount()
*/ */
bool IsEmpty(); bool IsEmpty();
@@ -253,37 +241,34 @@ public:
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
style) the return value could be different from style) the return value could be different from
(GetCount() - 1). When setting a single item to the (GetCount() - 1). When setting a single item to the
container, the return value is the index of the newly container, the return value is the index of the newly
added item which may be different from the last one added item which may be different from the last one if
if the control is sorted (e.g. has wxLB_SORT or the control is sorted (e.g. has wxLB_SORT or wxCB_SORT
wxCB_SORT style). 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);
//@} //@}
/** /**
@@ -292,41 +277,37 @@ public:
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);
/** /**
Associates the given typed client data pointer with the given item: the Associates the given typed client data pointer with the given item: the
@e data object will be deleted when the item is deleted (either explicitly @a data object will be deleted when the item is deleted (either explicitly
by using @ref delete() Deletes or implicitly when the by using @ref delete() Deletes or implicitly when the
control itself is destroyed). control itself is destroyed).
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);
/** /**
Sets the selection to the given item @e n or removes the selection entirely Sets the selection to the given item @a n or removes the selection entirely
if @e n == @c wxNOT_FOUND. if @a n == @c wxNOT_FOUND.
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() @see SetString(), SetStringSelection()
*/ */
void SetSelection(int n); void SetSelection(int n);
@@ -334,10 +315,9 @@ 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);
@@ -346,10 +326,10 @@ public:
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
wasn't found in the control. wasn't found in the control.
*/ */
bool SetStringSelection(const wxString& string); bool SetStringSelection(const wxString& string);
}; };

View File

@@ -48,211 +48,399 @@ 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
wxBITMAP_TYPE_MACCURSOR_RESOURCE. wxBITMAP_TYPE_MACCURSOR_RESOURCE.
Under X, the permitted cursor types are:
Under X, the permitted cursor types are:
wxBITMAP_TYPE_XBM
Load an X bitmap file.
Under Windows, the permitted types are:
wxBITMAP_TYPE_CUR
wxBITMAP_TYPE_XBM
Load a cursor from a .cur cursor file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h).
wxBITMAP_TYPE_CUR_RESOURCE
Load a Windows resource (as specified in the .rc file). Load an X bitmap file.
wxBITMAP_TYPE_ICO
Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h). Specify hotSpotX and hotSpotY.
Under Windows, the permitted types are:
wxBITMAP_TYPE_CUR
Load a cursor from a .cur cursor file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h).
wxBITMAP_TYPE_CUR_RESOURCE
Load a Windows resource (as specified in the .rc file).
wxBITMAP_TYPE_ICO
Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h). Specify hotSpotX and hotSpotY.
@param cursorId @param cursorId
A stock cursor identifier. May be one of: A stock cursor identifier. May be one of:
wxCURSOR_ARROW
A standard arrow cursor.
wxCURSOR_RIGHT_ARROW
A standard arrow cursor wxCURSOR_ARROW
pointing to the right.
wxCURSOR_BLANK
Transparent cursor.
wxCURSOR_BULLSEYE A standard arrow cursor.
Bullseye cursor.
wxCURSOR_CHAR
Rectangular character cursor. wxCURSOR_RIGHT_ARROW
wxCURSOR_CROSS
A cross cursor.
wxCURSOR_HAND A standard arrow cursor
pointing to the right.
A hand cursor.
wxCURSOR_IBEAM
An I-beam cursor (vertical line). wxCURSOR_BLANK
wxCURSOR_LEFT_BUTTON
Represents a mouse with the left button depressed.
wxCURSOR_MAGNIFIER Transparent cursor.
A magnifier icon.
wxCURSOR_MIDDLE_BUTTON
Represents a mouse with the middle button depressed. wxCURSOR_BULLSEYE
wxCURSOR_NO_ENTRY
A no-entry sign cursor.
wxCURSOR_PAINT_BRUSH Bullseye cursor.
A paintbrush cursor.
wxCURSOR_PENCIL
A pencil cursor. wxCURSOR_CHAR
wxCURSOR_POINT_LEFT
A cursor that points left.
wxCURSOR_POINT_RIGHT Rectangular character cursor.
A cursor that points right.
wxCURSOR_QUESTION_ARROW
An arrow and question mark. wxCURSOR_CROSS
wxCURSOR_RIGHT_BUTTON
Represents a mouse with the right button depressed.
wxCURSOR_SIZENESW A cross cursor.
A sizing cursor pointing NE-SW.
wxCURSOR_SIZENS
A sizing cursor pointing N-S. wxCURSOR_HAND
wxCURSOR_SIZENWSE
A sizing cursor pointing NW-SE.
wxCURSOR_SIZEWE A hand cursor.
A sizing cursor pointing W-E.
wxCURSOR_SIZING
A general sizing cursor. wxCURSOR_IBEAM
wxCURSOR_SPRAYCAN
A spraycan cursor.
wxCURSOR_WAIT An I-beam cursor (vertical line).
A wait cursor.
wxCURSOR_WATCH
A watch cursor. wxCURSOR_LEFT_BUTTON
wxCURSOR_ARROWWAIT
A cursor with both an arrow and
an hourglass, (windows.)
Note that not all cursors are available on all platforms. Represents a mouse with the left button depressed.
wxCURSOR_MAGNIFIER
A magnifier icon.
wxCURSOR_MIDDLE_BUTTON
Represents a mouse with the middle button depressed.
wxCURSOR_NO_ENTRY
A no-entry sign cursor.
wxCURSOR_PAINT_BRUSH
A paintbrush cursor.
wxCURSOR_PENCIL
A pencil cursor.
wxCURSOR_POINT_LEFT
A cursor that points left.
wxCURSOR_POINT_RIGHT
A cursor that points right.
wxCURSOR_QUESTION_ARROW
An arrow and question mark.
wxCURSOR_RIGHT_BUTTON
Represents a mouse with the right button depressed.
wxCURSOR_SIZENESW
A sizing cursor pointing NE-SW.
wxCURSOR_SIZENS
A sizing cursor pointing N-S.
wxCURSOR_SIZENWSE
A sizing cursor pointing NW-SE.
wxCURSOR_SIZEWE
A sizing cursor pointing W-E.
wxCURSOR_SIZING
A general sizing cursor.
wxCURSOR_SPRAYCAN
A spraycan cursor.
wxCURSOR_WAIT
A wait cursor.
wxCURSOR_WATCH
A watch cursor.
wxCURSOR_ARROWWAIT
A cursor with both an arrow and
an hourglass, (windows.)
Note that not all cursors are available on all platforms.
@param cursor @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);
@@ -262,7 +450,6 @@ public:
Destroys the cursor. Destroys the cursor.
See @ref overview_refcountdestruct "reference-counted object destruction" for See @ref overview_refcountdestruct "reference-counted object destruction" for
more info. more info.
A cursor can be reused for more A cursor can be reused for more
than one window, and does not get destroyed when the window is than one window, and does not get destroyed when the window is
destroyed. wxWidgets destroys all cursors on application exit, although destroyed. wxWidgets destroys all cursors on application exit, although
@@ -273,7 +460,7 @@ public:
/** /**
Returns @true if cursor data is present. Returns @true if cursor data is present.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Assignment operator, using @ref overview_trefcount "reference counting". Assignment operator, using @ref overview_trefcount "reference counting".

View File

@@ -37,7 +37,7 @@ class wxCustomDataObject : public wxDataObjectSimple
{ {
public: public:
/** /**
The constructor accepts a @e format argument which specifies the (single) The constructor accepts a @a 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.
*/ */
@@ -54,10 +54,10 @@ public:
~wxCustomDataObject(); ~wxCustomDataObject();
/** /**
This function is called to allocate @e size bytes of memory from SetData(). This function is called to allocate @a size bytes of memory from SetData().
The default version just uses the operator new. The default version just uses the operator new.
*/ */
virtual void * Alloc(size_t size); virtual void* Alloc(size_t size);
/** /**
This function is called when the data is freed, you may override it to anything This function is called when the data is freed, you may override it to anything
@@ -69,7 +69,7 @@ public:
/** /**
Returns a pointer to the data. Returns a pointer to the data.
*/ */
virtual void * GetData(); virtual void* GetData();
/** /**
Returns the data size in bytes. Returns the data size in bytes.
@@ -84,7 +84,6 @@ public:
/** /**
Like SetData(), but doesn't copy the data - Like SetData(), but doesn't copy the data -
instead the object takes ownership of the pointer. instead the object takes ownership of the pointer.
@b wxPython note: This method expects a string in wxPython. You can pass @b wxPython note: This method expects a string in wxPython. You can pass
nearly any object by pickling it first. nearly any object by pickling it first.
*/ */
@@ -125,10 +124,10 @@ public:
wxDataObjectComposite(); wxDataObjectComposite();
/** /**
Adds the @e dataObject to the list of supported objects and it becomes the Adds the @a dataObject to the list of supported objects and it becomes the
preferred object if @e preferred is @true. preferred object if @a preferred is @true.
*/ */
#define void Add(wxDataObjectSimple dataObject, bool preferred = @false) /* implementation is private */ void Add(wxDataObjectSimple dataObject, bool preferred = false);
/** /**
Report the format passed to the SetData method. This should be the Report the format passed to the SetData method. This should be the
@@ -197,7 +196,6 @@ public:
/** /**
Copy the data from the buffer, return @true on success. Must be implemented in Copy the data from the buffer, return @true on success. Must be implemented in
the derived class if the object supports setting its data. the derived class if the object supports setting its data.
@b wxPython note: When implementing this method in wxPython, the data comes @b wxPython note: When implementing this method in wxPython, the data comes
as a single string parameter rather than the two shown here. as a single string parameter rather than the two shown here.
*/ */
@@ -401,7 +399,7 @@ 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 @a url is empty,
SetURL() can be used later. SetURL() can be used later.
*/ */
wxURLDataObject(const wxString& url = wxEmptyString); wxURLDataObject(const wxString& url = wxEmptyString);
@@ -409,12 +407,12 @@ public:
/** /**
Returns the URL stored by this object, as a string. Returns the URL stored by this object, as a string.
*/ */
#define wxString GetURL() /* implementation is private */ wxString GetURL();
/** /**
Sets the URL stored by this object. Sets the URL stored by this object.
*/ */
#define void SetURL(const wxString& url) /* implementation is private */ void SetURL(const wxString& url);
}; };
@@ -563,11 +561,11 @@ public:
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,
Direction dir = Get); Direction dir = Get);
/** /**
The method will write the data of the format @e format in the buffer @e buf and The method will write the data of the format @a format in the buffer @a buf and
return @true on success, @false on failure. return @true on success, @false on failure.
*/ */
virtual bool GetDataHere(const wxDataFormat& format, void buf); virtual bool GetDataHere(const wxDataFormat& format, void buf);
@@ -583,16 +581,15 @@ public:
virtual size_t GetFormatCount(Direction dir = Get); virtual size_t GetFormatCount(Direction dir = Get);
/** /**
Returns the preferred format for either rendering the data (if @e dir is @c Get, Returns the preferred format for either rendering the data (if @a dir is @c Get,
its default value) or for setting it. Usually this will be the its default value) or for setting it. Usually this will be the
native format of the wxDataObject. native format of the wxDataObject.
*/ */
virtual wxDataFormat GetPreferredFormat(Direction dir = Get); virtual wxDataFormat GetPreferredFormat(Direction dir = Get);
/** /**
Set the data in the format @e format of the length @e len provided in the Set the data in the format @a format of the length @a len provided in the
buffer @e buf. buffer @e buf.
Returns @true on success, @false on failure. Returns @true on success, @false on failure.
*/ */
virtual bool SetData(const wxDataFormat& format, size_t len, virtual bool SetData(const wxDataFormat& format, size_t len,

View File

@@ -68,7 +68,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);
//@} //@}
@@ -198,7 +198,6 @@ 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.
*/ */
bool GetAttr(unsigned int row, unsigned int col, bool GetAttr(unsigned int row, unsigned int col,
@@ -387,7 +386,6 @@ public:
The compare function to be used by control. The default compare function The compare function to be used by control. The default compare function
sorts by container and other items separately and in ascending order. sorts by container and other items separately and in ascending order.
Override this for a different sorting behaviour. Override this for a different sorting behaviour.
See also HasDefaultCompare(). See also HasDefaultCompare().
*/ */
virtual int Compare(const wxDataViewItem& item1, virtual int Compare(const wxDataViewItem& item1,
@@ -399,7 +397,6 @@ 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.
*/ */
bool GetAttr(const wxDataViewItem& item, unsigned int col, bool GetAttr(const wxDataViewItem& item, unsigned int col,
@@ -426,7 +423,7 @@ public:
/** /**
Override this to indicate which wxDataViewItem representing the parent Override this to indicate which wxDataViewItem representing the parent
of @e item or an invalid wxDataViewItem if the the root item is of @a item or an invalid wxDataViewItem if the the root item is
the parent item. the parent item.
*/ */
virtual wxDataViewItem GetParent(const wxDataViewItem& item); virtual wxDataViewItem GetParent(const wxDataViewItem& item);
@@ -459,7 +456,7 @@ public:
virtual bool HasDefaultCompare(); virtual bool HasDefaultCompare();
/** /**
Override this to indicate of @e item is a container, i.e. if Override this to indicate of @a item is a container, i.e. if
it can have child items. it can have child items.
*/ */
virtual bool IsContainer(const wxDataViewItem& item); virtual bool IsContainer(const wxDataViewItem& item);
@@ -473,7 +470,6 @@ public:
/** /**
Call this to inform the model that an item has changed. Call this to inform the model that an item has changed.
This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
event (in which the column fields will not be set) to the user. event (in which the column fields will not be set) to the user.
*/ */
@@ -494,7 +490,6 @@ public:
/** /**
Call this to inform the model that several items have changed. Call this to inform the model that several items have changed.
This will eventually emit wxEVT_DATAVIEW_ITEM_VALUE_CHANGED This will eventually emit wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
events (in which the column fields will not be set) to the user. events (in which the column fields will not be set) to the user.
*/ */
@@ -507,7 +502,7 @@ public:
const wxDataViewItemArray& items); const wxDataViewItemArray& items);
/** /**
Remove the @e notifier from the list of notifiers. Remove the @a notifier from the list of notifiers.
*/ */
void RemoveNotifier(wxDataViewModelNotifier* notifier); void RemoveNotifier(wxDataViewModelNotifier* notifier);
@@ -533,7 +528,6 @@ public:
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
event to the user. event to the user.
*/ */
@@ -573,7 +567,7 @@ public:
*/ */
wxDataViewCustomRenderer(const wxString& varianttype = "string", wxDataViewCustomRenderer(const wxString& varianttype = "string",
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
bool no_init = @false); bool no_init = false);
/** /**
Destructor. Destructor.
@@ -589,18 +583,18 @@ public:
/** /**
Override this to create the actual editor control once editing Override this to create the actual editor control once editing
is about to start. @e parent is the parent of the editor is about to start. @a parent is the parent of the editor
control, @e labelRect indicates the position and control, @a labelRect indicates the position and
size of the editor control and @e value is its initial value: size of the editor control and @a value is its initial value:
*/ */
virtual wxControl* CreateEditorCtrl(wxWindow * parent, virtual wxControl* CreateEditorCtrl(wxWindow* parent,
wxRect labelRect, wxRect labelRect,
const wxVariant & value); const wxVariant& value);
/** /**
Create DC on request. Internal. Create DC on request. Internal.
*/ */
#define virtual wxDC* GetDC() /* implementation is private */ virtual wxDC* GetDC();
/** /**
Return size required to show content. Return size required to show content.
@@ -612,7 +606,7 @@ public:
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,
wxVariant & value); wxVariant& value);
/** /**
Override this and make it return @e @true in order to Override this and make it return @e @true in order to
@@ -753,19 +747,19 @@ public:
/** /**
*/ */
wxDataViewItem(void* id = @NULL); wxDataViewItem(void* id = NULL);
wxDataViewItem(const wxDataViewItem& item); wxDataViewItem(const wxDataViewItem& item);
//@} //@}
/** /**
Returns the ID. Returns the ID.
*/ */
#define void* GetID() /* implementation is private */ void* GetID();
/** /**
Returns @true if the ID is not @e @NULL. Returns @true if the ID is not @e @NULL.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
}; };
@@ -863,7 +857,6 @@ public:
/** /**
Add a wxDataViewColumn to the control. Returns Add a wxDataViewColumn to the control. Returns
@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).
@@ -986,7 +979,7 @@ public:
/** /**
Collapses the item. Collapses the item.
*/ */
void Collapse(const wxDataViewItem & item); void Collapse(const wxDataViewItem& item);
/** /**
Create the control. Useful for two step creation. Create the control. Useful for two step creation.
@@ -1005,16 +998,16 @@ public:
/** /**
Call this to ensure that the given item is visible. Call this to ensure that the given item is visible.
*/ */
void EnsureVisible(const wxDataViewItem & item, void EnsureVisible(const wxDataViewItem& item,
const wxDataViewColumn* column = @NULL); const wxDataViewColumn* column = NULL);
/** /**
Expands the item. Expands the item.
*/ */
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. @a 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.
*/ */
@@ -1033,7 +1026,7 @@ public:
/** /**
Returns column containing the expanders. Returns column containing the expanders.
*/ */
wxDataViewColumn * GetExpanderColumn(); wxDataViewColumn* GetExpanderColumn();
/** /**
Returns indentation. Returns indentation.
@@ -1044,7 +1037,7 @@ public:
Returns item rect. Returns item rect.
*/ */
wxRect GetItemRect(const wxDataViewItem& item, wxRect GetItemRect(const wxDataViewItem& item,
const wxDataViewColumn * col = @NULL); const wxDataViewColumn* col = NULL);
/** /**
Returns pointer to the data model associated with the Returns pointer to the data model associated with the
@@ -1058,10 +1051,10 @@ public:
wxDataViewItem GetSelection(); wxDataViewItem GetSelection();
/** /**
Fills @e sel with currently selected items and returns Fills @a sel with currently selected items and returns
their number. their number.
*/ */
int GetSelections(wxDataViewItemArray & sel); int GetSelections(wxDataViewItemArray& sel);
/** /**
Returns the wxDataViewColumn currently responsible for sorting Returns the wxDataViewColumn currently responsible for sorting
@@ -1073,17 +1066,17 @@ public:
Hittest. Hittest.
*/ */
void HitTest(const wxPoint& point, wxDataViewItem& item, void HitTest(const wxPoint& point, wxDataViewItem& item,
wxDataViewColumn *& col); wxDataViewColumn*& col);
/** /**
Return @true if the item is selected. Return @true if the item is selected.
*/ */
bool IsSelected(const wxDataViewItem & item); bool IsSelected(const wxDataViewItem& item);
/** /**
Select the given item. Select the given item.
*/ */
void Select(const wxDataViewItem & item); void Select(const wxDataViewItem& item);
/** /**
Select all items. Select all items.
@@ -1093,7 +1086,7 @@ public:
/** /**
Set which column shall contain the tree-like expanders. Set which column shall contain the tree-like expanders.
*/ */
void SetExpanderColumn(wxDataViewColumn * col); void SetExpanderColumn(wxDataViewColumn* col);
/** /**
Sets the indendation. Sets the indendation.
@@ -1103,12 +1096,12 @@ public:
/** /**
Sets the selection to the array of wxDataViewItems. Sets the selection to the array of wxDataViewItems.
*/ */
void SetSelections(const wxDataViewItemArray & sel); void SetSelections(const wxDataViewItemArray& sel);
/** /**
Unselect the given item. Unselect the given item.
*/ */
void Unselect(const wxDataViewItem & item); void Unselect(const wxDataViewItem& item);
/** /**
Unselect all item. This method only has effect if multiple Unselect all item. This method only has effect if multiple
@@ -1314,7 +1307,6 @@ public:
a certain aspect (e.g. max number of characters or only alphanumeric a certain aspect (e.g. max number of characters or only alphanumeric
input, ASCII only etc.). Return @e @false if the value is input, ASCII only etc.). Return @e @false if the value is
not valid. not valid.
Please note that due to implementation limitations, this validation Please note that due to implementation limitations, this validation
is done after the editing control already is destroyed and the is done after the editing control already is destroyed and the
editing process finished. editing process finished.
@@ -1380,7 +1372,7 @@ class wxDataViewSpinRenderer : public wxDataViewCustomRenderer
{ {
public: public:
/** /**
Constructor. @e min and @e max indicate the minimum und Constructor. @a min and @a max indicate the minimum und
maximum values of for the wxSpinCtrl. maximum values of for the wxSpinCtrl.
*/ */
wxDataViewSpinRenderer(int min, int max, wxDataViewSpinRenderer(int min, int max,
@@ -1451,7 +1443,7 @@ public:
const wxString& text, const wxString& text,
int icon = -1, int icon = -1,
int expanded = -1, int expanded = -1,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
@@ -1459,7 +1451,7 @@ public:
wxDataViewItem AppendItem(const wxDataViewItem& parent, wxDataViewItem AppendItem(const wxDataViewItem& parent,
const wxString& text, const wxString& text,
int icon = -1, int icon = -1,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Creates the control and a wxDataViewTreeStore as Creates the control and a wxDataViewTreeStore as
@@ -1539,7 +1531,7 @@ public:
const wxString& text, const wxString& text,
int icon = -1, int icon = -1,
int expanded = -1, int expanded = -1,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Calls the same method from wxDataViewTreeStore but uess Calls the same method from wxDataViewTreeStore but uess
@@ -1549,7 +1541,7 @@ public:
const wxDataViewItem& previous, const wxDataViewItem& previous,
const wxString& text, const wxString& text,
int icon = -1, int icon = -1,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Calls the same method from wxDataViewTreeStore but uess Calls the same method from wxDataViewTreeStore but uess
@@ -1559,7 +1551,7 @@ public:
const wxString& text, const wxString& text,
int icon = -1, int icon = -1,
int expanded = -1, int expanded = -1,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Calls the same method from wxDataViewTreeStore but uess Calls the same method from wxDataViewTreeStore but uess
@@ -1568,7 +1560,7 @@ public:
wxDataViewItem PrependItem(const wxDataViewItem& parent, wxDataViewItem PrependItem(const wxDataViewItem& parent,
const wxString& text, const wxString& text,
int icon = -1, int icon = -1,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Sets the image list. Sets the image list.
@@ -1633,7 +1625,7 @@ public:
const wxString& text, const wxString& text,
const wxIcon& icon = wxNullIcon, const wxIcon& icon = wxNullIcon,
const wxIcon& expanded = wxNullIcon, const wxIcon& expanded = wxNullIcon,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Append an item. Append an item.
@@ -1641,7 +1633,7 @@ public:
wxDataViewItem AppendItem(const wxDataViewItem& parent, wxDataViewItem AppendItem(const wxDataViewItem& parent,
const wxString& text, const wxString& text,
const wxIcon& icon = wxNullIcon, const wxIcon& icon = wxNullIcon,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Delete all item in the model. Delete all item in the model.
@@ -1697,7 +1689,7 @@ public:
const wxString& text, const wxString& text,
const wxIcon& icon = wxNullIcon, const wxIcon& icon = wxNullIcon,
const wxIcon& expanded = wxNullIcon, const wxIcon& expanded = wxNullIcon,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Inserts an item after @e previous. Inserts an item after @e previous.
@@ -1706,7 +1698,7 @@ public:
const wxDataViewItem& previous, const wxDataViewItem& previous,
const wxString& text, const wxString& text,
const wxIcon& icon = wxNullIcon, const wxIcon& icon = wxNullIcon,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Inserts a container before the first child item or @e parent. Inserts a container before the first child item or @e parent.
@@ -1715,7 +1707,7 @@ public:
const wxString& text, const wxString& text,
const wxIcon& icon = wxNullIcon, const wxIcon& icon = wxNullIcon,
const wxIcon& expanded = wxNullIcon, const wxIcon& expanded = wxNullIcon,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Inserts an item before the first child item or @e parent. Inserts an item before the first child item or @e parent.
@@ -1723,7 +1715,7 @@ public:
wxDataViewItem PrependItem(const wxDataViewItem& parent, wxDataViewItem PrependItem(const wxDataViewItem& parent,
const wxString& text, const wxString& text,
const wxIcon& icon = wxNullIcon, const wxIcon& icon = wxNullIcon,
wxClientData* data = @NULL); wxClientData* data = NULL);
/** /**
Sets the client data associated with the item. Sets the client data associated with the item.
@@ -1847,7 +1839,6 @@ public:
/** /**
Returns the renderer of this wxDataViewColumn. Returns the renderer of this wxDataViewColumn.
See also wxDataViewRenderer. See also wxDataViewRenderer.
*/ */
wxDataViewRenderer* GetRenderer(); wxDataViewRenderer* GetRenderer();
@@ -1859,7 +1850,6 @@ public:
/** /**
Returns @true if the column is sortable. Returns @true if the column is sortable.
See SetSortable() See SetSortable()
*/ */
bool GetSortable(); bool GetSortable();
@@ -1871,7 +1861,6 @@ public:
/** /**
Returns @true, if the sort order is ascending. Returns @true, if the sort order is ascending.
See also SetSortOrder() See also SetSortOrder()
*/ */
bool IsSortOrderAscending(); bool IsSortOrderAscending();
@@ -1906,7 +1895,7 @@ public:
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 @a sortable is @false, the column header is
no longer clickable and the sort indicator (little no longer clickable and the sort indicator (little
arrow) will disappear. arrow) will disappear.
*/ */

View File

@@ -43,7 +43,7 @@
@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
@@ -62,7 +62,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxDatePickerCtrl(wxWindow * parent, wxWindowID id, wxDatePickerCtrl(wxWindow* parent, wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime, const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -72,37 +72,30 @@ 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 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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime, const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -114,20 +107,19 @@ public:
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. @a dt1 and/or @a 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
bound is set. bound is set.
*/ */
bool GetRange(wxDateTime * dt1, wxDateTime dt2); bool GetRange(wxDateTime* dt1, wxDateTime dt2);
/** /**
Returns the currently selected. If there is no selection or the selection is Returns the currently selected. If there is no selection or the selection is
@@ -138,7 +130,6 @@ public:
/** /**
Please note that this function is only available in the generic version of this Please note that this function is only available in the generic version of this
control. The native version always uses the current system locale. control. The native version always uses the current system locale.
Sets the display format for the date in the control. See wxDateTime for the Sets the display format for the date in the control. See wxDateTime for the
meaning of format strings. meaning of format strings.
@@ -147,19 +138,18 @@ public:
void SetFormat(const wxChar* format); void SetFormat(const wxChar* format);
/** /**
Sets the valid range for the date selection. If @e dt1 is valid, it becomes Sets the valid range for the date selection. If @a dt1 is valid, it becomes
the earliest date (inclusive) accepted by the control. If @e dt2 is valid, the earliest date (inclusive) accepted by the control. If @a dt2 is valid,
it becomes the latest possible date. it becomes the latest possible date.
@remarks If the current value of the control is outside of the newly set @remarks If the current value of the control is outside of the newly set
range bounds, the behaviour is undefined. range bounds, the behaviour is undefined.
*/ */
void SetRange(const wxDateTime& dt1, const wxDateTime& dt2); void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
/** /**
Changes the current value of the control. The date should be valid and included Changes the current value of the control. The date should be valid and included
in the currently selected range, if any. in the currently selected range, if any.
Calling this method does not result in a date change event. Calling this method does not result in a date change event.
*/ */
void SetValue(const wxDateTime& dt); void SetValue(const wxDateTime& dt);

View File

@@ -35,7 +35,6 @@ public:
Here are the trivial accessors. Other functions, which might have to perform Here are the trivial accessors. Other functions, which might have to perform
some more complicated calculations to find the answer are under the some more complicated calculations to find the answer are under the
@ref overview_datetimecalculations "Calendar calculations" section. @ref overview_datetimecalculations "Calendar calculations" section.
IsValid() IsValid()
GetTicks() GetTicks()
@@ -89,7 +88,6 @@ public:
@ref setjdn() JDN and you may also get its JDN, @ref setjdn() JDN and you may also get its JDN,
@ref getmodifiedjuliandaynumber() MJD or @ref getmodifiedjuliandaynumber() MJD or
@ref getratadie() "Rata Die number" from it. @ref getratadie() "Rata Die number" from it.
@ref wxdatetimejdn() "wxDateTime(double jdn)" @ref wxdatetimejdn() "wxDateTime(double jdn)"
@ref setjdn() "Set(double jdn)" @ref setjdn() "Set(double jdn)"
@@ -110,10 +108,8 @@ public:
The functions in this section perform the basic calendar calculations, mostly The functions in this section perform the basic calendar calculations, mostly
related to the week days. They allow to find the given week day in the related to the week days. They allow to find the given week day in the
week with given number (either in the month or in the year) and so on. week with given number (either in the month or in the year) and so on.
All (non-const) functions in this section don't modify the time part of the All (non-const) functions in this section don't modify the time part of the
wxDateTime -- they only work with the date part of it. wxDateTime -- they only work with the date part of it.
SetToWeekDayInSameWeek() SetToWeekDayInSameWeek()
GetWeekDayInSameWeek() GetWeekDayInSameWeek()
@@ -151,7 +147,6 @@ public:
construct a date object from separate values for day, month and year, you construct a date object from separate values for day, month and year, you
should use IsValid() method to check that the should use IsValid() method to check that the
values were correct as constructors can not return an error code. values were correct as constructors can not return an error code.
@ref wxdatetimedef() wxDateTime @ref wxdatetimedef() wxDateTime
@ref wxdatetimetimet() wxDateTime(time_t) @ref wxdatetimetimet() wxDateTime(time_t)
@@ -205,7 +200,6 @@ public:
positive or zero) to the year in BC/AD notation. For the positive years, positive or zero) to the year in BC/AD notation. For the positive years,
nothing is done, but the year 0 is year 1 BC and so for other years there is a nothing is done, but the year 0 is year 1 BC and so for other years there is a
difference of 1. difference of 1.
This function should be used like this: This function should be used like this:
*/ */
static int ConvertYearToBC(int year); static int ConvertYearToBC(int year);
@@ -215,13 +209,11 @@ public:
objects. As explained in the overview, either wxTimeSpan or wxDateSpan may be objects. As explained in the overview, either wxTimeSpan or wxDateSpan may be
added to wxDateTime, hence all functions are overloaded to accept both added to wxDateTime, hence all functions are overloaded to accept both
arguments. arguments.
Also, both @c Add() and @c Subtract() have both const and non-const Also, both @c Add() and @c Subtract() have both const and non-const
version. The first one returns a new object which represents the version. The first one returns a new object which represents the
sum/difference of the original one with the argument while the second form sum/difference of the original one with the argument while the second form
modifies the object to which it is applied. The operators -= and += are modifies the object to which it is applied. The operators -= and += are
defined to be equivalent to the second forms of these functions. defined to be equivalent to the second forms of these functions.
@ref addts() Add(wxTimeSpan) @ref addts() Add(wxTimeSpan)
@ref addds() Add(wxDateSpan) @ref addds() Add(wxDateSpan)
@@ -245,7 +237,6 @@ public:
/** /**
There are several function to allow date comparison. To supplement them, a few There are several function to allow date comparison. To supplement them, a few
global operators , etc taking wxDateTime are defined. global operators , etc taking wxDateTime are defined.
IsEqualTo() IsEqualTo()
IsEarlierThan() IsEarlierThan()
@@ -266,15 +257,14 @@ public:
/** /**
This function does the same as the standard ANSI C @c strftime(3) function. This function does the same as the standard ANSI C @c strftime(3) function.
Please see its description for the meaning of @e format parameter. Please see its description for the meaning of @a format parameter.
It also accepts a few wxWidgets-specific extensions: you can optionally specify It also accepts a few wxWidgets-specific extensions: you can optionally specify
the width of the field to follow using @c printf(3)-like syntax and the the width of the field to follow using @c printf(3)-like syntax and the
format specification @c %l can be used to get the number of milliseconds. format specification @c %l can be used to get the number of milliseconds.
@sa ParseFormat() @see ParseFormat()
*/ */
wxString Format(const wxChar * format = wxDefaultDateTimeFormat, wxString Format(const wxChar* format = wxDefaultDateTimeFormat,
const TimeZone& tz = Local); const TimeZone& tz = Local);
/** /**
@@ -285,13 +275,13 @@ public:
/** /**
Returns the combined date-time representation in the ISO 8601 format Returns the combined date-time representation in the ISO 8601 format
(YYYY-MM-DDTHH:MM:SS). The @e sep parameter default value produces the (YYYY-MM-DDTHH:MM:SS). The @a sep parameter default value produces the
result exactly corresponding to the ISO standard, but it can also be useful to result exactly corresponding to the ISO standard, but it can also be useful to
use a space as seprator if a more human-readable combined date-time use a space as seprator if a more human-readable combined date-time
representation is needed. representation is needed.
@sa FormatISODate(), FormatISOTime(), @see FormatISODate(), FormatISOTime(),
ParseISOCombined() ParseISOCombined()
*/ */
wxString FormatISOCombined(char sep = 'T'); wxString FormatISOCombined(char sep = 'T');
@@ -314,20 +304,19 @@ 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 @a 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.
*/ */
wxDateTime FromTimezone(const TimeZone& tz, wxDateTime FromTimezone(const TimeZone& tz,
bool noDST = @false); bool noDST = false);
/** /**
Returns the translations of the strings @c AM and @c PM used for time Returns the translations of the strings @c AM and @c PM used for time
formatting for the current locale. Either of the pointers may be @NULL if formatting for the current locale. Either of the pointers may be @NULL if
the corresponding value is not needed. the corresponding value is not needed.
*/ */
static void GetAmPmStrings(wxString * am, wxString * pm); static void GetAmPmStrings(wxString* am, wxString* pm);
/** /**
Returns the date and time in Returns the date and time in
@@ -341,7 +330,7 @@ public:
by default). This function suffers from limitations described in by default). This function suffers from limitations described in
@ref overview_tdatedst "DST overview". @ref overview_tdatedst "DST overview".
@sa GetEndDST() @see GetEndDST()
*/ */
static wxDateTime GetBeginDST(int year = Inv_Year, static wxDateTime GetBeginDST(int year = Inv_Year,
Country country = Country_Default); Country country = Country_Default);
@@ -355,7 +344,7 @@ public:
Returns the current default country. The default country is used for DST Returns the current default country. The default country is used for DST
calculations, for example. calculations, for example.
@sa SetCountry() @see SetCountry()
*/ */
static Country GetCountry(); static Country GetCountry();
@@ -372,10 +361,9 @@ public:
/** /**
Returns the object having the same date component as this one but time of Returns the object having the same date component as this one but time of
00:00:00. 00:00:00.
This function is new since wxWidgets version 2.8.2 This function is new since wxWidgets version 2.8.2
@sa ResetTime() @see ResetTime()
*/ */
wxDateTime GetDateOnly(); wxDateTime GetDateOnly();
@@ -394,7 +382,7 @@ public:
Returns the end of DST for the given country in the given year (current one by Returns the end of DST for the given country in the given year (current one by
default). default).
@sa GetBeginDST() @see GetBeginDST()
*/ */
static wxDateTime GetEndDST(int year = Inv_Year, static wxDateTime GetEndDST(int year = Inv_Year,
Country country = Country_Default); Country country = Country_Default);
@@ -407,13 +395,13 @@ public:
/** /**
Synonym for GetJulianDayNumber(). Synonym for GetJulianDayNumber().
*/ */
#define double GetJDN() /* implementation is private */ double GetJDN();
/** /**
Returns the @ref setjdn() JDN corresponding to this date. Beware Returns the @ref setjdn() JDN corresponding to this date. Beware
of rounding errors! of rounding errors!
@sa GetModifiedJulianDayNumber() @see GetModifiedJulianDayNumber()
*/ */
double GetJulianDayNumber(); double GetJulianDayNumber();
@@ -435,7 +423,7 @@ public:
/** /**
Synonym for GetModifiedJulianDayNumber(). Synonym for GetModifiedJulianDayNumber().
*/ */
#define double GetMJD() /* implementation is private */ double GetMJD();
/** /**
Returns the milliseconds in the given timezone (local one by default). Returns the milliseconds in the given timezone (local one by default).
@@ -464,7 +452,7 @@ public:
Gets the full (default) or abbreviated (specify @c Name_Abbr name of the Gets the full (default) or abbreviated (specify @c Name_Abbr name of the
given month. given month.
@sa GetWeekDayName() @see GetWeekDayName()
*/ */
static wxString GetMonthName(Month month, static wxString GetMonthName(Month month,
NameFlags flags = Name_Full); NameFlags flags = Name_Full);
@@ -479,8 +467,7 @@ public:
/** /**
Returns the number of days in the given year or in the given month of the Returns the number of days in the given year or in the given month of the
year. year.
The only supported value for @a cal parameter is currently @c Gregorian.
The only supported value for @e cal parameter is currently @c Gregorian.
*/ */
static wxDateTime_t GetNumberOfDays(int year, static wxDateTime_t GetNumberOfDays(int year,
Calendar cal = Gregorian); Calendar cal = Gregorian);
@@ -497,7 +484,6 @@ public:
/** /**
Return the @e Rata Die number of this date. Return the @e Rata Die number of this date.
By definition, the Rata Die number is a date specified as the number of days By definition, the Rata Die number is a date specified as the number of days
relative to a base date of December 31 of the year 0. Thus January 1 of the relative to a base date of December 31 of the year 0. Thus January 1 of the
year 1 is Rata Die day 1. year 1 is Rata Die day 1.
@@ -533,7 +519,7 @@ public:
the flavour of function GetTmNow() the flavour of function GetTmNow()
taking a parameter. taking a parameter.
*/ */
static struct tm * GetTmNow(); static struct tm* GetTmNow();
/** /**
Returns the copy of this object to which Returns the copy of this object to which
@@ -555,14 +541,13 @@ public:
Gets the full (default) or abbreviated (specify @c Name_Abbr name of the Gets the full (default) or abbreviated (specify @c Name_Abbr name of the
given week day. given week day.
@sa GetMonthName() @see GetMonthName()
*/ */
static wxString GetWeekDayName(WeekDay weekday, static wxString GetWeekDayName(WeekDay weekday,
NameFlags flags = Name_Full); NameFlags flags = Name_Full);
/** /**
Returns the ordinal number of the week in the month (in 1...5 range). Returns the ordinal number of the week in the month (in 1...5 range).
As GetWeekOfYear(), this function supports As GetWeekOfYear(), this function supports
both conventions for the week start. See the description of these both conventions for the week start. See the description of these
@ref overview_wxdatetime "week start" conventions. @ref overview_wxdatetime "week start" conventions.
@@ -577,9 +562,8 @@ public:
definitions are the same as saying that the first week of the year must contain definitions are the same as saying that the first week of the year must contain
more than half of its days in this year. Accordingly, the week number will more than half of its days in this year. Accordingly, the week number will
always be in 1...53 range (52 for non-leap years). always be in 1...53 range (52 for non-leap years).
The function depends on the @ref overview_wxdatetime "week start" convention The function depends on the @ref overview_wxdatetime "week start" convention
specified by the @e flags argument but its results for specified by the @a flags argument but its results for
@c Sunday_First are not well-defined as the ISO definition quoted above @c Sunday_First are not well-defined as the ISO definition quoted above
applies to the weeks starting on Monday only. applies to the weeks starting on Monday only.
*/ */
@@ -601,14 +585,14 @@ public:
Returns @true if IsStrictlyBetween() Returns @true if IsStrictlyBetween()
is @true or if the date is equal to one of the limit values. is @true or if the date is equal to one of the limit values.
@sa IsStrictlyBetween() @see IsStrictlyBetween()
*/ */
bool IsBetween(const wxDateTime& t1, const wxDateTime& t2); bool IsBetween(const wxDateTime& t1, const wxDateTime& t2);
/** /**
Returns @true if the DST is applied for this date in the given country. Returns @true if the DST is applied for this date in the given country.
*/ */
#define int IsDST(Country country = Country_Default) /* implementation is private */ int IsDST(Country country = Country_Default);
/** /**
Returns @true if DST was used n the given year (the current one by Returns @true if DST was used n the given year (the current one by
@@ -647,8 +631,7 @@ public:
bool IsLaterThan(const wxDateTime& datetime); bool IsLaterThan(const wxDateTime& datetime);
/** /**
Returns @true if the @e year is a leap one in the specified calendar. Returns @true if the @a year is a leap one in the specified calendar.
This functions supports Gregorian and Julian calendars. This functions supports Gregorian and Julian calendars.
*/ */
static bool IsLeapYear(int year = Inv_Year, static bool IsLeapYear(int year = Inv_Year,
@@ -667,7 +650,7 @@ public:
/** /**
Returns @true if this date lies strictly between the two others, Returns @true if this date lies strictly between the two others,
@sa IsBetween() @see IsBetween()
*/ */
bool IsStrictlyBetween(const wxDateTime& t1, bool IsStrictlyBetween(const wxDateTime& t1,
const wxDateTime& t2); const wxDateTime& t2);
@@ -694,32 +677,32 @@ public:
in place. in place.
*/ */
wxDateTime MakeFromTimezone(const TimeZone& tz, wxDateTime MakeFromTimezone(const TimeZone& tz,
bool noDST = @false); bool noDST = false);
/** /**
Modifies the object in place to represent the date in another time zone. If Modifies the object in place to represent the date in another time zone. If
@e noDST is @true, no DST adjustments will be made. @a noDST is @true, no DST adjustments will be made.
*/ */
wxDateTime MakeTimezone(const TimeZone& tz, wxDateTime MakeTimezone(const TimeZone& tz,
bool noDST = @false); bool noDST = false);
/** /**
This is the same as calling MakeTimezone() with This is the same as calling MakeTimezone() with
the argument @c GMT0. the argument @c GMT0.
*/ */
wxDateTime MakeUTC(bool noDST = @false); wxDateTime MakeUTC(bool noDST = false);
/** /**
Returns the object corresponding to the current time. Returns the object corresponding to the current time.
Example: Example:
Note that this function is accurate up to second: Note that this function is accurate up to second:
UNow() should be used for better precision UNow() should be used for better precision
(but it is less efficient and might not be available on all platforms). (but it is less efficient and might not be available on all platforms).
@sa Today() @see Today()
*/ */
#define static wxDateTime Now() /* implementation is private */ static wxDateTime Now();
//@{ //@{
/** /**
@@ -727,72 +710,66 @@ public:
only allows the date to be specified. It is thus less flexible then only allows the date to be specified. It is thus less flexible then
ParseDateTime(), but also has less chances to ParseDateTime(), but also has less chances to
misinterpret the user input. misinterpret the user input.
Returns @NULL if the conversion failed, otherwise return the pointer to Returns @NULL if the conversion failed, otherwise return the pointer to
the character which stopped the scan. the character which stopped the scan.
*/ */
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);
//@} //@}
//@{ //@{
/** /**
Parses the string @e datetime containing the date and time in free format. Parses the string @a datetime containing the date and time in free format.
This function tries as hard as it can to interpret the given string as date This function tries as hard as it can to interpret the given string as date
and time. Unlike wxDateTime::ParseRfc822Date, it and time. Unlike wxDateTime::ParseRfc822Date, it
will accept anything that may be accepted and will only reject strings which will accept anything that may be accepted and will only reject strings which
can not be parsed in any way at all. can not be parsed in any way at all.
Returns @NULL if the conversion failed, otherwise return the pointer to Returns @NULL if the conversion failed, otherwise return the pointer to
the character which stopped the scan. the character which stopped the scan.
*/ */
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);
//@} //@}
//@{ //@{
/** /**
This function parses the string @e date according to the given This function parses the string @a date according to the given
@e format. The system @c strptime(3) function is used whenever available, @e format. The system @c strptime(3) function is used whenever available,
but even if it is not, this function is still implemented, although support but even if it is not, this function is still implemented, although support
for locale-dependent format specifiers such as @c "%c", @c "%x" or @c "%X" may for locale-dependent format specifiers such as @c "%c", @c "%x" or @c "%X" may
not be perfect and GNU extensions such as @c "%z" and @c "%Z" are not be perfect and GNU extensions such as @c "%z" and @c "%Z" are
not implemented. This function does handle the month and weekday not implemented. This function does handle the month and weekday
names in the current locale on all platforms, however. names in the current locale on all platforms, however.
Please see the description of the ANSI C function @c strftime(3) for the syntax Please see the description of the ANSI C function @c strftime(3) for the syntax
of the format string. of the format string.
The @a dateDef parameter is used to fill in the fields which could not be
The @e dateDef parameter is used to fill in the fields which could not be
determined from the format string. For example, if the format is @c "%d" (the determined from the format string. For example, if the format is @c "%d" (the
ay of the month), the month and the year are taken from @e dateDef. If ay of the month), the month and the year are taken from @e dateDef. If
it is not specified, Today() is used as the it is not specified, Today() is used as the
default date. default date.
Returns @NULL if the conversion failed, otherwise return the pointer to Returns @NULL if the conversion failed, otherwise return the pointer to
the character which stopped the scan. the character which stopped the scan.
*/ */
const char * ParseFormat(const wxString& date, const char* ParseFormat(const wxString& date,
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);
//@} //@}
/** /**
This function parses the string containing the date and time in ISO 8601 This function parses the string containing the date and time in ISO 8601
combined format (YYYY-MM-DDTHH:MM:SS). The separator between the date and time combined format (YYYY-MM-DDTHH:MM:SS). The separator between the date and time
parts must be equal to @e sep for the function to succeed. parts must be equal to @a sep for the function to succeed.
Returns @true if the entire string was parsed successfully, @false Returns @true if the entire string was parsed successfully, @false
otherwise. otherwise.
*/ */
@@ -800,7 +777,6 @@ public:
/** /**
This function parses the date in ISO 8601 format (YYYY-MM-DD). This function parses the date in ISO 8601 format (YYYY-MM-DD).
Returns @true if the entire string was parsed successfully, @false Returns @true if the entire string was parsed successfully, @false
otherwise. otherwise.
*/ */
@@ -808,7 +784,6 @@ public:
/** /**
This function parses the time in ISO 8601 format (HH:MM:SS). This function parses the time in ISO 8601 format (HH:MM:SS).
Returns @true if the entire string was parsed successfully, @false Returns @true if the entire string was parsed successfully, @false
otherwise. otherwise.
*/ */
@@ -816,40 +791,37 @@ public:
//@{ //@{
/** /**
Parses the string @e date looking for a date formatted according to the RFC Parses the string @a date looking for a date formatted according to the RFC
822 in it. The exact description of this format may, of course, be found in 822 in it. The exact description of this format may, of course, be found in
the RFC (section 5), but, briefly, this is the format used in the headers of the RFC (section 5), but, briefly, this is the format used in the headers of
Internet email messages and one of the most common strings expressing date in Internet email messages and one of the most common strings expressing date in
this format may be something like @c "Sat, 18 Dec 1999 00:48:30 +0100". this format may be something like @c "Sat, 18 Dec 1999 00:48:30 +0100".
Returns @NULL if the conversion failed, otherwise return the pointer to Returns @NULL if the conversion failed, otherwise return the pointer to
the character immediately following the part of the string which could be the character immediately following the part of the string which could be
parsed. If the entire string contains only the date in RFC 822 format, parsed. If the entire string contains only the date in RFC 822 format,
the returned pointer will be pointing to a @c NUL character. the returned pointer will be pointing to a @c NUL character.
This function is intentionally strict, it will return an error for any string This function is intentionally strict, it will return an error for any string
which is not RFC 822 compliant. If you need to parse date formatted in more which is not RFC 822 compliant. If you need to parse date formatted in more
free ways, you should use ParseDateTime() or free ways, you should use ParseDateTime() or
ParseDate() instead. ParseDate() instead.
*/ */
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);
//@} //@}
//@{ //@{
/** /**
This functions is like ParseDateTime(), but This functions is like ParseDateTime(), but
only allows the time to be specified in the input string. only allows the time to be specified in the input string.
Returns @NULL if the conversion failed, otherwise return the pointer to Returns @NULL if the conversion failed, otherwise return the pointer to
the character which stopped the scan. the character which stopped the scan.
*/ */
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);
//@} //@}
/** /**
@@ -863,7 +835,6 @@ public:
FormatISOTime() and FormatISOTime() and
wxDateTime::FormatISOCombined) or by specifying any wxDateTime::FormatISOCombined) or by specifying any
format at all and using Format() directly. format at all and using Format() directly.
The conversions from text are more interesting, as there are much more The conversions from text are more interesting, as there are much more
possibilities to care about. The simplest cases can be taken care of with possibilities to care about. The simplest cases can be taken care of with
ParseFormat() which can parse any date in the ParseFormat() which can parse any date in the
@@ -872,7 +843,6 @@ public:
which (still...) defines the format of email messages on the Internet. This which (still...) defines the format of email messages on the Internet. This
format can not be described with @c strptime(3)-like format strings used by format can not be described with @c strptime(3)-like format strings used by
Format(), hence the need for a separate function. Format(), hence the need for a separate function.
But the most interesting functions are But the most interesting functions are
ParseTime(), ParseTime(),
ParseDate() and ParseDate() and
@@ -883,7 +853,6 @@ public:
format. As an example, ParseDateTime() can format. As an example, ParseDateTime() can
parse the strings such as @c "tomorrow", @c "March first" and even parse the strings such as @c "tomorrow", @c "March first" and even
@c "next Sunday". @c "next Sunday".
Finally notice that each of the parsing functions is available in several Finally notice that each of the parsing functions is available in several
overloads: if the input string is a narrow (@c char *) string, then a overloads: if the input string is a narrow (@c char *) string, then a
narrow pointer is returned. If the input string is a wide string, a wide char narrow pointer is returned. If the input string is a wide string, a wide char
@@ -891,7 +860,6 @@ public:
char pointer is also returned for backwards compatibility but there is also an char pointer is also returned for backwards compatibility but there is also an
additional argument of wxString::const_iterator type in which, if it is not additional argument of wxString::const_iterator type in which, if it is not
@NULL, an iterator pointing to the end of the scanned string part is returned. @NULL, an iterator pointing to the end of the scanned string part is returned.
ParseFormat() ParseFormat()
ParseDateTime() ParseDateTime()
@@ -930,21 +898,20 @@ 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, 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);
/** /**
Sets the country to use by default. This setting influences the DST Sets the country to use by default. This setting influences the DST
calculations, date formatting and other things. calculations, date formatting and other things.
The possible values for @a country parameter are enumerated in
The possible values for @e country parameter are enumerated in
@ref overview_wxdatetime "wxDateTime constants section". @ref overview_wxdatetime "wxDateTime constants section".
@sa GetCountry() @see GetCountry()
*/ */
static void SetCountry(Country country); static void SetCountry(Country country);
@@ -994,7 +961,6 @@ public:
/** /**
Sets the date to the last day in the specified month (the current one by Sets the date to the last day in the specified month (the current one by
default). default).
Returns the reference to the modified object itself. Returns the reference to the modified object itself.
*/ */
wxDateTime SetToLastMonthDay(Month month = Inv_Month, wxDateTime SetToLastMonthDay(Month month = Inv_Month,
@@ -1003,59 +969,52 @@ public:
/** /**
The effect of calling this function is the same as of calling The effect of calling this function is the same as of calling
@c SetToWeekDay(-1, weekday, month, year). The date will be set to the last @c SetToWeekDay(-1, weekday, month, year). The date will be set to the last
@e weekday in the given month and year (the current ones by default). @a weekday in the given month and year (the current ones by default).
Always returns @true. Always returns @true.
*/ */
bool SetToLastWeekDay(WeekDay weekday, Month month = Inv_Month, bool SetToLastWeekDay(WeekDay weekday, Month month = Inv_Month,
int year = Inv_Year); int year = Inv_Year);
/** /**
Sets the date so that it will be the first @e weekday following the current Sets the date so that it will be the first @a weekday following the current
date. date.
Returns the reference to the modified object itself. Returns the reference to the modified object itself.
*/ */
wxDateTime SetToNextWeekDay(WeekDay weekday); wxDateTime SetToNextWeekDay(WeekDay weekday);
/** /**
Sets the date so that it will be the last @e weekday before the current Sets the date so that it will be the last @a weekday before the current
date. date.
Returns the reference to the modified object itself. Returns the reference to the modified object itself.
*/ */
wxDateTime SetToPrevWeekDay(WeekDay weekday); wxDateTime SetToPrevWeekDay(WeekDay weekday);
/** /**
Sets the date to the @e n-th @e weekday in the given month of the given Sets the date to the @e n-th @a weekday in the given month of the given
year (the current month and year are used by default). The parameter @e n year (the current month and year are used by default). The parameter @e n
may be either positive (counting from the beginning of the month) or negative may be either positive (counting from the beginning of the month) or negative
(counting from the end of it). (counting from the end of it).
For example, @c SetToWeekDay(2, wxDateTime::Wed) will set the date to the For example, @c SetToWeekDay(2, wxDateTime::Wed) will set the date to the
second Wednesday in the current month and second Wednesday in the current month and
@c SetToWeekDay(-1, wxDateTime::Sun) -- to the last Sunday in it. @c SetToWeekDay(-1, wxDateTime::Sun) -- to the last Sunday in it.
Returns @true if the date was modified successfully, @false Returns @true if the date was modified successfully, @false
otherwise meaning that the specified date doesn't exist. otherwise meaning that the specified date doesn't exist.
*/ */
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
week day will be the given one. week day will be the given one.
Returns the reference to the modified object itself. Returns the reference to the modified object itself.
*/ */
wxDateTime SetToWeekDayInSameWeek(WeekDay weekday, wxDateTime SetToWeekDayInSameWeek(WeekDay weekday,
WeekFlags flags = Monday_First); WeekFlags flags = Monday_First);
/** /**
Set the date to the given @e weekday in the week number @e numWeek of the Set the date to the given @a weekday in the week number @a numWeek of the
given @e year . The number should be in range 1...53. given @a year . The number should be in range 1...53.
Note that the returned date may be in a different year than the one passed to Note that the returned date may be in a different year than the one passed to
this function because both the week 1 and week 52 or 53 (for leap years) this function because both the week 1 and week 52 or 53 (for leap years)
contain days from different years. See contain days from different years. See
@@ -1066,11 +1025,10 @@ public:
WeekDay weekday = Mon); WeekDay weekday = Mon);
/** /**
Sets the date to the day number @e yday in the same year (i.e., unlike the Sets the date to the day number @a yday in the same year (i.e., unlike the
other functions, this one does not use the current year). The day number other functions, this one does not use the current year). The day number
should be in the range 1...366 for the leap years and 1...365 for should be in the range 1...366 for the leap years and 1...365 for
the other ones. the other ones.
Returns the reference to the modified object itself. Returns the reference to the modified object itself.
*/ */
wxDateTime SetToYearDay(wxDateTime_t yday); wxDateTime SetToYearDay(wxDateTime_t yday);
@@ -1085,10 +1043,10 @@ public:
either set or return the static variables of wxDateSpan (the country), return either set or return the static variables of wxDateSpan (the country), return
the current moment, year, month or number of days in it, or do some general the current moment, year, month or number of days in it, or do some general
calendar-related actions. calendar-related actions.
Please note that although several function accept an extra @e Calendar Please note that although several function accept an extra @e Calendar
parameter, it is currently ignored as only the Gregorian calendar is parameter, it is currently ignored as only the Gregorian calendar is
supported. Future versions will support other calendars. supported. Future versions will support other calendars.
SetCountry() SetCountry()
GetCountry() GetCountry()
@@ -1138,7 +1096,6 @@ public:
/** /**
Please see the @ref overview_tdatetimezones "time zone overview" for more Please see the @ref overview_tdatetimezones "time zone overview" for more
information about time zones. Normally, these functions should be rarely used. information about time zones. Normally, these functions should be rarely used.
FromTimezone() FromTimezone()
ToTimezone() ToTimezone()
@@ -1160,24 +1117,23 @@ public:
/** /**
Transform the date to the given time zone. If @e noDST is @true, no Transform the date to the given time zone. If @a noDST is @true, no
DST adjustments will be made. DST adjustments will be made.
Returns the date in the new time zone. Returns the date in the new time zone.
*/ */
wxDateTime ToTimezone(const TimeZone& tz, bool noDST = @false); wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false);
/** /**
This is the same as calling ToTimezone() with This is the same as calling ToTimezone() with
the argument @c GMT0. the argument @c GMT0.
*/ */
#define wxDateTime ToUTC(bool noDST = @false) /* implementation is private */ wxDateTime ToUTC(bool noDST = false);
/** /**
Returns the object corresponding to the midnight of the current day (i.e. the Returns the object corresponding to the midnight of the current day (i.e. the
same as Now(), but the time part is set to 0). same as Now(), but the time part is set to 0).
@sa Now() @see Now()
*/ */
static wxDateTime Today(); static wxDateTime Today();
@@ -1186,15 +1142,15 @@ public:
milliseconds if a function to get time with such precision is available on the milliseconds if a function to get time with such precision is available on the
current platform (supported under most Unices and Win32). current platform (supported under most Unices and Win32).
@sa Now() @see Now()
*/ */
#define static wxDateTime UNow() /* implementation is private */ static wxDateTime UNow();
/** /**
Same as @ref settm() Set. Same as @ref settm() Set.
*/ */
wxDateTime operator(const struct tm& tm); wxDateTime operator(const struct tm& tm);
}; };
/** /**
@@ -1280,14 +1236,14 @@ public:
/** /**
Returns a date span object corresponding to one day. Returns a date span object corresponding to one day.
@sa Days() @see Days()
*/ */
#define static wxDateSpan Day() /* implementation is private */ static wxDateSpan Day();
/** /**
Returns a date span object corresponding to the given number of days. Returns a date span object corresponding to the given number of days.
@sa Day() @see Day()
*/ */
static wxDateSpan Days(int days); static wxDateSpan Days(int days);
@@ -1295,7 +1251,7 @@ public:
Returns the number of days (only, that it not counting the weeks component!) Returns the number of days (only, that it not counting the weeks component!)
in this date span. in this date span.
@sa GetTotalDays() @see GetTotalDays()
*/ */
int GetDays(); int GetDays();
@@ -1308,14 +1264,14 @@ public:
Returns the combined number of days in this date span, counting both weeks and Returns the combined number of days in this date span, counting both weeks and
days. It still doesn't take neither months nor years into the account. days. It still doesn't take neither months nor years into the account.
@sa GetWeeks(), GetDays() @see GetWeeks(), GetDays()
*/ */
int GetTotalDays(); int GetTotalDays();
/** /**
Returns the number of weeks in this date span. Returns the number of weeks in this date span.
@sa GetTotalDays() @see GetTotalDays()
*/ */
int GetWeeks(); int GetWeeks();
@@ -1327,14 +1283,14 @@ public:
/** /**
Returns a date span object corresponding to one month. Returns a date span object corresponding to one month.
@sa Months() @see Months()
*/ */
static wxDateSpan Month(); static wxDateSpan Month();
/** /**
Returns a date span object corresponding to the given number of months. Returns a date span object corresponding to the given number of months.
@sa Month() @see Month()
*/ */
static wxDateSpan Months(int mon); static wxDateSpan Months(int mon);
@@ -1342,7 +1298,6 @@ public:
/** /**
Returns the product of the date span by the specified @e factor. The Returns the product of the date span by the specified @e factor. The
product is computed by multiplying each of the components by the factor. product is computed by multiplying each of the components by the factor.
The first version returns a new object, the second and third ones modify this The first version returns a new object, the second and third ones modify this
object in place. object in place.
*/ */
@@ -1355,7 +1310,7 @@ public:
/** /**
Changes the sign of this date span. Changes the sign of this date span.
@sa Negate() @see Negate()
*/ */
wxDateSpan Neg(); wxDateSpan Neg();
wxDateSpan operator-(); wxDateSpan operator-();
@@ -1364,7 +1319,7 @@ public:
/** /**
Returns the date span with the opposite sign. Returns the date span with the opposite sign.
@sa Neg() @see Neg()
*/ */
wxDateSpan Negate(); wxDateSpan Negate();
@@ -1405,28 +1360,28 @@ public:
/** /**
Returns a date span object corresponding to one week. Returns a date span object corresponding to one week.
@sa Weeks() @see Weeks()
*/ */
static wxDateSpan Week(); static wxDateSpan Week();
/** /**
Returns a date span object corresponding to the given number of weeks. Returns a date span object corresponding to the given number of weeks.
@sa Week() @see Week()
*/ */
static wxDateSpan Weeks(int weeks); static wxDateSpan Weeks(int weeks);
/** /**
Returns a date span object corresponding to one year. Returns a date span object corresponding to one year.
@sa Years() @see Years()
*/ */
static wxDateSpan Year(); static wxDateSpan Year();
/** /**
Returns a date span object corresponding to the given number of years. Returns a date span object corresponding to the given number of years.
@sa Year() @see Year()
*/ */
static wxDateSpan Years(int years); static wxDateSpan Years(int years);
@@ -1473,7 +1428,7 @@ public:
Returns the absolute value of the timespan: does not modify the Returns the absolute value of the timespan: does not modify the
object. object.
*/ */
#define wxTimeSpan Abs() /* implementation is private */ wxTimeSpan Abs();
/** /**
GetSeconds() GetSeconds()
@@ -1507,7 +1462,7 @@ public:
/** /**
Returns the timespan for one day. Returns the timespan for one day.
*/ */
#define static wxTimespan Day() /* implementation is private */ static wxTimespan Day();
/** /**
Returns the timespan for the given number of days. Returns the timespan for the given number of days.
@@ -1520,37 +1475,30 @@ public:
H H
number of @b Hours number of @b Hours
M M
number of @b Minutes number of @b Minutes
S S
number of @b Seconds number of @b Seconds
l l
number of mi@b lliseconds number of mi@b lliseconds
D D
number of @b Days number of @b Days
E E
number of w@b Eeks number of w@b Eeks
% %
the percent character the percent character
Note that, for example, the number of hours in the description above is not Note that, for example, the number of hours in the description above is not
@@ -1558,15 +1506,13 @@ public:
time span of 50 hours this would be 50) or just the hour part of the time time span of 50 hours this would be 50) or just the hour part of the time
span, which would be 2 in this case as 50 hours is equal to 2 days and span, which would be 2 in this case as 50 hours is equal to 2 days and
2 hours. 2 hours.
wxTimeSpan resolves this ambiguity in the following way: if there had been, wxTimeSpan resolves this ambiguity in the following way: if there had been,
indeed, the @c %D format specified preceding the @c %H, then it is indeed, the @c %D format specified preceding the @c %H, then it is
interpreted as 2. Otherwise, it is 50. interpreted as 2. Otherwise, it is 50.
The same applies to all other format specifiers: if they follow a specifier of The same applies to all other format specifiers: if they follow a specifier of
larger unit, only the rest part is taken, otherwise the full value is used. larger unit, only the rest part is taken, otherwise the full value is used.
*/ */
wxString Format(const wxChar * format = wxDefaultTimeSpanFormat); wxString Format(const wxChar* format = wxDefaultTimeSpanFormat);
/** /**
Format() Format()

View File

@@ -32,20 +32,18 @@ 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
conv before you destroy this wxDataOutputStream instance! It is conv before you destroy this wxDataOutputStream instance! It is
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);
@@ -57,7 +55,7 @@ public:
~wxDataOutputStream(); ~wxDataOutputStream();
/** /**
If @e be_order is @true, all data will be written in big-endian If @a be_order is @true, all data will be written in big-endian
order, e.g. for reading on a Sparc or from Java-Streams (which order, e.g. for reading on a Sparc or from Java-Streams (which
always use big-endian order), otherwise data will be written in always use big-endian order), otherwise data will be written in
little-endian order. little-endian order.
@@ -67,52 +65,51 @@ public:
//@{ //@{
/** /**
Writes an array of 16 bit unsigned integer to the stream. The amount of Writes an array of 16 bit unsigned integer to the stream. The amount of
16 bit unsigned integer to write is specified with the @e size variable. 16 bit unsigned integer to write is specified with the @a 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);
//@} //@}
//@{ //@{
/** /**
Writes an array of 32 bit unsigned integer to the stream. The amount of Writes an array of 32 bit unsigned integer to the stream. The amount of
32 bit unsigned integer to write is specified with the @e size variable. 32 bit unsigned integer to write is specified with the @a 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);
//@} //@}
//@{ //@{
/** /**
Writes an array of 64 bit unsigned integer to the stream. The amount of Writes an array of 64 bit unsigned integer to the stream. The amount of
64 bit unsigned integer to write is specified with the @e size variable. 64 bit unsigned integer to write is specified with the @a 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);
//@} //@}
//@{ //@{
/** /**
Writes an array of bytes to the stream. The amount of bytes to write is Writes an array of bytes to the stream. The amount of bytes to write is
specified with the @e size variable. specified with the @a 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);
//@} //@}
//@{ //@{
/** /**
Writes an array of double to the stream. The amount of double to write is Writes an array of double to the stream. The amount of double to write is
specified with the @e size variable. specified with the @a 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);
//@} //@}
/** /**
Writes @e string to the stream. Actually, this method writes the size of Writes @a string to the stream. Actually, this method writes the size of
the string before writing @e string itself. the string before writing @a string itself.
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
@@ -169,18 +166,16 @@ 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);
@@ -192,7 +187,7 @@ public:
~wxDataInputStream(); ~wxDataInputStream();
/** /**
If @e be_order is @true, all data will be read in big-endian If @a 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).
@@ -202,61 +197,59 @@ public:
//@{ //@{
/** /**
Reads 16 bit unsigned integers from the stream in a specified buffer. the Reads 16 bit unsigned integers from the stream in a specified buffer. the
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 @a size variable.
*/ */
wxUint16 Read16(); wxUint16 Read16();
void Read16(wxUint16 * buffer, size_t size); void Read16(wxUint16* buffer, size_t size);
//@} //@}
//@{ //@{
/** /**
Reads 32 bit unsigned integers from the stream in a specified buffer. the Reads 32 bit unsigned integers from the stream in a specified buffer. the
amount of amount of
32 bit unsigned integer to read is specified by the @e size variable. 32 bit unsigned integer to read is specified by the @a size variable.
*/ */
wxUint32 Read32(); wxUint32 Read32();
void Read32(wxUint32 * buffer, size_t size); void Read32(wxUint32* buffer, size_t size);
//@} //@}
//@{ //@{
/** /**
Reads 64 bit unsigned integers from the stream in a specified buffer. the Reads 64 bit unsigned integers from the stream in a specified buffer. the
amount of amount of
64 bit unsigned integer to read is specified by the @e size variable. 64 bit unsigned integer to read is specified by the @a size variable.
*/ */
wxUint64 Read64(); wxUint64 Read64();
void Read64(wxUint64 * buffer, size_t size); void Read64(wxUint64* buffer, size_t size);
//@} //@}
//@{ //@{
/** /**
Reads bytes from the stream in a specified buffer. The amount of Reads bytes from the stream in a specified buffer. The amount of
bytes to read is specified by the @e size variable. bytes to read is specified by the @a size variable.
*/ */
wxUint8 Read8(); wxUint8 Read8();
void Read8(wxUint8 * buffer, size_t size); void Read8(wxUint8* buffer, size_t size);
//@} //@}
//@{ //@{
/** /**
Reads double data (IEEE encoded) from the stream in a specified buffer. the Reads double data (IEEE encoded) from the stream in a specified buffer. the
amount of amount of
double to read is specified by the @e size variable. double to read is specified by the @a 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*)
string from the stream and then converts it to Unicode using the @e conv string from the stream and then converts it to Unicode using the @e conv
object passed to constructor and returns the result as wxString. You are object passed to constructor and returns the result as wxString. You are
responsible for using the same convertor as when writing the stream. responsible for using the same convertor as when writing the stream.
See also wxDataOutputStream::WriteString. See also wxDataOutputStream::WriteString.
*/ */
wxString ReadString(); wxString ReadString();

View File

@@ -42,78 +42,72 @@ public:
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
the bitmap with the bitmap
selected into the source device context. The Windows implementation does the selected into the source device context. The Windows implementation does
following if MaskBlt cannot be used: the following if MaskBlt cannot be used:
Creates a temporary bitmap and copies the destination area into it.
Copies the source area into the temporary bitmap using the specified logical
function.
Sets the masked area in the temporary bitmap to BLACK by ANDing the
mask bitmap with the temp bitmap with the foreground colour set to WHITE
and the bg colour set to BLACK.
Sets the unmasked area in the destination area to BLACK by ANDing the
mask bitmap with the destination area with the foreground colour set to BLACK
and the background colour set to WHITE.
ORs the temporary bitmap with the destination area.
Deletes the temporary bitmap.
This sequence of operations ensures that the source's transparent area need not Creates a temporary bitmap and copies the destination area into it.
be black, Copies the source area into the temporary bitmap using the specified
and logical functions are supported. logical function.
Sets the masked area in the temporary bitmap to BLACK by ANDing the
mask bitmap with the temp bitmap with the foreground colour set to WHITE
and the bg colour set to BLACK.
Sets the unmasked area in the destination area to BLACK by ANDing the
mask bitmap with the destination area with the foreground colour set to
BLACK
and the background colour set to WHITE.
ORs the temporary bitmap with the destination area.
Deletes the temporary bitmap.
Note: on Windows, blitting with masks can be speeded up considerably by
This sequence of operations ensures that the source's transparent area need
not be black,
and logical functions are supported.
Note: on Windows, blitting with masks can be speeded up considerably by
compiling compiling
wxWidgets with the wxUSE_DC_CACHE option enabled. You can also influence wxWidgets with the wxUSE_DC_CACHE option enabled. You can also influence
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
setting the no-maskblt option to 1. and
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
ysrc and 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
ysrc and 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.
@remarks There is partial support for Blit in wxPostScriptDC, under X. @remarks There is partial support for Blit in wxPostScriptDC, under X.
@sa StretchBlit(), wxMemoryDC, wxBitmap, wxMask @see StretchBlit(), wxMemoryDC, wxBitmap, wxMask
*/ */
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width,
wxCoord height, wxDC* source, wxCoord height, wxDC* source,
wxCoord xsrc, wxCoord ysrc, wxCoord xsrc, wxCoord ysrc,
int logicalFunc = wxCOPY, int logicalFunc = wxCOPY,
bool useMask = @false, bool useMask = false,
wxCoord xsrcMask = -1, wxCoord xsrcMask = -1,
wxCoord ysrcMask = -1); wxCoord ysrcMask = -1);
@@ -122,7 +116,7 @@ public:
MinX(), MaxX() and MinX(), MaxX() and
MinY(), MaxY() functions. MinY(), MaxY() functions.
@sa ResetBoundingBox() @see ResetBoundingBox()
*/ */
void CalcBoundingBox(wxCoord x, wxCoord y); void CalcBoundingBox(wxCoord x, wxCoord y);
@@ -182,7 +176,6 @@ public:
y1) y1)
and ending at (@e x2, y2). The current pen is used for the outline and ending at (@e x2, y2). The current pen is used for the outline
and the current brush for filling the shape. and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to the end The arc is drawn in an anticlockwise direction from the start point to the end
point. point.
*/ */
@@ -190,10 +183,9 @@ public:
wxCoord xc, wxCoord yc); wxCoord xc, wxCoord yc);
/** /**
Draw a bitmap on the device context at the specified point. If @e transparent Draw a bitmap on the device context at the specified point. If @a transparent
is @true and the bitmap has is @true and the bitmap has
a transparency mask, the bitmap will be drawn transparently. a transparency mask, the bitmap will be drawn transparently.
When drawing a mono-bitmap, the current text foreground colour will be used to When drawing a mono-bitmap, the current text foreground colour will be used to
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
@@ -210,14 +202,14 @@ 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);
//@} //@}
//@{ //@{
/** /**
Draws a circle with the given centre and radius. Draws a circle with the given centre and radius.
@sa DrawEllipse() @see 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);
@@ -229,7 +221,7 @@ public:
left corner and the given size or directly. The current pen is used for the left corner and the given size or directly. The current pen is used for the
outline and the current brush for filling the shape. outline and the current brush for filling the shape.
@sa DrawCircle() @see DrawCircle()
*/ */
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
@@ -240,20 +232,17 @@ public:
/** /**
Draws an arc of an ellipse. The current pen is used for drawing the arc and Draws an arc of an ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie. the current brush is used for drawing the pie.
@a x and @a y specify the x and y coordinates of the upper-left corner of the
@e x and @e y specify the x and y coordinates of the upper-left corner of the
rectangle that contains rectangle that contains
the ellipse. the ellipse.
@a width and @a height specify the width and height of the rectangle that
@e width and @e height specify the width and height of the rectangle that
contains contains
the ellipse. the ellipse.
@a start and @a end specify the start and end of the arc relative to the
@e start and @e end specify the start and end of the arc relative to the
three-o'clock three-o'clock
position from the center of the rectangle. Angles are specified position from the center of the rectangle. Angles are specified
in degrees (360 is a complete circle). Positive values mean in degrees (360 is a complete circle). Positive values mean
counter-clockwise motion. If @e start is equal to @e end, a counter-clockwise motion. If @a start is equal to @e end, a
complete ellipse will be drawn. complete ellipse will be drawn.
*/ */
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width, void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width,
@@ -280,7 +269,7 @@ public:
const wxRect& rect, const wxRect& rect,
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,7 +291,7 @@ 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);
//@} //@}
@@ -316,21 +305,16 @@ public:
/** /**
Draws two or more filled polygons using an array of @e points, adding the Draws two or more filled polygons using an array of @e points, adding the
optional offset coordinates. optional offset coordinates.
Notice that for the platforms providing a native implementation Notice that for the platforms providing a native implementation
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.
@a 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 @a 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)
or @b wxWINDING_RULE. or @b wxWINDING_RULE.
The current pen is used for drawing the outline, and the current brush for The current pen is used for drawing the outline, and the current brush for
filling the shape. Using a transparent brush suppresses filling. filling the shape. Using a transparent brush suppresses filling.
The polygons maybe disjoint or overlapping. Each polygon specified in a call to The polygons maybe disjoint or overlapping. Each polygon specified in a call to
@b DrawPolyPolygon must be closed. Unlike polygons created by the @b DrawPolyPolygon must be closed. Unlike polygons created by the
DrawPolygon() member function, the polygons created by DrawPolygon() member function, the polygons created by
@@ -345,20 +329,17 @@ public:
/** /**
This method draws a filled polygon using a list of wxPoints, This method draws a filled polygon using a list of wxPoints,
adding the optional offset coordinate. adding the optional offset coordinate.
The last argument specifies the fill rule: @b wxODDEVEN_RULE (the The last argument specifies the fill rule: @b wxODDEVEN_RULE (the
default) or @b wxWINDING_RULE. default) or @b wxWINDING_RULE.
The current pen is used for drawing the outline, and the current brush The current pen is used for drawing the outline, and the current brush
for filling the shape. Using a transparent brush suppresses filling. for filling the shape. Using a transparent brush suppresses filling.
The programmer is responsible for deleting the list of points. The programmer is responsible for deleting the list of points.
Note that wxWidgets automatically closes the first and last points. Note that wxWidgets automatically closes the first and last points.
*/ */
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);
@@ -373,14 +354,13 @@ public:
wxCoord height); wxCoord height);
/** /**
Draws the text rotated by @e angle degrees. Draws the text rotated by @a angle degrees.
@b NB: Under Win9x only TrueType fonts can be drawn by this function. In @b NB: Under Win9x only TrueType fonts can be drawn by this function. In
particular, a font different from @c wxNORMAL_FONT should be used as the particular, a font different from @c wxNORMAL_FONT should be used as the
latter is not a TrueType font. @c wxSWISS_FONT is an example of a font latter is not a TrueType font. @c wxSWISS_FONT is an example of a font
which is. which is.
@sa DrawText() @see DrawText()
*/ */
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
double angle); double angle);
@@ -390,9 +370,8 @@ public:
size. The corners are quarter-circles using the given radius. The size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling current pen is used for the outline and the current brush for filling
the shape. the shape.
If @a radius is positive, the value is assumed to be the
If @e radius is positive, the value is assumed to be the radius of the rounded corner. If @a radius is negative,
radius of the rounded corner. If @e radius is negative,
the absolute value is assumed to be the @e proportion of the smallest the absolute value is assumed to be the @e proportion of the smallest
dimension of the rectangle. This means that the corner can be dimension of the rectangle. This means that the corner can be
a sensible size relative to the size of the rectangle, and also avoids a sensible size relative to the size of the rectangle, and also avoids
@@ -408,7 +387,7 @@ 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,
@@ -418,12 +397,10 @@ public:
/** /**
Draws a text string at the specified point, using the current text font, Draws a text string at the specified point, using the current text font,
and the current text foreground and background colours. and the current text foreground and background colours.
The coordinates refer to the top-left corner of the rectangle bounding The coordinates refer to the top-left corner of the rectangle bounding
the string. See GetTextExtent() for how the string. See GetTextExtent() for how
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
@@ -444,19 +421,16 @@ public:
/** /**
Flood fills the device context starting from the given point, using Flood fills the device context starting from the given point, using
the @e current brush colour, and using a style: the @e current brush colour, and using a style:
wxFLOOD_SURFACE: the flooding occurs until a colour other than the given wxFLOOD_SURFACE: the flooding occurs until a colour other than the given
colour is encountered. colour is encountered.
wxFLOOD_BORDER: the area to be flooded is bounded by the given colour. wxFLOOD_BORDER: the area to be flooded is bounded by the given colour.
Returns @false if the operation failed. Returns @false if the operation failed.
@e Note: The present implementation for non-Windows platforms may fail to find @e Note: The present implementation for non-Windows platforms may fail to find
colour borders if the pixels do not match the colour exactly. However the colour borders if the pixels do not match the colour exactly. However the
function will still return @true. function will still return @true.
*/ */
bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour, bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
int style=wxFLOOD_SURFACE); int style = wxFLOOD_SURFACE);
/** /**
Gets the brush used for painting the background (see wxDC::SetBackground). Gets the brush used for painting the background (see wxDC::SetBackground).
@@ -466,7 +440,7 @@ public:
/** /**
Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT. Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT.
@sa SetBackgroundMode() @see SetBackgroundMode()
*/ */
int GetBackgroundMode(); int GetBackgroundMode();
@@ -494,7 +468,7 @@ public:
/** /**
Returns the depth (number of bits/pixel) of this DC. Returns the depth (number of bits/pixel) of this DC.
@sa wxDisplayDepth @see wxDisplayDepth
*/ */
int GetDepth(); int GetDepth();
@@ -513,7 +487,7 @@ public:
@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() @see SetLayoutDirection()
*/ */
wxLayoutDirection GetLayoutDirection(); wxLayoutDirection GetLayoutDirection();
@@ -530,41 +504,38 @@ public:
//@{ //@{
/** /**
Gets the dimensions of the string using the currently selected font. Gets the dimensions of the string using the currently selected font.
@e string is the text string to measure, @e heightLine, if non @NULL, @a string is the text string to measure, @e heightLine, if non @NULL,
is where to store the height of a single line. is where to store the height of a single line.
The text extent is returned in @a w and @a h pointers (first form) or as
The text extent is returned in @e w and @e h pointers (first form) or as
a wxSize object (second form). a wxSize object (second form).
If the optional parameter @a font is specified and valid, then it is used
If the optional parameter @e font is specified and valid, then it is used
for the text extent calculation. Otherwise the currently selected font is. for the text extent calculation. Otherwise the currently selected font is.
Note that this function works both with single-line and multi-line strings. Note that this function works both with single-line and multi-line strings.
@sa wxFont, SetFont(), GetPartialTextExtents(), GetTextExtent() @see wxFont, SetFont(), GetPartialTextExtents(), GetTextExtent()
*/ */
void GetMultiLineTextExtent(const wxString& string, wxCoord * w, void GetMultiLineTextExtent(const wxString& string, wxCoord* w,
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);
//@} //@}
/** /**
Returns the resolution of the device in pixels per inch. Returns the resolution of the device in pixels per inch.
*/ */
#define wxSize GetPPI() /* implementation is private */ wxSize GetPPI();
/** /**
Fills the @e widths array with the widths from the beginning of Fills the @a widths array with the widths from the beginning of
@e text to the corresponding character of @e text. The generic @a 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() @see GetMultiLineTextExtent(), GetTextExtent()
*/ */
bool GetPartialTextExtents(const wxString& text, bool GetPartialTextExtents(const wxString& text,
wxArrayInt& widths); wxArrayInt& widths);
@@ -575,12 +546,11 @@ public:
const wxPen GetPen(); const wxPen GetPen();
/** /**
Gets in @e colour the colour at the specified location. Gets in @a colour the colour at the specified location.
Not available for wxPostScriptDC or wxMetafileDC. Not available for wxPostScriptDC or wxMetafileDC.
Note that setting a pixel can be done using DrawPoint(). Note that setting a pixel can be done using DrawPoint().
*/ */
bool GetPixel(wxCoord x, wxCoord y, wxColour * colour); bool GetPixel(wxCoord x, wxCoord y, wxColour* colour);
//@{ //@{
/** /**
@@ -592,19 +562,16 @@ public:
printer page: printer page:
@b GetSize() @b GetSize()
Returns a Wx::Size Returns a Wx::Size
@b GetSizeWH() @b GetSizeWH()
Returns a 2-element list Returns a 2-element list
@c ( width, height ) @c ( width, height )
*/ */
void GetSize(wxCoord * width, wxCoord * height); void GetSize(wxCoord* width, wxCoord* height);
wxSize GetSize(); wxSize GetSize();
//@} //@}
@@ -612,7 +579,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();
//@} //@}
@@ -624,27 +591,24 @@ public:
//@{ //@{
/** /**
Gets the dimensions of the string using the currently selected font. Gets the dimensions of the string using the currently selected font.
@e string is the text string to measure, @e descent is the @a string is the text string to measure, @a descent is the
dimension from the baseline of the font to the bottom of the dimension from the baseline of the font to the bottom of the
descender, and @e externalLeading is any extra vertical space added descender, and @a externalLeading is any extra vertical space added
to the font by the font designer (usually is zero). to the font by the font designer (usually is zero).
The text extent is returned in @a w and @a h pointers (first form) or as
The text extent is returned in @e w and @e h pointers (first form) or as
a wxSize object (second form). a wxSize object (second form).
If the optional parameter @a font is specified and valid, then it is used
If the optional parameter @e font is specified and valid, then it is used
for the text extent calculation. Otherwise the currently selected font is. for the text extent calculation. Otherwise the currently selected font is.
Note that this function only works with single-line strings. Note that this function only works with single-line strings.
@sa wxFont, SetFont(), GetPartialTextExtents(), @see wxFont, SetFont(), GetPartialTextExtents(),
GetMultiLineTextExtent() GetMultiLineTextExtent()
*/ */
void GetTextExtent(const wxString& string, wxCoord * w, void GetTextExtent(const wxString& string, wxCoord* w,
wxCoord * h, wxCoord* h,
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);
//@} //@}
@@ -661,13 +625,11 @@ 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 @a initialColour at the centre of the circle and fading to @a destColour
on the circle outside. on the circle outside.
@a circleCenter are the relative coordinates of centre of the circle in
@e circleCenter are the relative coordinates of centre of the circle in
the specified @e rect. If not specified, the cercle is placed at the the specified @e rect. If not specified, the cercle is placed at the
centre of rect. centre of rect.
@b Note: Currently this function is very slow, don't use it for @b Note: Currently this function is very slow, don't use it for
real-time drawing. real-time drawing.
*/ */
@@ -681,11 +643,11 @@ public:
//@} //@}
/** /**
Fill the area specified by @e rect with a linear gradient, starting from Fill the area specified by @a rect with a linear gradient, starting from
@e initialColour and eventually fading to @e destColour. The @a initialColour and eventually fading to @e destColour. The
@e nDirection specifies the direction of the colour change, default is to @a nDirection specifies the direction of the colour change, default is to
use @e initialColour on the left part of the rectangle and use @a initialColour on the left part of the rectangle and
@e destColour on the right one. @a destColour on the right one.
*/ */
void GradientFillLinear(const wxRect& rect, void GradientFillLinear(const wxRect& rect,
const wxColour& initialColour, const wxColour& initialColour,
@@ -695,7 +657,7 @@ public:
/** /**
Returns @true if the DC is ok to use. Returns @true if the DC is ok to use.
*/ */
#define bool Ok() /* implementation is private */ bool Ok();
/** /**
Converts logical X coordinate to device coordinate, using the current Converts logical X coordinate to device coordinate, using the current
@@ -726,28 +688,28 @@ public:
/** /**
Gets the maximum horizontal extent used in drawing commands so far. Gets the maximum horizontal extent used in drawing commands so far.
*/ */
#define wxCoord MaxX() /* implementation is private */ wxCoord MaxX();
/** /**
Gets the maximum vertical extent used in drawing commands so far. Gets the maximum vertical extent used in drawing commands so far.
*/ */
#define wxCoord MaxY() /* implementation is private */ wxCoord MaxY();
/** /**
Gets the minimum horizontal extent used in drawing commands so far. Gets the minimum horizontal extent used in drawing commands so far.
*/ */
#define wxCoord MinX() /* implementation is private */ wxCoord MinX();
/** /**
Gets the minimum vertical extent used in drawing commands so far. Gets the minimum vertical extent used in drawing commands so far.
*/ */
#define wxCoord MinY() /* implementation is private */ wxCoord MinY();
/** /**
Resets the bounding box: after a call to this function, the bounding box Resets the bounding box: after a call to this function, the bounding box
doesn't contain anything. doesn't contain anything.
@sa CalcBoundingBox() @see CalcBoundingBox()
*/ */
void ResetBoundingBox(); void ResetBoundingBox();
@@ -757,12 +719,11 @@ public:
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.
*/ */
void SetAxisOrientation(bool xLeftRight, bool yBottomUp); void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
@@ -772,20 +733,17 @@ public:
void SetBackground(const wxBrush& brush); void SetBackground(const wxBrush& brush);
/** /**
@e mode may be one of wxSOLID and wxTRANSPARENT. This setting determines @a mode may be one of wxSOLID and wxTRANSPARENT. This setting determines
whether text will be drawn with a background colour or not. whether text will be drawn with a background colour or not.
*/ */
void SetBackgroundMode(int mode); void SetBackgroundMode(int mode);
/** /**
Sets the current brush for the DC. Sets the current brush for the DC.
If the argument is wxNullBrush, the current brush is selected out of the device If the argument is wxNullBrush, the current brush is selected out of the device
context (leaving wxDC without any valid brush), allowing the current brush to context (leaving wxDC without any valid brush), allowing the current brush to
be destroyed safely. be destroyed safely.
See also wxBrush. See also wxBrush.
See also wxMemoryDC for the interpretation of colours See also wxMemoryDC for the interpretation of colours
when drawing into a monochrome bitmap. when drawing into a monochrome bitmap.
*/ */
@@ -798,12 +756,11 @@ public:
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.
The clipping region is an area to which drawing is restricted. Possible uses The clipping region is an area to which drawing is restricted. Possible uses
for the clipping region are for clipping text or for speeding up window redraws for the clipping region are for clipping text or for speeding up window redraws
when only a known area of the screen is damaged. when only a known area of the screen is damaged.
@sa DestroyClippingRegion(), wxRegion @see DestroyClippingRegion(), wxRegion
*/ */
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
@@ -815,7 +772,6 @@ public:
/** /**
Sets the device origin (i.e., the origin in pixels after scaling has been Sets the device origin (i.e., the origin in pixels after scaling has been
applied). applied).
This function may be useful in Windows printing This function may be useful in Windows printing
operations for placing a graphic on a page. operations for placing a graphic on a page.
*/ */
@@ -824,16 +780,15 @@ public:
/** /**
Sets the current font for the DC. It must be a valid font, in particular you Sets the current font for the DC. It must be a valid font, in particular you
should not pass @c wxNullFont to this method. should not pass @c wxNullFont to this method.
See also wxFont. See also wxFont.
*/ */
void SetFont(const wxFont& font); void SetFont(const wxFont& font);
/** /**
Sets the current layout direction for the device context. @e dir may be either Sets the current layout direction for the device context. @a dir may be either
@c wxLayout_Default, @c wxLayout_LeftToRight or @c wxLayout_RightToLeft. @c wxLayout_Default, @c wxLayout_LeftToRight or @c wxLayout_RightToLeft.
@sa GetLayoutDirection() @see GetLayoutDirection()
*/ */
void SetLayoutDirection(wxLayoutDirection dir); void SetLayoutDirection(wxLayoutDirection dir);
@@ -842,10 +797,10 @@ public:
a source pixel (from a pen or brush colour, or source device context if a source pixel (from a pen or brush colour, or source device context if
using wxDC::Blit) combines with a destination pixel in the using wxDC::Blit) combines with a destination pixel in the
current device context. current device context.
The possible values The possible values
and their meaning in terms of source and destination pixel values are and their meaning in terms of source and destination pixel values are
as follows: as follows:
The default is wxCOPY, which simply draws with the current colour. The default is wxCOPY, which simply draws with the current colour.
The others combine the current colour and the background using a The others combine the current colour and the background using a
logical operation. wxINVERT is commonly used for drawing rubber bands or logical operation. wxINVERT is commonly used for drawing rubber bands or
@@ -861,38 +816,30 @@ public:
wxDC::SetUserScale) scales the text appropriately. In wxDC::SetUserScale) scales the text appropriately. In
Windows, scalable TrueType fonts are always used; in X, results depend Windows, scalable TrueType fonts are always used; in X, results depend
on availability of fonts, but usually a reasonable match is found. on availability of fonts, but usually a reasonable match is found.
The coordinate origin is always at the top left of the screen/printer. The coordinate origin is always at the top left of the screen/printer.
Drawing to a Windows printer device context uses the current mapping mode, Drawing to a Windows printer device context uses the current mapping mode,
but mapping mode is currently ignored for PostScript output. but mapping mode is currently ignored for PostScript output.
The mapping mode can be one of the following: The mapping mode can be one of the following:
wxMM_TWIPS wxMM_TWIPS
Each logical unit is 1/20 of a point, or 1/1440 of Each logical unit is 1/20 of a point, or 1/1440 of
an inch. an inch.
wxMM_POINTS wxMM_POINTS
Each logical unit is a point, or 1/72 of an inch. Each logical unit is a point, or 1/72 of an inch.
wxMM_METRIC wxMM_METRIC
Each logical unit is 1 mm. Each logical unit is 1 mm.
wxMM_LOMETRIC wxMM_LOMETRIC
Each logical unit is 1/10 of a mm. Each logical unit is 1/10 of a mm.
wxMM_TEXT wxMM_TEXT
Each logical unit is 1 device pixel. Each logical unit is 1 device pixel.
*/ */
void SetMapMode(int int); void SetMapMode(int int);
@@ -902,18 +849,15 @@ public:
or bitmap associated with the DC. If the argument is wxNullPalette, the current or bitmap associated with the DC. If the argument is wxNullPalette, the current
palette is selected out of the device context, and the original palette palette is selected out of the device context, and the original palette
restored. restored.
See wxPalette for further details. See wxPalette for further details.
*/ */
void SetPalette(const wxPalette& palette); void SetPalette(const wxPalette& palette);
/** /**
Sets the current pen for the DC. Sets the current pen for the DC.
If the argument is wxNullPen, the current pen is selected out of the device If the argument is wxNullPen, the current pen is selected out of the device
context (leaving wxDC without any valid pen), allowing the current brush to context (leaving wxDC without any valid pen), allowing the current brush to
be destroyed safely. be destroyed safely.
See also wxMemoryDC for the interpretation of colours See also wxMemoryDC for the interpretation of colours
when drawing into a monochrome bitmap. when drawing into a monochrome bitmap.
*/ */
@@ -926,7 +870,6 @@ public:
/** /**
Sets the current text foreground colour for the DC. Sets the current text foreground colour for the DC.
See also wxMemoryDC for the interpretation of colours See also wxMemoryDC for the interpretation of colours
when drawing into a monochrome bitmap. when drawing into a monochrome bitmap.
*/ */
@@ -956,73 +899,65 @@ public:
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
the bitmap with the bitmap
selected into the source device context. The Windows implementation does the selected into the source device context. The Windows implementation does
following if MaskBlt cannot be used: the following if MaskBlt cannot be used:
Creates a temporary bitmap and copies the destination area into it.
Copies the source area into the temporary bitmap using the specified logical
function.
Sets the masked area in the temporary bitmap to BLACK by ANDing the
mask bitmap with the temp bitmap with the foreground colour set to WHITE
and the background colour set to BLACK.
Sets the unmasked area in the destination area to BLACK by ANDing the
mask bitmap with the destination area with the foreground colour set to BLACK
and the background colour set to WHITE.
ORs the temporary bitmap with the destination area.
Deletes the temporary bitmap.
This sequence of operations ensures that the source's transparent area need not Creates a temporary bitmap and copies the destination area into it.
be black, Copies the source area into the temporary bitmap using the specified
and logical functions are supported. logical function.
Sets the masked area in the temporary bitmap to BLACK by ANDing the
mask bitmap with the temp bitmap with the foreground colour set to WHITE
and the background colour set to BLACK.
Sets the unmasked area in the destination area to BLACK by ANDing the
mask bitmap with the destination area with the foreground colour set to
BLACK
and the background colour set to WHITE.
ORs the temporary bitmap with the destination area.
Deletes the temporary bitmap.
Note: on Windows, blitting with masks can be speeded up considerably by
This sequence of operations ensures that the source's transparent area need
not be black,
and logical functions are supported.
Note: on Windows, blitting with masks can be speeded up considerably by
compiling compiling
wxWidgets with the wxUSE_DC_CACHE option enabled. You can also influence wxWidgets with the wxUSE_DC_CACHE option enabled. You can also influence
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
setting the no-maskblt option to 1. and
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
ysrc and 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
ysrc and 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.
@remarks There is partial support for Blit in wxPostScriptDC, under X. @remarks There is partial support for Blit in wxPostScriptDC, under X.
@@ -1034,7 +969,7 @@ public:
wxCoord srcWidth, wxCoord srcWidth,
wxCoord srcHeight, wxCoord srcHeight,
int logicalFunc = wxCOPY, int logicalFunc = wxCOPY,
bool useMask = @false, bool useMask = false,
wxCoord xsrcMask = -1, wxCoord xsrcMask = -1,
wxCoord ysrcMask = -1); wxCoord ysrcMask = -1);
}; };
@@ -1075,10 +1010,9 @@ class wxDCClipper
public: public:
//@{ //@{
/** /**
Sets the clipping region to the specified region @e r or rectangle specified Sets the clipping region to the specified region @a r or rectangle specified
by either a single @e rect parameter or its position (@e x and @e y) by either a single @a rect parameter or its position (@a x and @e y)
and size (@e w ad @e h). and size (@a w ad @e h).
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);

View File

@@ -48,37 +48,35 @@ 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
should have appropriate size, anything drawn outside of its bounds is clipped.
@param style
wxBUFFER_CLIENT_AREA to indicate that just the client area of
the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the buffer
bitmap bitmap
covers the virtual area (in which case PrepareDC is automatically called for should have appropriate size, anything drawn outside of its bounds is
the actual window clipped.
device context). @param style
wxBUFFER_CLIENT_AREA to indicate that just the client area of
the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the
buffer bitmap
covers the virtual area (in which case PrepareDC is automatically called
for the actual window
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);
//@} //@}
@@ -93,9 +91,9 @@ public:
These functions initialize the object created using the default constructor. These functions initialize the object created using the default constructor.
Please see @ref ctor() "constructors documentation" for details. Please see @ref ctor() "constructors documentation" for details.
*/ */
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);
//@} //@}
}; };
@@ -131,7 +129,7 @@ public:
/** /**
Constructor. Pass a pointer to the window on which you wish to paint. Constructor. Pass a pointer to the window on which you wish to paint.
*/ */
wxAutoBufferedPaintDC(wxWindow * window); wxAutoBufferedPaintDC(wxWindow* window);
}; };
@@ -165,8 +163,7 @@ public:
As with @ref wxBufferedDC::ctor wxBufferedDC, you may either provide the As with @ref wxBufferedDC::ctor wxBufferedDC, you may either provide the
bitmap to be used for buffering or let this object create one internally (in bitmap to be used for buffering or let this object create one internally (in
the latter case, the size of the client part of the window is used). the latter case, the size of the client part of the window is used).
Pass wxBUFFER_CLIENT_AREA for the @a style parameter to indicate that just the
Pass wxBUFFER_CLIENT_AREA for the @e style parameter to indicate that just the
client area of 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
@@ -174,9 +171,9 @@ public:
the actual window the actual window
device context). device context).
*/ */
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

@@ -41,17 +41,15 @@ public:
this is the function you should use when you select a bitmap because you want this is the function you should use when you select a bitmap because you want
to modify to modify
it, e.g. drawing on this DC. it, e.g. drawing on this DC.
Using SelectObjectAsSource() when modifying Using SelectObjectAsSource() when modifying
the bitmap may incurr some problems related to wxBitmap being a reference the bitmap may incurr some problems related to wxBitmap being a reference
counted object counted object
(see @ref overview_trefcount "reference counting overview"). (see @ref overview_trefcount "reference counting overview").
Also, before using the updated bitmap data, make sure to select it out of Also, before using the updated bitmap data, make sure to select it out of
context first context first
(for example by selecting wxNullBitmap into the device context). (for example by selecting wxNullBitmap into the device context).
@sa wxDC::DrawBitmap @see wxDC::DrawBitmap
*/ */
void SelectObject(wxBitmap& bitmap); void SelectObject(wxBitmap& bitmap);
@@ -61,7 +59,6 @@ public:
the DC (and therefore the bitmap) and also to use wxDC::Blit to copy the DC (and therefore the bitmap) and also to use wxDC::Blit to copy
the bitmap to a window. For this purpose, you may find wxDC::DrawIcon the bitmap to a window. For this purpose, you may find wxDC::DrawIcon
easier to use instead. easier to use instead.
If the argument is wxNullBitmap (or some other uninitialised wxBitmap) the If the argument is wxNullBitmap (or some other uninitialised wxBitmap) the
current bitmap is current bitmap is
selected out of the device context, and the original bitmap restored, allowing selected out of the device context, and the original bitmap restored, allowing

View File

@@ -27,8 +27,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.
@a 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

@@ -28,17 +28,16 @@ public:
/** /**
Constructor. With empty strings for the first three arguments, the default Constructor. With empty strings for the first three arguments, the default
printer dialog is printer dialog is
displayed. @e device indicates the type of printer and @e output displayed. @a device indicates the type of printer and @e output
is an optional file for printing to. The @e driver parameter is is an optional file for printing to. The @a driver parameter is
currently unused. Use the @e Ok member to test whether the currently unused. Use the @e Ok member to test whether the
constructor was successful in creating a usable device context. constructor was successful in creating a usable device context.
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

@@ -22,23 +22,20 @@ class wxPostScriptDC : public wxDC
public: public:
//@{ //@{
/** /**
Constructor. @e output is an optional file for printing to, and if Constructor. @a output is an optional file for printing to, and if
@e interactive is @true a dialog box will be displayed for adjusting @a interactive is @true a dialog box will be displayed for adjusting
various parameters. @e parent is the parent of the printer dialog box. various parameters. @a parent is the parent of the printer dialog box.
Use the @e Ok member to test whether the constructor was successful Use the @e Ok member to test whether the constructor was successful
in creating a usable device context. in creating a usable device context.
See @ref overview_printersettings "Printer settings" for functions to set and See @ref overview_printersettings "Printer settings" for functions to set and
get PostScript printing settings. get PostScript printing settings.
This constructor and the global printer settings are now deprecated; This constructor and the global printer settings are now deprecated;
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);
//@} //@}
/** /**
@@ -84,7 +81,7 @@ void wxSetPrinterOptions(const wxString& options);
Gets the translation (from the top left corner) for PostScript output. The Gets the translation (from the top left corner) for PostScript output. The
default is 0.0, 0.0. default is 0.0, 0.0.
*/ */
void wxGetPrinterTranslation(float * x, float * y); void wxGetPrinterTranslation(float* x, float* y);
/** /**
Sets the scaling factor for PostScript output. The default is 1.0, 1.0. Sets the scaling factor for PostScript output. The default is 1.0, 1.0.
@@ -135,7 +132,7 @@ int wxGetPrinterMode();
/** /**
Gets the scaling factor for PostScript output. The default is 1.0, 1.0. Gets the scaling factor for PostScript output. The default is 1.0, 1.0.
*/ */
void wxGetPrinterScaling(float * x, float * y); void wxGetPrinterScaling(float* x, float* y);
/** /**
Sets the command used to view a PostScript file. The default depends on the Sets the command used to view a PostScript file. The default depends on the

View File

@@ -30,7 +30,6 @@ public:
/** /**
Use this in conjunction with StartDrawingOnTop(). Use this in conjunction with StartDrawingOnTop().
This function destroys the temporary window created to implement on-top drawing This function destroys the temporary window created to implement on-top drawing
(X only). (X only).
*/ */
@@ -43,30 +42,26 @@ public:
this, this,
some window systems (such as X) only allow drawing to take place underneath some window systems (such as X) only allow drawing to take place underneath
other windows. other windows.
By using the first form of this function, an application is specifying that By using the first form of this function, an application is specifying that
the area that will be drawn on coincides with the given window. the area that will be drawn on coincides with the given window.
By using the second form, an application can specify an area of the screen By using the second form, an application can specify an area of the screen
which is to be drawn on. If @NULL is passed, the whole screen is available. which is to be drawn on. If @NULL is passed, the whole screen is available.
It is recommended that an area of the screen is specified because with large It is recommended that an area of the screen is specified because with large
regions, regions,
flickering effects are noticeable when destroying the temporary transparent flickering effects are noticeable when destroying the temporary transparent
window used window used
to implement this feature. to implement this feature.
You might use this pair of functions when implementing a drag feature, for You might use this pair of functions when implementing a drag feature, for
example example
as in the wxSplitterWindow implementation. as in the wxSplitterWindow implementation.
@remarks This function is probably obsolete since the X implementations @remarks This function is probably obsolete since the X implementations
allow drawing directly on the screen now. However, allow drawing directly on the screen now. However, the
the fact that this function allows the screen to be fact that this function allows the screen to be
refreshed afterwards, may be useful to some refreshed afterwards, may be useful to some
applications. applications.
*/ */
bool StartDrawingOnTop(wxWindow* window); bool StartDrawingOnTop(wxWindow* window);
bool StartDrawingOnTop(wxRect* rect = @NULL); bool StartDrawingOnTop(wxRect* rect = NULL);
//@} //@}
}; };

View File

@@ -45,10 +45,10 @@ public:
//@{ //@{
/** /**
Constructors: Constructors:
a filename @e f with default size 340x240 at 72.0 dots per inch (a frequent a filename @a 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 @a f with size @a Width by @a Height at 72.0 dots per inch
a filename @e f with size @e Width by @e Height at @e dpi resolution. a filename @a f with size @a Width by @a Height at @a dpi resolution.
*/ */
wxSVGFileDC(wxString f); wxSVGFileDC(wxString f);
wxSVGFileDC(wxString f, int Width, int Height); wxSVGFileDC(wxString f, int Width, int Height);
@@ -131,7 +131,6 @@ public:
y1) y1)
and ending at (@e x2, y2). The current pen is used for the outline and ending at (@e x2, y2). The current pen is used for the outline
and the current brush for filling the shape. and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to the end The arc is drawn in an anticlockwise direction from the start point to the end
point. point.
*/ */
@@ -139,10 +138,9 @@ public:
wxCoord xc, wxCoord yc); wxCoord xc, wxCoord yc);
/** /**
Draw a bitmap on the device context at the specified point. If @e transparent Draw a bitmap on the device context at the specified point. If @a transparent
is @true and the bitmap has is @true and the bitmap has
a transparency mask, the bitmap will be drawn transparently. a transparency mask, the bitmap will be drawn transparently.
When drawing a mono-bitmap, the current text foreground colour will be used to When drawing a mono-bitmap, the current text foreground colour will be used to
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
@@ -159,14 +157,14 @@ 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);
//@} //@}
//@{ //@{
/** /**
Draws a circle with the given centre and radius. Draws a circle with the given centre and radius.
@sa wxDC::DrawEllipse @see 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);
@@ -178,7 +176,7 @@ public:
left corner and the given size or directly. The current pen is used for the left corner and the given size or directly. The current pen is used for the
outline and the current brush for filling the shape. outline and the current brush for filling the shape.
@sa wxDC::DrawCircle @see wxDC::DrawCircle
*/ */
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
wxCoord height); wxCoord height);
@@ -189,20 +187,17 @@ public:
/** /**
Draws an arc of an ellipse. The current pen is used for drawing the arc and Draws an arc of an ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie. the current brush is used for drawing the pie.
@a x and @a y specify the x and y coordinates of the upper-left corner of the
@e x and @e y specify the x and y coordinates of the upper-left corner of the
rectangle that contains rectangle that contains
the ellipse. the ellipse.
@a width and @a height specify the width and height of the rectangle that
@e width and @e height specify the width and height of the rectangle that
contains contains
the ellipse. the ellipse.
@a start and @a end specify the start and end of the arc relative to the
@e start and @e end specify the start and end of the arc relative to the
three-o'clock three-o'clock
position from the center of the rectangle. Angles are specified position from the center of the rectangle. Angles are specified
in degrees (360 is a complete circle). Positive values mean in degrees (360 is a complete circle). Positive values mean
counter-clockwise motion. If @e start is equal to @e end, a counter-clockwise motion. If @a start is equal to @e end, a
complete ellipse will be drawn. complete ellipse will be drawn.
*/ */
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width, void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width,
@@ -224,14 +219,14 @@ public:
//@{ //@{
/** /**
Draws lines using an array of @e points of size @e n, or list of Draws lines using an array of @a points of size @e n, or list of
pointers to points, adding the optional offset coordinate. The current pointers to points, adding the optional offset coordinate. The current
pen is used for drawing the lines. The programmer is responsible for pen is used for drawing the lines. The programmer is responsible for
deleting the list of points. deleting the list of points.
*/ */
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);
//@} //@}
@@ -242,22 +237,19 @@ public:
//@{ //@{
/** /**
Draws a filled polygon using an array of @e points of size @e n, Draws a filled polygon using an array of @a points of size @e n,
or list of pointers to points, adding the optional offset coordinate. or list of pointers to points, adding the optional offset coordinate.
The last argument specifies the fill rule: @b wxODDEVEN_RULE (the The last argument specifies the fill rule: @b wxODDEVEN_RULE (the
default) or @b wxWINDING_RULE. default) or @b wxWINDING_RULE.
The current pen is used for drawing the outline, and the current brush The current pen is used for drawing the outline, and the current brush
for filling the shape. Using a transparent brush suppresses filling. for filling the shape. Using a transparent brush suppresses filling.
The programmer is responsible for deleting the list of points. The programmer is responsible for deleting the list of points.
Note that wxWindows automatically closes the first and last points. Note that wxWindows automatically closes the first and last points.
*/ */
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);
//@} //@}
@@ -271,8 +263,7 @@ public:
wxCoord height); wxCoord height);
/** /**
Draws the text rotated by @e angle degrees. Draws the text rotated by @a angle degrees.
The wxMSW wxDC and wxSVGFileDC rotate the text around slightly different The wxMSW wxDC and wxSVGFileDC rotate the text around slightly different
points, depending on the size of the font points, depending on the size of the font
*/ */
@@ -284,9 +275,8 @@ public:
size. The corners are quarter-circles using the given radius. The size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling current pen is used for the outline and the current brush for filling
the shape. the shape.
If @a radius is positive, the value is assumed to be the
If @e radius is positive, the value is assumed to be the radius of the rounded corner. If @a radius is negative,
radius of the rounded corner. If @e radius is negative,
the absolute value is assumed to be the @e proportion of the smallest the absolute value is assumed to be the @e proportion of the smallest
dimension of the rectangle. This means that the corner can be dimension of the rectangle. This means that the corner can be
a sensible size relative to the size of the rectangle, and also avoids a sensible size relative to the size of the rectangle, and also avoids
@@ -301,7 +291,7 @@ 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,
@@ -311,7 +301,6 @@ public:
/** /**
Draws a text string at the specified point, using the current text font, Draws a text string at the specified point, using the current text font,
and the current text foreground and background colours. and the current text foreground and background colours.
The coordinates refer to the top-left corner of the rectangle bounding The coordinates refer to the top-left corner of the rectangle bounding
the string. See GetTextExtent() for how the string. See GetTextExtent() for how
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
@@ -338,7 +327,7 @@ public:
Not implemented Not implemented
*/ */
void FloodFill(wxCoord x, wxCoord y, const wxColour& colour, void FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
int style=wxFLOOD_SURFACE); int style = wxFLOOD_SURFACE);
//@{ //@{
/** /**
@@ -352,7 +341,7 @@ public:
/** /**
Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT. Returns the current background mode: @c wxSOLID or @c wxTRANSPARENT.
@sa wxDC::SetBackgroundMode @see wxDC::SetBackgroundMode
*/ */
int GetBackgroundMode(); int GetBackgroundMode();
@@ -409,13 +398,13 @@ public:
/** /**
Not implemented Not implemented
*/ */
bool GetPixel(wxCoord x, wxCoord y, wxColour * colour); bool GetPixel(wxCoord x, wxCoord y, wxColour* colour);
/** /**
For a Windows printer device context, this gets the horizontal and vertical For a Windows printer device context, this gets the horizontal and vertical
resolution. resolution.
*/ */
void GetSize(wxCoord * width, wxCoord * height); void GetSize(wxCoord* width, wxCoord* height);
//@{ //@{
/** /**
@@ -427,24 +416,22 @@ public:
/** /**
Gets the dimensions of the string using the currently selected font. Gets the dimensions of the string using the currently selected font.
@e string is the text string to measure, @e w and @e h are @a string is the text string to measure, @a w and @a h are
the total width and height respectively, @e descent is the the total width and height respectively, @a descent is the
dimension from the baseline of the font to the bottom of the dimension from the baseline of the font to the bottom of the
descender, and @e externalLeading is any extra vertical space added descender, and @a externalLeading is any extra vertical space added
to the font by the font designer (usually is zero). to the font by the font designer (usually is zero).
The optional parameter @a font specifies an alternative
The optional parameter @e font specifies an alternative
to the currently selected font: but note that this does not to the currently selected font: but note that this does not
yet work under Windows, so you need to set a font for yet work under Windows, so you need to set a font for
the device context first. the device context first.
See also wxFont, SetFont(). See also wxFont, SetFont().
*/ */
void GetTextExtent(const wxString& string, wxCoord * w, void GetTextExtent(const wxString& string, wxCoord* w,
wxCoord * h, wxCoord* h,
wxCoord * descent = @NULL, wxCoord* descent = NULL,
wxCoord * externalLeading = @NULL, wxCoord* externalLeading = NULL,
wxFont * font = @NULL); wxFont* font = NULL);
//@{ //@{
/** /**
@@ -488,34 +475,34 @@ public:
/** /**
Gets the maximum horizontal extent used in drawing commands so far. Gets the maximum horizontal extent used in drawing commands so far.
*/ */
#define wxCoord MaxX() /* implementation is private */ wxCoord MaxX();
/** /**
Gets the maximum vertical extent used in drawing commands so far. Gets the maximum vertical extent used in drawing commands so far.
*/ */
#define wxCoord MaxY() /* implementation is private */ wxCoord MaxY();
/** /**
Gets the minimum horizontal extent used in drawing commands so far. Gets the minimum horizontal extent used in drawing commands so far.
*/ */
#define wxCoord MinX() /* implementation is private */ wxCoord MinX();
/** /**
Gets the minimum vertical extent used in drawing commands so far. Gets the minimum vertical extent used in drawing commands so far.
*/ */
#define wxCoord MinY() /* implementation is private */ wxCoord MinY();
/** /**
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 */ bool Ok();
/** /**
Resets the bounding box: after a call to this function, the bounding box Resets the bounding box: after a call to this function, the bounding box
doesn't contain anything. doesn't contain anything.
@sa wxDC::CalcBoundingBox @see wxDC::CalcBoundingBox
*/ */
void ResetBoundingBox(); void ResetBoundingBox();
@@ -525,12 +512,11 @@ public:
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.
*/ */
void SetAxisOrientation(bool xLeftRight, bool yBottomUp); void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
@@ -540,20 +526,17 @@ public:
void SetBackground(const wxBrush& brush); void SetBackground(const wxBrush& brush);
/** /**
@e mode may be one of wxSOLID and wxTRANSPARENT. This setting determines @a mode may be one of wxSOLID and wxTRANSPARENT. This setting determines
whether text will be drawn with a background colour or not. whether text will be drawn with a background colour or not.
*/ */
void SetBackgroundMode(int mode); void SetBackgroundMode(int mode);
/** /**
Sets the current brush for the DC. Sets the current brush for the DC.
If the argument is wxNullBrush, the current brush is selected out of the device If the argument is wxNullBrush, the current brush is selected out of the device
context, and the original brush restored, allowing the current brush to context, and the original brush restored, allowing the current brush to
be destroyed safely. be destroyed safely.
See also wxBrush. See also wxBrush.
See also wxMemoryDC for the interpretation of colours See also wxMemoryDC for the interpretation of colours
when drawing into a monochrome bitmap. when drawing into a monochrome bitmap.
*/ */
@@ -573,7 +556,6 @@ public:
/** /**
Sets the device origin (i.e., the origin in pixels after scaling has been Sets the device origin (i.e., the origin in pixels after scaling has been
applied). applied).
This function may be useful in Windows printing This function may be useful in Windows printing
operations for placing a graphic on a page. operations for placing a graphic on a page.
*/ */
@@ -582,7 +564,6 @@ public:
/** /**
Sets the current font for the DC. It must be a valid font, in particular you Sets the current font for the DC. It must be a valid font, in particular you
should not pass @c wxNullFont to this method. should not pass @c wxNullFont to this method.
See also wxFont. See also wxFont.
*/ */
void SetFont(const wxFont& font); void SetFont(const wxFont& font);
@@ -600,40 +581,32 @@ public:
wxSVGFileDC::SetUserScale) scales the text appropriately. In wxSVGFileDC::SetUserScale) scales the text appropriately. In
Windows, scaleable TrueType fonts are always used; in X, results depend Windows, scaleable TrueType fonts are always used; in X, results depend
on availability of fonts, but usually a reasonable match is found. on availability of fonts, but usually a reasonable match is found.
Note that the coordinate origin should ideally be selectable, but for Note that the coordinate origin should ideally be selectable, but for
now is always at the top left of the screen/printer. now is always at the top left of the screen/printer.
Drawing to a Windows printer device context under UNIX Drawing to a Windows printer device context under UNIX
uses the current mapping mode, but mapping mode is currently ignored for uses the current mapping mode, but mapping mode is currently ignored for
PostScript output. PostScript output.
The mapping mode can be one of the following: The mapping mode can be one of the following:
wxMM_TWIPS wxMM_TWIPS
Each logical unit is 1/20 of a point, or 1/1440 of Each logical unit is 1/20 of a point, or 1/1440 of
an inch. an inch.
wxMM_POINTS wxMM_POINTS
Each logical unit is a point, or 1/72 of an inch. Each logical unit is a point, or 1/72 of an inch.
wxMM_METRIC wxMM_METRIC
Each logical unit is 1 mm. Each logical unit is 1 mm.
wxMM_LOMETRIC wxMM_LOMETRIC
Each logical unit is 1/10 of a mm. Each logical unit is 1/10 of a mm.
wxMM_TEXT wxMM_TEXT
Each logical unit is 1 pixel. Each logical unit is 1 pixel.
*/ */
void SetMapMode(int int); void SetMapMode(int int);
@@ -645,10 +618,8 @@ public:
/** /**
Sets the current pen for the DC. Sets the current pen for the DC.
If the argument is wxNullPen, the current pen is selected out of the device If the argument is wxNullPen, the current pen is selected out of the device
context, and the original pen restored. context, and the original pen restored.
See also wxMemoryDC for the interpretation of colours See also wxMemoryDC for the interpretation of colours
when drawing into a monochrome bitmap. when drawing into a monochrome bitmap.
*/ */
@@ -661,7 +632,6 @@ public:
/** /**
Sets the current text foreground colour for the DC. Sets the current text foreground colour for the DC.
See also wxMemoryDC for the interpretation of colours See also wxMemoryDC for the interpretation of colours
when drawing into a monochrome bitmap. when drawing into a monochrome bitmap.
*/ */

View File

@@ -137,7 +137,7 @@ public:
*/ */
virtual const void* OnRequest(const wxString& topic, virtual const void* OnRequest(const wxString& topic,
const wxString& item, const wxString& item,
size_t * size, size_t* size,
wxIPCFormat format); wxIPCFormat format);
/** /**
@@ -177,7 +177,7 @@ public:
character string (actually a pointer to the connection's buffer) if character string (actually a pointer to the connection's buffer) if
successful, @NULL otherwise. successful, @NULL otherwise.
*/ */
const void* Request(const wxString& item, size_t * size, const void* Request(const wxString& item, size_t* size,
wxIPCFormat format = wxIPC_TEXT); wxIPCFormat format = wxIPC_TEXT);
/** /**
@@ -239,22 +239,21 @@ public:
the OnMakeConnection() member to return your own the OnMakeConnection() member to return your own
derived connection object. derived connection object.
*/ */
wxConnectionBase * MakeConnection(const wxString& host, wxConnectionBase* MakeConnection(const wxString& host,
const wxString& service, const wxString& service,
const wxString& topic); const wxString& topic);
/** /**
The type of wxDDEConnection returned from a MakeConnection() call can The type of wxDDEConnection returned from a MakeConnection() call can
be altered by deriving the @b OnMakeConnection member to return your be altered by deriving the @b OnMakeConnection member to return your
own derived connection object. By default, a wxDDEConnection own derived connection object. By default, a wxDDEConnection
object is returned. object is returned.
The advantage of deriving your own connection class is that it will The advantage of deriving your own connection class is that it will
enable you to intercept messages initiated by the server, such enable you to intercept messages initiated by the server, such
as wxDDEConnection::OnAdvise. You may also want to as wxDDEConnection::OnAdvise. You may also want to
store application-specific data in instances of the new class. store application-specific data in instances of the new class.
*/ */
wxConnectionBase * OnMakeConnection(); wxConnectionBase* OnMakeConnection();
/** /**
Returns @true if this is a valid host name, @false otherwise. This always Returns @true if this is a valid host name, @false otherwise. This always
@@ -307,7 +306,7 @@ public:
always sent for standard input and output, but in the context of DDE always sent for standard input and output, but in the context of DDE
messages it doesn't make a lot of sense. messages it doesn't make a lot of sense.
*/ */
virtual wxConnectionBase * OnAcceptConnection(const wxString& topic); virtual wxConnectionBase* OnAcceptConnection(const wxString& topic);
}; };
@@ -319,17 +318,14 @@ 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

@@ -8,33 +8,30 @@
/** /**
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 */ wxFAIL();
/** /**
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,
const char * cond, const char* cond,
const char * msg = @NULL); const char* msg = NULL);
/** /**
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,12 +39,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 @see wxFAIL
*/ */
#define wxFAIL_MSG(msg) /* implementation is private */ #define wxFAIL_MSG(msg) /* implementation is private */
@@ -56,14 +52,14 @@ void wxTrap();
(FAILs in debug mode). (FAILs in debug mode).
This check is done even in release mode. This check is done even in release mode.
*/ */
#define wxCHECK(condition, retValue) /* implementation is private */ #define wxCHECK(condition, retValue) /* implementation is private */
/** /**
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 @a type is less than @a 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);
@@ -72,93 +68,86 @@ void wxTrap();
wxASSERT_MIN_BITSIZE(wchar_t, 16); wxASSERT_MIN_BITSIZE(wchar_t, 16);
@endcode @endcode
*/ */
#define wxASSERT_MIN_BITSIZE(type, size) /* implementation is private */ #define wxASSERT_MIN_BITSIZE(type, size) /* implementation is private */
/** /**
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 @see wxASSERT, wxCOMPILE_TIME_ASSERT
*/ */
#define wxASSERT_MSG(condition, msg) /* implementation is private */ #define wxASSERT_MSG(condition, msg) /* implementation is private */
/** /**
This is the same as wxCHECK2, but This is the same as wxCHECK2, but
wxFAIL_MSG with the specified @e msg is called wxFAIL_MSG with the specified @a msg is called
instead of wxFAIL() if the @e condition is @false. instead of wxFAIL() if the @a condition is @false.
*/ */
#define wxCHECK2(condition, operation, msg) /* implementation is private */ #define wxCHECK2(condition, operation, msg) /* implementation is private */
/** /**
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 @see wxASSERT_MSG, wxCOMPILE_TIME_ASSERT
*/ */
#define wxASSERT(condition) /* implementation is private */ #define wxASSERT(condition) /* implementation is private */
/** /**
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.
*/ */
#define wxCHECK_RET(condition, msg) /* implementation is private */ #define wxCHECK_RET(condition, msg) /* implementation is private */
/** /**
Checks that the condition is @true and wxFAIL and execute Checks that the condition is @true and wxFAIL and execute
@e operation if it is not. This is a generalisation of @a 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 @a 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 */
/** /**
This macro is identical to wxCOMPILE_TIME_ASSERT2 This macro is identical to wxCOMPILE_TIME_ASSERT2
except that it allows you to specify a unique @e name for the struct except that it allows you to specify a unique @a name for the struct
internally defined by this macro to avoid getting the compilation errors internally defined by this macro to avoid getting the compilation errors
described above. described above.
*/ */
#define wxCOMPILE_TIME_ASSERT(condition, msg, name) /* implementation is private */ #define wxCOMPILE_TIME_ASSERT(condition, msg, name) /* implementation is private */
/** /**
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.
*/ */
#define wxCHECK_MSG(condition, retValue, msg) /* implementation is private */ #define wxCHECK_MSG(condition, retValue, msg) /* implementation is private */
/** /**
Using @c wxCOMPILE_TIME_ASSERT results in a compilation error if the Using @c wxCOMPILE_TIME_ASSERT results in a compilation error if the
specified @e condition is @false. The compiler error message should include specified @a condition is @false. The compiler error message should include
the @e msg identifier - please note that it must be a valid C++ identifier the @a 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 @see 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

@@ -144,7 +144,6 @@ 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).
*/ */
@@ -161,11 +160,10 @@ public:
bool AddExceptionDump(); bool AddExceptionDump();
/** /**
Add another file to the report. If @e filename is an absolute path, it is Add another file to the report. If @a filename is an absolute path, it is
copied to a file in the debug report directory with the same name. Otherwise copied to a file in the debug report directory with the same name. Otherwise
the file should already exist in this directory the file should already exist in this directory
@a description only exists to be displayed to the user in the report summary
@e description only exists to be displayed to the user in the report summary
shown by wxDebugReportPreview. shown by wxDebugReportPreview.
*/ */
void AddFile(const wxString& filename, void AddFile(const wxString& filename,
@@ -173,9 +171,8 @@ public:
/** /**
This is a convenient wrapper around AddFile(). It This is a convenient wrapper around AddFile(). It
creates the file with the given @e name and writes @e text to it, then creates the file with the given @e name and writes @a text to it, then
adds the file to the report. The @e filename shouldn't contain the path. adds the file to the report. The @a filename shouldn't contain the path.
Returns @true if file could be added successfully, @false if an IO error Returns @true if file could be added successfully, @false if an IO error
occurred. occurred.
*/ */
@@ -187,7 +184,7 @@ public:
context file created by AddContext(). By context file created by AddContext(). By
default, it does nothing. default, it does nothing.
*/ */
void DoAddCustomContext(wxXmlNode * nodeRoot); void DoAddCustomContext(wxXmlNode* nodeRoot);
/** /**
This function may be overridden to modify the contents of the exception tag in This function may be overridden to modify the contents of the exception tag in
@@ -209,7 +206,6 @@ public:
/** /**
Returns the name of the temporary directory used for the files in this report. Returns the name of the temporary directory used for the files in this report.
This method should be used to construct the full name of the files which you This method should be used to construct the full name of the files which you
wish to add to the report using AddFile(). wish to add to the report using AddFile().
*/ */
@@ -218,7 +214,7 @@ public:
/** /**
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 @a n is greater than or equal to the number of
filse, @false is returned. filse, @false is returned.
*/ */
bool GetFile(size_t n, wxString* name, wxString* desc); bool GetFile(size_t n, wxString* name, wxString* desc);
@@ -239,7 +235,7 @@ public:
returns returns
@false the report can't be used. @false the report can't be used.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Processes this report: the base class simply notifies the user that the Processes this report: the base class simply notifies the user that the
@@ -307,11 +303,10 @@ class wxDebugReportUpload : public wxDebugReportCompress
public: public:
/** /**
) )
This class will upload the compressed file created by its base class to an HTML This class will upload the compressed file created by its base class to an HTML
multipart/form-data form at the specified address. The @e url is the upload multipart/form-data form at the specified address. The @a url is the upload
page address, @e input is the name of the @c "type=file" control on page address, @a input is the name of the @c "type=file" control on
the form used for the file name and @e action is the value of the form the form used for the file name and @a action is the value of the form
action field. The report is uploaded using @c @e curl program which action field. The report is uploaded using @c @e curl program which
should be available, the @e curl parameter may be used to specify the full should be available, the @e curl parameter may be used to specify the full
path to it. path to it.
@@ -321,7 +316,6 @@ 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

View File

@@ -8,7 +8,7 @@
//@{ //@{
/** /**
These macros will swap the bytes of the @e value variable from little These macros will swap the bytes of the @a 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.
*/ */
@@ -21,11 +21,10 @@ 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 @a 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.
*/ */
@@ -37,9 +36,8 @@ 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 @a 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
@@ -52,7 +50,7 @@ wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value);
}; };
@endcode @endcode
*/ */
#define wxDEPRECATED_INLINE(func, body) /* implementation is private */ #define wxDEPRECATED_INLINE(func, body) /* implementation is private */
/** /**
@c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if @c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if
@@ -67,9 +65,10 @@ wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value);
unless it has a friend. This warning may sometimes be useful but it doesn't unless it has a friend. This warning may sometimes be useful but it doesn't
make sense for reference counted class which always delete themselves (hence make sense for reference counted class which always delete themselves (hence
destructor should be private) but don't necessarily have any friends, so this destructor should be private) but don't necessarily have any friends, so this
macro is provided to disable the warning in such case. The @e name parameter macro is provided to disable the warning in such case. The @a name parameter
should be the name of the class but is only used to construct a unique friend should be the name of the class but is only used to construct a unique friend
class name internally. Example of using the macro: class name internally. Example of using the macro:
@code @code
class RefCounted class RefCounted
{ {
@@ -91,11 +90,10 @@ wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value);
//@{ //@{
/** /**
This macro will swap the bytes of the @e value variable from little This macro will swap the bytes of the @a 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
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.
*/ */
@@ -110,7 +108,6 @@ wxUint16 wxUINT16_SWAP_ON_BE(wxUint16 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
@@ -128,7 +125,6 @@ wxUint16 wxUINT16_SWAP_ON_BE(wxUint16 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

@@ -61,8 +61,8 @@
@category{cmndlg} @category{cmndlg}
@seealso @seealso
@ref overview_wxdialogoverview "wxDialog overview", wxFrame, @ref @ref overview_wxdialogoverview, wxFrame, @ref overview_validatoroverview
overview_validatoroverview "Validator overview" "Validator overview"
*/ */
class wxDialog : public wxTopLevelWindow class wxDialog : public wxTopLevelWindow
{ {
@@ -72,31 +72,26 @@ 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,
either the windowing system or wxWidgets, depending on platform. chosen by
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.
@sa Create() @see Create()
*/ */
wxDialog(); wxDialog();
wxDialog(wxWindow* parent, wxWindowID id, wxDialog(wxWindow* parent, wxWindowID id,
@@ -115,7 +110,6 @@ public:
/** /**
Adds an identifier to be regarded as a main button for the non-scrolling area Adds an identifier to be regarded as a main button for the non-scrolling area
of a dialog. of a dialog.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -125,7 +119,6 @@ public:
Returns @true if this dialog can and should perform layout adaptation using Returns @true if this dialog can and should perform layout adaptation using
DoLayoutAdaptation(), usually if DoLayoutAdaptation(), usually if
the dialog is too large to fit on the display. the dialog is too large to fit on the display.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -135,7 +128,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);
@@ -151,12 +144,10 @@ public:
const wxString& name = "dialogBox"); const wxString& name = "dialogBox");
/** /**
Creates a sizer with standard buttons. @e flags is a bit list Creates a sizer with standard buttons. @a 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
@@ -169,7 +160,6 @@ public:
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.
@@ -177,10 +167,9 @@ public:
wxSizer* CreateSeparatedButtonSizer(long flags); wxSizer* CreateSeparatedButtonSizer(long flags);
/** /**
Creates a wxStdDialogButtonSizer with standard buttons. @e flags is a bit list Creates a wxStdDialogButtonSizer with standard buttons. @a 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.
*/ */
wxStdDialogButtonSizer* CreateStdDialogButtonSizer(long flags); wxStdDialogButtonSizer* CreateStdDialogButtonSizer(long flags);
@@ -188,7 +177,6 @@ public:
/** /**
Performs layout adaptation, usually if the dialog is too large to fit on the Performs layout adaptation, usually if the dialog is too large to fit on the
display. display.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -201,11 +189,10 @@ public:
wxWidgets wxWidgets
will call Close() for the dialog. will call Close() for the dialog.
*/ */
#define virtual bool DoOK() /* implementation is private */ virtual bool DoOK();
/** /**
A static function enabling or disabling layout adaptation for all dialogs. A static function enabling or disabling layout adaptation for all dialogs.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -216,9 +203,9 @@ public:
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() @see ShowModal(), GetReturnCode(), SetReturnCode()
*/ */
void EndModal(int retCode); void EndModal(int retCode);
@@ -226,7 +213,7 @@ public:
Gets the identifier of the button which works like standard OK button in this Gets the identifier of the button which works like standard OK button in this
dialog. dialog.
@sa SetAffirmativeId() @see SetAffirmativeId()
*/ */
int GetAffirmativeId(); int GetAffirmativeId();
@@ -244,14 +231,13 @@ public:
Gets the identifier of the button to map presses of @c ESC Gets the identifier of the button to map presses of @c ESC
button to. button to.
@sa SetEscapeId() @see SetEscapeId()
*/ */
int GetEscapeId(); int GetEscapeId();
/** /**
Returns @true if the dialog has been adapted, usually by making it scrollable Returns @true if the dialog has been adapted, usually by making it scrollable
to work with a small display. to work with a small display.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -262,7 +248,6 @@ public:
to be in the non-scrolling part of a layout-adapted dialog. to be in the non-scrolling part of a layout-adapted dialog.
Zero switches off adaptation, and 3 allows search for standard buttons anywhere Zero switches off adaptation, and 3 allows search for standard buttons anywhere
in the dialog. in the dialog.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -270,7 +255,6 @@ public:
/** /**
Gets the adaptation mode, overriding the global adaptation flag. Gets the adaptation mode, overriding the global adaptation flag.
See also SetLayoutAdaptationMode() and @ref overview_autoscrollingdialogs See also SetLayoutAdaptationMode() and @ref overview_autoscrollingdialogs
"Automatic scrolling dialogs". "Automatic scrolling dialogs".
*/ */
@@ -278,7 +262,6 @@ public:
/** /**
A static function getting the current layout adapter object. A static function getting the current layout adapter object.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -287,7 +270,6 @@ public:
/** /**
Returns an array of identifiers to be regarded as the main buttons for the Returns an array of identifiers to be regarded as the main buttons for the
non-scrolling area of a dialog. non-scrolling area of a dialog.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -297,9 +279,9 @@ public:
Gets the return code for this window. Gets the return code for this window.
@remarks A return code is normally associated with a modal dialog, where @remarks A return code is normally associated with a modal dialog, where
ShowModal() returns a code to the application. ShowModal() returns a code to the application.
@sa SetReturnCode(), ShowModal(), EndModal() @see SetReturnCode(), ShowModal(), EndModal()
*/ */
int GetReturnCode(); int GetReturnCode();
@@ -308,7 +290,6 @@ public:
GetToolBar GetToolBar
allows you to access the toolbar and add tools to it. Removing tools and adding allows you to access the toolbar and add tools to it. Removing tools and adding
arbitrary controls are not currently supported. arbitrary controls are not currently supported.
This function is not available on any other platform. This function is not available on any other platform.
*/ */
wxToolBar* GetToolBar(); wxToolBar* GetToolBar();
@@ -317,14 +298,14 @@ 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
boxes cannot be iconized. However, applications may boxes cannot be iconized. However, applications may
need to explicitly restore dialog boxes under Motif need to explicitly restore dialog boxes under Motif
which have user-iconizable frames, and under Windows which have user-iconizable frames, and under Windows
calling Iconize(@false) will bring the window to the calling Iconize(@false) will bring the window to the
front, as does Show(@true). front, as does Show(@true).
*/ */
void Iconize(bool iconize); void Iconize(bool iconize);
@@ -332,23 +313,21 @@ public:
Returns @true if the dialog box is iconized. Windows only. Returns @true if the dialog box is iconized. Windows only.
@remarks Always returns @false under Windows since dialogs cannot be @remarks Always returns @false under Windows since dialogs cannot be
iconized. iconized.
*/ */
bool IsIconized(); bool IsIconized();
/** /**
A static function returning @true if layout adaptation is enabled for all A static function returning @true if layout adaptation is enabled for all
dialogs. dialogs.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
static bool IsLayoutAdaptationEnabled(); static bool IsLayoutAdaptationEnabled();
/** /**
Returns @true if @e id is in the array of identifiers to be regarded as the Returns @true if @a id is in the array of identifiers to be regarded as the
main buttons for the non-scrolling area of a dialog. main buttons for the non-scrolling area of a dialog.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -363,17 +342,17 @@ 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
(Windows only). Add an event table entry for your (Windows only). Add an event table entry for your
dialog class if you wish the behaviour to be dialog class if you wish the behaviour to be different
different (such as keeping a user-defined background (such as keeping a user-defined background colour). If
colour). If you do override this function, call you do override this function, call wxEvent::Skip to
wxEvent::Skip to propagate the notification to child propagate the notification to child windows and
windows and controls. controls.
@sa wxSysColourChangedEvent @see wxSysColourChangedEvent
*/ */
void OnSysColourChanged(wxSysColourChangedEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event);
@@ -383,14 +362,12 @@ public:
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.
Also, when the user presses a hardware OK button on the devices having one or Also, when the user presses a hardware OK button on the devices having one or
the special OK button in the PocketPC title bar, an event with this id is the special OK button in the PocketPC title bar, an event with this id is
generated. generated.
By default, the affirmative id is wxID_OK. By default, the affirmative id is wxID_OK.
@sa GetAffirmativeId(), SetEscapeId() @see GetAffirmativeId(), SetEscapeId()
*/ */
void SetAffirmativeId(int id); void SetAffirmativeId(int id);
@@ -400,11 +377,10 @@ public:
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 @a 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.
*/ */
@@ -414,7 +390,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);
@@ -422,14 +398,13 @@ 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);
/** /**
Marks the dialog as having been adapted, usually by making it scrollable to Marks the dialog as having been adapted, usually by making it scrollable to
work with a small display. work with a small display.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -440,15 +415,15 @@ public:
non-scrolling part of a layout-adapted dialog. non-scrolling part of a layout-adapted dialog.
Zero switches off adaptation, and 3 allows search for standard buttons anywhere Zero switches off adaptation, and 3 allows search for standard buttons anywhere
in the dialog. in the dialog.
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
void SetLayoutAdaptationLevel(int level); void SetLayoutAdaptationLevel(int level);
/** /**
Sets the adaptation mode, overriding the global adaptation flag. @e mode may be Sets the adaptation mode, overriding the global adaptation flag. @a mode may be
one of the following values: one of the following values:
See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for See also @ref overview_autoscrollingdialogs "Automatic scrolling dialogs" for
more on layout adaptation. more on layout adaptation.
*/ */
@@ -458,7 +433,6 @@ public:
A static function for setting the current layout adapter object, returning the A static function for setting the current layout adapter object, returning the
old adapter. If you call this, you should old adapter. If you call this, you should
delete the old adapter object. delete the old adapter object.
See also wxDialogLayoutAdapter and @ref overview_autoscrollingdialogs See also wxDialogLayoutAdapter and @ref overview_autoscrollingdialogs
"Automatic scrolling dialogs". "Automatic scrolling dialogs".
*/ */
@@ -467,13 +441,12 @@ public:
/** /**
@b NB: This function is deprecated and doesn't work for all ports, just use @b NB: This function is deprecated and doesn't work for all ports, just use
ShowModal() to show a modal dialog instead. ShowModal() to show a modal dialog instead.
Allows the programmer to specify whether the dialog box is modal (Show() blocks Allows the programmer to specify whether the dialog box is modal (Show() blocks
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);
@@ -481,14 +454,13 @@ 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
ShowModal() returns a code to the ShowModal() returns a code to the application.
application. The function EndModal() calls The function EndModal() calls SetReturnCode.
SetReturnCode.
@sa GetReturnCode(), ShowModal(), EndModal() @see GetReturnCode(), ShowModal(), EndModal()
*/ */
void SetReturnCode(int retCode); void SetReturnCode(int retCode);
@@ -496,12 +468,12 @@ 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.
@remarks The preferred way of dismissing a modal dialog is to use @remarks The preferred way of dismissing a modal dialog is to use
EndModal(). EndModal().
*/ */
bool Show(bool show); bool Show(bool show);

View File

@@ -43,10 +43,9 @@ public:
/** /**
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.
@sa IsDialing() @see IsDialing()
*/ */
bool CancelDialing(); bool CancelDialing();
@@ -58,28 +57,24 @@ public:
wxDialUpManager* Create(); wxDialUpManager* Create();
/** /**
Dial the given ISP, use @e username and @e password to authenticate. Dial the given ISP, use @a username and @a 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.
If no @a nameOfISP is given, the function will select the default one
If no @e nameOfISP is given, the function will select the default one
(proposing the user to choose among all connections defined on this machine) (proposing the user to choose among all connections defined on this machine)
and if no username and/or password are given, the function will try to do and if no username and/or password are given, the function will try to do
without them, but will ask the user if really needed. without them, but will ask the user if really needed.
If @a async parameter is @false, the function waits until the end of dialing
If @e async parameter is @false, the function waits until the end of dialing
and returns @true upon successful completion. and returns @true upon successful completion.
If @a async is @true, the function only initiates the connection and
If @e async is @true, the function only initiates the connection and
returns immediately - the result is reported via events (an event is sent returns immediately - the result is reported via events (an event is sent
anyhow, but if dialing failed it will be a DISCONNECTED one). anyhow, but if dialing failed it will be a DISCONNECTED one).
*/ */
bool Dial(const wxString& nameOfISP = wxEmptyString, bool Dial(const wxString& nameOfISP = wxEmptyString,
const wxString& username = wxEmptyString, const wxString& username = wxEmptyString,
const wxString& password = wxEmptyString, const wxString& password = wxEmptyString,
bool async = @true); bool async = true);
/** /**
Disable automatic check for connection status change - notice that the Disable automatic check for connection status change - notice that the
@@ -94,14 +89,12 @@ public:
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
notification about the change of connection status is sent by the system and so notification about the change of connection status is sent by the system and so
we don't do any polling and this parameter is ignored. we don't do any polling and this parameter is ignored.
Returns @false if couldn't set up automatic check for online status. Returns @false if couldn't set up automatic check for online status.
*/ */
bool EnableAutoCheckOnlineStatus(size_t nSeconds = 60); bool EnableAutoCheckOnlineStatus(size_t nSeconds = 60);
/** /**
This function is only implemented under Windows. This function is only implemented under Windows.
Fills the array with the names of all possible values for the first Fills the array with the names of all possible values for the first
parameter to Dial() on this machine and returns parameter to Dial() on this machine and returns
their number (may be 0). their number (may be 0).
@@ -116,7 +109,6 @@ public:
/** /**
Returns @true if the computer has a permanent network connection (i.e. is Returns @true if the computer has a permanent network connection (i.e. is
on a LAN) and so there is no need to use Dial() function to go online. on a LAN) and so there is no need to use Dial() function to go online.
@b NB: this functions tries to guess the result and it is not always @b NB: this functions tries to guess the result and it is not always
guaranteed to be correct, so it is better to ask user for guaranteed to be correct, so it is better to ask user for
confirmation or give him a possibility to override it. confirmation or give him a possibility to override it.
@@ -126,7 +118,7 @@ public:
/** /**
Returns @true if (async) dialing is in progress. Returns @true if (async) dialing is in progress.
@sa Dial() @see Dial()
*/ */
bool IsDialing(); bool IsDialing();
@@ -136,7 +128,7 @@ public:
good idea to call this function and check its result before calling any other good idea to call this function and check its result before calling any other
wxDialUpManager methods wxDialUpManager methods
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Returns @true if the computer is connected to the network: under Windows, Returns @true if the computer is connected to the network: under Windows,
@@ -148,9 +140,7 @@ public:
/** /**
, @b const wxString&@e commandHangup = wxT("/usr/bin/poff")) , @b const wxString&@e commandHangup = wxT("/usr/bin/poff"))
This method is for Unix only. This method is for Unix only.
Sets the commands to start up the network and to hang up again. Sets the commands to start up the network and to hang up again.
*/ */
void SetConnectCommand(); void SetConnectCommand();
@@ -161,13 +151,12 @@ public:
allows to forcefully set the online status - whatever our internal allows to forcefully set the online status - whatever our internal
algorithm may think about it. algorithm may think about it.
@sa IsOnline() @see IsOnline()
*/ */
void SetOnlineStatus(bool isOnline = @true); void SetOnlineStatus(bool isOnline = true);
/** /**
This method is for Unix only. This method is for Unix only.
Under Unix, the value of well-known host is used to check whether we're Under Unix, the value of well-known host is used to check whether we're
connected to the internet. It is unused under Windows, but this function connected to the internet. It is unused under Windows, but this function
is always safe to call. The default value is @c www.yahoo.com:80. is always safe to call. The default value is @c www.yahoo.com:80.

View File

@@ -55,7 +55,6 @@ public:
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.
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.
*/ */
virtual wxDirTraverseResult OnDir(const wxString& dirname); virtual wxDirTraverseResult OnDir(const wxString& dirname);
@@ -64,7 +63,6 @@ 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.
*/ */
virtual wxDirTraverseResult OnFile(const wxString& filename); virtual wxDirTraverseResult OnFile(const wxString& filename);
@@ -74,7 +72,6 @@ public:
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.
*/ */
virtual wxDirTraverseResult OnOpenError(const wxString& openerrorname); virtual wxDirTraverseResult OnOpenError(const wxString& openerrorname);
@@ -147,13 +144,11 @@ public:
/** /**
The function returns the path of the first file matching the given @e filespec The function returns the path of the first file matching the given @e filespec
or an empty string if there are no files matching it. or an empty string if there are no files matching it.
The @a 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, @a 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 @a dirname itself.
See also: Traverse() See also: Traverse()
*/ */
static wxString FindFirst(const wxString& dirname, static wxString FindFirst(const wxString& dirname,
@@ -161,23 +156,21 @@ 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 @a dirname
to the array @e files (note that its old content is preserved). Only files to the array @a 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 @a filespec are taken, with empty spec matching all the files.
The @a flags parameter should always include @c wxDIR_FILES or the array
The @e flags parameter should always include @c wxDIR_FILES or the array
would be unchanged and should include @c wxDIR_DIRS flag to recurse into would be unchanged and should include @c wxDIR_DIRS flag to recurse into
subdirectories (both flags are included in the value by default). subdirectories (both flags are included in the value by default).
See also: Traverse() See also: Traverse()
*/ */
static size_t GetAllFiles(const wxString& dirname, static size_t GetAllFiles(const wxString& dirname,
wxArrayString * files, wxArrayString* files,
const wxString& filespec = wxEmptyString, const wxString& filespec = wxEmptyString,
int flags = wxDIR_DEFAULT); int flags = wxDIR_DEFAULT);
/** /**
Start enumerating all files matching @e filespec (or all files if it is Start enumerating all files matching @a filespec (or all files if it is
empty) and @e flags, return @true on success. empty) and @e flags, return @true on success.
*/ */
bool GetFirst(wxString* filename, bool GetFirst(wxString* filename,
@@ -199,7 +192,6 @@ public:
/** /**
Returns the size (in bytes) of all files recursively found in @c dir or Returns the size (in bytes) of all files recursively found in @c dir or
@c wxInvalidSize in case of error. @c wxInvalidSize in case of error.
In case it happens that while traversing folders a file's size can not be read, In case it happens that while traversing folders a file's size can not be read,
that file is added to the @c filesSkipped array, if not @NULL, and then that file is added to the @c filesSkipped array, if not @NULL, and then
skipped. skipped.
@@ -210,16 +202,15 @@ public:
then the returned value is not 100% accurate and, if the skipped files were then the returned value is not 100% accurate and, if the skipped files were
big, it could be big, it could be
far from real size of the directory. far from real size of the directory.
See also: wxFileName::GetHumanReadableSize, See also: wxFileName::GetHumanReadableSize,
wxGetDiskSpace wxGetDiskSpace
*/ */
static wxULongLong GetTotalSize(const wxString& dir, static wxULongLong GetTotalSize(const wxString& dir,
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 @a 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.
*/ */
bool HasFiles(const wxString& filespec = wxEmptyString); bool HasFiles(const wxString& filespec = wxEmptyString);
@@ -247,19 +238,15 @@ 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 @a 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.
For each found directory, @ref wxDirTraverser::ondir sink.OnDir is called For each found directory, @ref wxDirTraverser::ondir sink.OnDir is called
and @ref wxDirTraverser::onfile sink.OnFile is called for every file. and @ref wxDirTraverser::onfile sink.OnFile is called for every file.
Depending on the return value, the enumeration may continue or stop. Depending on the return value, the enumeration may continue or stop.
The function returns the total number of files found or @c (size_t)-1 on The function returns the total number of files found or @c (size_t)-1 on
error. error.
See also: GetAllFiles() See also: GetAllFiles()
*/ */
size_t Traverse(wxDirTraverser& sink, size_t Traverse(wxDirTraverser& sink,

View File

@@ -28,35 +28,26 @@ 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
empty if filters be 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,
@@ -109,7 +100,6 @@ public:
/** /**
Gets selected filename path only (else empty string). Gets selected filename path only (else empty string).
This function doesn't count a directory as a selection. This function doesn't count a directory as a selection.
*/ */
wxString GetFilePath(); wxString GetFilePath();
@@ -177,8 +167,8 @@ public:
/** /**
@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.
*/ */
void ShowHidden(bool show); void ShowHidden(bool show);
}; };

View File

@@ -40,25 +40,19 @@ public:
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,
const wxString& message = "Choose a directory", const wxString& message = "Choose a directory",
@@ -109,9 +103,9 @@ 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
const wxString& dir = wxDirSelector("Choose a folder"); const wxString& dir = wxDirSelector("Choose a folder");
if ( !dir.empty() ) if ( !dir.empty() )
@@ -124,5 +118,5 @@ wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
const wxString& default_path = "", const wxString& default_path = "",
long style = 0, long style = 0,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
wxWindow * parent = @NULL); wxWindow* parent = NULL);

View File

@@ -25,8 +25,8 @@ 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().
*/ */
wxDisplay(unsigned index = 0); wxDisplay(unsigned index = 0);
@@ -38,14 +38,12 @@ public:
/** /**
Changes the video mode of this display to the mode specified Changes the video mode of this display to the mode specified
in the mode parameter. in the mode parameter.
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
@@ -82,20 +80,18 @@ public:
@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);
/** /**
Returns the index of the display on which the given window lies. Returns the index of the display on which the given window lies.
If the window is on more than one display it gets the display that overlaps the If the window is on more than one display it gets the display that overlaps the
window the most. window the most.
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);

View File

@@ -16,8 +16,7 @@
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDropSource, @ref overview_wxdndoverview, wxDropSource, wxDropTarget, wxFileDropTarget
wxDropTarget, wxFileDropTarget
*/ */
class wxTextDropTarget : public wxDropTarget class wxTextDropTarget : public wxDropTarget
{ {
@@ -37,13 +36,11 @@ 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,
const wxString& data); const wxString& data);
@@ -70,8 +67,7 @@ public:
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 and @ref overview_wxdataobjectoverview
overview_wxdataobjectoverview "wxDataObject overview"
for more information. for more information.
@library{wxcore} @library{wxcore}
@@ -84,9 +80,9 @@ class wxDropTarget
{ {
public: public:
/** /**
Constructor. @e data is the data to be associated with the drop target. Constructor. @a data is the data to be associated with the drop target.
*/ */
wxDropTarget(wxDataObject* data = @NULL); wxDropTarget(wxDataObject* data = NULL);
/** /**
Destructor. Deletes the associated data object, if any. Destructor. Deletes the associated data object, if any.
@@ -114,17 +110,15 @@ public:
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
optical feedback from the side of the drop source, optical feedback from the side of the drop source,
typically in form of changing the icon. typically in form of changing the icon.
*/ */
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, virtual wxDragResult OnDragOver(wxCoord x, wxCoord y,
wxDragResult def); wxDragResult def);
@@ -134,10 +128,9 @@ public:
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.
*/ */
@@ -148,17 +141,16 @@ public:
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
optical feedback from the side of the drop source, optical feedback from the side of the drop source,
typically in form of changing the icon. typically in form of changing the icon.
*/ */
virtual wxDragResult OnEnter(wxCoord x, wxCoord y, virtual wxDragResult OnEnter(wxCoord x, wxCoord y,
wxDragResult def); wxDragResult def);
@@ -182,8 +174,7 @@ public:
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 and @ref overview_wxdataobjectoverview
overview_wxdataobjectoverview "wxDataObject overview"
for more information. for more information.
@library{wxcore} @library{wxcore}
@@ -198,32 +189,27 @@ public:
//@{ //@{
/** /**
The constructors for wxDataObject. The constructors for wxDataObject.
If you use the constructor without @a 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 @a iconCopy and subsequent parameters differs
Note that the exact type of @e iconCopy and subsequent parameters differs
between wxMSW and wxGTK: these are cursors under Windows but icons for GTK. between wxMSW and wxGTK: these are cursors under Windows but icons for GTK.
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);
@@ -240,21 +226,21 @@ public:
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.
*/ */
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
/** /**
Returns the wxDataObject object that has been assigned previously. Returns the wxDataObject object that has been assigned previously.
*/ */
wxDataObject * GetDataObject(); wxDataObject* GetDataObject();
/** /**
Overridable: you may give some custom UI feedback during the drag and drop Overridable: you may give some custom UI feedback during the drag and drop
@@ -264,15 +250,14 @@ public:
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
implement your own feedback. The return values is implement your own feedback. The return values is
ignored under GTK. ignored under GTK.
*/ */
virtual bool GiveFeedback(wxDragResult effect); virtual bool GiveFeedback(wxDragResult effect);
@@ -280,10 +265,9 @@ 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);
@@ -306,8 +290,7 @@ public:
@category{dnd} @category{dnd}
@seealso @seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDropSource, @ref overview_wxdndoverview, wxDropSource, wxDropTarget, wxTextDropTarget
wxDropTarget, wxTextDropTarget
*/ */
class wxFileDropTarget : public wxDropTarget class wxFileDropTarget : public wxDropTarget
{ {
@@ -327,13 +310,11 @@ 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,
const wxArrayString& filenames); const wxArrayString& filenames);
@@ -348,9 +329,8 @@ 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".
*/ */
#define wxIconOrCursor wxDROP_ICON(const char * name) /* implementation is private */ #define wxIconOrCursor wxDROP_ICON(const char* name) /* implementation is private */

View File

@@ -23,7 +23,7 @@
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxMDIParentFrame @ref overview_docviewoverview, wxMDIParentFrame
*/ */
class wxDocMDIParentFrame : public wxMDIParentFrame class wxDocMDIParentFrame : public wxMDIParentFrame
{ {
@@ -33,7 +33,7 @@ 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,
@@ -50,7 +50,7 @@ public:
/** /**
Creates the window. Creates the window.
*/ */
bool Create(wxDocManager* manager, wxFrame * parent, bool Create(wxDocManager* manager, wxFrame* parent,
wxWindowID id, const wxString& title, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -60,7 +60,6 @@ public:
/** /**
Deletes all views and documents. If no user input cancelled the Deletes all views and documents. If no user input cancelled the
operation, the frame will be destroyed and the application will exit. operation, the frame will be destroyed and the application will exit.
Since understanding how document/view clean-up takes place can be difficult, Since understanding how document/view clean-up takes place can be difficult,
the implementation of this function is shown below. the implementation of this function is shown below.
*/ */
@@ -85,7 +84,7 @@ public:
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxMDIChildFrame @ref overview_docviewoverview, wxMDIChildFrame
*/ */
class wxDocMDIChildFrame : public wxMDIChildFrame class wxDocMDIChildFrame : public wxMDIChildFrame
{ {
@@ -132,23 +131,21 @@ public:
/** /**
Sets the document for this frame. Sets the document for this frame.
*/ */
void SetDocument(wxDocument * doc); void SetDocument(wxDocument* doc);
/** /**
Sets the view for this frame. Sets the view for this frame.
*/ */
void SetView(wxView * view); void SetView(wxView* view);
/** /**
wxDocument* m_childDocument wxDocument* m_childDocument
The document associated with the frame. The document associated with the frame.
*/ */
/** /**
wxView* m_childView wxView* m_childView
The view associated with the frame. The view associated with the frame.
*/ */
}; };

View File

@@ -26,64 +26,49 @@ public:
Constructor. Create instances dynamically near the start of your application Constructor. Create instances dynamically near the start of your application
after creating after creating
a wxDocManager instance, and before doing any document or view operations. a wxDocManager instance, and before doing any document or view operations.
@a manager is the document manager object which manages this template.
@e manager is the document manager object which manages this template. @a descr is a short description of what the template is for. This string will
@e descr is a short description of what the template is for. This string will
be displayed in the be displayed in the
file filter list of Windows file selectors. file filter list of Windows file selectors.
@a filter is an appropriate file filter such as @c *.txt.
@e filter is an appropriate file filter such as @c *.txt. @a dir is the default directory to use for file selectors.
@a ext is the default file extension (such as txt).
@e dir is the default directory to use for file selectors. @a docTypeName is a name that should be unique for a given type of document,
@e ext is the default file extension (such as txt).
@e docTypeName is a name that should be unique for a given type of document,
used for used for
gathering a list of views relevant to a particular document. gathering a list of views relevant to a particular document.
@a viewTypeName is a name that should be unique for a given view.
@e viewTypeName is a name that should be unique for a given view. @a docClassInfo is a pointer to the run-time document class information as
@e docClassInfo is a pointer to the run-time document class information as
returned returned
by the CLASSINFO macro, e.g. CLASSINFO(MyDocumentClass). If this is not by the CLASSINFO macro, e.g. CLASSINFO(MyDocumentClass). If this is not
supplied, supplied,
you will need to derive a new wxDocTemplate class and override the you will need to derive a new wxDocTemplate class and override the
CreateDocument CreateDocument
member to return a new document instance on demand. member to return a new document instance on demand.
@a viewClassInfo is a pointer to the run-time view class information as returned
@e viewClassInfo is a pointer to the run-time view class information as returned
by the CLASSINFO macro, e.g. CLASSINFO(MyViewClass). If this is not supplied, by the CLASSINFO macro, e.g. CLASSINFO(MyViewClass). If this is not supplied,
you will need to derive a new wxDocTemplate class and override the CreateView you will need to derive a new wxDocTemplate class and override the CreateView
member to return a new view instance on demand. member to return a new view instance on demand.
@a flags is a bit list of the following:
@e flags is a bit list of the following:
wxTEMPLATE_VISIBLE The template may be displayed to the user in dialogs. wxTEMPLATE_VISIBLE The template may be displayed to the user in dialogs.
wxTEMPLATE_INVISIBLE The template may not be displayed to the user in dialogs. wxTEMPLATE_INVISIBLE The template may not be displayed to the user in dialogs.
wxDEFAULT_TEMPLATE_FLAGS Defined as wxTEMPLATE_VISIBLE. wxDEFAULT_TEMPLATE_FLAGS Defined as wxTEMPLATE_VISIBLE.
@b Wx::DocTemplate-new( docmgr, descr, filter, dir, @b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags
) )
will construct document and view objects from the class information will construct document and view objects from the class information
@b Wx::DocTemplate-new( docmgr, descr, filter, dir, @b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassName, viewClassName, flags ext, docTypeName, viewTypeName, docClassName, viewClassName, flags
) )
will construct document and view objects from perl packages will construct document and view objects from perl packages
@b Wx::DocTemplate-new( docmgr, descr, filter, dir, @b Wx::DocTemplate-new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName ) ext, docTypeName, viewTypeName )
@c Wx::DocTemplate::CreateDocument() and @c Wx::DocTemplate::CreateDocument() and
@c Wx::DocTemplate::CreateView() must be overridden @c Wx::DocTemplate::CreateView() must be overridden
*/ */
@@ -93,8 +78,8 @@ public:
const wxString& ext, const wxString& ext,
const wxString& docTypeName, const wxString& docTypeName,
const wxString& viewTypeName, const wxString& viewTypeName,
wxClassInfo* docClassInfo = @NULL, wxClassInfo* docClassInfo = NULL,
wxClassInfo* viewClassInfo = @NULL, wxClassInfo* viewClassInfo = NULL,
long flags = wxDEFAULT_TEMPLATE_FLAGS); long flags = wxDEFAULT_TEMPLATE_FLAGS);
/** /**
@@ -108,11 +93,10 @@ public:
a wxClassInfo parameter to the template constructor, you will need to override a wxClassInfo parameter to the template constructor, you will need to override
this this
function to return an appropriate document instance. function to return an appropriate document instance.
This function calls InitDocument() which in turns This function calls InitDocument() which in turns
calls wxDocument::OnCreate. calls wxDocument::OnCreate.
*/ */
wxDocument * CreateDocument(const wxString& path, long flags = 0); wxDocument* CreateDocument(const wxString& path, long flags = 0);
/** /**
Creates a new instance of the associated view class. If you have not supplied Creates a new instance of the associated view class. If you have not supplied
@@ -120,7 +104,7 @@ public:
this this
function to return an appropriate view instance. function to return an appropriate view instance.
*/ */
wxView * CreateView(wxDocument * doc, long flags = 0); wxView* CreateView(wxDocument* doc, long flags = 0);
/** /**
Returns the default file extension for the document data, as passed to the Returns the default file extension for the document data, as passed to the
@@ -143,7 +127,7 @@ public:
Returns a pointer to the document manager instance for which this template was Returns a pointer to the document manager instance for which this template was
created. created.
*/ */
wxDocManager * GetDocumentManager(); wxDocManager* GetDocumentManager();
/** /**
Returns the document type name, as passed to the document template constructor. Returns the document type name, as passed to the document template constructor.
@@ -198,7 +182,7 @@ public:
created. created.
Should not be called by the application. Should not be called by the application.
*/ */
void SetDocumentManager(wxDocManager * manager); void SetDocumentManager(wxDocManager* manager);
/** /**
Sets the file filter. Sets the file filter.
@@ -213,28 +197,24 @@ public:
/** /**
wxString m_defaultExt wxString m_defaultExt
The default extension for files of this type. The default extension for files of this type.
*/ */
/** /**
wxString m_description wxString m_description
A short description of this template. A short description of this template.
*/ */
/** /**
wxString m_directory wxString m_directory
The default directory for files of this type. The default directory for files of this type.
*/ */
/** /**
wxClassInfo* m_docClassInfo wxClassInfo* m_docClassInfo
Run-time class information that allows document instances to be constructed Run-time class information that allows document instances to be constructed
dynamically. dynamically.
*/ */
@@ -242,35 +222,30 @@ public:
/** /**
wxString m_docTypeName wxString m_docTypeName
The named type of the document associated with this template. The named type of the document associated with this template.
*/ */
/** /**
wxDocTemplate* m_documentManager wxDocTemplate* m_documentManager
A pointer to the document manager for which this template was created. A pointer to the document manager for which this template was created.
*/ */
/** /**
wxString m_fileFilter wxString m_fileFilter
The file filter (such as @c *.txt) to be used in file selector dialogs. The file filter (such as @c *.txt) to be used in file selector dialogs.
*/ */
/** /**
long m_flags long m_flags
The flags passed to the constructor. The flags passed to the constructor.
*/ */
/** /**
wxClassInfo* m_viewClassInfo wxClassInfo* m_viewClassInfo
Run-time class information that allows view instances to be constructed Run-time class information that allows view instances to be constructed
dynamically. dynamically.
*/ */
@@ -278,7 +253,6 @@ public:
/** /**
wxString m_viewTypeName wxString m_viewTypeName
The named type of the view associated with this template. The named type of the view associated with this template.
*/ */
}; };
@@ -307,10 +281,8 @@ public:
Constructor. Create a document manager instance dynamically near the start of Constructor. Create a document manager instance dynamically near the start of
your application your application
before doing any document or view operations. before doing any document or view operations.
@a flags is currently unused.
@e flags is currently unused. If @a initialize is @true, the Initialize() function will be called
If @e initialize is @true, the Initialize() function will be called
to create a default history list object. If you derive from wxDocManager, you to create a default history list object. If you derive from wxDocManager, you
may wish to call the may wish to call the
base constructor with @false, and then call Initialize in your own constructor, base constructor with @false, and then call Initialize in your own constructor,
@@ -318,7 +290,7 @@ public:
your own Initialize or OnCreateFileHistory functions to be called. your own Initialize or OnCreateFileHistory functions to be called.
*/ */
wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS,
bool initialize = @true); bool initialize = true);
/** /**
Destructor. Destructor.
@@ -328,12 +300,12 @@ public:
/** /**
Sets the current view. Sets the current view.
*/ */
void ActivateView(wxView* doc, bool activate = @true); void ActivateView(wxView* doc, bool activate = true);
/** /**
Adds the document to the list of documents. Adds the document to the list of documents.
*/ */
void AddDocument(wxDocument * doc); void AddDocument(wxDocument* doc);
/** /**
Adds a file to the file history list, if we have a pointer to an appropriate Adds a file to the file history list, if we have a pointer to an appropriate
@@ -344,20 +316,18 @@ public:
/** /**
Adds the template to the document manager's template list. Adds the template to the document manager's template list.
*/ */
void AssociateTemplate(wxDocTemplate * temp); void AssociateTemplate(wxDocTemplate* temp);
/** /**
Closes all currently opened documents. Closes all currently opened documents.
*/ */
bool CloseDocuments(bool force = @true); bool CloseDocuments(bool force = true);
/** /**
Creates a new document in a manner determined by the @e flags parameter, which Creates a new document in a manner determined by the @a flags parameter, which
can be: can be:
wxDOC_NEW Creates a fresh document. wxDOC_NEW Creates a fresh document.
wxDOC_SILENT Silently loads the given document file. wxDOC_SILENT Silently loads the given document file.
If wxDOC_NEW is present, a new document will be created and returned, possibly If wxDOC_NEW is present, a new document will be created and returned, possibly
after after
asking the user for a template to use if there is more than one document asking the user for a template to use if there is more than one document
@@ -368,7 +338,6 @@ public:
a file selector for the file to load, and the template to use will be a file selector for the file to load, and the template to use will be
determined by the determined by the
extension (Windows) or by popping up a template choice list (other platforms). extension (Windows) or by popping up a template choice list (other platforms).
If the maximum number of documents has been reached, this function If the maximum number of documents has been reached, this function
will delete the oldest currently loaded document before creating a new one. will delete the oldest currently loaded document before creating a new one.
*/ */
@@ -386,7 +355,7 @@ public:
/** /**
Removes the template from the list of templates. Removes the template from the list of templates.
*/ */
void DisassociateTemplate(wxDocTemplate * temp); void DisassociateTemplate(wxDocTemplate* temp);
//@{ //@{
/** /**
@@ -399,7 +368,7 @@ public:
/** /**
Loads the file history from a config object. Loads the file history from a config object.
@sa wxConfig @see wxConfig
*/ */
void FileHistoryLoad(wxConfigBase& config); void FileHistoryLoad(wxConfigBase& config);
@@ -413,7 +382,7 @@ public:
Saves the file history into a config object. This must be called Saves the file history into a config object. This must be called
explicitly by the application. explicitly by the application.
@sa wxConfig @see wxConfig
*/ */
void FileHistorySave(wxConfigBase& resourceFile); void FileHistorySave(wxConfigBase& resourceFile);
@@ -421,7 +390,6 @@ public:
Use this menu for appending recently-visited document filenames, for convenient Use this menu for appending recently-visited document filenames, for convenient
access. Calling this function with a valid menu pointer enables the history access. Calling this function with a valid menu pointer enables the history
list functionality. list functionality.
Note that you can add multiple menus using this function, to be managed by the Note that you can add multiple menus using this function, to be managed by the
file history object. file history object.
*/ */
@@ -431,17 +399,17 @@ public:
Given a path, try to find template that matches the extension. This is only Given a path, try to find template that matches the extension. This is only
an approximate method of finding a template for creating a document. an approximate method of finding a template for creating a document.
*/ */
wxDocTemplate * FindTemplateForPath(const wxString& path); wxDocTemplate* FindTemplateForPath(const wxString& path);
/** /**
Returns the document associated with the currently active view (if any). Returns the document associated with the currently active view (if any).
*/ */
wxDocument * GetCurrentDocument(); wxDocument* GetCurrentDocument();
/** /**
Returns the currently active view Returns the currently active view
*/ */
wxView * GetCurrentView(); wxView* GetCurrentView();
/** /**
Returns a reference to the list of documents. Returns a reference to the list of documents.
@@ -451,7 +419,7 @@ public:
/** /**
Returns a pointer to file history. Returns a pointer to file history.
*/ */
wxFileHistory * GetFileHistory(); wxFileHistory* GetFileHistory();
/** /**
Returns the number of files currently stored in the file history. Returns the number of files currently stored in the file history.
@@ -484,7 +452,6 @@ public:
vetoed by passing @false to the second argument, allowing the derived class's vetoed by passing @false to the second argument, allowing the derived class's
constructor to call Initialize, possibly calling a different OnCreateFileHistory constructor to call Initialize, possibly calling a different OnCreateFileHistory
from the default. from the default.
The bottom line: if you're not deriving from Initialize, forget it and The bottom line: if you're not deriving from Initialize, forget it and
construct wxDocManager with no arguments. construct wxDocManager with no arguments.
*/ */
@@ -503,7 +470,7 @@ public:
Called Called
from Initialize(). from Initialize().
*/ */
wxFileHistory * OnCreateFileHistory(); wxFileHistory* OnCreateFileHistory();
/** /**
Closes and deletes the currently active document. Closes and deletes the currently active document.
@@ -544,26 +511,23 @@ public:
/** /**
Removes the document from the list of documents. Removes the document from the list of documents.
*/ */
void RemoveDocument(wxDocument * doc); void RemoveDocument(wxDocument* doc);
/** /**
Under Windows, pops up a file selector with a list of filters corresponding to Under Windows, pops up a file selector with a list of filters corresponding to
document templates. document templates.
The wxDocTemplate corresponding to the selected file's extension is returned. The wxDocTemplate corresponding to the selected file's extension is returned.
On other platforms, if there is more than one document template a choice list On other platforms, if there is more than one document template a choice list
is popped up, is popped up,
followed by a file selector. followed by a file selector.
This function is used in CreateDocument(). This function is used in CreateDocument().
(doctemplate, path) = My::DocManager-SelectDocumentPath( ... ); (doctemplate, path) = My::DocManager-SelectDocumentPath( ... );
*/ */
wxDocTemplate * SelectDocumentPath(wxDocTemplate ** templates, wxDocTemplate* SelectDocumentPath(wxDocTemplate** templates,
int noTemplates, int noTemplates,
wxString& path, wxString& path,
long flags, long flags,
bool save); bool save);
/** /**
Returns a document template by asking the user (if there is more than one Returns a document template by asking the user (if there is more than one
@@ -571,20 +535,19 @@ public:
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,
int noTemplates, int noTemplates,
bool sort=@false); bool sort = false);
/** /**
Returns a document template by asking the user (if there is more than one Returns a document template by asking the user (if there is more than one
@@ -595,20 +558,19 @@ public:
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,
int noTemplates, int noTemplates,
bool sort=@false); bool sort = false);
/** /**
Sets the directory to be displayed to the user when opening a file. Initially Sets the directory to be displayed to the user when opening a file. Initially
@@ -628,28 +590,24 @@ public:
/** /**
wxView* m_currentView wxView* m_currentView
The currently active view. The currently active view.
*/ */
/** /**
int m_defaultDocumentNameCounter int m_defaultDocumentNameCounter
Stores the integer to be used for the next default document name. Stores the integer to be used for the next default document name.
*/ */
/** /**
wxList m_docs wxList m_docs
A list of all documents. A list of all documents.
*/ */
/** /**
wxFileHistory* m_fileHistory wxFileHistory* m_fileHistory
A pointer to an instance of wxFileHistory, A pointer to an instance of wxFileHistory,
which manages the history of recently-visited files on the File menu. which manages the history of recently-visited files on the File menu.
*/ */
@@ -657,21 +615,18 @@ public:
/** /**
long m_flags long m_flags
Stores the flags passed to the constructor. Stores the flags passed to the constructor.
*/ */
/** /**
The directory last selected by the user when opening a file. The directory last selected by the user when opening a file.
wxFileHistory* m_fileHistory wxFileHistory* m_fileHistory
*/ */
/** /**
int m_maxDocsOpen int m_maxDocsOpen
Stores the maximum number of documents that can be opened before Stores the maximum number of documents that can be opened before
existing documents are closed. By default, this is 10,000. existing documents are closed. By default, this is 10,000.
*/ */
@@ -717,20 +672,18 @@ public:
need to need to
call this function from any place where you know the view must call this function from any place where you know the view must
be active, and the framework will need to get the current view. be active, and the framework will need to get the current view.
The prepackaged view frame wxDocChildFrame calls Activate() from its OnActivate The prepackaged view frame wxDocChildFrame calls Activate() from its OnActivate
member. member.
This function calls OnActivateView(). This function calls OnActivateView().
*/ */
virtual void Activate(bool activate); virtual void Activate(bool activate);
/** /**
Closes the view by calling OnClose. If @e deleteWindow is @true, this function Closes the view by calling OnClose. If @a deleteWindow is @true, this function
should should
delete the window associated with the view. delete the window associated with the view.
*/ */
virtual bool Close(bool deleteWindow = @true); virtual bool Close(bool deleteWindow = true);
/** /**
Gets a pointer to the document associated with the view. Gets a pointer to the document associated with the view.
@@ -748,7 +701,7 @@ public:
pages instead of the frames and this is why this method returns a wxWindow and pages instead of the frames and this is why this method returns a wxWindow and
not a wxFrame. not a wxFrame.
*/ */
wxWindow * GetFrame(); wxWindow* GetFrame();
/** /**
Gets the name associated with the view (passed to the wxDocTemplate Gets the name associated with the view (passed to the wxDocTemplate
@@ -762,8 +715,8 @@ public:
implementation does implementation does
nothing. nothing.
*/ */
virtual void OnActivateView(bool activate, wxView * activeView, virtual void OnActivateView(bool activate, wxView* activeView,
wxView * deactiveView); wxView* deactiveView);
/** /**
Called when the filename has changed. The default implementation constructs a Called when the filename has changed. The default implementation constructs a
@@ -777,7 +730,7 @@ public:
may wish to do some cleaning up operations in this function, @e if a may wish to do some cleaning up operations in this function, @e if a
call to wxDocument::Close succeeded. For example, if your views call to wxDocument::Close succeeded. For example, if your views
all share the same window, you need to disassociate the window from the view all share the same window, you need to disassociate the window from the view
and perhaps clear the window. If @e deleteWindow is @true, delete the and perhaps clear the window. If @a deleteWindow is @true, delete the
frame associated with the view. frame associated with the view.
*/ */
virtual bool OnClose(bool deleteWindow); virtual bool OnClose(bool deleteWindow);
@@ -795,7 +748,6 @@ public:
wxDocChildFrame wxDocChildFrame
or a derived class. This wxDocChildFrame provides user interface or a derived class. This wxDocChildFrame provides user interface
elements to view and/or edit the contents of the wxDocument. elements to view and/or edit the contents of the wxDocument.
By default, simply returns @true. If the function returns @false, the By default, simply returns @true. If the function returns @false, the
view will be deleted. view will be deleted.
*/ */
@@ -805,10 +757,8 @@ public:
If the printing framework is enabled in the library, this function returns a If the printing framework is enabled in the library, this function returns a
wxPrintout object for the purposes of printing. It should create a new object wxPrintout object for the purposes of printing. It should create a new object
every time it is called; the framework will delete objects it creates. every time it is called; the framework will delete objects it creates.
By default, this function returns an instance of wxDocPrintout, which prints By default, this function returns an instance of wxDocPrintout, which prints
and previews one page by calling OnDraw(). and previews one page by calling OnDraw().
Override to return an instance of a class other than wxDocPrintout. Override to return an instance of a class other than wxDocPrintout.
*/ */
virtual wxPrintout* OnCreatePrintout(); virtual wxPrintout* OnCreatePrintout();
@@ -819,10 +769,10 @@ public:
virtual void OnDraw(wxDC* dc); virtual void OnDraw(wxDC* dc);
/** /**
Called when the view should be updated. @e sender is a pointer to the view Called when the view should be updated. @a sender is a pointer to the view
that sent the update request, or @NULL if no single view requested the update that sent the update request, or @NULL if no single view requested the update
(for instance, (for instance,
when the document is opened). @e hint is as yet unused but may in future contain when the document is opened). @a hint is as yet unused but may in future contain
application-specific information for making updating more efficient. application-specific information for making updating more efficient.
*/ */
virtual void OnUpdate(wxView* sender, wxObject* hint); virtual void OnUpdate(wxView* sender, wxObject* hint);
@@ -836,7 +786,6 @@ public:
/** /**
Sets the frame associated with this view. The application should call this Sets the frame associated with this view. The application should call this
if possible, to tell the view about the frame. if possible, to tell the view about the frame.
See GetFrame() for the explanation about the mismatch See GetFrame() for the explanation about the mismatch
between the "Frame'' in the method name and the type of its parameter. between the "Frame'' in the method name and the type of its parameter.
*/ */
@@ -849,7 +798,6 @@ public:
/** /**
wxDocument* m_viewDocument wxDocument* m_viewDocument
The document associated with this view. There may be more than one view per The document associated with this view. There may be more than one view per
document, but there can never be more than one document for one view. document, but there can never be more than one document for one view.
*/ */
@@ -857,14 +805,12 @@ public:
/** /**
wxFrame* m_viewFrame wxFrame* m_viewFrame
Frame associated with the view, if any. Frame associated with the view, if any.
*/ */
/** /**
wxString m_viewTypeName wxString m_viewTypeName
The view type name given to the wxDocTemplate constructor, copied to this The view type name given to the wxDocTemplate constructor, copied to this
variable when the view is created. Not currently used by the framework. variable when the view is created. Not currently used by the framework.
*/ */
@@ -888,7 +834,7 @@ public:
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxFrame @ref overview_docviewoverview, wxFrame
*/ */
class wxDocChildFrame : public wxFrame class wxDocChildFrame : public wxFrame
{ {
@@ -934,23 +880,21 @@ public:
/** /**
Sets the document for this frame. Sets the document for this frame.
*/ */
void SetDocument(wxDocument * doc); void SetDocument(wxDocument* doc);
/** /**
Sets the view for this frame. Sets the view for this frame.
*/ */
void SetView(wxView * view); void SetView(wxView* view);
/** /**
wxDocument* m_childDocument wxDocument* m_childDocument
The document associated with the frame. The document associated with the frame.
*/ */
/** /**
wxView* m_childView wxView* m_childView
The view associated with the frame. The view associated with the frame.
*/ */
}; };
@@ -973,7 +917,7 @@ public:
@category{dvf} @category{dvf}
@seealso @seealso
@ref overview_docviewoverview "Document/view overview", wxFrame @ref overview_docviewoverview, wxFrame
*/ */
class wxDocParentFrame : public wxFrame class wxDocParentFrame : public wxFrame
{ {
@@ -983,7 +927,7 @@ 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,
@@ -1000,7 +944,7 @@ public:
/** /**
Used in two-step construction. Used in two-step construction.
*/ */
bool Create(wxDocManager* manager, wxFrame * parent, bool Create(wxDocManager* manager, wxFrame* parent,
wxWindowID id, const wxString& title, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -1010,12 +954,11 @@ public:
/** /**
Returns the associated @ref overview_wxdocmanager "document manager object". Returns the associated @ref overview_wxdocmanager "document manager object".
*/ */
wxDocManager * GetDocumentManager(); wxDocManager* GetDocumentManager();
/** /**
Deletes all views and documents. If no user input cancelled the Deletes all views and documents. If no user input cancelled the
operation, the frame will be destroyed and the application will exit. operation, the frame will be destroyed and the application will exit.
Since understanding how document/view clean-up takes place can be difficult, Since understanding how document/view clean-up takes place can be difficult,
the implementation of this function is shown below. the implementation of this function is shown below.
*/ */
@@ -1058,7 +1001,7 @@ public:
If the view is not already in the list of views, adds the view and calls If the view is not already in the list of views, adds the view and calls
OnChangedViewList. OnChangedViewList.
*/ */
virtual bool AddView(wxView * view); virtual bool AddView(wxView* view);
/** /**
Closes the document, by calling OnSaveModified and then (if this returned @true) Closes the document, by calling OnSaveModified and then (if this returned @true)
@@ -1079,7 +1022,6 @@ public:
/** /**
Returns a pointer to the command processor associated with this document. Returns a pointer to the command processor associated with this document.
See wxCommandProcessor. See wxCommandProcessor.
*/ */
wxCommandProcessor* GetCommandProcessor(); wxCommandProcessor* GetCommandProcessor();
@@ -1115,10 +1057,9 @@ public:
/** /**
A convenience function to get the first view for a document, because A convenience function to get the first view for a document, because
in many cases a document will only have a single view. in many cases a document will only have a single view.
See also: GetViews() See also: GetViews()
*/ */
wxView * GetFirstView(); wxView* GetFirstView();
/** /**
Gets the title for this document. The document title is used for an associated Gets the title for this document. The document title is used for an associated
@@ -1136,7 +1077,6 @@ public:
/** /**
Returns the list whose elements are the views on the document. Returns the list whose elements are the views on the document.
See also: GetFirstView() See also: GetFirstView()
*/ */
wxList GetViews(); wxList GetViews();
@@ -1147,7 +1087,6 @@ public:
You may need to override this if your document view maintains its own You may need to override this if your document view maintains its own
record of being modified (for example if using wxTextWindow to view and edit record of being modified (for example if using wxTextWindow to view and edit
the document). the document).
See also Modify(). See also Modify().
*/ */
virtual bool IsModified(); virtual bool IsModified();
@@ -1157,7 +1096,6 @@ public:
Override this function and call it from your own LoadObject before Override this function and call it from your own LoadObject before
streaming your own data. LoadObject is called by the framework streaming your own data. LoadObject is called by the framework
automatically when the document contents need to be loaded. automatically when the document contents need to be loaded.
Note that only one of these forms exists, depending on how wxWidgets Note that only one of these forms exists, depending on how wxWidgets
was configured. was configured.
*/ */
@@ -1171,7 +1109,6 @@ public:
You may need to override this if your document view maintains its own You may need to override this if your document view maintains its own
record of being modified (for example if using wxTextWindow to view and edit record of being modified (for example if using wxTextWindow to view and edit
the document). the document).
See also IsModified(). See also IsModified().
*/ */
virtual void Modify(bool modify); virtual void Modify(bool modify);
@@ -1202,7 +1139,6 @@ public:
Override this function if you want a different (or no) command processor Override this function if you want a different (or no) command processor
to be created when the document is created. By default, it returns to be created when the document is created. By default, it returns
an instance of wxCommandProcessor. an instance of wxCommandProcessor.
See wxCommandProcessor. See wxCommandProcessor.
*/ */
virtual wxCommandProcessor* OnCreateCommandProcessor(); virtual wxCommandProcessor* OnCreateCommandProcessor();
@@ -1262,7 +1198,6 @@ public:
Override this function and call it from your own SaveObject before Override this function and call it from your own SaveObject before
streaming your own data. SaveObject is called by the framework streaming your own data. SaveObject is called by the framework
automatically when the document contents need to be saved. automatically when the document contents need to be saved.
Note that only one of these forms exists, depending on how wxWidgets Note that only one of these forms exists, depending on how wxWidgets
was configured. was configured.
*/ */
@@ -1276,10 +1211,9 @@ public:
for its deletion. Normally you should not call this; override for its deletion. Normally you should not call this; override
OnCreateCommandProcessor OnCreateCommandProcessor
instead. instead.
See wxCommandProcessor. See wxCommandProcessor.
*/ */
virtual void SetCommandProcessor(wxCommandProcessor * processor); virtual void SetCommandProcessor(wxCommandProcessor* processor);
/** /**
Sets the document type name for this document. See the comment for Sets the document type name for this document. See the comment for
@@ -1296,11 +1230,10 @@ public:
/** /**
Sets the filename for this document. Usually called by the framework. Sets the filename for this document. Usually called by the framework.
If @a notifyViews is @true, wxView::OnChangeFilename is called for all views.
If @e notifyViews is @true, wxView::OnChangeFilename is called for all views.
*/ */
void SetFilename(const wxString& filename, void SetFilename(const wxString& filename,
bool notifyViews = @false); bool notifyViews = false);
/** /**
Sets the title for this document. The document title is used for an associated Sets the title for this document. The document title is used for an associated
@@ -1310,43 +1243,37 @@ public:
void SetTitle(const wxString& title); void SetTitle(const wxString& title);
/** /**
Updates all views. If @e sender is non-@NULL, does not update this view. Updates all views. If @a sender is non-@NULL, does not update this view.
@a hint represents optional information to allow a view to optimize its update.
@e hint represents optional information to allow a view to optimize its update.
*/ */
void UpdateAllViews(wxView* sender = @NULL, wxObject* hint = @NULL); void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL);
/** /**
wxCommandProcessor* m_commandProcessor wxCommandProcessor* m_commandProcessor
A pointer to the command processor associated with this document. A pointer to the command processor associated with this document.
*/ */
/** /**
wxString m_documentFile wxString m_documentFile
Filename associated with this document ("" if none). Filename associated with this document ("" if none).
*/ */
/** /**
bool m_documentModified bool m_documentModified
@true if the document has been modified, @false otherwise. @true if the document has been modified, @false otherwise.
*/ */
/** /**
wxDocTemplate * m_documentTemplate wxDocTemplate * m_documentTemplate
A pointer to the template from which this document was created. A pointer to the template from which this document was created.
*/ */
/** /**
wxString m_documentTitle wxString m_documentTitle
Document title. The document title is used for an associated Document title. The document title is used for an associated
frame (if any), and is usually constructed by the framework from frame (if any), and is usually constructed by the framework from
the filename. the filename.
@@ -1355,7 +1282,6 @@ public:
/** /**
wxString m_documentTypeName wxString m_documentTypeName
The document type name given to the wxDocTemplate constructor, copied to this The document type name given to the wxDocTemplate constructor, copied to this
variable when the document is created. If several document templates are variable when the document is created. If several document templates are
created that use the same document type, this variable is used in created that use the same document type, this variable is used in
@@ -1367,7 +1293,6 @@ public:
/** /**
wxList m_documentViews wxList m_documentViews
List of wxView instances associated with this document. List of wxView instances associated with this document.
*/ */
}; };
@@ -1398,8 +1323,7 @@ public:
/** /**
Constructor. Pass the maximum number of files that should be stored and Constructor. Pass the maximum number of files that should be stored and
displayed. displayed.
@a idBase defaults to wxID_FILE1 and represents the id given to the first
@e idBase defaults to wxID_FILE1 and represents the id given to the first
history menu item. Since menu items can't share the same ID you should change history menu item. Since menu items can't share the same ID you should change
idBase (To one of your own defined IDs) when using more than one wxFileHistory idBase (To one of your own defined IDs) when using more than one wxFileHistory
in your application. in your application.
@@ -1449,7 +1373,7 @@ public:
/** /**
Returns the list of menus that are managed by this file history object. Returns the list of menus that are managed by this file history object.
@sa UseMenu() @see UseMenu()
*/ */
const wxList GetMenus(); const wxList GetMenus();
@@ -1457,7 +1381,7 @@ public:
Loads the file history from the given config object. This function should be Loads the file history from the given config object. This function should be
called explicitly by the application. called explicitly by the application.
@sa wxConfig @see wxConfig
*/ */
void Load(wxConfigBase& config); void Load(wxConfigBase& config);
@@ -1475,7 +1399,7 @@ public:
Saves the file history into the given config object. This must be called Saves the file history into the given config object. This must be called
explicitly by the application. explicitly by the application.
@sa wxConfig @see wxConfig
*/ */
void Save(wxConfigBase& config); void Save(wxConfigBase& config);
@@ -1495,7 +1419,6 @@ public:
/** /**
char** m_fileHistory char** m_fileHistory
A character array of strings corresponding to the most recently opened A character array of strings corresponding to the most recently opened
files. files.
*/ */
@@ -1503,21 +1426,18 @@ public:
/** /**
size_t m_fileHistoryN size_t m_fileHistoryN
The number of files stored in the history array. The number of files stored in the history array.
*/ */
/** /**
size_t m_fileMaxFiles size_t m_fileMaxFiles
The maximum number of files to be stored and displayed on the menu. The maximum number of files to be stored and displayed on the menu.
*/ */
/** /**
wxMenu* m_fileMenu wxMenu* m_fileMenu
The file menu used to display the file history list (if enabled). The file menu used to display the file history list (if enabled).
*/ */
}; };

View File

@@ -50,33 +50,26 @@ public:
//@{ //@{
/** /**
) )
Constructs a drag image an optional cursor. This constructor is only available Constructs a drag image an optional cursor. This constructor is only available
for for
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,
@@ -96,43 +89,36 @@ public:
second second
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
mouse will the 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
by cutting down on the area under consideration, and it can also make a visual by cutting down on the area under consideration, and it can also make a
difference visual difference
since the drag is clipped to this area. since the drag is clipped to this area.
*/ */
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);
//@} //@}
@@ -140,7 +126,6 @@ public:
/** /**
Draws the image on the device context with top-left corner at the given Draws the image on the device context with top-left corner at the given
position. position.
This function is only available with wxGenericDragImage, to allow applications This function is only available with wxGenericDragImage, to allow applications
to to
draw their own image instead of using an actual bitmap. If you override this draw their own image instead of using an actual bitmap. If you override this
@@ -151,7 +136,6 @@ public:
/** /**
Call this when the drag has finished. Call this when the drag has finished.
Note that this call automatically calls ReleaseMouse. Note that this call automatically calls ReleaseMouse.
*/ */
bool EndDrag(); bool EndDrag();
@@ -160,7 +144,6 @@ public:
Returns the rectangle enclosing the image, assuming that the image is drawn Returns the rectangle enclosing the image, assuming that the image is drawn
with its with its
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.
@@ -178,10 +161,8 @@ public:
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).
@a pt is the position in client coordinates (relative to the window specified
@e pt is the position in client coordinates (relative to the window specified
in BeginDrag). in BeginDrag).
You can move the image either when the image is hidden or shown, but in general You can move the image either when the image is hidden or shown, but in general
dragging dragging
will be smoother if you move the image when it is shown. will be smoother if you move the image when it is shown.
@@ -203,13 +184,11 @@ public:
graphic @e minus the objects to be dragged, and leave the window itself to be graphic @e minus the objects to be dragged, and leave the window itself to be
updated updated
by the drag image. This can provide eerily smooth, flicker-free drag behaviour. by the drag image. This can provide eerily smooth, flicker-free drag behaviour.
The default implementation copies the window contents to the backing bitmap. A The default implementation copies the window contents to the backing bitmap. A
new new
implementation will normally copy information from another source, such as from implementation will normally copy information from another source, such as from
its its
own backing bitmap if it has one, or directly from internal data structures. own backing bitmap if it has one, or directly from internal data structures.
This function is available in wxGenericDragImage only. This function is available in wxGenericDragImage only.
*/ */
bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC,

View File

@@ -150,19 +150,17 @@
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxcontaineroverview "Container classes overview", wxListT, @ref overview_wxcontaineroverview, wxListT, wxVectorT
wxVectorT
*/ */
class wxArray<T> class wxArray<T>
{ {
public: public:
//@{ //@{
/** /**
Appends the given number of @e copies of the @e item to the array Appends the given number of @a copies of the @a item to the array
consisting of the elements of type @e T. consisting of the elements of type @e T.
The first version is used with wxArray. The second is used with wxSortedArray, The first version is used with wxArray. The second is used with wxSortedArray,
returning the index where @e item is stored. The third and the returning the index where @a item is stored. The third and the
fourth ones are used with wxObjArray. There is an important difference between fourth ones are used with wxObjArray. There is an important difference between
them: if you give a pointer to the array, it will take ownership of it, i.e. them: if you give a pointer to the array, it will take ownership of it, i.e.
will delete it when the item is deleted from the array. If you give a reference will delete it when the item is deleted from the array. If you give a reference
@@ -171,25 +169,22 @@ public:
because the other array types never take ownership of their elements. Also note because the other array types never take ownership of their elements. Also note
that you cannot append more than one pointer as reusing it would lead to that you cannot append more than one pointer as reusing it would lead to
deleting it twice (or more) and hence to a crash. deleting it twice (or more) and hence to a crash.
You may also use WX_APPEND_ARRAY macro to append all You may also use WX_APPEND_ARRAY macro to append all
elements of one array to another one but it is more efficient to use elements of one array to another one but it is more efficient to use
@e copies parameter and modify the elements in place later if you plan to @a copies parameter and modify the elements in place later if you plan to
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);
//@} //@}
/** /**
Inserts the given @e item into the array in the specified @e index Inserts the given @a item into the array in the specified @e index
position. position.
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".
@@ -235,7 +230,6 @@ public:
should avoid deleting wxObjArray through a wxBaseArray pointer (as you would should avoid deleting wxObjArray through a wxBaseArray pointer (as you would
never use wxBaseArray anyhow it shouldn't be a problem) and that you should not never use wxBaseArray anyhow it shouldn't be a problem) and that you should not
derive your own classes from the array classes. derive your own classes from the array classes.
@ref wxArray::ctordef "wxArray default constructor" @ref wxArray::ctordef "wxArray default constructor"
@ref wxArray::ctorcopy "wxArray copy constructors and assignment operators" @ref wxArray::ctorcopy "wxArray copy constructors and assignment operators"
@@ -247,7 +241,6 @@ public:
//@{ //@{
/** /**
(T first, T second)@e compareFunction) (T first, T second)@e compareFunction)
There is no default constructor for wxSortedArray classes - you must initialize There is no default constructor for wxSortedArray classes - you must initialize
it it
with a function to use for item comparison. It is a function which is passed with a function to use for item comparison. It is a function which is passed
@@ -265,7 +258,7 @@ public:
wxArray::Remove doesn't delete it. The function returns the wxArray::Remove doesn't delete it. The function returns the
pointer to the removed element. pointer to the removed element.
*/ */
T * Detach(size_t index); T* Detach(size_t index);
/** /**
Empties the array. For wxObjArray classes, this destroys all of the array Empties the array. For wxObjArray classes, this destroys all of the array
@@ -284,34 +277,29 @@ public:
/** /**
The first version of the function is for wxArray and wxObjArray, the second is The first version of the function is for wxArray and wxObjArray, the second is
for wxSortedArray only. for wxSortedArray only.
Searches the element in the array, starting from either beginning or the end Searches the element in the array, starting from either beginning or the end
depending on the value of @e searchFromEnd parameter. @c wxNOT_FOUND is depending on the value of @a searchFromEnd parameter. @c wxNOT_FOUND is
returned if the element is not found, otherwise the index of the element is returned if the element is not found, otherwise the index of the element is
returned. returned.
Linear search is used for the wxArray and wxObjArray classes but binary search Linear search is used for the wxArray and wxObjArray classes but binary search
in the sorted array is used for wxSortedArray (this is why searchFromEnd in the sorted array is used for wxSortedArray (this is why searchFromEnd
parameter doesn't make sense for it). parameter doesn't make sense for it).
@b NB: even for wxObjArray classes, the operator==() of the elements in the @b NB: even for wxObjArray classes, the operator==() of the elements in the
array is @b not used by this function. It searches exactly the given array is @b not used by this function. It searches exactly the given
element in the array and so will only succeed if this element had been element in the array and so will only succeed if this element had been
previously added to the array, but fail even if another, identical, element is previously added to the array, but fail even if another, identical, element is
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);
//@} //@}
/** /**
Search for a place to insert @e item into the sorted array (binary search). Search for a place to insert @a item into the sorted array (binary search).
The index returned is just before the first existing item that is greater or The index returned is just before the first existing item that is greater or
equal equal
(according to the compare function) to the given @e item. (according to the compare function) to the given @e item.
You have to do extra work to know if the @a 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".
@@ -320,19 +308,17 @@ public:
//@{ //@{
/** /**
Insert the given number of @e copies of the @e item into the array before Insert the given number of @a copies of the @a item into the array before
the existing item @e n - thus, @e Insert(something, 0u) will insert an the existing item @a n - thus, @e Insert(something, 0u) will insert an
item in such way that it will become the first array element. item in such way that it will become the first array element.
wxSortedArray doesn't have this function because inserting in wrong place wxSortedArray doesn't have this function because inserting in wrong place
would break its sorted condition. would break its sorted condition.
Please see wxArray::Add for explanation of the differences Please see wxArray::Add for explanation of the differences
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);
//@} //@}
/** /**
@@ -341,10 +327,9 @@ public:
bool IsEmpty(); bool IsEmpty();
/** /**
Returns the item at the given position in the array. If @e index is out of Returns the item at the given position in the array. If @a index is out of
bounds, an assert failure is raised in the debug builds but nothing special is bounds, an assert failure is raised in the debug builds but nothing special is
done in the release build. done in the release build.
The returned value is of type "reference to the array element type" for all of The returned value is of type "reference to the array element type" for all of
the array classes. the array classes.
*/ */
@@ -353,7 +338,6 @@ public:
/** /**
Returns the last element in the array, i.e. is the same as Item(GetCount() - 1). Returns the last element in the array, i.e. is the same as Item(GetCount() - 1).
An assert failure is raised in the debug mode if the array is empty. An assert failure is raised in the debug mode if the array is empty.
The returned value is of type "reference to the array element type" for all of The returned value is of type "reference to the array element type" for all of
the array classes. the array classes.
*/ */
@@ -365,7 +349,6 @@ public:
least) forward declared for WX_DEFINE_ARRAY, WX_DEFINE_SORTED_ARRAY and least) forward declared for WX_DEFINE_ARRAY, WX_DEFINE_SORTED_ARRAY and
WX_DECLARE_OBJARRAY macros and must be fully declared before you use WX_DECLARE_OBJARRAY macros and must be fully declared before you use
WX_DEFINE_OBJARRAY macro. WX_DEFINE_OBJARRAY macro.
WX_DEFINE_ARRAY WX_DEFINE_ARRAY
WX_DEFINE_EXPORTED_ARRAY WX_DEFINE_EXPORTED_ARRAY
@@ -387,18 +370,17 @@ public:
WX_DEFINE_EXPORTED_OBJARRAY WX_DEFINE_EXPORTED_OBJARRAY
WX_DEFINE_USER_EXPORTED_OBJARRAY WX_DEFINE_USER_EXPORTED_OBJARRAY
To slightly complicate the matters even further, the operator - defined by To slightly complicate the matters even further, the operator - defined by
default for the array iterators by these macros only makes sense if the array default for the array iterators by these macros only makes sense if the array
element type is not a pointer itself and, although it still works, this element type is not a pointer itself and, although it still works, this
provokes warnings from some compilers and to avoid them you should use the provokes warnings from some compilers and to avoid them you should use the
@c _PTR versions of the macros above. For example, to define an array of @c _PTR versions of the macros above. For example, to define an array of
pointers to @c double you should use: pointers to @c double you should use:
Note that the above macros are generally only useful for Note that the above macros are generally only useful for
wxObject types. There are separate macros for declaring an array of a simple wxObject types. There are separate macros for declaring an array of a simple
type, type,
such as an int. such as an int.
The following simple types are supported: The following simple types are supported:
int int
@@ -408,12 +390,9 @@ public:
size_t size_t
double double
To create an array of a simple type, simply append the type you want in CAPS to To create an array of a simple type, simply append the type you want in CAPS to
the array definition. the array definition.
For example, for an integer array, you'd use one of the following variants: For example, for an integer array, you'd use one of the following variants:
WX_DEFINE_ARRAY_INT WX_DEFINE_ARRAY_INT
WX_DEFINE_EXPORTED_ARRAY_INT WX_DEFINE_EXPORTED_ARRAY_INT
@@ -441,7 +420,6 @@ public:
function can also be quite useful if you know in advance how many items you are function can also be quite useful if you know in advance how many items you are
going to put in the array and will prevent the array code from reallocating the going to put in the array and will prevent the array code from reallocating the
memory more times than needed. memory more times than needed.
wxArray::Alloc wxArray::Alloc
wxArray::Shrink wxArray::Shrink
@@ -452,7 +430,6 @@ public:
Functions in this section return the total number of array elements and allow to Functions in this section return the total number of array elements and allow to
retrieve them - possibly using just the C array indexing [] operator which retrieve them - possibly using just the C array indexing [] operator which
does exactly the same as wxArray::Item method. does exactly the same as wxArray::Item method.
wxArray::GetCount wxArray::GetCount
wxArray::IsEmpty wxArray::IsEmpty
@@ -465,24 +442,25 @@ public:
/** /**
Removes an element from the array by value: the first item of the Removes an element from the array by value: the first item of the
array equal to @e item is removed, an assert failure will result from an array equal to @a item is removed, an assert failure will result from an
attempt to remove an item which doesn't exist in the array. attempt to remove an item which doesn't exist in the array.
When an element is removed from wxObjArray it is deleted by the array - use When an element is removed from wxObjArray it is deleted by the array - use
Detach if you don't want this to happen. On the Detach if you don't want this to happen. On the
other hand, when an object is removed from a wxArray nothing happens - you other hand, when an object is removed from a wxArray nothing happens - you
should delete it manually if required: should delete it manually if required:
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 @a count elements starting at @a index from the array. When an
element is removed from wxObjArray it is deleted by the array - use element is removed from wxObjArray it is deleted by the array - use
Detach if you don't want this to happen. On Detach if you don't want this to happen. On
the other hand, when an object is removed from a wxArray nothing happens - the other hand, when an object is removed from a wxArray nothing happens -
you should delete it manually if required: you should delete it manually if required:
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).
*/ */
@@ -512,13 +490,12 @@ public:
/** /**
) )
This function ensures that the number of array elements is at least This function ensures that the number of array elements is at least
@e count. If the array has already @e count or more items, nothing is @e count. If the array has already @a count or more items, nothing is
done. Otherwise, @c count - GetCount() elements are added and initialized to done. Otherwise, @c count - GetCount() elements are added and initialized to
the value @e defval. the value @e defval.
@sa wxArray::GetCount @see wxArray::GetCount
*/ */
void SetCount(size_t count); void SetCount(size_t count);
@@ -532,19 +509,18 @@ public:
/** /**
The notation CMPFUNCT should be read as if we had the following declaration: The notation CMPFUNCT should be read as if we had the following declaration:
where @e T is the type of the array elements. I.e. it is a function returning where @e T is the type of the array elements. I.e. it is a function returning
@e int which is passed two arguments of type @e T *. @e int which is passed two arguments of type @e T *.
Sorts the array using the specified compare function: this function should Sorts the array using the specified compare function: this function should
return a negative, zero or positive value according to whether the first element 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. passed to it is less than, equal to or greater than the second one.
wxSortedArray doesn't have this function because it is always sorted. wxSortedArray doesn't have this function because it is always sorted.
*/ */
void Sort(CMPFUNC<T> compareFunction); void Sort(CMPFUNC<T> compareFunction);
/** /**
This macro may be used to append all elements of the @e other array to the This macro may be used to append all elements of the @a other array to the
@e array. The two arrays must be of the same type. @e array. The two arrays must be of the same type.
*/ */
#define void WX_APPEND_ARRAY(wxArray& array, wxArray& other) /* implementation is private */ #define void WX_APPEND_ARRAY(wxArray& array, wxArray& other) /* implementation is private */
@@ -558,40 +534,40 @@ public:
//@{ //@{
/** /**
This macro declares a new object array class named @e name and containing This macro declares a new object array class named @a name and containing
the elements of type @e T. The second form is used when compiling wxWidgets as the elements of type @e T. The second form is used when compiling wxWidgets as
a DLL under Windows and array needs to be visible outside the DLL. The third is a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL. needed for exporting an array from a user DLL.
Example: Example:
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);
//@} //@}
//@{ //@{
/** /**
This macro defines a new array class named @e name and containing the This macro defines a new array class named @a name and containing the
elements of type @e T. The second form is used when compiling wxWidgets as elements of type @e T. The second form is used when compiling wxWidgets as
a DLL under Windows and array needs to be visible outside the DLL. The third is a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL. needed for exporting an array from a user DLL.
Example: Example:
Note that wxWidgets predefines the following standard array classes: @b Note that wxWidgets predefines the following standard array classes: @b
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);
//@} //@}
//@{ //@{
/** /**
This macro defines the methods of the array class @e name not defined by the This macro defines the methods of the array class @a name not defined by the
WX_DECLARE_OBJARRAY macro. You must include the WX_DECLARE_OBJARRAY macro. You must include the
file wx/arrimpl.cpp before using this macro and you must have the full file wx/arrimpl.cpp before using this macro and you must have the full
declaration of the class of array elements in scope! If you forget to do the declaration of the class of array elements in scope! If you forget to do the
@@ -600,7 +576,6 @@ public:
objects of the class will not be copied correctly and their real destructor will objects of the class will not be copied correctly and their real destructor will
not be called. The latter two forms are merely aliases of the first to satisfy not be called. The latter two forms are merely aliases of the first to satisfy
some people's sense of symmetry when using the exported declarations. some people's sense of symmetry when using the exported declarations.
Example of usage: Example of usage:
*/ */
WX_DEFINE_OBJARRAY(name); WX_DEFINE_OBJARRAY(name);
@@ -610,22 +585,22 @@ public:
//@{ //@{
/** /**
This macro defines a new sorted array class named @e name and containing This macro defines a new sorted array class named @a name and containing
the elements of type @e T. The second form is used when compiling wxWidgets as the elements of type @e T. The second form is used when compiling wxWidgets as
a DLL under Windows and array needs to be visible outside the DLL. The third is a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL. needed for exporting an array from a user DLL.
Example: Example:
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);
//@} //@}
/** /**
This macro may be used to prepend all elements of the @e other array to the This macro may be used to prepend all elements of the @a other array to the
@e array. The two arrays must be of the same type. @e array. The two arrays must be of the same type.
*/ */
#define void WX_PREPEND_ARRAY(wxArray& array, wxArray& other) /* implementation is private */ #define void WX_PREPEND_ARRAY(wxArray& array, wxArray& other) /* implementation is private */

View File

@@ -26,17 +26,16 @@ 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
@returns @true if the load address and module size were retrieved, @false @returns @true if the load address and module size were retrieved, @false
if this information is not available. if this information is not available.
*/ */
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
@@ -131,7 +130,6 @@ 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.
*/ */
@@ -141,7 +139,6 @@ public:
This function returns a valid handle for the main program itself. Notice that This function returns a valid handle for the main program itself. Notice that
the @NULL return value is valid for some systems (i.e. doesn't mean that the @NULL return value is valid for some systems (i.e. doesn't mean that
the function failed). the function failed).
@b NB: This function is Unix specific. It will always fail under Windows @b NB: This function is Unix specific. It will always fail under Windows
or OS/2. or OS/2.
*/ */
@@ -150,42 +147,38 @@ public:
/** /**
This function resolves a symbol in a loaded DLL, such as a variable or This function resolves a symbol in a loaded DLL, such as a variable or
function name. function name.
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);
/** /**
This function loads a shared library into memory, with @e libname being the This function loads a shared library into memory, with @a libname being the
name of the library: it may be either the full name including path and name of the library: it may be either the full name including path and
(platform-dependent) extension, just the basename (no path and no extension) (platform-dependent) extension, just the basename (no path and no extension)
or a basename with extension. In the last two cases, the library will be or a basename with extension. In the last two cases, the library will be
searched in all standard locations. searched in all standard locations.
Returns a handle to the loaded DLL. Use @a 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.
*/ */
wxDllType LoadLibrary(const wxString & libname, wxDllType LoadLibrary(const wxString& libname,
bool* success = @NULL); bool* success = NULL);
/** /**
This function unloads the shared library. The handle @e dllhandle must have This function unloads the shared library. The handle @a dllhandle must have
been returned by LoadLibrary() previously. been returned by LoadLibrary() previously.
*/ */
void UnloadLibrary(wxDllType dllhandle); void UnloadLibrary(wxDllType dllhandle);
@@ -223,25 +216,18 @@ public:
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 @a cat are:
The possible values for @e cat are:
wxDL_LIBRARY wxDL_LIBRARY
normal library normal library
wxDL_MODULE wxDL_MODULE
a loadable module or plugin a loadable module or plugin
@see CanonicalizePluginName()
@sa CanonicalizePluginName()
*/ */
static wxString CanonicalizeName(const wxString& name, static wxString CanonicalizeName(const wxString& name,
wxDynamicLibraryCategory cat = wxDL_LIBRARY); wxDynamicLibraryCategory cat = wxDL_LIBRARY);
@@ -252,21 +238,15 @@ public:
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
compatible with the main program. compatible with the main program.
The possible values for @a 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
plugin which only uses wxBase plugin which only uses wxBase
*/ */
static wxString CanonicalizePluginName(const wxString& name, static wxString CanonicalizePluginName(const wxString& name,
@@ -286,12 +266,12 @@ public:
static wxDllType GetProgramHandle(); static wxDllType GetProgramHandle();
/** /**
Returns pointer to symbol @e name in the library or @NULL if the library Returns pointer to symbol @a name in the library or @NULL if the library
contains no such symbol. contains no such symbol.
@sa wxDYNLIB_FUNCTION @see wxDYNLIB_FUNCTION
*/ */
void * GetSymbol(const wxString& name); void* GetSymbol(const wxString& name);
/** /**
This function is available only under Windows as it is only useful when This function is available only under Windows as it is only useful when
@@ -302,13 +282,12 @@ public:
automatically depending on the current build. Otherwise, this method is automatically depending on the current build. Otherwise, this method is
identical to GetSymbol(). identical to GetSymbol().
*/ */
void * GetSymbolAorW(const wxString& name); void* GetSymbolAorW(const wxString& name);
/** /**
Returns @true if the symbol with the given @e name is present in the dynamic Returns @true if the symbol with the given @a name is present in the dynamic
library, @false otherwise. Unlike GetSymbol(), library, @false otherwise. Unlike GetSymbol(),
this function doesn't log an error message if the symbol is not found. this function doesn't log an error message if the symbol is not found.
This function is new since wxWidgets version 2.5.4 This function is new since wxWidgets version 2.5.4
*/ */
bool HasSymbol(const wxString& name); bool HasSymbol(const wxString& name);
@@ -323,45 +302,38 @@ public:
of all modules loaded into the address space of the current project, the array of all modules loaded into the address space of the current project, the array
elements are object of @c wxDynamicLibraryDetails class. The array will elements are object of @c wxDynamicLibraryDetails class. The array will
be empty if an error occurred. be empty if an error occurred.
This method is currently implemented only under Win32 and Linux and is useful This method is currently implemented only under Win32 and Linux and is useful
mostly for diagnostics purposes. mostly for diagnostics purposes.
*/ */
static wxDynamicLibraryDetailsArray ListLoaded(); static wxDynamicLibraryDetailsArray ListLoaded();
/** /**
Loads DLL with the given @e name into memory. The @e flags argument can Loads DLL with the given @a name into memory. The @a flags argument can
be a combination of the following bits: be a combination of the following bits:
wxDL_LAZY wxDL_LAZY
equivalent of RTLD_LAZY under Unix, ignored elsewhere equivalent of RTLD_LAZY under Unix, ignored elsewhere
wxDL_NOW wxDL_NOW
equivalent of RTLD_NOW under Unix, ignored elsewhere equivalent of RTLD_NOW under Unix, ignored elsewhere
wxDL_GLOBAL wxDL_GLOBAL
equivalent of RTLD_GLOBAL under Unix, ignored elsewhere equivalent of RTLD_GLOBAL under Unix, ignored elsewhere
wxDL_VERBATIM wxDL_VERBATIM
don't try to append the appropriate extension to don't try to append the appropriate extension to
the library name (this is done by default). the library name (this is done by default).
wxDL_DEFAULT wxDL_DEFAULT
default flags, same as wxDL_NOW currently default flags, same as wxDL_NOW currently
wxDL_QUIET wxDL_QUIET
don't log an error message if the library couldn't be don't log an error message if the library couldn't be
loaded. loaded.
@@ -373,7 +345,6 @@ public:
/** /**
Unloads the library from memory. wxDynamicLibrary object automatically calls Unloads the library from memory. wxDynamicLibrary object automatically calls
this method from its destructor if it had been successfully loaded. this method from its destructor if it had been successfully loaded.
The second version is only used if you need to keep the library in memory The second version is only used if you need to keep the library in memory
during a longer period of time than the scope of the wxDynamicLibrary object. during a longer period of time than the scope of the wxDynamicLibrary object.
In this case you may call Detach() and store In this case you may call Detach() and store
@@ -394,22 +365,19 @@ 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 @a 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

@@ -40,28 +40,23 @@ 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
appropriately. sized
appropriately.
@param style @param style
Window style. See wxEditableListBox. Window style. See wxEditableListBox.
@param name @param name
Window name. Window name.
@sa Create() @see Create()
*/ */
wxEditableListBox(); wxEditableListBox();
wxEditableListBox(wxWindow* parent, wxWindowID id, wxEditableListBox(wxWindow* parent, wxWindowID id,

View File

@@ -33,9 +33,8 @@ public:
wxEncodingConverter(); wxEncodingConverter();
/** /**
Return @true if (any text in) multibyte encoding @e encIn can be converted to Return @true if (any text in) multibyte encoding @a encIn can be converted to
another one (@e encOut) losslessly. another one (@e encOut) losslessly.
Do not call this method with @c wxFONTENCODING_UNICODE as either Do not call this method with @c wxFONTENCODING_UNICODE as either
parameter, it doesn't make sense (always works in one sense and always depends parameter, it doesn't make sense (always works in one sense and always depends
on the text to convert in the other). on the text to convert in the other).
@@ -61,8 +60,7 @@ public:
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 @a enc
This platform's encodings are before others in the array. And again, if @e enc
is in the array, is in the array,
it is the very first item in it. it is the very first item in it.
*/ */
@@ -71,23 +69,20 @@ public:
/** /**
Return equivalents for given font that are used Return equivalents for given font that are used
under given platform. Supported platforms: under given platform. Supported platforms:
wxPLATFORM_UNIX wxPLATFORM_UNIX
wxPLATFORM_WINDOWS wxPLATFORM_WINDOWS
wxPLATFORM_OS2 wxPLATFORM_OS2
wxPLATFORM_MAC wxPLATFORM_MAC
wxPLATFORM_CURRENT wxPLATFORM_CURRENT
wxPLATFORM_CURRENT means the platform this binary was compiled for. wxPLATFORM_CURRENT means the platform this binary was compiled for.
Examples: Examples:
Equivalence is defined in terms of convertibility: Equivalence is defined in terms of convertibility:
two encodings are equivalent if you can convert text between two encodings are equivalent if you can convert text between
then without losing information (it may - and will - happen then without losing information (it may - and will - happen
that you lose special chars like quotation marks or em-dashes that you lose special chars like quotation marks or em-dashes
but you shouldn't lose any diacritics and language-specific but you shouldn't lose any diacritics and language-specific
characters when converting between equivalent encodings). characters when converting between equivalent encodings).
Remember that this function does @b NOT check for presence of Remember that this function does @b NOT check for presence of
fonts in system. It only tells you what are most suitable fonts in system. It only tells you what are most suitable
encodings. (It usually returns only one encoding.) encodings. (It usually returns only one encoding.)
@@ -100,8 +95,8 @@ public:
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 @a input_enc encoding and will output string in
@e output_enc encoding. @a 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
@@ -109,14 +104,12 @@ public:
@b wxCONVERT_STRICT @b wxCONVERT_STRICT
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

@@ -21,7 +21,7 @@ public:
/** /**
Constuctor used by wxWidgets only. Constuctor used by wxWidgets only.
*/ */
wxFindDialogEvent(wxEventType commandType = wxEVT_@NULL, wxFindDialogEvent(wxEventType commandType = wxEVT_NULL,
int id = 0); int id = 0);
/** /**
@@ -129,11 +129,10 @@ public:
/** /**
After using default constructor Create() After using default constructor Create()
must be called. must be called.
The @a parent and @a 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);
@@ -146,10 +145,9 @@ public:
/** /**
Creates the dialog; use wxWindow::Show to show it on screen. Creates the dialog; use wxWindow::Show to show it on screen.
The @a parent and @a data parameters must be non-@NULL.
The @e parent and @e data parameters must be non-@NULL.
*/ */
bool Create(wxWindow * parent, wxFindReplaceData* data, bool Create(wxWindow* parent, wxFindReplaceData* data,
const wxString& title, int style = 0); const wxString& title, int style = 0);
/** /**

View File

@@ -30,16 +30,14 @@ 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");
@@ -48,14 +46,12 @@ public:
/** /**
Destructor will close the file. Destructor will close the file.
NB: it is not virtual so you should @e not derive from wxFFile! NB: it is not virtual so you should @e not derive from wxFFile!
*/ */
~wxFFile(); ~wxFFile();
/** /**
Attaches an existing file pointer to the wxFFile object. Attaches an existing file pointer to the wxFFile object.
The descriptor should be already opened and it will be closed by wxFFile The descriptor should be already opened and it will be closed by wxFFile
object. object.
*/ */
@@ -76,27 +72,24 @@ 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
will return @true here as soon as the last byte of the file has been will return @true here as soon as the last byte of the file has been
read. read.
Also note that this method may only be called for opened files and may crash if Also note that this method may only be called for opened files and may crash if
the file is not opened. the file is not opened.
@sa IsOpened() @see IsOpened()
*/ */
#define bool Eof() /* implementation is private */ bool Eof();
/** /**
Returns @true if an error has occurred on this file, similar to the standard Returns @true if an error has occurred on this file, similar to the standard
@c ferror() function. @c ferror() function.
Please note that this method may only be called for opened files and may crash Please note that this method may only be called for opened files and may crash
if the file is not opened. if the file is not opened.
@sa IsOpened() @see IsOpened()
*/ */
@@ -126,10 +119,9 @@ 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");
@@ -138,10 +130,9 @@ public:
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.
*/ */
@@ -149,28 +140,25 @@ 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.
@returns @true if file was read successfully, @false otherwise. @returns @true if file was read successfully, @false otherwise.
*/ */
bool ReadAll(wxString * str); bool ReadAll(wxString* str);
/** /**
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);
@@ -180,7 +168,7 @@ public:
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);
@@ -191,16 +179,14 @@ public:
/** /**
) )
Writes the contents of the string to the file, returns @true on success. Writes the contents of the string to the file, returns @true on success.
The second argument is only meaningful in Unicode build of wxWidgets when The second argument is only meaningful in Unicode build of wxWidgets when
@e conv is used to convert @e s to multibyte representation. @e conv is used to convert @a s to multibyte representation.
*/ */
bool Write(const wxString& s); bool Write(const wxString& s);
/** /**
Returns the file pointer associated with the file. Returns the file pointer associated with the file.
*/ */
#define FILE * fp() /* implementation is private */ FILE* fp();
}; };

View File

@@ -89,10 +89,9 @@ public:
/** /**
Open the temporary file, returns @true on success, @false if an error Open the temporary file, returns @true on success, @false if an error
occurred. occurred.
@a 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 @a strName is. In particular, if
created in the directory where @e strName is. In particular, if @a 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.
*/ */
bool Open(const wxString& strName); bool Open(const wxString& strName);
@@ -112,9 +111,8 @@ public:
/** /**
Write to the file, return @true on success, @false on failure. Write to the file, return @true on success, @false on failure.
The second argument is only meaningful in Unicode build of wxWidgets when The second argument is only meaningful in Unicode build of wxWidgets when
@e conv is used to convert @e str to multibyte representation. @a conv is used to convert @a str to multibyte representation.
*/ */
bool Write(const wxString& str, bool Write(const wxString& str,
const wxMBConv& conv = wxConvUTF8); const wxMBConv& conv = wxConvUTF8);
@@ -150,14 +148,12 @@ public:
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();
@@ -168,7 +164,6 @@ public:
/** /**
Destructor will close the file. Destructor will close the file.
@b NB: it is not virtual so you should not use wxFile polymorphically. @b NB: it is not virtual so you should not use wxFile polymorphically.
*/ */
~wxFile(); ~wxFile();
@@ -185,7 +180,6 @@ public:
(and (and
have symbolic names of @b wxFile::fd_stdin, @b wxFile::fd_stdout and @b have symbolic names of @b wxFile::fd_stdin, @b wxFile::fd_stdout and @b
wxFile::fd_stderr). wxFile::fd_stderr).
The descriptor should be already opened and it will be closed by wxFile The descriptor should be already opened and it will be closed by wxFile
object. object.
*/ */
@@ -201,7 +195,7 @@ public:
@true @true
will ensure it is overwritten. will ensure it is overwritten.
*/ */
bool Create(const wxString& filename, bool overwrite = @false, bool Create(const wxString& filename, bool overwrite = false,
int access = wxS_DEFAULT); int access = wxS_DEFAULT);
/** /**
@@ -213,14 +207,12 @@ 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.
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
@@ -228,7 +220,7 @@ public:
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.
*/ */
#define bool Eof() /* implementation is private */ bool Eof();
/** /**
Returns @true if the given name specifies an existing regular file (not a Returns @true if the given name specifies an existing regular file (not a
@@ -238,7 +230,6 @@ public:
/** /**
Flushes the file descriptor. Flushes the file descriptor.
Note that Flush() is not implemented on some Windows compilers Note that Flush() is not implemented on some Windows compilers
due to a missing fsync function, which reduces the usefulness of this function due to a missing fsync function, which reduces the usefulness of this function
(it can still be called but it will do nothing on unsupported compilers). (it can still be called but it will do nothing on unsupported compilers).
@@ -264,10 +255,9 @@ 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.
*/ */
bool Open(const wxString& filename, bool Open(const wxString& filename,
@@ -286,13 +276,12 @@ public:
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
failure. failure.
*/ */
wxFileOffset Seek(wxFileOffset ofs, wxFileOffset Seek(wxFileOffset ofs,
wxSeekMode mode = wxFromStart); wxSeekMode mode = wxFromStart);
@@ -303,10 +292,10 @@ public:
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
failure. failure.
*/ */
wxFileOffset SeekEnd(wxFileOffset ofs = 0); wxFileOffset SeekEnd(wxFileOffset ofs = 0);
@@ -319,10 +308,8 @@ public:
/** /**
Writes the contents of the string to the file, returns @true on success. Writes the contents of the string to the file, returns @true on success.
The second argument is only meaningful in Unicode build of wxWidgets when The second argument is only meaningful in Unicode build of wxWidgets when
@e conv is used to convert @e s to multibyte representation. @a conv is used to convert @a 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".
@@ -332,5 +319,5 @@ public:
/** /**
Returns the file descriptor associated with the file. Returns the file descriptor associated with the file.
*/ */
#define int fd() /* implementation is private */ int fd();
}; };

View File

@@ -31,32 +31,29 @@ class wxFileConfig : public wxConfigBase
public: public:
/** /**
) )
Read the config data from the specified stream instead of the associated file, Read the config data from the specified stream instead of the associated file,
as usual. as usual.
@sa Save() @see Save()
*/ */
wxFileConfig(wxInputStream& is); wxFileConfig(wxInputStream& is);
/** /**
Return the full path to the file which would be used by wxFileConfig as global, Return the full path to the file which would be used by wxFileConfig as global,
system-wide, file if it were constructed with @e basename as "global system-wide, file if it were constructed with @a basename as "global
filename'' parameter in the constructor. Notice that this function cannot be filename'' parameter in the constructor. Notice that this function cannot be
used if @e basename is already a full path name. used if @a basename is already a full path name.
*/ */
static wxFileName GetGlobalFile(const wxString& basename); static wxFileName GetGlobalFile(const wxString& basename);
/** /**
Return the full path to the file which would be used by wxFileConfig as local, Return the full path to the file which would be used by wxFileConfig as local,
user-specific, file if it were constructed with @e basename as "local user-specific, file if it were constructed with @a basename as "local
filename'' parameter in the constructor. filename'' parameter in the constructor.
@a 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.
Notice that this function cannot be used if @a basename is already a full
Notice that this function cannot be used if @e basename is already a full
path name. path name.
*/ */
static wxFileName GetLocalFile(const wxString& basename, static wxFileName GetLocalFile(const wxString& basename,
@@ -64,17 +61,15 @@ public:
/** /**
) )
Saves all config data to the given stream, returns @true if data was saved Saves all config data to the given stream, returns @true if data was saved
successfully or @false on error. successfully or @false on error.
Note the interaction of this function with the internal "dirty flag'': the Note the interaction of this function with the internal "dirty flag'': the
data is saved unconditionally, i.e. even if the object is not dirty. However data is saved unconditionally, i.e. even if the object is not dirty. However
after saving it successfully, the dirty flag is reset so no changes will be after saving it successfully, the dirty flag is reset so no changes will be
written back to the file this object is associated with until you change its written back to the file this object is associated with until you change its
contents again. contents again.
@sa wxConfigBase::Flush @see wxConfigBase::Flush
*/ */
bool Save(wxOutputStream& os); bool Save(wxOutputStream& os);
@@ -83,10 +78,9 @@ public:
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.
@sa wxCHANGE_UMASK @see wxCHANGE_UMASK
*/ */
void SetUmask(int mode); void SetUmask(int mode);
}; };

View File

@@ -42,40 +42,32 @@ 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,
@@ -88,7 +80,7 @@ public:
/** /**
Create function for two-step construction. See wxFileCtrl() for details. Create function for two-step construction. See wxFileCtrl() for details.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(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,
@@ -111,7 +103,7 @@ public:
wxString GetFilename(); wxString GetFilename();
/** /**
Fills the array @e filenames with the filenames only of selected items. This Fills the array @a filenames with the filenames only of selected items. This
function should only be used with the controls having the @c wxFC_MULTIPLE function should only be used with the controls having the @c wxFC_MULTIPLE
style, style,
use GetFilename() for the others. use GetFilename() for the others.
@@ -133,7 +125,7 @@ public:
wxString GetPath(); wxString GetPath();
/** /**
Fills the array @e paths with the full paths of the files chosen. This Fills the array @a paths with the full paths of the files chosen. This
function should be used with the controls having the @c wxFC_MULTIPLE style, function should be used with the controls having the @c wxFC_MULTIPLE style,
use GetPath() otherwise. use GetPath() otherwise.
@@ -167,7 +159,6 @@ public:
/** /**
Sets the wildcard, which can contain multiple file types, for example: Sets the wildcard, which can contain multiple file types, for example:
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
*/ */
void SetWildcard(const wxString& wildCard); void SetWildcard(const wxString& wildCard);

View File

@@ -51,34 +51,26 @@ 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,
const wxString& message = "Choose a file", const wxString& message = "Choose a file",
@@ -114,10 +106,9 @@ public:
wxString GetFilename(); wxString GetFilename();
/** /**
Fills the array @e filenames with the names of the files chosen. This Fills the array @a filenames with the names of the files chosen. This
function should only be used with the dialogs which have @c wxFD_MULTIPLE style, function should only be used with the dialogs which have @c wxFD_MULTIPLE style,
use GetFilename() for the others. use GetFilename() for the others.
Note that under Windows, if the user selects shortcuts, the filenames Note that under Windows, if the user selects shortcuts, the filenames
include paths, since the application cannot determine the full path include paths, since the application cannot determine the full path
of each referenced file by appending the directory containing the shortcuts of each referenced file by appending the directory containing the shortcuts
@@ -145,7 +136,7 @@ public:
wxString GetPath(); wxString GetPath();
/** /**
Fills the array @e paths with the full paths of the files chosen. This Fills the array @a paths with the full paths of the files chosen. This
function should only be used with the dialogs which have @c wxFD_MULTIPLE style, function should only be used with the dialogs which have @c wxFD_MULTIPLE style,
use GetPath() for the others. use GetPath() for the others.
*/ */
@@ -164,12 +155,10 @@ public:
/** /**
Customize file dialog by adding extra window, which is typically placed Customize file dialog by adding extra window, which is typically placed
below the list of files and above the buttons. below the list of files and above the buttons.
SetExtraControlCreator can be called only once, before calling SetExtraControlCreator can be called only once, before calling
ShowModal(). ShowModal().
The @c creator function should take pointer to parent window (file dialog) The @c creator function should take pointer to parent window (file dialog)
and should return a window allocated with operator new. and should return a window allocated with operator new.
Supported platforms: wxGTK, wxUniv. Supported platforms: wxGTK, wxUniv.
*/ */
bool SetExtraControlCreator(t_extraControlCreator creator); bool SetExtraControlCreator(t_extraControlCreator creator);
@@ -197,9 +186,7 @@ public:
/** /**
Sets the wildcard, which can contain multiple file types, for example: Sets the wildcard, which can contain multiple file types, for example:
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" "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.
*/ */
@@ -229,20 +216,20 @@ 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
wxString filename = wxFileSelector("Choose a file to open"); wxString filename = wxFileSelector("Choose a file to open");
if ( !filename.empty() ) if ( !filename.empty() )
@@ -259,7 +246,7 @@ wxString wxFileSelector(const wxString& message,
const wxString& default_extension = "", const wxString& default_extension = "",
const wxString& wildcard = ".", const wxString& wildcard = ".",
int flags = 0, int flags = 0,
wxWindow * parent = @NULL, wxWindow* parent = NULL,
int x = -1, int x = -1,
int y = -1); int y = -1);

View File

@@ -40,15 +40,12 @@ public:
The first form adds the given directory to the path list, if the path is not The first form adds the given directory to the path list, if the path is not
already in the list. already in the list.
If the path cannot be normalized for some reason, it returns @false. If the path cannot be normalized for some reason, it returns @false.
The second form just calls the first form on all elements of the given array. The second form just calls the first form on all elements of the given array.
The @a path is always considered a directory but no existence checks will be
The @e path is always considered a directory but no existence checks will be
done on it done on it
(because if it doesn't exist, it could be created later and thus result a valid (because if it doesn't exist, it could be created later and thus result a valid
path when path when
FindValidPath() is called). FindValidPath() is called).
@b Note: if the given path is relative, it won't be made absolute before adding @b Note: if the given path is relative, it won't be made absolute before adding
it it
(this is why FindValidPath() may return relative paths). (this is why FindValidPath() may return relative paths).
@@ -82,15 +79,12 @@ public:
Searches the given file in all paths stored in this class. Searches the given file in all paths stored in this class.
The first path which concatenated to the given string points to an existing The first path which concatenated to the given string points to an existing
file (see @ref wxFile::exists wxFileExists) is returned. file (see @ref wxFile::exists wxFileExists) is returned.
If the file wasn't found in any of the stored paths, an empty string is If the file wasn't found in any of the stored paths, an empty string is
returned. returned.
The given string must be a file name, eventually with a path prefix (if the path The given string must be a file name, eventually with a path prefix (if the path
prefix is absolute, only its name will be searched); i.e. it must not end with prefix is absolute, only its name will be searched); i.e. it must not end with
a directory separator (see wxFileName::GetPathSeparator) a directory separator (see wxFileName::GetPathSeparator)
otherwise an assertion will fail. otherwise an assertion will fail.
The returned path may be relative to the current working directory. The returned path may be relative to the current working directory.
Note in fact that wxPathList can be used to store both relative and absolute Note in fact that wxPathList can be used to store both relative and absolute
paths so that paths so that
@@ -108,13 +102,13 @@ public:
/** /**
This function returns the total number of bytes and number of free bytes on This function returns the total number of bytes and number of free bytes on
the disk containing the directory @e path (it should exist). Both the disk containing the directory @a path (it should exist). Both
@e total and @e free parameters may be @NULL if the corresponding @a total and @a free parameters may be @NULL if the corresponding
information is not needed. information is not needed.
*/ */
bool wxGetDiskSpace(const wxString& path, bool wxGetDiskSpace(const wxString& path,
wxLongLong total = @NULL, wxLongLong total = NULL,
wxLongLong free = @NULL); wxLongLong free = NULL);
/** /**
Returns the Windows directory under Windows; on other platforms returns the Returns the Windows directory under Windows; on other platforms returns the
@@ -128,7 +122,7 @@ wxString wxGetOSDirectory();
The arrays will contain an equal number of items found before the error. The arrays will contain an equal number of items found before the error.
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: @a wildCard is in the form:
@code @code
"All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png" "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
@@ -140,40 +134,35 @@ 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.
*/ */
void wxUnix2DosFilename(wxChar * s); void wxUnix2DosFilename(wxChar* s);
/** /**
Returns @true if @e dirname exists and is a directory. Returns @true if @a dirname exists and is a directory.
*/ */
bool wxDirExists(const wxString& dirname); 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
output parameters output parameters
(@e path, @e name or @e ext) may be @NULL if you are not interested in the value (@e path, @a 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, @a 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, @a 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 @a ext contains the file extension without leading
dot. All dot. All
three of them may be empty if the corresponding component is. The old contents three of them may be empty if the corresponding component is. The old contents
of the of the
@@ -181,23 +170,21 @@ bool wxDirExists(const wxString& dirname);
pointers pointers
are not @NULL). are not @NULL).
*/ */
void wxSplitPath(const wxString& fullname, wxString * path, void wxSplitPath(const wxString& fullname, wxString* path,
wxString * name, wxString* name,
wxString * ext); wxString* ext);
/** /**
Under Unix this macro changes the current process umask to the given value, Under Unix this macro changes the current process umask to the given value,
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 @a 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,34 +194,31 @@ 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 @a file1 to @e file2, returning @true if successful.
If @a 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 @a 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.
*/ */
bool wxRenameFile(const wxString& file1, const wxString& file2, bool wxRenameFile(const wxString& file1, const wxString& file2,
bool overwrite = @true); bool overwrite = true);
/** /**
Copies @e file1 to @e file2, returning @true if successful. If Copies @a file1 to @e file2, returning @true if successful. If
@e overwrite parameter is @true (default), the destination file is overwritten @a 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 @a 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,
bool overwrite = @true); bool overwrite = true);
/** /**
Returns @true if the file exists and is a plain file. Returns @true if the file exists and is a plain file.
@@ -242,7 +226,7 @@ bool wxCopyFile(const wxString& file1, const wxString& file2,
bool wxFileExists(const wxString& filename); bool wxFileExists(const wxString& filename);
/** /**
Returns @true if the @e pattern matches the @e text; if @e dot_special is @true, Returns @true if the @a pattern matches the @e text; if @a dot_special is @true,
filenames beginning with a dot are not matched filenames beginning with a dot are not matched
with wildcard characters. See wxIsWild. with wildcard characters. See wxIsWild.
*/ */
@@ -251,14 +235,12 @@ 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.
@a 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);
/** /**
Returns the directory part of the filename. Returns the directory part of the filename.
@@ -279,10 +261,10 @@ wxString wxGetCwd();
Converts a DOS to a Unix filename by replacing backslashes with forward Converts a DOS to a Unix filename by replacing backslashes with forward
slashes. slashes.
*/ */
void wxDos2UnixFilename(wxChar * s); void wxDos2UnixFilename(wxChar* s);
/** /**
Concatenates @e file1 and @e file2 to @e file3, returning Concatenates @a file1 and @a file2 to @e file3, returning
@true if successful. @true if successful.
*/ */
bool wxConcatFiles(const wxString& file1, const wxString& file2, bool wxConcatFiles(const wxString& file1, const wxString& file2,
@@ -295,15 +277,14 @@ bool wxRemoveFile(const wxString& file);
/** /**
Sets the current working directory, returning @true if the operation succeeded. Sets the current working directory, returning @true if the operation succeeded.
Under MS Windows, the current drive is also changed if @e dir contains a drive Under MS Windows, the current drive is also changed if @a dir contains a drive
specification. specification.
*/ */
bool wxSetWorkingDirectory(const wxString& dir); bool wxSetWorkingDirectory(const wxString& dir);
/** /**
Makes the directory @e dir, returning @true if successful. Makes the directory @e dir, returning @true if successful.
@a 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.
*/ */
bool wxMkdir(const wxString& dir, int perm = 0777); bool wxMkdir(const wxString& dir, int perm = 0777);
@@ -316,7 +297,6 @@ 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();
@@ -332,6 +312,7 @@ wxString wxFindFirstFile(const wxString& spec, int flags = 0);
//@{ //@{
/** /**
Returns the type of an open file. Possible return values are: Returns the type of an open file. Possible return values are:
@code @code
enum wxFileKind enum wxFileKind
{ {
@@ -343,7 +324,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);
//@} //@}
//@{ //@{
@@ -352,20 +333,18 @@ wxFileKind wxGetFileKind(FILE * fp);
wxFileName::CreateTempFileName wxFileName::CreateTempFileName
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 @a 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
confuse these two functions. confuse these two functions.
*/ */
bool wxRmdir(const wxString& dir, int flags=0); bool wxRmdir(const wxString& dir, int flags = 0);

View File

@@ -120,9 +120,9 @@ public:
/** /**
Makes this object refer to the current working directory on the specified Makes this object refer to the current working directory on the specified
volume (or current volume if @e volume is empty). volume (or current volume if @a volume is empty).
@sa GetCwd() @see GetCwd()
*/ */
static void AssignCwd(const wxString& volume = wxEmptyString); static void AssignCwd(const wxString& volume = wxEmptyString);
@@ -145,7 +145,7 @@ public:
@ref isok() invalid state. @ref isok() invalid state.
*/ */
void AssignTempFileName(const wxString& prefix, void AssignTempFileName(const wxString& prefix,
wxFile * fileTemp = @NULL); wxFile* fileTemp = NULL);
/** /**
Reset all components to default, uninitialized state. Reset all components to default, uninitialized state.
@@ -156,36 +156,33 @@ public:
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() @see SetExt(), SetEmptyExt()
*/ */
void SetClearExt(); void SetClearExt();
/** /**
Returns a temporary file name starting with the given @e prefix. If Returns a temporary file name starting with the given @e prefix. If
the @e prefix is an absolute path, the temporary file is created in this the @a prefix is an absolute path, the temporary file is created in this
directory, otherwise it is created in the default system directory for the directory, otherwise it is created in the default system directory for the
temporary files or in the current directory. temporary files or in the current directory.
If the function succeeds, the temporary file is actually created. If If the function succeeds, the temporary file is actually created. If
@e fileTemp is not @NULL, this file will be opened using the name of @a fileTemp is not @NULL, this file will be opened using the name of
the temporary file. When possible, this is done in an atomic way ensuring that the temporary file. When possible, this is done in an atomic way ensuring that
no race condition occurs between the temporary file name generation and opening no race condition occurs between the temporary file name generation and opening
it which could often lead to security compromise on the multiuser systems. it which could often lead to security compromise on the multiuser systems.
If @e fileTemp is @NULL, the file is only created, but not opened. If @a fileTemp is @NULL, the file is only created, but not opened.
Under Unix, the temporary file will have read and write permissions for the 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.
*/ */
static wxString CreateTempFileName(const wxString& prefix, static wxString CreateTempFileName(const wxString& prefix,
wxFile * fileTemp = @NULL); wxFile* fileTemp = NULL);
//@{ //@{
/** /**
@@ -197,7 +194,7 @@ public:
/** /**
Returns the object corresponding to the directory with the given name. Returns the object corresponding to the directory with the given name.
The @e dir parameter may have trailing path separator or not. The @a dir parameter may have trailing path separator or not.
*/ */
static wxFileName DirName(const wxString& dir, static wxFileName DirName(const wxString& dir,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
@@ -205,7 +202,6 @@ public:
/** /**
These functions allow to examine and modify the individual directories of the These functions allow to examine and modify the individual directories of the
path: path:
AppendDir() AppendDir()
InsertDir() InsertDir()
@@ -216,10 +212,8 @@ public:
RemoveDir() RemoveDir()
RemoveLastDir() RemoveLastDir()
To change the components of the file name individually you can use the To change the components of the file name individually you can use the
following functions: following functions:
GetExt() GetExt()
GetName() GetName()
@@ -246,7 +240,6 @@ public:
/** /**
You can initialize a wxFileName instance using one of the following functions: You can initialize a wxFileName instance using one of the following functions:
@ref wxfilename() "wxFileName constructors" @ref wxfilename() "wxFileName constructors"
Assign() Assign()
@@ -279,10 +272,8 @@ public:
for example, the volume name is always empty under Unix, but if they are all for example, the volume name is always empty under Unix, but if they are all
empty simultaneously, the filename object is considered to be in an invalid empty simultaneously, the filename object is considered to be in an invalid
state and IsOk() returns @false for it. state and IsOk() returns @false for it.
File names can be case-sensitive or not, the function File names can be case-sensitive or not, the function
IsCaseSensitive() allows to determine this. IsCaseSensitive() allows to determine this.
The rules for determining whether the file name is absolute or relative also The rules for determining whether the file name is absolute or relative also
depend on the file name format and the only portable way to answer this depend on the file name format and the only portable way to answer this
question is to use IsAbsolute() or question is to use IsAbsolute() or
@@ -290,12 +281,10 @@ public:
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
MakeAbsolute(). There is also an inverse MakeAbsolute(). There is also an inverse
function MakeRelativeTo() which undoes function MakeRelativeTo() which undoes
what @ref normalize() Normalize(wxPATH_NORM_DOTS) does. what @ref normalize() Normalize(wxPATH_NORM_DOTS) does.
Other functions returning information about the file format provided by this Other functions returning information about the file format provided by this
class are GetVolumeSeparator(), class are GetVolumeSeparator(),
IsPathSeparator(). IsPathSeparator().
@@ -308,12 +297,9 @@ public:
FileExists() can be used to test whether a file FileExists() can be used to test whether a file
with such name exists and DirExists() can be used with such name exists and DirExists() can be used
to test for directory existence. to test for directory existence.
File names should be compared using SameAs() method File names should be compared using SameAs() method
or @ref operatorequal() "operator ==". or @ref operatorequal() "operator ==".
For testing basic access modes, you can use: For testing basic access modes, you can use:
IsDirWritable() IsDirWritable()
IsDirReadable() IsDirReadable()
@@ -330,7 +316,7 @@ public:
/** /**
Returns @true if the file with this name exists. Returns @true if the file with this name exists.
@sa DirExists() @see DirExists()
*/ */
bool FileExists(); bool FileExists();
static bool FileExists(const wxString& file); static bool FileExists(const wxString& file);
@@ -349,9 +335,9 @@ public:
current volume. current volume.
@returns The string containing the current working directory or an empty @returns The string containing the current working directory or an empty
string on error. string on error.
@sa AssignCwd() @see AssignCwd()
*/ */
static wxString GetCwd(const wxString& volume = ""); static wxString GetCwd(const wxString& volume = "");
@@ -401,12 +387,10 @@ public:
Returns the size of this file (first form) or the given number of bytes (second Returns the size of this file (first form) or the given number of bytes (second
form) form)
in a human-readable form. in a human-readable form.
If the size could not be retrieved the @c failmsg string is returned (first If the size could not be retrieved the @c failmsg string is returned (first
form). form).
If @c bytes is @c wxInvalidSize or zero, then @c nullsize is returned (second If @c bytes is @c wxInvalidSize or zero, then @c nullsize is returned (second
form). form).
In case of success, the returned string is a floating-point number with @c In case of success, the returned string is a floating-point number with @c
precision decimal digits precision decimal digits
followed by the size unit (B, kB, MB, GB, TB: respectively bytes, kilobytes, followed by the size unit (B, kB, MB, GB, TB: respectively bytes, kilobytes,
@@ -432,7 +416,7 @@ public:
/** /**
Returns the name part of the filename (without extension). Returns the name part of the filename (without extension).
@sa GetFullName() @see GetFullName()
*/ */
wxString GetName(); wxString GetName();
@@ -440,17 +424,14 @@ public:
Returns the path part of the filename (without the name or extension). The Returns the path part of the filename (without the name or extension). The
possible flags values are: possible flags values are:
@b wxPATH_GET_VOLUME @b wxPATH_GET_VOLUME
Return the path with the volume (does Return the path with the volume (does
nothing for the filename formats without volumes), otherwise the path without nothing for the filename formats without volumes), otherwise the path without
volume part is returned. volume part is returned.
@b wxPATH_GET_SEPARATOR @b wxPATH_GET_SEPARATOR
Return the path with the trailing Return the path with the trailing
separator, if this flag is not given there will be no separator at the end of separator, if this flag is not given there will be no separator at the end of
the path. the path.
@@ -464,7 +445,7 @@ public:
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.
@sa GetPathSeparators() @see GetPathSeparators()
*/ */
static wxChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE); static wxChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE);
@@ -474,7 +455,7 @@ public:
DOS and Windows both @c '/' and @c '\' may be used as DOS and Windows both @c '/' and @c '\' may be used as
separators. separators.
@sa GetPathSeparator() @see GetPathSeparator()
*/ */
static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE); static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE);
@@ -488,7 +469,6 @@ public:
/** /**
Returns the path with the trailing separator, useful for appending the name to Returns the path with the trailing separator, useful for appending the name to
the given path. the given path.
This is the same as calling GetPath() This is the same as calling GetPath()
@c (wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, format). @c (wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, format).
*/ */
@@ -524,13 +504,11 @@ public:
under Windows and the inode change time under Unix (as it is impossible to under Windows and the inode change time under Unix (as it is impossible to
retrieve the real file creation time there anyhow) which can also be changed retrieve the real file creation time there anyhow) which can also be changed
by many operations after the file creation. by many operations after the file creation.
If no filename or extension is specified in this instance of wxFileName If no filename or extension is specified in this instance of wxFileName
(and therefore IsDir() returns @true) then (and therefore IsDir() returns @true) then
this function will return the directory times of the path specified by this function will return the directory times of the path specified by
GetPath(), otherwise the file times of the GetPath(), otherwise the file times of the
file specified by GetFullPath(). file specified by GetFullPath().
Any of the pointers may be @NULL if the corresponding time is not Any of the pointers may be @NULL if the corresponding time is not
needed. needed.
@@ -647,7 +625,7 @@ public:
Clear() may reset the object to the uninitialized, Clear() may reset the object to the uninitialized,
invalid state (the former only do it on failure). invalid state (the former only do it on failure).
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
/** /**
Returns @true if the char is a path separator for this format. Returns @true if the char is a path separator for this format.
@@ -686,7 +664,7 @@ public:
@c wxFileName::Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE | @c wxFileName::Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE |
wxPATH_NORM_TILDE, cwd, format). wxPATH_NORM_TILDE, cwd, format).
@sa MakeRelativeTo(), Normalize(), IsAbsolute() @see MakeRelativeTo(), Normalize(), IsAbsolute()
*/ */
bool MakeAbsolute(const wxString& cwd = wxEmptyString, bool MakeAbsolute(const wxString& cwd = wxEmptyString,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
@@ -699,18 +677,17 @@ public:
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
anything with it (currently this only happens if the anything with it (currently this only happens if the
file name is on a volume different from the volume file name is on a volume different from the volume
specified by pathBase). specified by pathBase).
@sa Normalize() @see Normalize()
*/ */
bool MakeRelativeTo(const wxString& pathBase = wxEmptyString, bool MakeRelativeTo(const wxString& pathBase = wxEmptyString,
wxPathFormat format = wxPATH_NATIVE); wxPathFormat format = wxPATH_NATIVE);
@@ -718,18 +695,16 @@ 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.
@returns Returns @true if the directory was successfully created, @false @returns Returns @true if the directory was successfully created, @false
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,
@@ -742,56 +717,103 @@ public:
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:
wxPATH_NORM_ENV_VARS
replace env vars with their values
wxPATH_NORM_DOTS
squeeze all .. and . when possible; if there are too many .. and thus they
wxPATH_NORM_ENV_VARS
replace env vars with their values
wxPATH_NORM_DOTS
squeeze all .. and . when possible; if there are too many .. and thus they
cannot be all removed, @false will be returned cannot be all removed, @false will be returned
wxPATH_NORM_CASE
if filesystem is case insensitive, transform to lower case
wxPATH_NORM_ABSOLUTE
make the path absolute prepending cwd wxPATH_NORM_CASE
wxPATH_NORM_LONG
make the path the long form
wxPATH_NORM_SHORTCUT
resolve if it is a shortcut (Windows only) if filesystem is case insensitive, transform to lower case
wxPATH_NORM_TILDE
replace ~ and ~user (Unix only)
wxPATH_NORM_ALL
all of previous flags except wxPATH_NORM_CASE
wxPATH_NORM_ABSOLUTE
make the path absolute prepending cwd
wxPATH_NORM_LONG
make the path the long form
wxPATH_NORM_SHORTCUT
resolve if it is a shortcut (Windows only)
wxPATH_NORM_TILDE
replace ~ and ~user (Unix only)
wxPATH_NORM_ALL
all of previous flags except wxPATH_NORM_CASE
@param cwd @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.
*/ */
@@ -805,7 +827,6 @@ public:
in the same way. For example, the access time under Windows has a resolution of in the same way. For example, the access time under Windows has a resolution of
one day (so it is really the access date and not time). The access time may be one day (so it is really the access date and not time). The access time may be
updated when the file is executed or not depending on the platform. updated when the file is executed or not depending on the platform.
GetModificationTime() GetModificationTime()
GetTimes() GetTimes()
@@ -813,9 +834,7 @@ public:
SetTimes() SetTimes()
Touch() Touch()
Other file system operations functions are: Other file system operations functions are:
Mkdir() Mkdir()
Rmdir() Rmdir()
@@ -831,7 +850,7 @@ public:
/** /**
Removes the specified directory component from the path. Removes the specified directory component from the path.
@sa GetDirCount() @see GetDirCount()
*/ */
void RemoveDir(size_t pos); void RemoveDir(size_t pos);
@@ -867,7 +886,7 @@ public:
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() @see SetExt(), ClearExt()
*/ */
void SetEmptyExt(); void SetEmptyExt();
@@ -877,7 +896,7 @@ public:
name without a trailing dot, unlike a call to name without a trailing dot, unlike a call to
SetEmptyExt(). SetEmptyExt().
@sa SetEmptyExt(), ClearExt() @see SetEmptyExt(), ClearExt()
*/ */
void SetExt(const wxString& ext); void SetExt(const wxString& ext);
@@ -889,7 +908,7 @@ public:
/** /**
Sets the name part (without extension). Sets the name part (without extension).
@sa SetFullName() @see SetFullName()
*/ */
void SetName(const wxString& name); void SetName(const wxString& name);
@@ -911,24 +930,22 @@ 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 @a 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, @a fullpath may be empty on entry.
On return, @a path contains the file path (without the trailing separator),
On return, @e path contains the file path (without the trailing separator), @a name contains the file name and @a 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. @a hasExt instead of relying on testing whether @a ext is empty or not.
*/ */
static void SplitPath(const wxString& fullpath, wxString* volume, static void SplitPath(const wxString& fullpath, wxString* volume,
wxString* path, wxString* path,
wxString* name, wxString* name,
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,
@@ -944,10 +961,10 @@ public:
//@} //@}
/** /**
Splits the given @e fullpath into the volume part (which may be empty) and Splits the given @a fullpath into the volume part (which may be empty) and
the pure path part, not containing any volume. the pure path part, not containing any volume.
@sa SplitPath() @see SplitPath()
*/ */
static void SplitVolume(const wxString& fullpath, static void SplitVolume(const wxString& fullpath,
wxString* volume, wxString* volume,

View File

@@ -55,7 +55,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxFilePickerCtrl(wxWindow * parent, wxWindowID id, wxFilePickerCtrl(wxWindow* parent, wxWindowID id,
const wxString& path = wxEmptyString, const wxString& path = wxEmptyString,
const wxString& message = "Select a file", const wxString& message = "Select a file",
const wxString& wildcard = ".", const wxString& wildcard = ".",
@@ -67,41 +67,32 @@ 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 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
empty string. the 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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxString& path = wxEmptyString, const wxString& path = wxEmptyString,
const wxString& message = "Select a file", const wxString& message = "Select a file",
const wxString& wildcard = ".", const wxString& wildcard = ".",
@@ -126,14 +117,14 @@ public:
This method does the same thing as SetPath() but This method does the same thing as SetPath() but
takes a wxFileName object instead of a string. takes a wxFileName object instead of a string.
*/ */
void SetFileName(const wxFileName & filename); void SetFileName(const wxFileName& filename);
/** /**
Sets the absolute path of the currently selected file. This must be a valid Sets the absolute path of the currently selected file. This must be a valid
file if file if
the @c wxFLP_FILE_MUST_EXIST style was given. the @c wxFLP_FILE_MUST_EXIST style was given.
*/ */
void SetPath(const wxString & filename); void SetPath(const wxString& filename);
}; };
@@ -182,7 +173,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxDirPickerCtrl(wxWindow * parent, wxWindowID id, wxDirPickerCtrl(wxWindow* parent, wxWindowID id,
const wxString& path = wxEmptyString, const wxString& path = wxEmptyString,
const wxString& message = "Select a folder", const wxString& message = "Select a folder",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -193,37 +184,29 @@ 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 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
or the empty string. directory 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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxString& path = wxEmptyString, const wxString& path = wxEmptyString,
const wxString& message = "Select a folder", const wxString& message = "Select a folder",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@@ -248,14 +231,14 @@ public:
Just like SetPath() but this function takes a Just like SetPath() but this function takes a
wxFileName object. wxFileName object.
*/ */
void SetDirName(const wxFileName & dirname); void SetDirName(const wxFileName& dirname);
/** /**
Sets the absolute path of (the default converter uses current locale's Sets the absolute path of (the default converter uses current locale's
charset)the currently selected directory. This must be a valid directory if charset)the currently selected directory. This must be a valid directory if
@c wxDIRP_DIR_MUST_EXIST style was given. @c wxDIRP_DIR_MUST_EXIST style was given.
*/ */
void SetPath(const wxString & dirname); void SetPath(const wxString& dirname);
}; };
@@ -278,7 +261,7 @@ public:
/** /**
The constructor is not normally used by the user code. The constructor is not normally used by the user code.
*/ */
wxFileDirPickerEvent(wxEventType type, wxObject * generator, wxFileDirPickerEvent(wxEventType type, wxObject* generator,
int id, int id,
const wxString path); const wxString path);
@@ -290,5 +273,5 @@ public:
/** /**
Set the absolute path of the file/directory associated with the event. Set the absolute path of the file/directory associated with the event.
*/ */
void SetPath(const wxString & path); void SetPath(const wxString& path);
}; };

View File

@@ -38,51 +38,47 @@ public:
static void AddHandler(wxFileSystemHandler handler); static void AddHandler(wxFileSystemHandler handler);
/** /**
Sets the current location. @e location parameter passed to Sets the current location. @a location parameter passed to
OpenFile() is relative to this path. OpenFile() is relative to this path.
@b Caution! Unless @a is_dir is @true the @a 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);
/** /**
Converts filename into URL. Converts filename into URL.
@sa URLToFileName(), wxFileName @see URLToFileName(), wxFileName
*/ */
static wxString FileNameToURL(wxFileName filename); static wxString FileNameToURL(wxFileName filename);
/** /**
Looks for the file with the given name @e file in a colon or semi-colon Looks for the file with the given name @a 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,
const wxString& file); const wxString& file);
/** /**
Works like wxFindFirstFile. Returns name of the first Works like wxFindFirstFile. Returns name of the first
filename (within filesystem's current path) that matches @e wildcard. @e flags filename (within filesystem's current path) that matches @e wildcard. @a flags
may be one of may be one of
wxFILE (only files), wxDIR (only directories) or 0 (both). wxFILE (only files), wxDIR (only directories) or 0 (both).
*/ */
@@ -103,7 +99,7 @@ public:
open the given open the given
location. location.
*/ */
static bool HasHandlerForPath(const wxString & location); static bool HasHandlerForPath(const wxString& location);
/** /**
Opens the file and returns a pointer to a wxFSFile object Opens the file and returns a pointer to a wxFSFile object
@@ -111,11 +107,11 @@ public:
(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.
@a 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
or may not be seekable depending on the underlying source. or may not be seekable depending on the underlying source.
Passing @e wxFS_READ | wxFS_SEEKABLE for @e flags will Passing @e wxFS_READ | wxFS_SEEKABLE for @a flags will
back a stream that is not natively seekable with memory or a file back a stream that is not natively seekable with memory or a file
and return a stream that is always seekable. and return a stream that is always seekable.
*/ */
@@ -157,18 +153,15 @@ 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,
const wxString& mimetype, const wxString& mimetype,
@@ -185,6 +178,7 @@ public:
/** /**
Returns anchor (if present). The term of @b anchor can be easily Returns anchor (if present). The term of @b anchor can be easily
explained using few examples: explained using few examples:
Usually an anchor is presented only if the MIME type is 'text/html'. Usually an anchor is presented only if the MIME type is 'text/html'.
But it may have some meaning with other files; But it may have some meaning with other files;
for example myanim.avi#200 may refer to position in animation for example myanim.avi#200 may refer to position in animation
@@ -260,16 +254,16 @@ public:
Returns @true if the handler is able to open this file. This function doesn't Returns @true if the handler is able to open this file. This function doesn't
check whether the file exists or not, it only checks if it knows the protocol. check whether the file exists or not, it only checks if it knows the protocol.
Example: Example:
Must be overridden in derived handlers. Must be overridden in derived handlers.
*/ */
virtual bool CanOpen(const wxString& location); virtual bool CanOpen(const wxString& location);
/** /**
Works like wxFindFirstFile. Returns name of the first Works like wxFindFirstFile. Returns name of the first
filename (within filesystem's current path) that matches @e wildcard. @e flags filename (within filesystem's current path) that matches @e wildcard. @a flags
may be one of may be one of
wxFILE (only files), wxDIR (only directories) or 0 (both). wxFILE (only files), wxDIR (only directories) or 0 (both).
This method is only called if CanOpen() returns @true. This method is only called if CanOpen() returns @true.
*/ */
virtual wxString FindFirst(const wxString& wildcard, virtual wxString FindFirst(const wxString& wildcard,
@@ -277,7 +271,6 @@ public:
/** /**
Returns next filename that matches parameters passed to wxFileSystem::FindFirst. Returns next filename that matches parameters passed to wxFileSystem::FindFirst.
This method is only called if CanOpen() returns @true and FindFirst This method is only called if CanOpen() returns @true and FindFirst
returned a non-empty string. returned a non-empty string.
*/ */
@@ -286,16 +279,13 @@ public:
/** /**
Returns the anchor if present in the location. Returns the anchor if present in the location.
See @ref wxFSFile::getanchor wxFSFile for details. See @ref wxFSFile::getanchor wxFSFile for details.
Example: GetAnchor("index.htm#chapter2") == "chapter2" Example: GetAnchor("index.htm#chapter2") == "chapter2"
@b Note: the anchor is NOT part of the left location. @b Note: the anchor is NOT part of the left location.
*/ */
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"
*/ */
@@ -305,36 +295,31 @@ public:
Returns the MIME type based on @b extension of @e location. (While Returns the MIME type based on @b extension of @e location. (While
wxFSFile::GetMimeType wxFSFile::GetMimeType
returns real MIME type - either extension-based or queried from HTTP.) returns real MIME type - either extension-based or queried from HTTP.)
Example : GetMimeTypeFromExt("index.htm") == "text/html" Example : GetMimeTypeFromExt("index.htm") == "text/html"
*/ */
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"
*/ */
wxString GetRightLocation(const wxString& location); wxString GetRightLocation(const wxString& location);
/** /**
Opens the file and returns wxFSFile pointer or @NULL if failed. Opens the file and returns wxFSFile pointer or @NULL if failed.
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,
const wxString& location); const wxString& location);

View File

@@ -41,7 +41,7 @@
wxSWISS_FONT wxSWISS_FONT
@seealso @seealso
@ref overview_wxfontoverview "wxFont overview", wxDC::SetFont, wxDC::DrawText, @ref overview_wxfontoverview, wxDC::SetFont, wxDC::DrawText,
wxDC::GetTextExtent, wxFontDialog, wxSystemSettings wxDC::GetTextExtent, wxFontDialog, wxSystemSettings
*/ */
class wxFont : public wxGDIObject class wxFont : public wxGDIObject
@@ -52,134 +52,226 @@ 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
font with the closest size to the given one is found using binary search and platforms a
the static New method must be used. font with the closest size to the given one is found using binary search and
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:
wxFONTFAMILY_DEFAULT
Chooses a default font.
wxFONTFAMILY_DECORATIVE
A decorative font.
wxFONTFAMILY_ROMAN wxFONTFAMILY_DEFAULT
A formal, serif font.
wxFONTFAMILY_SCRIPT
A handwriting font. Chooses a default font.
wxFONTFAMILY_SWISS
A sans-serif font.
wxFONTFAMILY_MODERN
A fixed pitch font.
wxFONTFAMILY_TELETYPE wxFONTFAMILY_DECORATIVE
A teletype font.
A decorative font.
wxFONTFAMILY_ROMAN
A formal, serif font.
wxFONTFAMILY_SCRIPT
A handwriting font.
wxFONTFAMILY_SWISS
A sans-serif font.
wxFONTFAMILY_MODERN
A fixed pitch font.
wxFONTFAMILY_TELETYPE
A teletype font.
@param style @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:
wxFONTWEIGHT_NORMAL
Normal font.
wxFONTWEIGHT_LIGHT
Light font.
wxFONTWEIGHT_BOLD wxFONTWEIGHT_NORMAL
Bold font.
Normal font.
wxFONTWEIGHT_LIGHT
Light font.
wxFONTWEIGHT_BOLD
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
Motif 2.x only. and 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
string, empty 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
Default system encoding.
wxFONTENCODING_DEFAULT
Default application encoding: this
is the encoding set by calls to
SetDefaultEncoding and which may be set to,
say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the
default application encoding is the same as default system encoding.
wxFONTENCODING_ISO8859_1...15
ISO8859 encodings.
wxFONTENCODING_KOI8 wxFONTENCODING_SYSTEM
The standard Russian encoding for Internet.
wxFONTENCODING_CP1250...1252
Windows encodings similar to ISO8859 (but not identical). Default system encoding.
If the specified encoding isn't available, no font is created
(see also font encoding overview).
wxFONTENCODING_DEFAULT
Default application encoding: this
is the encoding set by calls to
SetDefaultEncoding and which may be set to,
say, KOI8 to create all fonts by default with KOI8 encoding. Initially, the
default application encoding is the same as default system encoding.
wxFONTENCODING_ISO8859_1...15
ISO8859 encodings.
wxFONTENCODING_KOI8
The standard Russian encoding for Internet.
wxFONTENCODING_CP1250...1252
Windows encodings similar to ISO8859 (but not identical).
If the specified encoding isn't available, no font is created
(see also font encoding overview).
@remarks If the desired font does not exist, the closest match will be @remarks If the desired font does not exist, the closest match will be
chosen. Under Windows, only scalable TrueType fonts chosen. Under Windows, only scalable TrueType fonts are
are used. 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);
//@} //@}
@@ -190,19 +282,17 @@ public:
more info. more info.
@remarks Although all remaining fonts are deleted when the application @remarks Although all remaining fonts are deleted when the application
exits, the application should try to clean up all exits, the application should try to clean up all fonts
fonts itself. This is because wxWidgets cannot know itself. This is because wxWidgets cannot know if a
if a pointer to the font object is stored in an pointer to the font object is stored in an application
application data structure, and there is a risk of data structure, and there is a risk of double deletion.
double deletion.
*/ */
~wxFont(); ~wxFont();
/** /**
Returns the current application's default encoding. Returns the current application's default encoding.
@sa @ref overview_wxfontencodingoverview "Font encoding overview", @see @ref overview_wxfontencodingoverview, SetDefaultEncoding()
SetDefaultEncoding()
*/ */
static wxFontEncoding GetDefaultEncoding(); static wxFontEncoding GetDefaultEncoding();
@@ -211,7 +301,7 @@ public:
there is no there is no
typeface information. typeface information.
@sa SetFaceName() @see SetFaceName()
*/ */
wxString GetFaceName(); wxString GetFaceName();
@@ -219,7 +309,7 @@ public:
Gets the font family. See SetFamily() for a list of valid Gets the font family. See SetFamily() for a list of valid
family identifiers. family identifiers.
@sa SetFamily() @see SetFamily()
*/ */
wxFontFamily GetFamily(); wxFontFamily GetFamily();
@@ -230,7 +320,7 @@ public:
typical typical
use of this function is for serializing in string-form a wxFont object. use of this function is for serializing in string-form a wxFont object.
@sa SetNativeFontInfo(),GetNativeFontInfoUserDesc() @see SetNativeFontInfo(),GetNativeFontInfoUserDesc()
*/ */
wxString GetNativeFontInfoDesc(); wxString GetNativeFontInfoDesc();
@@ -240,14 +330,14 @@ public:
Some examples of the formats of returned strings (which are platform-dependent) Some examples of the formats of returned strings (which are platform-dependent)
are in SetNativeFontInfoUserDesc(). are in SetNativeFontInfoUserDesc().
@sa GetNativeFontInfoDesc() @see GetNativeFontInfoDesc()
*/ */
wxString GetNativeFontInfoUserDesc(); wxString GetNativeFontInfoUserDesc();
/** /**
Gets the point size. Gets the point size.
@sa SetPointSize() @see SetPointSize()
*/ */
int GetPointSize(); int GetPointSize();
@@ -255,14 +345,14 @@ public:
Gets the font style. See wxFont() for a list of valid Gets the font style. See wxFont() for a list of valid
styles. styles.
@sa SetStyle() @see SetStyle()
*/ */
int GetStyle(); int GetStyle();
/** /**
Returns @true if the font is underlined, @false otherwise. Returns @true if the font is underlined, @false otherwise.
@sa SetUnderlined() @see SetUnderlined()
*/ */
bool GetUnderlined(); bool GetUnderlined();
@@ -270,7 +360,7 @@ public:
Gets the font weight. See wxFont() for a list of valid Gets the font weight. See wxFont() for a list of valid
weight identifiers. weight identifiers.
@sa SetWeight() @see SetWeight()
*/ */
wxFontWeight GetWeight(); wxFontWeight GetWeight();
@@ -283,45 +373,42 @@ public:
/** /**
Returns @true if this object is a valid font, @false otherwise. Returns @true if this object is a valid font, @false otherwise.
*/ */
#define bool IsOk() /* implementation is private */ bool IsOk();
//@{ //@{
/** /**
These functions take the same parameters as @ref ctor() wxFont These functions take the same parameters as @ref ctor() wxFont
constructor and return a new font object allocated on the heap. constructor and return a new font object allocated on the heap.
Using @c New() is currently the only way to directly create a font with Using @c New() is currently the only way to directly create a font with
the given size in pixels on platforms other than wxMSW. the given size in pixels on platforms other than wxMSW.
*/ */
static wxFont * New(int pointSize, wxFontFamily family, static wxFont* New(int pointSize, 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(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);
//@} //@}
/** /**
Sets the default font encoding. Sets the default font encoding.
@sa @ref overview_wxfontencodingoverview "Font encoding overview", @see @ref overview_wxfontencodingoverview, GetDefaultEncoding()
GetDefaultEncoding()
*/ */
static void SetDefaultEncoding(wxFontEncoding encoding); static void SetDefaultEncoding(wxFontEncoding encoding);
@@ -330,16 +417,16 @@ public:
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,
but specify the font family instead or as well. A but specify the font family instead or as well. A
suitable font will be found on the end-user's system. suitable font will be found on the end-user's system.
If both the family and the facename are specified, If both the family and the facename are specified,
wxWidgets will first search for the specific face, wxWidgets will first search for the specific face, and
and then for a font belonging to the same family. then for a font belonging to the same family.
@sa GetFaceName(), SetFamily() @see GetFaceName(), SetFamily()
*/ */
bool SetFaceName(const wxString& faceName); bool SetFaceName(const wxString& faceName);
@@ -347,45 +434,88 @@ public:
Sets the font family. Sets the font family.
@param family @param family
One of: One of:
wxFONTFAMILY_DEFAULT
Chooses a default font.
wxFONTFAMILY_DECORATIVE
A decorative font.
wxFONTFAMILY_ROMAN wxFONTFAMILY_DEFAULT
A formal, serif font.
wxFONTFAMILY_SCRIPT
A handwriting font. Chooses a default font.
wxFONTFAMILY_SWISS
A sans-serif font.
wxFONTFAMILY_MODERN
A fixed pitch font.
wxFONTFAMILY_TELETYPE wxFONTFAMILY_DECORATIVE
A teletype font.
@sa GetFamily(), SetFaceName()
A decorative font.
wxFONTFAMILY_ROMAN
A formal, serif font.
wxFONTFAMILY_SCRIPT
A handwriting font.
wxFONTFAMILY_SWISS
A sans-serif font.
wxFONTFAMILY_MODERN
A fixed pitch font.
wxFONTFAMILY_TELETYPE
A teletype font.
@see GetFamily(), SetFaceName()
*/ */
void SetFamily(wxFontFamily family); void SetFamily(wxFontFamily family);
@@ -399,7 +529,7 @@ public:
a wxFont a wxFont
object previously saved in a string-form. object previously saved in a string-form.
@sa SetNativeFontInfoUserDesc() @see SetNativeFontInfoUserDesc()
*/ */
bool SetNativeFontInfo(const wxString& info); bool SetNativeFontInfo(const wxString& info);
@@ -411,31 +541,26 @@ public:
strings which are user-friendly. strings which are user-friendly.
Examples of accepted string formats are: Examples of accepted string formats are:
Generic syntax Generic syntax
Example Example
on @b wxGTK2: @c [FACE-NAME] [bold] [oblique|italic] [POINTSIZE] on @b wxGTK2: @c [FACE-NAME] [bold] [oblique|italic] [POINTSIZE]
Monospace bold 10 Monospace bold 10
on @b wxMSW: @c [light|bold] [italic] [FACE-NAME] [POINTSIZE] [ENCODING] on @b wxMSW: @c [light|bold] [italic] [FACE-NAME] [POINTSIZE] [ENCODING]
Tahoma 10 WINDOWS-1252 Tahoma 10 WINDOWS-1252
on @b wxMac: FIXME on @b wxMac: FIXME
FIXME FIXME
For more detailed information about the allowed syntaxes you can look at the For more detailed information about the allowed syntaxes you can look at the
documentation of the native API used for font-rendering (e.g. pango_font_description_from_string). documentation of the native API used for font-rendering (e.g. pango_font_description_from_string).
@sa SetNativeFontInfo() @see SetNativeFontInfo()
*/ */
bool SetNativeFontInfoUserDesc(const wxString& info); bool SetNativeFontInfoUserDesc(const wxString& info);
@@ -443,9 +568,9 @@ public:
Sets the point size. Sets the point size.
@param pointSize @param pointSize
Size in points. Size in points.
@sa GetPointSize() @see GetPointSize()
*/ */
void SetPointSize(int pointSize); void SetPointSize(int pointSize);
@@ -453,9 +578,9 @@ 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() @see GetStyle()
*/ */
void SetStyle(int style); void SetStyle(int style);
@@ -463,9 +588,9 @@ public:
Sets underlining. Sets underlining.
@param underlining @param underlining
@true to underline, @false otherwise. @true to underline, @false otherwise.
@sa GetUnderlined() @see GetUnderlined()
*/ */
void SetUnderlined(const bool underlined); void SetUnderlined(const bool underlined);
@@ -473,25 +598,44 @@ public:
Sets the font weight. Sets the font weight.
@param weight @param weight
One of: One of:
wxFONTWEIGHT_NORMAL
Normal font.
wxFONTWEIGHT_LIGHT
Light font.
wxFONTWEIGHT_BOLD wxFONTWEIGHT_NORMAL
Bold font.
@sa GetWeight()
Normal font.
wxFONTWEIGHT_LIGHT
Light font.
wxFONTWEIGHT_BOLD
Bold font.
@see GetWeight()
*/ */
void SetWeight(wxFontWeight weight); void SetWeight(wxFontWeight weight);

View File

@@ -56,7 +56,6 @@ public:
/** /**
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
will be created. If the user presses OK, a new wxFont will be created and will be created. If the user presses OK, a new wxFont will be created and
stored in the font dialog's wxFontData structure. stored in the font dialog's wxFontData structure.
@@ -75,15 +74,13 @@ public:
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,
const wxFont& fontInit, const wxFont& fontInit,
const wxString& caption = wxEmptyString); const wxString& caption = wxEmptyString);

View File

@@ -27,8 +27,8 @@
@category{FIXME} @category{FIXME}
@seealso @seealso
@ref overview_wxfontencodingoverview "Font encoding overview", @ref @ref overview_wxfontencodingoverview, @ref overview_samplefont "Font sample",
overview_samplefont "Font sample", wxFont, wxFontMapper wxFont, wxFontMapper
*/ */
class wxFontEnumerator class wxFontEnumerator
{ {
@@ -36,20 +36,19 @@ public:
/** /**
Call OnFontEncoding() for each Call OnFontEncoding() for each
encoding supported by the given font - or for each encoding supported by at encoding supported by the given font - or for each encoding supported by at
least some font if @e font is not specified. least some font if @a font is not specified.
*/ */
virtual bool EnumerateEncodings(const wxString& font = ""); virtual bool EnumerateEncodings(const wxString& font = "");
/** /**
Call OnFacename() for each font which Call OnFacename() for each font which
supports given encoding (only if it is not wxFONTENCODING_SYSTEM) and is of supports given encoding (only if it is not wxFONTENCODING_SYSTEM) and is of
fixed width (if @e fixedWidthOnly is @true). fixed width (if @a fixedWidthOnly is @true).
Calling this function with default arguments will result in enumerating all Calling this function with default arguments will result in enumerating all
fonts available on the system. fonts available on the system.
*/ */
virtual bool EnumerateFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, virtual bool EnumerateFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM,
bool fixedWidthOnly = @false); bool fixedWidthOnly = false);
/** /**
Return array of strings containing all encodings found by Return array of strings containing all encodings found by
@@ -62,14 +61,14 @@ public:
EnumerateFacenames(). EnumerateFacenames().
*/ */
static wxArrayString GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, static wxArrayString GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM,
bool fixedWidthOnly = @false); bool fixedWidthOnly = false);
/** /**
Returns @true if the given string is valid face name, i.e. it's the face name Returns @true if the given string is valid face name, i.e. it's the face name
of an installed of an installed
font and it can safely be used with wxFont::SetFaceName. font and it can safely be used with wxFont::SetFaceName.
*/ */
static bool IsValidFacename(const wxString & facename); static bool IsValidFacename(const wxString& facename);
/** /**
Called by EnumerateFacenames() for Called by EnumerateFacenames() for

View File

@@ -51,8 +51,7 @@ public:
/** /**
Returns the encoding for the given charset (in the form of RFC 2046) or Returns the encoding for the given charset (in the form of RFC 2046) or
@c wxFONTENCODING_SYSTEM if couldn't decode it. @c wxFONTENCODING_SYSTEM if couldn't decode it.
Be careful when using this function with @a interactive set to @true
Be careful when using this function with @e interactive set to @true
(default value) as the function then may show a dialog box to the user which (default value) as the function then may show a dialog box to the user which
may lead to unexpected reentrancies and may also take a significantly longer may lead to unexpected reentrancies and may also take a significantly longer
time than a simple function call. For these reasons, it is almost always a bad time than a simple function call. For these reasons, it is almost always a bad
@@ -60,15 +59,15 @@ public:
events such as @c EVT_PAINT. events such as @c EVT_PAINT.
*/ */
wxFontEncoding CharsetToEncoding(const wxString& charset, wxFontEncoding CharsetToEncoding(const wxString& charset,
bool interactive = @true); bool interactive = true);
/** /**
Get the current font mapper object. If there is no current object, creates Get the current font mapper object. If there is no current object, creates
one. one.
@sa Set() @see Set()
*/ */
#define static wxFontMapper * Get() /* implementation is private */ static wxFontMapper* Get();
/** /**
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
@@ -84,7 +83,6 @@ public:
available on this system). If successful, return @true and fill info available on this system). If successful, return @true and fill info
structure with the parameters required to create the font, otherwise structure with the parameters required to create the font, otherwise
return @false. return @false.
The first form is for wxWidgets' internal use while the second one The first form is for wxWidgets' internal use while the second one
is better suitable for general use -- it returns wxFontEncoding which is better suitable for general use -- it returns wxFontEncoding which
can consequently be passed to wxFont constructor. can consequently be passed to wxFont constructor.
@@ -92,11 +90,11 @@ public:
bool GetAltForEncoding(wxFontEncoding encoding, bool GetAltForEncoding(wxFontEncoding encoding,
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);
//@} //@}
/** /**
@@ -126,7 +124,7 @@ public:
Return internal string identifier for the encoding (see also Return internal string identifier for the encoding (see also
wxFontMapper::GetEncodingDescription) wxFontMapper::GetEncodingDescription)
@sa GetEncodingFromName() @see GetEncodingFromName()
*/ */
static wxString GetEncodingName(wxFontEncoding encoding); static wxString GetEncodingName(wxFontEncoding encoding);
@@ -149,13 +147,12 @@ public:
This method is only useful if you want to plug-in an alternative font mapper This method is only useful if you want to plug-in an alternative font mapper
into wxWidgets. into wxWidgets.
@sa Get() @see Get()
*/ */
#define static wxFontMapper * Set(wxFontMapper * mapper) /* implementation is private */ static wxFontMapper* Set(wxFontMapper* mapper);
/** /**
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

@@ -50,7 +50,7 @@ public:
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
*/ */
wxFontPickerCtrl(wxWindow * parent, wxWindowID id, wxFontPickerCtrl(wxWindow* parent, wxWindowID id,
const wxFont& font = wxNullFont, const wxFont& font = wxNullFont,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -60,34 +60,27 @@ 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 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
creation failed. creation failed.
*/ */
bool Create(wxWindow * parent, wxWindowID id, bool Create(wxWindow* parent, wxWindowID id,
const wxFont& font = wxNullFont, const wxFont& font = wxNullFont,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
@@ -122,7 +115,7 @@ public:
Sets the currently selected font. Sets the currently selected font.
Note that this function is completely different from wxWindow::SetFont. Note that this function is completely different from wxWindow::SetFont.
*/ */
void SetSelectedFont(const wxFont & font); void SetSelectedFont(const wxFont& font);
}; };
@@ -145,7 +138,7 @@ public:
/** /**
The constructor is not normally used by the user code. The constructor is not normally used by the user code.
*/ */
wxFontPickerEvent(wxObject * generator, int id, wxFontPickerEvent(wxObject* generator, int id,
const wxFont& font); const wxFont& font);
/** /**
@@ -156,5 +149,5 @@ public:
/** /**
Set the font associated with the event. Set the font associated with the event.
*/ */
void SetFont(const wxFont & f); void SetFont(const wxFont& f);
}; };

View File

@@ -93,37 +93,33 @@ 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,
either the windowing system or wxWidgets, depending on platform. chosen by
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
individual windows. individual windows.
@remarks For Motif, MWM (the Motif Window Manager) should be running for @remarks For Motif, MWM (the Motif Window Manager) should be running for
any window styles to work (otherwise all styles take any window styles to work (otherwise all styles take
effect). effect).
@sa Create() @see Create()
*/ */
wxFrame(); wxFrame();
wxFrame(wxWindow* parent, wxWindowID id, wxFrame(wxWindow* parent, wxWindowID id,
@@ -143,7 +139,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);
@@ -162,29 +158,25 @@ 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
otherwise. otherwise.
@remarks The width of the status bar is the whole width of the frame @remarks The width of the status bar is the whole width of the frame
(adjusted automatically when resizing), and the (adjusted automatically when resizing), and the height
height and text size are chosen by the host windowing and text size are chosen by the host windowing system.
system.
@sa SetStatusText(), OnCreateStatusBar(), GetStatusBar() @see SetStatusText(), OnCreateStatusBar(), GetStatusBar()
*/ */
virtual wxStatusBar* CreateStatusBar(int number = 1, virtual wxStatusBar* CreateStatusBar(int number = 1,
long style = 0, long style = 0,
@@ -195,28 +187,26 @@ 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
otherwise. otherwise.
@remarks By default, the toolbar is an instance of wxToolBar (which is @remarks By default, the toolbar is an instance of wxToolBar (which is
defined to be a suitable toolbar class on each defined to be a suitable toolbar class on each
platform, such as wxToolBar95). To use a different platform, such as wxToolBar95). To use a different
class, override OnCreateToolBar(). class, override OnCreateToolBar().
@sa CreateStatusBar(), OnCreateToolBar(), SetToolBar(), @see CreateStatusBar(), OnCreateToolBar(), SetToolBar(),
GetToolBar() GetToolBar()
*/ */
virtual wxToolBar* CreateToolBar(long style = wxBORDER_NONE | wxTB_HORIZONTAL, virtual wxToolBar* CreateToolBar(long style = wxBORDER_NONE | wxTB_HORIZONTAL,
wxWindowID id = -1, wxWindowID id = -1,
const wxString& name = "toolBar"); const wxString& name = "toolBar");
@@ -229,7 +219,7 @@ public:
/** /**
Returns a pointer to the menubar currently associated with the frame (if any). Returns a pointer to the menubar currently associated with the frame (if any).
@sa SetMenuBar(), wxMenuBar, wxMenu @see SetMenuBar(), wxMenuBar, wxMenu
*/ */
wxMenuBar* GetMenuBar(); wxMenuBar* GetMenuBar();
@@ -237,21 +227,21 @@ public:
Returns a pointer to the status bar currently associated with the frame (if Returns a pointer to the status bar currently associated with the frame (if
any). any).
@sa CreateStatusBar(), wxStatusBar @see CreateStatusBar(), wxStatusBar
*/ */
wxStatusBar* GetStatusBar(); wxStatusBar* GetStatusBar();
/** /**
Returns the status bar pane used to display menu and toolbar help. Returns the status bar pane used to display menu and toolbar help.
@sa SetStatusBarPane() @see SetStatusBarPane()
*/ */
int GetStatusBarPane(); int GetStatusBarPane();
/** /**
Returns a pointer to the toolbar currently associated with the frame (if any). Returns a pointer to the toolbar currently associated with the frame (if any).
@sa CreateToolBar(), wxToolBar, SetToolBar() @see CreateToolBar(), wxToolBar, SetToolBar()
*/ */
wxToolBar* GetToolBar(); wxToolBar* GetToolBar();
@@ -259,26 +249,23 @@ 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.
@remarks An application can override this function to return a different @remarks An application can override this function to return a different
kind of status bar. The default implementation kind of status bar. The default implementation returns
returns an instance of wxStatusBar. an instance of wxStatusBar.
@sa CreateStatusBar(), wxStatusBar. @see CreateStatusBar(), wxStatusBar.
*/ */
virtual wxStatusBar* OnCreateStatusBar(int number, long style, virtual wxStatusBar* OnCreateStatusBar(int number, long style,
wxWindowID id, wxWindowID id,
@@ -288,23 +275,21 @@ 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.
@remarks An application can override this function to return a different @remarks An application can override this function to return a different
kind of toolbar. The default implementation returns kind of toolbar. The default implementation returns an
an instance of wxToolBar. instance of wxToolBar.
@sa CreateToolBar(), wxToolBar. @see CreateToolBar(), wxToolBar.
*/ */
virtual wxToolBar* OnCreateToolBar(long style, wxWindowID id, virtual wxToolBar* OnCreateToolBar(long style, wxWindowID id,
const wxString& name); const wxString& name);
@@ -313,7 +298,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);
@@ -322,7 +307,6 @@ public:
forcing it to reevaluate its children positions. It is sometimes useful to call forcing it to reevaluate its children positions. It is sometimes useful to call
this function after adding or deleting a children after the frame creation or this function after adding or deleting a children after the frame creation or
if a child size changes. if a child size changes.
Note that if the frame is using either sizers or constraints for the children Note that if the frame is using either sizers or constraints for the children
layout, it is enough to call wxWindow::Layout directly and layout, it is enough to call wxWindow::Layout directly and
this function should not be used in this case. this function should not be used in this case.
@@ -333,21 +317,21 @@ 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
destroyed also, so do not delete the menu bar destroyed also, so do not delete the menu bar
explicitly (except by resetting the frame's menu bar explicitly (except by resetting the frame's menu bar to
to another frame or @NULL). another frame or @NULL).
@sa GetMenuBar(), wxMenuBar, wxMenu. @see GetMenuBar(), wxMenuBar, wxMenu.
*/ */
void SetMenuBar(wxMenuBar* menuBar); void SetMenuBar(wxMenuBar* menuBar);
/** /**
Associates a status bar with the frame. Associates a status bar with the frame.
@sa CreateStatusBar(), wxStatusBar, GetStatusBar() @see CreateStatusBar(), wxStatusBar, GetStatusBar()
*/ */
void SetStatusBar(wxStatusBar* statusBar); void SetStatusBar(wxStatusBar* statusBar);
@@ -361,14 +345,13 @@ 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.
@sa CreateStatusBar(), wxStatusBar @see CreateStatusBar(), wxStatusBar
*/ */
virtual void SetStatusText(const wxString& text, int number = 0); virtual void SetStatusText(const wxString& text, int number = 0);
@@ -376,21 +359,21 @@ 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
one least one
field must be -1. You should delete this array after calling SetStatusWidths. field must be -1. You should delete this array after calling
SetStatusWidths.
@remarks The widths of the variable fields are calculated from the total @remarks The widths of the variable fields are calculated from the total
width of all fields, minus the sum of widths of the width of all fields, minus the sum of widths of the
non-variable fields, divided by the number of non-variable fields, divided by the number of variable
variable fields. fields.
*/ */
virtual void SetStatusWidths(int n, int * widths); virtual void SetStatusWidths(int n, int* widths);
/** /**
Associates a toolbar with the frame. Associates a toolbar with the frame.

View File

@@ -78,13 +78,12 @@ public:
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 @a type argument is one of @c wxBITMAP_TYPE_XXX constants.
The @e type argument is one of @c wxBITMAP_TYPE_XXX constants. Note that you must use a @a type value (aka image format)
Note that you must use a @e type value (aka image format)
that wxWidgets can save (e.g. JPG, PNG, see wxImage that wxWidgets can save (e.g. JPG, PNG, see wxImage
documentation)! documentation)!
@sa AddFileWithMimeType() @see AddFileWithMimeType()
*/ */
static void AddFile(const wxString& filename, wxImage& image, static void AddFile(const wxString& filename, wxImage& image,
long type); long type);
@@ -98,10 +97,9 @@ public:
Like AddFile(), but lets you explicitly Like AddFile(), but lets you explicitly
specify added file's MIME type. This version should be used whenever you know specify added file's MIME type. This version should be used whenever you know
the MIME type, because it makes accessing the files faster. the MIME type, because it makes accessing the files faster.
This function is new since wxWidgets version 2.8.5 This function is new since wxWidgets version 2.8.5
@sa AddFile() @see AddFile()
*/ */
static void AddFileWithMimeType(const wxString& filename, static void AddFileWithMimeType(const wxString& filename,
const wxString& textdata, const wxString& textdata,

View File

@@ -51,28 +51,22 @@ 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() @see Create()
*/ */
wxGauge(); wxGauge();
wxGauge(wxWindow* parent, wxWindowID id, int range, wxGauge(wxWindow* parent, wxWindowID id, int range,
@@ -104,14 +98,14 @@ public:
@remarks This method is not implemented (returns 0) for most platforms. @remarks This method is not implemented (returns 0) for most platforms.
@sa SetBezelFace() @see SetBezelFace()
*/ */
int GetBezelFace(); int GetBezelFace();
/** /**
Returns the maximum position of the gauge. Returns the maximum position of the gauge.
@sa SetRange() @see SetRange()
*/ */
int GetRange(); int GetRange();
@@ -120,14 +114,14 @@ public:
@remarks This method is not implemented (returns 0) for most platforms. @remarks This method is not implemented (returns 0) for most platforms.
@sa SetShadowWidth() @see SetShadowWidth()
*/ */
int GetShadowWidth(); int GetShadowWidth();
/** /**
Returns the current position of the gauge. Returns the current position of the gauge.
@sa SetValue() @see SetValue()
*/ */
int GetValue(); int GetValue();
@@ -140,7 +134,6 @@ public:
/** /**
Switch the gauge to indeterminate mode (if required) and makes the gauge move Switch the gauge to indeterminate mode (if required) and makes the gauge move
a bit to indicate the user that some progress has been made. a bit to indicate the user that some progress has been made.
Note that after calling this function the value returned by GetValue() Note that after calling this function the value returned by GetValue()
is undefined and thus you need to explicitely call SetValue() if you is undefined and thus you need to explicitely call SetValue() if you
want to restore the determinate mode. want to restore the determinate mode.
@@ -151,9 +144,9 @@ public:
Sets the 3D bezel face width. Sets the 3D bezel face width.
@remarks This method is not implemented (doesn't do anything) for most @remarks This method is not implemented (doesn't do anything) for most
platforms. platforms.
@sa GetBezelFace() @see GetBezelFace()
*/ */
void SetBezelFace(int width); void SetBezelFace(int width);
@@ -161,7 +154,7 @@ public:
Sets the range (maximum value) of the gauge. Sets the range (maximum value) of the gauge.
This function makes the gauge switch to determinate mode, if it's not already. This function makes the gauge switch to determinate mode, if it's not already.
@sa GetRange() @see GetRange()
*/ */
void SetRange(int range); void SetRange(int range);
@@ -169,21 +162,20 @@ public:
Sets the 3D shadow width. Sets the 3D shadow width.
@remarks This method is not implemented (doesn't do anything) for most @remarks This method is not implemented (doesn't do anything) for most
platforms. platforms.
*/ */
void SetShadowWidth(int width); void SetShadowWidth(int width);
/** /**
Sets the position of the gauge. The @e pos must be between 0 and the gauge Sets the position of the gauge. The @a pos must be between 0 and the gauge
range as returned by GetRange(), inclusive. range as returned by GetRange(), inclusive.
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() @see GetValue()
*/ */
void SetValue(int pos); void SetValue(int pos);
}; };

View File

@@ -92,18 +92,18 @@ public:
const wxGBSpan& span = wxDefaultSpan, const wxGBSpan& span = wxDefaultSpan,
int flag = 0, int flag = 0,
int border = 0, int border = 0,
wxObject* userData = @NULL); wxObject* userData = NULL);
wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos, wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos,
const wxGBSpan& span = wxDefaultSpan, const wxGBSpan& span = wxDefaultSpan,
int flag = 0, int flag = 0,
int border = 0, int border = 0,
wxObject* userData = @NULL); wxObject* userData = NULL);
wxSizerItem* Add(int width, int height, wxSizerItem* Add(int width, int height,
const wxGBPosition& pos, const wxGBPosition& pos,
const wxGBSpan& span = wxDefaultSpan, const wxGBSpan& span = wxDefaultSpan,
int flag = 0, int flag = 0,
int border = 0, int border = 0,
wxObject* userData = @NULL); wxObject* userData = NULL);
wxSizerItem* Add(wxGBSizerItem* item); wxSizerItem* Add(wxGBSizerItem* item);
//@} //@}
@@ -121,10 +121,10 @@ public:
example it may be the item we are checking the position of. example it may be the item we are checking the position of.
*/ */
bool CheckForIntersection(wxGBSizerItem* item, bool CheckForIntersection(wxGBSizerItem* item,
wxGBSizerItem* excludeItem = @NULL); wxGBSizerItem* excludeItem = NULL);
bool CheckForIntersection(const wxGBPosition& pos, bool CheckForIntersection(const wxGBPosition& pos,
const wxGBSpan& span, const wxGBSpan& span,
wxGBSizerItem* excludeItem = @NULL); wxGBSizerItem* excludeItem = NULL);
//@} //@}
//@{ //@{

View File

@@ -26,11 +26,8 @@ public:
//@{ //@{
/** /**
Create a point. Create a point.
double x double x
double y double y
Members of the @b wxRealPoint object. Members of the @b wxRealPoint object.
*/ */
wxRealPoint(); wxRealPoint();
@@ -69,7 +66,7 @@ public:
/** /**
Returns the rectangle having the same size as this one but centered relatively Returns the rectangle having the same size as this one but centered relatively
to the given rectangle @e r. By default, rectangle is centred in both to the given rectangle @e r. By default, rectangle is centred in both
directions but if @e dir includes only @c wxVERTICAL or only directions but if @a dir includes only @c wxVERTICAL or only
@c wxHORIZONTAL flag, then it is only centered in this direction while @c wxHORIZONTAL flag, then it is only centered in this direction while
the other component of its position remains unchanged. the other component of its position remains unchanged.
*/ */
@@ -90,12 +87,11 @@ public:
//@{ //@{
/** /**
Decrease the rectangle size. Decrease the rectangle size.
This method is the opposite from Inflate(): This method is the opposite from Inflate():
Deflate(a, b) is equivalent to Inflate(-a, -b). Deflate(a, b) is equivalent to Inflate(-a, -b).
Please refer to Inflate() for full description. Please refer to Inflate() for full description.
@sa Inflate() @see Inflate()
*/ */
void Deflate(wxCoord dx, wxCoord dy); void Deflate(wxCoord dx, wxCoord dy);
void Deflate(const wxSize& diff); void Deflate(const wxSize& diff);
@@ -141,7 +137,7 @@ public:
/** /**
Gets the size. Gets the size.
@sa SetSize() @see SetSize()
*/ */
wxSize GetSize(); wxSize GetSize();
@@ -169,38 +165,32 @@ public:
/** /**
Gets the x member. Gets the x member.
*/ */
#define int GetX() /* implementation is private */ int GetX();
/** /**
Gets the y member. Gets the y member.
*/ */
#define int GetY() /* implementation is private */ int GetY();
//@{ //@{
/** /**
Increases the size of the rectangle. Increases the size of the rectangle.
The second form uses the same @a diff for both @a dx and @e dy.
The second form uses the same @e diff for both @e dx and @e dy.
The first two versions modify the rectangle in place, the last one returns a The first two versions modify the rectangle in place, the last one returns a
new rectangle leaving this one unchanged. new rectangle leaving this one unchanged.
The left border is moved farther left and the right border is moved farther The left border is moved farther left and the right border is moved farther
right by @e dx. The upper border is moved farther up and the bottom border right by @e dx. The upper border is moved farther up and the bottom border
is moved farther down by @e dy. (Note the the width and height of the is moved farther down by @e dy. (Note the the width and height of the
rectangle thus change by 2*@e dx and 2*@e dy, respectively.) If one or rectangle thus change by 2*@a dx and 2*@e dy, respectively.) If one or
both of @e dx and @e dy are negative, the opposite happens: the rectangle both of @a dx and @a dy are negative, the opposite happens: the rectangle
size decreases in the respective direction. size decreases in the respective direction.
Inflating and deflating behaves "naturally''. Defined more precisely, that Inflating and deflating behaves "naturally''. Defined more precisely, that
means: means:
"Real'' inflates (that is, @a dx and/or @a dy = 0) are not
"Real'' inflates (that is, @e dx and/or @e dy = 0) are not
constrained. Thus inflating a rectangle can cause its upper left corner constrained. Thus inflating a rectangle can cause its upper left corner
to move into the negative numbers. (the versions prior to 2.5.4 forced to move into the negative numbers. (the versions prior to 2.5.4 forced
the top left coordinate to not fall below (0, 0), which implied a the top left coordinate to not fall below (0, 0), which implied a
forced move of the rectangle.) forced move of the rectangle.)
Deflates are clamped to not reduce the width or height of the Deflates are clamped to not reduce the width or height of the
rectangle below zero. In such cases, the top-left corner is nonetheless rectangle below zero. In such cases, the top-left corner is nonetheless
handled properly. For example, a rectangle at (10, 10) with size (20, handled properly. For example, a rectangle at (10, 10) with size (20,
@@ -210,7 +200,7 @@ public:
whereas the height is reduced by the full 30 (rather than also stopping whereas the height is reduced by the full 30 (rather than also stopping
at 20, when the width reached zero). at 20, when the width reached zero).
@sa Deflate() @see Deflate()
*/ */
void Inflate(wxCoord dx, wxCoord dy); void Inflate(wxCoord dx, wxCoord dy);
void Inflate(const wxSize& diff); void Inflate(const wxSize& diff);
@@ -230,7 +220,7 @@ public:
/** /**
Returns @true if this rectangle has a non-empty intersection with the Returns @true if this rectangle has a non-empty intersection with the
rectangle @e rect and @false otherwise. rectangle @a rect and @false otherwise.
*/ */
bool Intersects(const wxRect& rect); bool Intersects(const wxRect& rect);
@@ -242,8 +232,8 @@ public:
//@{ //@{
/** /**
Moves the rectangle by the specified offset. If @e dx is positive, the Moves the rectangle by the specified offset. If @a dx is positive, the
rectangle is moved to the right, if @e dy is positive, it is moved to the rectangle is moved to the right, if @a dy is positive, it is moved to the
bottom, otherwise it is moved to the left or top respectively. bottom, otherwise it is moved to the left or top respectively.
*/ */
void Offset(wxCoord dx, wxCoord dy); void Offset(wxCoord dx, wxCoord dy);
@@ -258,7 +248,7 @@ public:
/** /**
Sets the size. Sets the size.
@sa GetSize() @see GetSize()
*/ */
void SetSize(const wxSize& s); void SetSize(const wxSize& s);
@@ -270,12 +260,12 @@ public:
/** /**
Sets the x position. Sets the x position.
*/ */
#define void SetX(int x) /* implementation is private */ void SetX(int x);
/** /**
Sets the y position. Sets the y position.
*/ */
#define void SetY(int y) /* implementation is private */ void SetY(int y);
//@{ //@{
/** /**
@@ -289,7 +279,6 @@ public:
/** /**
int height int height
Height member. Height member.
*/ */
@@ -318,21 +307,18 @@ public:
/** /**
int width int width
Width member. Width member.
*/ */
/** /**
int x int x
x coordinate of the top-level corner of the rectangle. x coordinate of the top-level corner of the rectangle.
*/ */
/** /**
int y int y
y coordinate of the top-level corner of the rectangle. y coordinate of the top-level corner of the rectangle.
*/ */
}; };
@@ -365,13 +351,12 @@ public:
to the brush list, and returns it. to the brush list, and returns it.
@param colour @param colour
Colour object. Colour object.
@param style @param style
Brush style. See wxBrush::SetStyle for a list of styles. Brush style. See wxBrush::SetStyle for a list of styles.
*/ */
wxBrush * FindOrCreateBrush(const wxColour& colour, wxBrush* FindOrCreateBrush(const wxColour& colour,
int style = wxSOLID); int style = wxSOLID);
}; };
@@ -423,14 +408,12 @@ public:
/** /**
int x int x
x member. x member.
*/ */
/** /**
int y int y
y member. y member.
*/ */
}; };
@@ -468,7 +451,6 @@ public:
/** /**
Adds a colour to the database. If a colour with the same name already exists, Adds a colour to the database. If a colour with the same name already exists,
it is replaced. it is replaced.
Please note that the overload taking a pointer is deprecated and will be Please note that the overload taking a pointer is deprecated and will be
removed in the next wxWidgets version, please don't use it. removed in the next wxWidgets version, please don't use it.
*/ */
@@ -526,11 +508,11 @@ public:
list. See the @ref wxFont::ctor "wxFont constructor" for list. See the @ref wxFont::ctor "wxFont constructor" for
details of the arguments. details of the arguments.
*/ */
wxFont * FindOrCreateFont(int point_size, int family, int style, wxFont* FindOrCreateFont(int point_size, int family, int style,
int weight, int weight,
bool underline = @false, bool underline = false,
const wxString& facename = @NULL, const wxString& facename = NULL,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
}; };
@@ -570,12 +552,11 @@ public:
//@{ //@{
/** /**
Decreases the size in x- and y- directions Decreases the size in x- and y- directions
By @e size.x and @e size.y for the first overload By @e size.x and @e size.y for the first overload
By @e dx and @e dy for the second one By @a dx and @a dy for the second one
By @e d and @e d for the third one By @a d and @a d for the third one
@sa IncBy() @see IncBy()
*/ */
void DecBy(const wxSize& size); void DecBy(const wxSize& size);
void DecBy(int dx, int dy); void DecBy(int dx, int dy);
@@ -586,7 +567,7 @@ public:
Decrements this object so that both of its dimensions are not greater than the Decrements this object so that both of its dimensions are not greater than the
corresponding dimensions of the @e size. corresponding dimensions of the @e size.
@sa IncTo() @see IncTo()
*/ */
void DecTo(const wxSize& size); void DecTo(const wxSize& size);
@@ -603,12 +584,11 @@ public:
//@{ //@{
/** /**
Increases the size in x- and y- directions Increases the size in x- and y- directions
By @e size.x and @e size.y for the first overload By @e size.x and @e size.y for the first overload
By @e dx and @e dy for the second one By @a dx and @a dy for the second one
By @e d and @e d for the third one By @a d and @a d for the third one
@sa DecBy() @see DecBy()
*/ */
void IncBy(const wxSize& size); void IncBy(const wxSize& size);
void IncBy(int dx, int dy); void IncBy(int dx, int dy);
@@ -619,7 +599,7 @@ public:
Increments this object so that both of its dimensions are not less than the Increments this object so that both of its dimensions are not less than the
corresponding dimensions of the @e size. corresponding dimensions of the @e size.
@sa DecTo() @see DecTo()
*/ */
void IncTo(const wxSize& size); void IncTo(const wxSize& size);
@@ -627,7 +607,6 @@ public:
Returns @true if neither of the size object components is equal to -1, which Returns @true if neither of the size object components is equal to -1, which
is used as default for the size values in wxWidgets (hence the predefined is used as default for the size values in wxWidgets (hence the predefined
@c wxDefaultSize has both of its components equal to -1). @c wxDefaultSize has both of its components equal to -1).
This method is typically used before calling This method is typically used before calling
SetDefaults(). SetDefaults().
*/ */
@@ -656,7 +635,6 @@ public:
Scales the dimensions of this object by the given factors. Scales the dimensions of this object by the given factors.
If you want to scale both dimensions by the same factor you can also use If you want to scale both dimensions by the same factor you can also use
the @ref operators() "operator *=" the @ref operators() "operator *="
Returns a reference to this object (so that you can concatenate other Returns a reference to this object (so that you can concatenate other
operations in the same line). operations in the same line).
*/ */
@@ -665,14 +643,14 @@ public:
/** /**
Sets the width and height members. Sets the width and height members.
*/ */
#define void Set(int width, int height) /* implementation is private */ void Set(int width, int height);
/** /**
Combine this size object with another one replacing the default (i.e. equal Combine this size object with another one replacing the default (i.e. equal
to -1) components of this object with those of the other. It is typically to -1) components of this object with those of the other. It is typically
used like this: used like this:
@sa IsFullySpecified() @see IsFullySpecified()
*/ */
void SetDefaults(const wxSize& sizeDefault); void SetDefaults(const wxSize& sizeDefault);
@@ -741,16 +719,13 @@ public:
to the pen list, and returns it. to the pen list, and returns it.
@param colour @param colour
Colour object. Colour object.
@param colourName @param colourName
Colour name, which should be in the colour database. Colour name, which should be in the colour database.
@param width @param width
Width of pen. Width of pen.
@param style @param style
Pen style. See wxPen::wxPen for a list of styles. Pen style. See wxPen::wxPen for a list of styles.
*/ */
wxPen* FindOrCreatePen(const wxColour& colour, int width, wxPen* FindOrCreatePen(const wxColour& colour, int width,
int style); int style);
@@ -771,8 +746,8 @@ public:
are currently defaulting to the whole display until a way is found to are currently defaulting to the whole display until a way is found to
provide this info for all window managers, etc. provide this info for all window managers, etc.
*/ */
void wxClientDisplayRect(int * x, int * y, int * width, void wxClientDisplayRect(int* x, int* y, int* width,
int * height); int* height);
wxRect wxGetClientDisplayRect(); wxRect wxGetClientDisplayRect();
//@} //@}
@@ -780,7 +755,7 @@ wxRect wxGetClientDisplayRect();
/** /**
Returns the display size in pixels. Returns the display size in pixels.
*/ */
void wxDisplaySize(int * width, int * height); void wxDisplaySize(int* width, int* height);
wxSize wxGetDisplaySize(); wxSize wxGetDisplaySize();
//@} //@}
@@ -788,7 +763,7 @@ wxSize wxGetDisplaySize();
/** /**
Returns the display size in millimeters. Returns the display size in millimeters.
*/ */
void wxDisplaySizeMM(int * width, int * height); void wxDisplaySizeMM(int* width, int* height);
wxSize wxGetDisplaySizeMM(); wxSize wxGetDisplaySizeMM();
//@} //@}
@@ -797,9 +772,9 @@ wxSize wxGetDisplaySizeMM();
for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to
avoid using @c #ifdefs when creating icons. avoid using @c #ifdefs when creating icons.
@sa @ref overview_wxbitmapoverview "Bitmaps and icons overview", wxBITMAP @see @ref overview_wxbitmapoverview, wxBITMAP
*/ */
#define wxICON() /* implementation is private */ wxICON();
/** /**
Returns @true if the display is colour, @false otherwise. Returns @true if the display is colour, @false otherwise.
@@ -811,7 +786,7 @@ bool wxColourDisplay();
for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to
avoid using @c #ifdefs when creating bitmaps. avoid using @c #ifdefs when creating bitmaps.
@sa @ref overview_wxbitmapoverview "Bitmaps and icons overview", wxICON @see @ref overview_wxbitmapoverview, wxICON
*/ */
#define wxBITMAP() /* implementation is private */ #define wxBITMAP() /* implementation is private */

View File

@@ -48,24 +48,22 @@ public:
Constructor. Constructor.
@param win @param win
The canvas that is used to initialize this context. This parameter is needed The canvas that is used to initialize this context. This parameter is
only temporarily, needed only temporarily,
and the caller may do anything with it (e.g. destroy the window) after the and the caller may do anything with it (e.g. destroy the window) after the
constructor returned. constructor returned.
It will be possible to bind (make current) this context to any other
It will be possible to bind (make current) this context to any other wxGLCanvas wxGLCanvas that has been created
that has been created with equivalent attributes as win.
with equivalent attributes as win.
@param other @param other
Context to share display lists with or @NULL (the default) for no sharing. Context to share display lists with or @NULL (the default) for no sharing.
*/ */
wxGLContext(wxGLCanvas* win, const wxGLContext* other=@NULL); wxGLContext(wxGLCanvas* win, const wxGLContext* other = NULL);
/** /**
Makes the OpenGL state that is represented by this rendering context current Makes the OpenGL state that is represented by this rendering context current
with the wxGLCanvas @e win. with the wxGLCanvas @e win.
Note that @e win can be a different wxGLCanvas window than the one that was Note that @a win can be a different wxGLCanvas window than the one that was
passed to the constructor of this rendering context. passed to the constructor of this rendering context.
If @e RC is an object of type wxGLContext, the statements @e If @e RC is an object of type wxGLContext, the statements @e
RC.SetCurrent(win); and @e win.SetCurrent(RC); are equivalent, RC.SetCurrent(win); and @e win.SetCurrent(RC); are equivalent,
@@ -123,63 +121,56 @@ public:
/** /**
Creates a window with the given parameters. Notice that you need to create and Creates a window with the given parameters. Notice that you need to create and
use a wxGLContext to output to this window. use a wxGLContext to output to this window.
If If
@param attribList is not specified, double buffered RGBA mode is used. @param attribList is not specified, double buffered RGBA mode is used.
parent parent
Pointer to a parent window. Pointer to a parent window.
@param id @param id
Window identifier. If -1, will automatically create an identifier. Window identifier. If -1, will automatically create an identifier.
@param pos @param pos
Window position. wxDefaultPosition is (-1, -1) which indicates that wxWidgets Window position. wxDefaultPosition is (-1, -1) which indicates that
should generate a default position for the window. wxWidgets
should generate a default position for the window.
@param size @param size
Window size. wxDefaultSize is (-1, -1) which indicates that wxWidgets should Window size. wxDefaultSize is (-1, -1) which indicates that wxWidgets should
generate a default size for the window. If no suitable size can be found, the generate a default size for the window. If no suitable size can be found,
window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized. the window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized.
@param style @param style
Window style. Window style.
@param name @param name
Window name. Window name.
@param attribList @param attribList
Array of integers. With this parameter you can set the device context Array of integers. With this parameter you can set the device context
attributes associated to this window. attributes associated to this window.
This array is zero-terminated: it should be set up with constants described in This array is zero-terminated: it should be set up with constants described
the table above. in the table above.
If a constant should be followed by a value, put it in the next array position. If a constant should be followed by a value, put it in the next array
For example, the WX_GL_DEPTH_SIZE should be followed by the value that position.
For example, the WX_GL_DEPTH_SIZE should be followed by the value that
indicates the number of indicates the number of
bits for the depth buffer, so: bits for the depth buffer, so:
@param palette @param palette
Palette for indexed colour (i.e. non WX_GL_RGBA) mode. Palette for indexed colour (i.e. non WX_GL_RGBA) mode.
Ignored under most platforms. Ignored under most platforms.
*/ */
wxGLCanvas(wxWindow* parent, wxWindowID id = wxID_ANY, wxGLCanvas(wxWindow* parent, wxWindowID id = wxID_ANY,
const int* attribList = @NULL, const int* attribList = NULL,
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="GLCanvas", const wxString& name = "GLCanvas",
const wxPalette& palette = wxNullPalette); const wxPalette& palette = wxNullPalette);
/** /**
Determines if a canvas having the specified attributes is available. Determines if a canvas having the specified attributes is available.
Returns @true if attributes are supported. Returns @true if attributes are supported.
@param attribList @param attribList
See attribList for wxGLCanvas(). See attribList for wxGLCanvas().
*/ */
static bool IsDisplaySupported(const int * attribList = @NULL); static bool IsDisplaySupported(const int* attribList = NULL);
/** /**
Sets the current colour for this window (using @c glcolor3f()), using the Sets the current colour for this window (using @c glcolor3f()), using the
@@ -189,15 +180,12 @@ public:
/** /**
Makes the OpenGL state that is represented by the OpenGL rendering context Makes the OpenGL state that is represented by the OpenGL rendering context
@e context current, i.e. it will be used by all subsequent OpenGL calls. @a context current, i.e. it will be used by all subsequent OpenGL calls.
This is equivalent to wxGLContext::SetCurrent This is equivalent to wxGLContext::SetCurrent
called with this window as parameter. called with this window as parameter.
Note that this function may only be called when the window is shown on screen, Note that this function may only be called when the window is shown on screen,
in particular it can't usually be called from the constructor as the window in particular it can't usually be called from the constructor as the window
isn't yet shown at this moment. isn't yet shown at this moment.
Returns @false if an error occurred. Returns @false if an error occurred.
*/ */
bool SetCurrent(const wxGLContext context); bool SetCurrent(const wxGLContext context);
@@ -206,7 +194,6 @@ public:
Swaps the double-buffer of this window, making the back-buffer the front-buffer Swaps the double-buffer of this window, making the back-buffer the front-buffer
and vice versa, and vice versa,
so that the output of the previous OpenGL commands is displayed on the window. so that the output of the previous OpenGL commands is displayed on the window.
Returns @false if an error occurred. Returns @false if an error occurred.
*/ */
bool SwapBuffers(); bool SwapBuffers();

View File

@@ -133,7 +133,7 @@ public:
Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus Returns the native path (CGPathRef for Core Graphics, Path pointer for GDIPlus
and a cairo_path_t pointer for cairo). and a cairo_path_t pointer for cairo).
*/ */
void * GetNativePath(); void* GetNativePath();
//@{ //@{
/** /**
@@ -221,7 +221,7 @@ public:
/** /**
Creates a wxGraphicsContext from a wxWindow. Creates a wxGraphicsContext from a wxWindow.
@sa wxGraphicsRenderer:: CreateContext @see wxGraphicsRenderer:: CreateContext
*/ */
wxGraphicsContext* Create(const wxWindowDC& dc); wxGraphicsContext* Create(const wxWindowDC& dc);
wxGraphicsContext* Create(wxWindow* window); wxGraphicsContext* Create(wxWindow* window);
@@ -245,14 +245,14 @@ public:
Creates a wxGraphicsContext from a native window. Creates a wxGraphicsContext from a native window.
@sa wxGraphicsRenderer:: CreateContextFromNativeContext @see wxGraphicsRenderer:: CreateContextFromNativeContext
*/ */
wxGraphicsContext* CreateFromNative(void * context); wxGraphicsContext* CreateFromNative(void* context);
/** /**
@sa wxGraphicsRenderer:: CreateContextFromNativeWindow @see wxGraphicsRenderer:: CreateContextFromNativeWindow
*/ */
wxGraphicsContext* CreateFromNativeWindow(void * window); wxGraphicsContext* CreateFromNativeWindow(void* window);
/** /**
Creates a native brush, having a linear gradient, starting at (x1,y1) with Creates a native brush, having a linear gradient, starting at (x1,y1) with
@@ -359,11 +359,11 @@ public:
Returns the native context (CGContextRef for Core Graphics, Graphics pointer Returns the native context (CGContextRef for Core Graphics, Graphics pointer
for GDIPlus and cairo_t pointer for cairo). for GDIPlus and cairo_t pointer for cairo).
*/ */
void * GetNativeContext(); void* GetNativeContext();
/** /**
Fills the @e widths array with the widths from the beginning of Fills the @a widths array with the widths from the beginning of
@e text to the corresponding character of @e text. @a text to the corresponding character of @e text.
*/ */
void GetPartialTextExtents(const wxString& text, void GetPartialTextExtents(const wxString& text,
wxArrayDouble& widths); wxArrayDouble& widths);
@@ -371,9 +371,9 @@ public:
/** /**
Gets the dimensions of the string using the currently selected font. Gets the dimensions of the string using the currently selected font.
@e string is the text string to measure, @e w and @e h are @e string is the text string to measure, @e w and @e h are
the total width and height respectively, @e descent is the the total width and height respectively, @a descent is the
dimension from the baseline of the font to the bottom of the dimension from the baseline of the font to the bottom of the
descender, and @e externalLeading is any extra vertical space added descender, and @a externalLeading is any extra vertical space added
to the font by the font designer (usually is zero). to the font by the font designer (usually is zero).
*/ */
void GetTextExtent(const wxString& text, wxDouble* width, void GetTextExtent(const wxString& text, wxDouble* width,
@@ -480,20 +480,20 @@ public:
/** /**
Creates a wxGraphicsContext from a wxWindow. Creates a wxGraphicsContext from a wxWindow.
*/ */
wxGraphicsContext * CreateContext(const wxWindowDC& dc); wxGraphicsContext* CreateContext(const wxWindowDC& dc);
wxGraphicsContext * CreateContext(wxWindow* window); wxGraphicsContext* CreateContext(wxWindow* window);
//@} //@}
/** /**
Creates a wxGraphicsContext from a native context. This native context must be Creates a wxGraphicsContext from a native context. This native context must be
eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a cairo_t pointer for cairo. eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a cairo_t pointer for cairo.
*/ */
wxGraphicsContext * CreateContextFromNativeContext(void * context); wxGraphicsContext* CreateContextFromNativeContext(void* context);
/** /**
Creates a wxGraphicsContext from a native window. Creates a wxGraphicsContext from a native window.
*/ */
wxGraphicsContext * CreateContextFromNativeWindow(void * window); wxGraphicsContext* CreateContextFromNativeWindow(void* window);
/** /**
Creates a native graphics font from a wxFont and a text colour. Creates a native graphics font from a wxFont and a text colour.
@@ -621,15 +621,15 @@ public:
/** /**
Returns the component values of the matrix via the argument pointers. Returns the component values of the matrix via the argument pointers.
*/ */
#define void Get(wxDouble* a=@NULL, wxDouble* b=@NULL, wxDouble* c=@NULL, void Get(wxDouble* a = NULL, wxDouble* b = NULL, wxDouble* c = NULL,
wxDouble* d=@NULL, wxDouble* tx=@NULL, wxDouble* d = NULL, wxDouble* tx = NULL,
wxDouble* ty=@NULL) /* implementation is private */ wxDouble* ty = NULL);
/** /**
Returns the native representation of the matrix. For CoreGraphics this is a Returns the native representation of the matrix. For CoreGraphics this is a
CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for Cairo a cairo_matrix_t pointer. CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for Cairo a cairo_matrix_t pointer.
*/ */
void * GetNativeMatrix(); void* GetNativeMatrix();
/** /**
Inverts the matrix. Inverts the matrix.
@@ -660,9 +660,9 @@ public:
Sets the matrix to the respective values (default values are the identity Sets the matrix to the respective values (default values are the identity
matrix) matrix)
*/ */
#define void Set(wxDouble a = 1.0, wxDouble b = 0.0, wxDouble c = 0.0, void Set(wxDouble a = 1.0, wxDouble b = 0.0, wxDouble c = 0.0,
wxDouble d = 1.0, wxDouble tx = 0.0, wxDouble d = 1.0, wxDouble tx = 0.0,
wxDouble ty = 0.0) /* implementation is private */ wxDouble ty = 0.0);
/** /**
Applies this matrix to a distance (ie. performs all transforms except Applies this matrix to a distance (ie. performs all transforms except

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