Version: 2.9.4
Classes | Typedefs | Enumerations | Functions
utils.h File Reference

クラス

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(* wxSortCallback )(const void *pItem1, const void *pItem2, const void *user_data)
 Compare function type for use with wxQsort()

Enumerations

enum  wxSignal {
  wxSIGNONE = 0,
  wxSIGHUP,
  wxSIGINT,
  wxSIGQUIT,
  wxSIGILL,
  wxSIGTRAP,
  wxSIGABRT,
  wxSIGEMT,
  wxSIGFPE,
  wxSIGKILL,
  wxSIGBUS,
  wxSIGSEGV,
  wxSIGSYS,
  wxSIGPIPE,
  wxSIGALRM,
  wxSIGTERM
}
 Signal constants used by wxProcess. More...
enum  wxKillError {
  wxKILL_OK,
  wxKILL_BAD_SIGNAL,
  wxKILL_ACCESS_DENIED,
  wxKILL_NO_PROCESS,
  wxKILL_ERROR
}
 Return values for wxProcess::Kill. More...
enum  wxKillFlags {
  wxKILL_NOCHILDREN = 0,
  wxKILL_CHILDREN = 1
}
enum  wxShutdownFlags {
  wxSHUTDOWN_FORCE = 1,
  wxSHUTDOWN_POWEROFF = 2,
  wxSHUTDOWN_REBOOT = 4,
  wxSHUTDOWN_LOGOFF = 8
}
enum  {
  wxStrip_Mnemonics = 1,
  wxStrip_Accel = 2,
  wxStrip_All = wxStrip_Mnemonics | wxStrip_Accel
}
 flags for wxStripMenuCodes More...
enum  {
  wxEXEC_ASYNC = 0,
  wxEXEC_SYNC = 1,
  wxEXEC_SHOW_CONSOLE = 2,
  wxEXEC_MAKE_GROUP_LEADER = 4,
  wxEXEC_NODISABLE = 8,
  wxEXEC_NOEVENTS = 16,
  wxEXEC_HIDE_CONSOLE = 32,
  wxEXEC_BLOCK = wxEXEC_SYNC | wxEXEC_NOEVENTS
}
 Bit flags that can be used with wxExecute(). More...

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.
wxCharwxGetenv (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.
wxWindowwxFindWindowAtPoint (const wxPoint &pt)
 Find the deepest window at the given mouse position in screen coordinates, returning the window if found, or NULL if not.
wxWindowwxFindWindowByLabel (const wxString &label, wxWindow *parent=NULL)
wxWindowwxFindWindowByName (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 *pbase, size_t total_elems, size_t size, wxSortCallback cmp, const void *user_data)
 Function implementing quick sort algorithm.
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 ()
 現在のホストマシン名を与えられたバッファへコピーします。
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)

Enumeration Type Documentation

Return values for wxProcess::Kill.

Enumerator:
wxKILL_OK 

no error

wxKILL_BAD_SIGNAL 

no such signal

wxKILL_ACCESS_DENIED 

permission denied

wxKILL_NO_PROCESS 

no such process

wxKILL_ERROR 

another, unspecified error

Enumerator:
wxKILL_NOCHILDREN 

don't kill children

wxKILL_CHILDREN 

kill children

Enumerator:
wxSHUTDOWN_FORCE 

can be combined with other flags (MSW-only)

wxSHUTDOWN_POWEROFF 

power off the computer

wxSHUTDOWN_REBOOT 

shutdown and reboot

wxSHUTDOWN_LOGOFF 

close session (currently MSW-only)

enum wxSignal

Signal constants used by wxProcess.

Enumerator:
wxSIGNONE 

verify if the process exists under Unix

wxSIGHUP 
wxSIGINT 
wxSIGQUIT 
wxSIGILL 
wxSIGTRAP 
wxSIGABRT 
wxSIGEMT 
wxSIGFPE 
wxSIGKILL 

forcefully kill, dangerous!

wxSIGBUS 
wxSIGSEGV 
wxSIGSYS 
wxSIGPIPE 
wxSIGALRM 
wxSIGTERM 

terminate the process gently

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines