Classes | Typedefs | Functions

# utils.h File Reference

## Classes
class | wxWindowDisabler
| This class disables all windows of the application (may be with the exception of one of them) in its constructor and enables them back in its destructor. More...
class | wxBusyCursor
| This class makes it easy to tell your user that the program is temporarily busy. More...
struct | wxExecuteEnv
| This structure can optionally be passed to wxExecute() to specify additional options to use for the child process. More...
## Typedefs
typedef wxStringToStringHashMap | wxEnvVariableHashMap
| A map type containing environment variables names and values.
typedef int(wxCMPFUNC_CONV * | CMPFUNCDATA )(const void *pItem1, const void *pItem2, const void *user_data)
| Compare function type for use with wxQsort().
## Functions
void | wxBeginBusyCursor (const wxCursor *cursor=wxHOURGLASS_CURSOR)
| Changes the cursor to the given cursor for all windows in the application.
void | wxEndBusyCursor ()
| Changes the cursor back to the original cursor, for all windows in the application.
bool | wxIsBusy ()
| Returns true if between two wxBeginBusyCursor() and wxEndBusyCursor() calls.
void | wxBell ()
| Ring the system bell.
void | wxInfoMessageBox (wxWindow *parent)
| 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.
wxVersionInfo | wxGetLibraryVersionInfo ()
| Get wxWidgets version information.
wxChar * | wxGetenv (const wxString &var)
| This is a macro defined as `getenv()` or its wide char version in Unicode mode.
bool | wxGetEnv (const wxString &var, wxString *value)
| Returns the current value of the environment variable var in value.
bool | wxSetEnv (const wxString &var, const wxString &value)
| Sets the value of the environment variable var (adding it if necessary) to value.
bool | wxUnsetEnv (const wxString &var)
| Removes the variable var from the environment.
bool | wxGetEnvMap (wxEnvVariableHashMap *map)
| Fill a map with the complete content of current environment.
wxBatteryState | wxGetBatteryState ()
| Returns battery state as one of `wxBATTERY_NORMAL_STATE`, `wxBATTERY_LOW_STATE`, `wxBATTERY_CRITICAL_STATE`, `wxBATTERY_SHUTDOWN_STATE` or `wxBATTERY_UNKNOWN_STATE`.
wxPowerType | wxGetPowerType ()
| Returns the type of power source as one of `wxPOWER_SOCKET`, `wxPOWER_BATTERY` or `wxPOWER_UNKNOWN`.
wxString | wxGetDisplayName ()
| Under X only, returns the current display name.
bool | wxGetKeyState (wxKeyCode key)
| For normal keys, returns true if the specified key is currently down.
wxPoint | wxGetMousePosition ()
| Returns the mouse position in screen coordinates.
wxMouseState | wxGetMouseState ()
| Returns the current state of the mouse.
void | wxEnableTopLevelWindows (bool enable=true)
| This function enables or disables all top level windows.
wxWindow * | wxFindWindowAtPoint (const wxPoint &pt)
| Find the deepest window at the given mouse position in screen coordinates, returning the window if found, or NULL if not.
wxWindow * | wxFindWindowByLabel (const wxString &label, wxWindow *parent=NULL)
wxWindow * | wxFindWindowByName (const wxString &name, wxWindow *parent=NULL)
int | wxFindMenuItemId (wxFrame *frame, const wxString &menuString, const wxString &itemString)
| Find a menu item identifier associated with the given frame's menu bar.
long | wxNewId ()
void | wxRegisterId (long id)
| Ensures that Ids subsequently generated by wxNewId() do not clash with the given id.
bool | wxLaunchDefaultApplication (const wxString &document, int flags=0)
| Opens the document in the application associated with the files of this type.
bool | wxLaunchDefaultBrowser (const wxString &url, int flags=0)
| Opens the url in user's default browser.
wxString | wxLoadUserResource (const wxString &resourceName, const wxString &resourceType="TEXT")
| Loads a user-defined Windows resource as a string.
void | wxPostDelete (wxObject *object)
void | wxQsort (void *const pbase, size_t total_elems, size_t size, CMPFUNCDATA cmp, const void *user_data)
| Function for performing a qsort operation including a user data parameter.
void | wxSetDisplayName (const wxString &displayName)
| Under X only, sets the current display name.
wxString | wxStripMenuCodes (const wxString &str, int flags=wxStrip_All)
| Strips any menu codes from str and returns the result.
wxString | wxGetEmailAddress ()
| Copies the user's email address into the supplied buffer, by concatenating the values returned by wxGetFullHostName() and wxGetUserId().
bool | wxGetEmailAddress (char *buf, int sz)
wxMemorySize | wxGetFreeMemory ()
| Returns the amount of free memory in bytes under environments which support it, and -1 if not supported or failed to perform measurement.
wxString | wxGetHomeDir ()
| Return the (current) user's home directory.
wxString | wxGetHostName ()
| Copies the current host machine's name into the supplied buffer.
bool | wxGetHostName (char *buf, int sz)
wxString | wxGetFullHostName ()
| Returns the FQDN (fully qualified domain host name) or an empty string on error.
wxString | wxGetUserHome (const wxString &user=wxEmptyString)
| Returns the home directory for the given user.
wxString | wxGetUserId ()
| This function returns the "user id" also known as "login name" under Unix (i.e.
bool | wxGetUserId (char *buf, int sz)
wxString | wxGetUserName ()
| This function returns the full user name (something like "Mr. John Smith").
bool | wxGetUserName (char *buf, int sz)
wxString | wxGetOsDescription ()
| Returns the string containing the description of the current platform in a user-readable form.
wxOperatingSystemId | wxGetOsVersion (int *major=NULL, int *minor=NULL)
| Gets the version and the operating system ID for currently running OS.
bool | wxIsPlatform64Bit ()
| Returns true if the operating system the program is running under is 64 bit.
bool | wxIsPlatformLittleEndian ()
| Returns true if the current platform is little endian (instead of big endian).
wxLinuxDistributionInfo | wxGetLinuxDistributionInfo ()
| Returns a structure containing informations about the currently running Linux distribution.
long | wxExecute (const wxString &command, int flags=wxEXEC_ASYNC, wxProcess *callback=NULL, const wxExecuteEnv *env=NULL)
| Executes another program in Unix or Windows.
long | wxExecute (char **argv, int flags=wxEXEC_ASYNC, wxProcess *callback=NULL, const wxExecuteEnv *env=NULL)
| This is an overloaded version of wxExecute(const wxString&,int,wxProcess*), please see its documentation for general information.
long | wxExecute (wchar_t **argv, int flags=wxEXEC_ASYNC, wxProcess *callback=NULL, const wxExecuteEnv *env=NULL)
long | wxExecute (const wxString &command, wxArrayString &output, int flags=0, const wxExecuteEnv *env=NULL)
| This is an overloaded version of wxExecute(const wxString&,int,wxProcess*), please see its documentation for general information.
long | wxExecute (const wxString &command, wxArrayString &output, wxArrayString &errors, int flags=0, const wxExecuteEnv *env=NULL)
| This is an overloaded version of wxExecute(const wxString&,int,wxProcess*), please see its documentation for general information.
unsigned long | wxGetProcessId ()
| Returns the number uniquely identifying the current process in the system.
int | wxKill (long pid, wxSignal sig=wxSIGTERM, wxKillError *rc=NULL, int flags=wxKILL_NOCHILDREN)
| Equivalent to the Unix kill function: send the given signal sig to the process with PID pid.
bool | wxShell (const wxString &command=wxEmptyString)
| Executes a command in an interactive shell window.
bool | wxShutdown (int flags=wxSHUTDOWN_POWEROFF)
| This function shuts down or reboots the computer depending on the value of the flags.
void | wxMicroSleep (unsigned long microseconds)
| Sleeps for the specified number of microseconds.
void | wxMilliSleep (unsigned long milliseconds)
| Sleeps for the specified number of milliseconds.
wxString | wxNow ()
| Returns a string representing the current date and time.
void | wxSleep (int secs)
| Sleeps for the specified number of seconds.
void | wxUsleep (unsigned long milliseconds)

|  | [ top ]