info.SetName(_("My Program"));
info.SetVersion(_("1.2.3 Beta"));
info.SetDescription(_("This program does something great."));
- info.SetCopyright(_T("(C) 2007 Me my@email.addre.ss"));
+ info.SetCopyright(_T("(C) 2007 Me <my@email.addre.ss>"));
wxAboutBox(info);
}
Please see the @ref page_utils_samples_dialogs for more examples of
using this function and wxAboutDialogInfo for the description of the
information which can be shown in the about dialog.
+
+ @header{wx/aboutdlg.h}
*/
void wxAboutBox(const wxAboutDialogInfo& info);
customization.
@see wxAboutDialogInfo
+
+ @header{wx/aboutdlg.h}
*/
void wxGenericAboutBox(const wxAboutDialogInfo& info);
/////////////////////////////////////////////////////////////////////////////
// Name: choicdlg.h
-// Purpose: interface of wxMultiChoiceDialog
+// Purpose: interface of wx[Multi|Single]ChoiceDialog
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
@library{wxbase}
@category{cmndlg}
- @see @ref overview_wxmultichoicedialogoverview "wxMultiChoiceDialog overview",
- wxSingleChoiceDialog
+ @see @ref overview_cmndlg_multichoice, wxSingleChoiceDialog
*/
class wxMultiChoiceDialog : public wxDialog
{
//@{
/**
Constructor taking an array of wxString choices.
-
+
@param parent
Parent window.
@param message
An array of strings, or a string list, containing the choices.
@param style
A dialog style (bitlist) containing flags chosen from standard
- dialog styles and the following:
-
-
-
-
-
-
-
- wxOK
-
-
-
-
+ dialog style and the ones listed below. The default value is
+ equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK |
+ wxCANCEL | wxCENTRE.
+ @param pos
+ Dialog position. Not Windows.
+
+ @beginStyleTable
+ @style{wxOK}:
Show an OK button.
-
-
-
-
-
- wxCANCEL
-
-
-
-
+ @style{wxCANCEL}:
Show a Cancel button.
-
-
-
-
-
- wxCENTRE
-
-
-
-
+ @style{wxCENTRE}:
Centre the message. Not Windows.
-
-
-
-
-
- The default value is equivalent to wxDEFAULT_DIALOG_STYLE |
- wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
- @param pos
- Dialog position. Not Windows.
-
+ @endStyleTable
+
@remarks Use ShowModal() to show the dialog.
*/
wxMultiChoiceDialog(wxWindow* parent, const wxString& message,
@class wxSingleChoiceDialog
@wxheader{choicdlg.h}
- This class represents a dialog that shows a list of strings, and allows the
- user to select one. Double-clicking on a list item is equivalent to
+ This class represents a dialog that shows a list of strings, and allows
+ the user to select one. Double-clicking on a list item is equivalent to
single-clicking and then pressing OK.
@library{wxbase}
@category{cmndlg}
- @see @ref overview_wxsinglechoicedialogoverview "wxSingleChoiceDialog
- overview", wxMultiChoiceDialog
+ @see @ref overview_cmndlg_singlechoice, wxMultiChoiceDialog
*/
class wxSingleChoiceDialog : public wxDialog
{
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
Parent window.
@param message
See GetSelectionClientData.
@param style
A dialog style (bitlist) containing flags chosen from standard
- dialog styles and the following:
-
-
-
-
-
-
-
- wxOK
-
-
-
-
+ dialog styles and the ones listed below. The default value is
+ equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK |
+ wxCANCEL | wxCENTRE.
+ @param pos
+ Dialog position. Not Windows.
+
+ @beginStyleTable
+ @style{wxOK}:
Show an OK button.
-
-
-
-
-
- wxCANCEL
-
-
-
-
+ @style{wxCANCEL}:
Show a Cancel button.
-
-
-
-
-
- wxCENTRE
-
-
-
-
+ @style{wxCENTRE}:
Centre the message. Not Windows.
-
-
-
-
-
- The default value is equivalent to wxDEFAULT_DIALOG_STYLE |
- wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
- @param pos
- Dialog position. Not Windows.
-
+ @endStyleTable
+
@remarks Use ShowModal() to show the dialog.
*/
wxSingleChoiceDialog(wxWindow* parent, const wxString& message,
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
//@{
+
/**
- As @b wxGetSingleChoice but returns the index representing the selected
- string. If the user pressed cancel, -1 is returned.
+ Same as wxGetSingleChoice() but returns the index representing the
+ selected string. If the user pressed cancel, -1 is returned.
+
+ @header{wx/choicdlg.h}
*/
int wxGetSingleChoiceIndex(const wxString& message,
const wxString& caption,
bool centre = true,
int width = 150,
int height = 200);
+
//@}
+/** @ingroup group_funcmacro_dialog */
//@{
+
/**
Pops up a dialog box containing a message, OK/Cancel buttons and a
- single-selection listbox. The user may choose an item and press OK to return a
- string or Cancel to return the empty string. Use
- wxGetSingleChoiceIndex() if empty string is a
- 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
+ single-selection listbox. The user may choose an item and press OK to
+ return a string or Cancel to return the empty string. Use
+ wxGetSingleChoiceIndex() if empty string is a 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 @c choices
which is an array of @a n strings for the listbox or by using a single
- @a aChoices parameter of type wxArrayString.
- If @a centre is @true, the message text (which may include new line
+ @c aChoices parameter of type wxArrayString.
+
+ If @c centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified.
+
+ @header{wx/choicdlg.h}
*/
wxString wxGetSingleChoice(const wxString& message,
const wxString& caption,
bool centre = true,
int width = 150,
int height = 200);
+
//@}
+/** @ingroup group_funcmacro_dialog */
//@{
+
/**
- As @b wxGetSingleChoice but takes an array of client data pointers
- corresponding to the strings, and returns one of these pointers or @NULL if
- Cancel was pressed. The @e client_data array must have the same number of
- elements as @e choices or @e aChoices!
+ Same as wxGetSingleChoice but takes an array of client data pointers
+ corresponding to the strings, and returns one of these pointers or @NULL
+ if Cancel was pressed. The @c client_data array must have the same number
+ of elements as @c choices or @c aChoices!
+
+ @header{wx/choicdlg.h}
*/
wxString wxGetSingleChoiceData(const wxString& message,
const wxString& caption,
bool centre = true,
int width = 150,
int height = 200);
+
//@}
+/** @ingroup group_funcmacro_dialog */
//@{
+
/**
Pops up a dialog box containing a message, OK/Cancel buttons and a
multiple-selection listbox. The user may choose an arbitrary (including 0)
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
+ @c selections array. The initial contents of this array will be used to
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 @c choices
which is an array of @a n strings for the listbox or by using a single
- @a aChoices parameter of type wxArrayString.
- If @a centre is @true, the message text (which may include new line
+ @c aChoices parameter of type wxArrayString.
+
+ If @c centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified.
+
+ @header{wx/choicdlg.h}
*/
size_t wxGetMultipleChoices(wxArrayInt& selections,
const wxString& message,
bool centre = true,
int width = 150,
int height = 200);
+
//@}
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
- Shows the colour selection dialog and returns the colour selected by user or
- invalid colour (use @ref wxColour::isok wxColour:IsOk to test whether a colour
- is valid) if the dialog was cancelled.
+ Shows the colour selection dialog and returns the colour selected by user
+ or invalid colour (use wxColour::IsOk() to test whether a colour is valid)
+ if the dialog was cancelled.
@param parent
- The parent window for the colour selection dialog
+ The parent window for the colour selection dialog.
@param colInit
If given, this will be the colour initially selected in the dialog.
@param caption
If given, this will be used for the dialog caption.
@param data
- Optional object storing additional colour dialog settings, such
- as custom colours. If none is provided the same settings as the last time
- are
- used.
+ Optional object storing additional colour dialog settings, such as
+ custom colours. If none is provided the same settings as the last time
+ are used.
+
+ @header{wx/colordlg.h}
*/
wxColour wxGetColourFromUser(wxWindow* parent,
const wxColour& colInit,
const wxString& caption = wxEmptyString,
wxColourData* data = NULL);
+//@}
+
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
- Pops up a directory selector dialog. The arguments have the same meaning as
- those of wxDirDialog::wxDirDialog(). The message is displayed at the top,
- and the default_path, if specified, is set as the initial selection.
+ Pops up a directory selector dialog. The arguments have the same meaning
+ as those of wxDirDialog::wxDirDialog(). The message is displayed at the
+ top, 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
Cancel). For example:
const wxString& dir = wxDirSelector("Choose a folder");
if ( !dir.empty() )
{
- ...
+ ...
}
@endcode
+
+ @header{wx/dirdlg.h}
*/
wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
const wxString& default_path = "",
const wxPoint& pos = wxDefaultPosition,
wxWindow* parent = NULL);
+//@}
+
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
Pops up a file selector box. In Windows, this is the common file selector
- dialog. In X, this is a file selector box with the same functionality.
- The path and filename are distinct elements of a full file pathname.
- If path is empty, the current directory will be used. If filename is empty,
- no default filename will be supplied. The wildcard determines what files
- are displayed in the file selector, and file extension supplies a type
- extension for the required filename. Flags may be a combination of wxFD_OPEN,
- wxFD_SAVE, wxFD_OVERWRITE_PROMPT or wxFD_FILE_MUST_EXIST. Note that
- wxFD_MULTIPLE
- can only be used with wxFileDialog and not here as this
- function only returns a single file name.
+ dialog. In X, this is a file selector box with the same functionality. The
+ path and filename are distinct elements of a full file pathname. If path
+ is empty, the current directory will be used. If filename is empty, no
+ default filename will be supplied. The wildcard determines what files are
+ displayed in the file selector, and file extension supplies a type
+ extension for the required filename. Flags may be a combination of
+ wxFD_OPEN, wxFD_SAVE, wxFD_OVERWRITE_PROMPT or wxFD_FILE_MUST_EXIST.
+
+ @note wxFD_MULTIPLE can only be used with wxFileDialog and not here since
+ this function only returns a single file name.
+
Both the Unix and Windows versions implement a wildcard filter. Typing a
filename containing wildcards (*, ?) in the filename text item, and
clicking on Ok, will result in only those files matching the pattern being
displayed.
- The wildcard may be a specification for multiple types of file
- with a description for each, such as:
+
+ The wildcard may be a specification for multiple types of file with a
+ description for each, such as:
@code
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
}
//else: cancelled by user
@endcode
+
+ @header{wx/filedlg.h}
*/
wxString wxFileSelector(const wxString& message,
const wxString& default_path = "",
int x = -1,
int y = -1);
+//@}
+
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
Shows the font selection dialog and returns the font selected by user or
- invalid font (use @ref wxFont::isok wxFont:IsOk to test whether a font
- is valid) if the dialog was cancelled.
+ invalid font (use wxFont::IsOk() to test whether a font is valid) if the
+ dialog was cancelled.
@param parent
- The parent window for the font selection dialog
+ The parent window for the font selection dialog.
@param fontInit
If given, this will be the font initially selected in the dialog.
@param caption
If given, this will be used for the dialog caption.
+
+ @header{wx/fontdlg.h}
*/
wxFont wxGetFontFromUser(wxWindow* parent,
const wxFont& fontInit,
const wxString& caption = wxEmptyString);
+//@}
+
@param style
A dialog style (bitlist) containing flags chosen from the following:
-
-
-
-
-
-
wxOK
-
-
-
Show an OK button.
-
-
-
-
wxCANCEL
-
-
-
Show a Cancel button.
-
-
-
-
wxYES_NO
-
-
-
Show Yes and No buttons.
-
-
-
-
wxYES_DEFAULT
-
-
-
Used with wxYES_NO, makes Yes button the default - which is the default
behaviour.
-
-
-
-
wxNO_DEFAULT
-
-
-
Used with wxYES_NO, makes No button the default.
-
-
-
-
wxICON_EXCLAMATION
-
-
-
Shows an exclamation mark icon.
-
-
-
-
wxICON_HAND
-
-
-
Shows an error icon.
-
-
-
-
wxICON_ERROR
-
-
-
Shows an error icon - the same as wxICON_HAND.
-
-
-
-
wxICON_QUESTION
-
-
-
Shows a question mark icon.
-
-
-
-
wxICON_INFORMATION
-
-
-
Shows an information (i) icon.
-
-
-
-
wxSTAY_ON_TOP
-
-
-
The message box stays on top of all other window, even those of the other
applications (Windows only).
@param pos
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
- General purpose message dialog. @a style may be a bit list of the
+ General purpose message dialog. @c style may be a bit list of the
following identifiers:
- wxYES_NO
-
- Puts Yes and No buttons on the message box. May be combined with
- wxCANCEL.
-
- wxCANCEL
-
- Puts a Cancel button on the message box. May only be combined with
- wxYES_NO or wxOK.
-
- wxOK
-
- Puts an Ok button on the message box. May be combined with wxCANCEL.
-
- wxICON_EXCLAMATION
-
- Displays an exclamation mark symbol.
-
- wxICON_HAND
-
- Displays an error symbol.
-
- wxICON_ERROR
-
- Displays an error symbol - the same as wxICON_HAND.
-
- wxICON_QUESTION
-
- Displays a question mark symbol.
-
- wxICON_INFORMATION
-
- Displays an information symbol.
-
- The return value is one of: wxYES, wxNO, wxCANCEL, wxOK.
- For example:
+ @beginStyleTable
+ @style{wxYES_NO}:
+ Puts Yes and No buttons on the message box. May be combined with
+ wxCANCEL.
+ @style{wxCANCEL}:
+ Puts a Cancel button on the message box. May only be combined with
+ wxYES_NO or wxOK.
+ @style{wxOK}:
+ Puts an Ok button on the message box. May be combined with wxCANCEL.
+ @style{wxICON_EXCLAMATION}:
+ Displays an exclamation mark symbol.
+ @style{wxICON_HAND}:
+ Displays an error symbol.
+ @style{wxICON_ERROR}:
+ Displays an error symbol - the same as wxICON_HAND.
+ @style{wxICON_QUESTION}:
+ Displays a question mark symbol.
+ @style{wxICON_INFORMATION}:
+ Displays an information symbol.
+
+ The return value is one of: wxYES, wxNO, wxCANCEL, wxOK. For example:
@code
- ...
- int answer = wxMessageBox("Quit program?", "Confirm",
- wxYES_NO | wxCANCEL, main_frame);
- if (answer == wxYES)
- main_frame-Close();
- ...
+ int answer = wxMessageBox("Quit program?", "Confirm",
+ wxYES_NO | wxCANCEL, main_frame);
+ if (answer == wxYES)
+ main_frame->Close();
@endcode
- @a message may contain newline characters, in which case the
- message will be split into separate lines, to cater for large messages.
+ @a message may contain newline characters, in which case the message will
+ be split into separate lines, to cater for large messages.
+
+ @header{wx/msgdlg.h}
*/
int wxMessageBox(const wxString& message,
const wxString& caption = "Message",
wxWindow* parent = NULL,
int x = -1, int y = -1);
+//@}
+
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
-Shows a dialog asking the user for numeric input. The dialogs title is set to
-@e caption, it contains a (possibly) multiline @a message above the
-single line @a prompt and the zone for entering the number.
-The number entered must be in the range @e min..@a max (both of which
-should be positive) and @a value is the initial value of it. If the user
-enters an invalid value or cancels the dialog, the function will return -1.
-Dialog is centered on its @a parent unless an explicit position is given in
-@e pos.
+ Shows a dialog asking the user for numeric input. The dialogs title is set
+ to @c caption, it contains a (possibly) multiline @c message above the
+ single line @c prompt and the zone for entering the number.
+
+ The number entered must be in the range @c min to @c max (both of which
+ should be positive) and @c value is the initial value of it. If the user
+ enters an invalid value or cancels the dialog, the function will return
+ -1.
+
+ Dialog is centered on its @c parent unless an explicit position is given
+ in @c pos.
+
+ @header{wx/numdlg.h}
*/
long wxGetNumberFromUser(const wxString& message,
const wxString& prompt,
wxWindow* parent = NULL,
const wxPoint& pos = wxDefaultPosition);
+//@}
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
- Pop up a dialog box with title set to @e caption, @e message, and a
- @e default_value. The user may type in text and press OK to return this text,
- or press Cancel to return the empty string.
- If @a centre is @true, the message text (which may include new line characters)
- is centred; if @false, the message is left-justified.
+ Pop up a dialog box with title set to @e caption, @c message, and a
+ @c default_value. The user may type in text and press OK to return this
+ text, or press Cancel to return the empty string.
+
+ If @c centre is @true, the message text (which may include new line
+ characters) is centred; if @false, the message is left-justified.
+
+ @header{wx/textdlg.h}
*/
wxString wxGetTextFromUser(const wxString& message,
const wxString& caption = "Input text",
bool centre = true);
/**
- Similar to wxGetTextFromUser() but the text entered
- in the dialog is not shown on screen but replaced with stars. This is intended
- to be used for entering passwords as the function name implies.
+ Similar to wxGetTextFromUser() but the text entered in the dialog is not
+ shown on screen but replaced with stars. This is intended to be used for
+ entering passwords as the function name implies.
+
+ @header{wx/textdlg.h}
*/
wxString wxGetPasswordFromUser(const wxString& message,
const wxString& caption = "Input text",
int y = wxDefaultCoord,
bool centre = true);
+//@}
+
// Global functions/macros
// ============================================================================
+/** @ingroup group_funcmacro_dialog */
+//@{
+
/**
- This function creates a wxTipProvider which may be
- used with wxShowTip().
+ This function creates a wxTipProvider which may be used with wxShowTip().
@param filename
- The name of the file containing the tips, one per line
+ The name of the file containing the tips, one per line.
@param currentTip
- The index of the first tip to show - normally this index
- is remembered between the 2 program runs.
+ The index of the first tip to show. Normally this index is remembered
+ between the 2 program runs.
+
+ @see @ref overview_tips
- @see @ref overview_tipsoverview "Tips overview"
+ @header{wx/tipdlg.h}
*/
wxTipProvider* wxCreateFileTipProvider(const wxString& filename,
size_t currentTip);
+/**
+ This function shows a "startup tip" to the user. The return value is the
+ state of the "Show tips at startup" checkbox.
+
+ @param parent
+ The parent window for the modal dialog.
+ @param tipProvider
+ An object which is used to get the text of the tips. It may be created
+ with the wxCreateFileTipProvider() function.
+ @param showAtStartup
+ Should be true if startup tips are shown, false otherwise. This is
+ used as the initial value for "Show tips at startup" checkbox which is
+ shown in the tips dialog.
+
+ @see @ref overview_tips
+
+ @header{wx/tipdlg.h}
+*/
+bool wxShowTip(wxWindow *parent,
+ wxTipProvider *tipProvider,
+ bool showAtStartup = true);
+
+//@}
+
// Global functions/macros
// ============================================================================
+
+/** @ingroup group_funcmacro_dialog */
+//@{
+
+/**
+ Changes the cursor to the given cursor for all windows in the application.
+ Use wxEndBusyCursor() to revert the cursor back to its previous state.
+ These two calls can be nested, and a counter ensures that only the outer
+ calls take effect.
+
+ @see wxIsBusy(), wxBusyCursor
+
+ @header{wx/utils.h}
+*/
+void wxBeginBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
+
+/**
+ Changes the cursor back to the original cursor, for all windows in the
+ application. Use with wxBeginBusyCursor().
+
+ @see wxIsBusy(), wxBusyCursor
+
+ @header{wx/utils.h}
+*/
+void wxEndBusyCursor();
+
+/**
+ Returns @true if between two wxBeginBusyCursor() and wxEndBusyCursor()
+ calls.
+
+ @see wxBusyCursor.
+
+ @header{wx/utils.h}
+*/
+bool wxIsBusy();
+
+/**
+ Ring the system bell.
+
+ @note This function is categorized as a GUI one and so is not thread-safe.
+
+ @header{wx/utils.h}
+*/
+void wxBell();
+
+/**
+ Shows a message box with the information about the wxWidgets build used,
+ including its version, most important build parameters and the version of
+ the underlying GUI toolkit. This is mainly used for diagnostic purposes
+ and can be invoked by Ctrl-Alt-middle clicking on any wxWindow which
+ doesn't otherwise handle this event.
+
+ @wxsince{2.9.0}
+
+ @header{wx/utils.h}
+*/
+void wxInfoMessageBox(wxWindow parent = NULL);
+
+//@}
+
+
+
/**
Returns the type of power source as one of @c wxPOWER_SOCKET,
@c wxPOWER_BATTERY or @c wxPOWER_UNKNOWN.
@c wxPOWER_UNKNOWN is also the default on platforms where this
feature is not implemented (currently everywhere but MS Windows).
+
+ @header{wx/utils.h}
*/
wxPowerType wxGetPowerType();
if successful, @false otherwise.
@see wxGetUserName()
+
+ @header{wx/utils.h}
*/
wxString wxGetUserId();
bool wxGetUserId(char* buf, int sz);
Displays @a msg and exits. This writes to standard error under Unix,
and pops up a message box under Windows. Used for fatal internal
wxWidgets errors. See also wxError().
+
+ @header{wx/utils.h}
*/
void wxFatalError(const wxString& msg,
const wxString& title = "wxWidgets Fatal Error");
@c wxBATTERY_SHUTDOWN_STATE or @c wxBATTERY_UNKNOWN_STATE.
@c wxBATTERY_UNKNOWN_STATE is also the default on platforms where
this feature is not implemented (currently everywhere but MS Windows).
+
+ @header{wx/utils.h}
*/
wxBatteryState wxGetBatteryState();
window hierarchy.
The search is recursive in both cases.
If no such named window is found, @b wxFindWindowByLabel is called.
+
+ @header{wx/utils.h}
*/
wxWindow* wxFindWindowByName(const wxString& name,
wxWindow* parent = NULL);
-/**
- Changes the cursor back to the original cursor, for all windows in the
- application.
- Use with wxBeginBusyCursor().
- See also wxIsBusy(), wxBusyCursor.
-*/
-void wxEndBusyCursor();
-
/**
This function is deprecated as the ids generated by it can conflict with the
ids defined by the user code, use @c wxID_ANY to assign ids which are
items you create instead of using this function.
Generates an integer identifier unique to this run of the program.
+
+ @header{wx/utils.h}
*/
long wxNewId();
/**
Ensures that ids subsequently generated by @b NewId do not clash with
the given @b id.
+
+ @header{wx/utils.h}
*/
void wxRegisterId(long id);
each wxDebugMsg call. wxDebugMsg seems to be broken under WIN32s
(at least for Watcom C++): preformat your messages and use OutputDebugString
instead.
+
+ @header{wx/utils.h}
*/
void wxDebugMsg(const wxString& fmt, ... );
currently no way to test whether togglable keys are up or down.
Even though there are virtual key codes defined for mouse buttons, they
cannot be used with this function currently.
+
+ @header{wx/utils.h}
*/
bool wxGetKeyState(wxKeyCode key);
@c Windows NT Version 4.0 or @c Linux 2.2.2 i386.
@see ::wxGetOsVersion
+
+ @header{wx/utils.h}
*/
wxString wxGetOsDescription();
Return the (current) user's home directory.
@see wxGetUserHome(), wxStandardPaths
+
+ @header{wx/utils.h}
*/
wxString wxGetHomeDir();
Sleeps for the specified number of milliseconds. Notice that usage of this
function is encouraged instead of calling usleep(3) directly because the
standard usleep() function is not MT safe.
+
+ @header{wx/utils.h}
*/
void wxMilliSleep(unsigned long milliseconds);
not, in fact, be available on all platforms (currently only Unix platforms with
nanosleep(2) may provide it) in which case this is the same as
wxMilliSleep()(@e microseconds/1000).
+
+ @header{wx/utils.h}
*/
void wxMicroSleep(unsigned long microseconds);
-/**
- Shows a message box with the information about the wxWidgets build used,
- including its version, most important build parameters and the version of the
- underlying GUI toolkit. This is mainly used for diagnostic purposes and can be
- invoked by Ctrl-Alt-middle clicking on any wxWindow which doesn't otherwise
- handle this event.
-
- @wxsince{2.9.0}
-*/
-void wxInfoMessageBox(wxWindow ( parent = NULL);
/**
Find a menu item identifier associated with the given frame's menu bar.
+
+ @header{wx/utils.h}
*/
int wxFindMenuItemId(wxFrame* frame, const wxString& menuString,
const wxString& itemString);
/**
This function enables or disables all top level windows. It is used by
::wxSafeYield.
+
+ @header{wx/utils.h}
*/
void wxEnableTopLevelWindows(bool enable = true);
Notice that in most cases
wxMenuItem::GetLabelFromText or
wxControl::GetLabelText can be used instead.
+
+ @header{wx/utils.h}
*/
wxString wxStripMenuCodes(const wxString& str,
int flags = wxStrip_All);
Displays @a msg and continues. This writes to standard error under
Unix, and pops up a message box under Windows. Used for internal
wxWidgets errors. See also wxFatalError().
+
+ @header{wx/utils.h}
*/
void wxError(const wxString& msg,
const wxString& title = "wxWidgets Internal Error");
is launched to open the given URL may be URL-dependent (e.g. a browser may be
used for
local URLs while another one may be used for remote URLs).
+
+ @header{wx/utils.h}
*/
bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
Executes a command in an interactive shell window. If no command is
specified, then just the shell is spawned.
See also wxExecute(), @ref overview_sampleexec "Exec sample".
+
+ @header{wx/utils.h}
*/
bool wxShell(const wxString& command = NULL);
See wxPlatformInfo for more details about wxOperatingSystemId.
@see ::wxGetOsDescription, wxPlatformInfo
+
+ @header{wx/utils.h}
*/
wxOperatingSystemId wxGetOsVersion(int* major = NULL,
int* minor = NULL);
error.
@see wxGetHostName()
-*/
-wxString wxGetFullHostName();
-/**
- Changes the cursor to the given cursor for all windows in the application.
- Use wxEndBusyCursor() to revert the cursor back
- to its previous state. These two calls can be nested, and a counter
- ensures that only the outer calls take effect.
- See also wxIsBusy(), wxBusyCursor.
+ @header{wx/utils.h}
*/
-void wxBeginBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
+wxString wxGetFullHostName();
/**
Tells the system to delete the specified object when
necessary to use this instead of deleting a frame directly with the
delete operator, because some GUIs will still send events to a deleted window.
Now obsolete: use wxWindow::Close instead.
+
+ @header{wx/utils.h}
*/
void wxPostDelete(wxObject* object);
frames and dialog boxes; if non-@NULL, the search will be limited to the given
window hierarchy.
The search is recursive in both cases.
+
+ @header{wx/utils.h}
*/
wxWindow* wxFindWindowByLabel(const wxString& label,
wxWindow* parent = NULL);
/**
Returns the mouse position in screen coordinates.
+
+ @header{wx/utils.h}
*/
wxPoint wxGetMousePosition();
where @c file.ext is a file that the resource compiler can find.
This function is available under Windows only.
+
+ @header{wx/utils.h}
*/
wxString wxLoadUserResource(const wxString& resourceName,
const wxString& resourceType = "TEXT");
Note that under Win32 it may not return correct value for the variables set
with wxSetEnv(), use wxGetEnv() function
instead.
+
+ @header{wx/utils.h}
*/
wxChar* wxGetEnv(const wxString& var);
if successful, @false otherwise.
@see wxGetFullHostName()
+
+ @header{wx/utils.h}
*/
wxString wxGetHostName();
bool wxGetHostName(char* buf, int sz);
@a value may be @NULL if you just want to know if the variable exists
and are not interested in its value.
Returns @true if the variable exists, @false otherwise.
+
+ @header{wx/utils.h}
*/
bool wxGetEnv(const wxString& var, wxString* value);
/**
Under X only, returns the current display name. See also wxSetDisplayName().
-*/
-wxString wxGetDisplayName();
-/**
- Ring the system bell.
- Note that this function is categorized as a GUI one and so is not thread-safe.
+ @header{wx/utils.h}
*/
-void wxBell();
+wxString wxGetDisplayName();
/**
Returns the home directory for the given user. If the @a user is empty
wxGetHomeDir() i.e. returns the current user home
directory.
If the home directory couldn't be determined, an empty string is returned.
+
+ @header{wx/utils.h}
*/
wxString wxGetUserHome(const wxString& user = "");
An optional pointer to wxProcess
@see wxShell(), wxProcess, @ref overview_sampleexec "Exec sample".
+
+ @header{wx/utils.h}
*/
long wxExecute(const wxString& command, int sync = wxEXEC_ASYNC,
wxProcess* callback = NULL);
/**
Returns a string representing the current date and time.
+
+ @header{wx/utils.h}
*/
wxString wxNow();
fact
that there isn't always a standard way to do a reliable check on the OS
architecture.
+
+ @header{wx/utils.h}
*/
bool wxIsPlatform64Bit();
/**
Returns the number uniquely identifying the current process in the system.
If an error occurs, 0 is returned.
+
+ @header{wx/utils.h}
*/
unsigned long wxGetProcessId();
to wxExecute.
@see wxProcess::Kill, wxProcess::Exists, @ref overview_sampleexec "Exec sample"
+
+ @header{wx/utils.h}
*/
int wxKill(long pid, int sig = wxSIGTERM, wxKillError rc = NULL,
int flags = 0);
instance that contains the current position of the mouse pointer in
screen coordinates, as well as boolean values indicating the up/down
status of the mouse buttons and the modifier keys.
-*/
-wxMouseState wxGetMouseState();
-/**
- Returns @true if between two wxBeginBusyCursor() and
- wxEndBusyCursor() calls.
- See also wxBusyCursor.
+ @header{wx/utils.h}
*/
-bool wxIsBusy();
+wxMouseState wxGetMouseState();
//@{
/**
concatenating the values returned by wxGetFullHostName()
and wxGetUserId().
Returns @true if successful, @false otherwise.
+
+ @header{wx/utils.h}
*/
wxString wxGetEmailAddress();
bool wxGetEmailAddress(char* buf, int sz);
/**
Sleeps for the specified number of seconds.
+
+ @header{wx/utils.h}
*/
void wxSleep(int secs);
Returns @true on success.
@see wxUnsetEnv()
+
+ @header{wx/utils.h}
*/
bool wxSetEnv(const wxString& var, const wxString& value);
The check is performed at run-time.
@see @ref overview_byteordermacros "Byte order macros"
+
+ @header{wx/utils.h}
*/
bool wxIsPlatformLittleEndian();
multiple
displays to be used.
See also wxGetDisplayName().
+
+ @header{wx/utils.h}
*/
void wxSetDisplayName(const wxString& displayName);