Miscellaneous Routines

Miscellaneous Routines
Random stuff

Functions/Procedures

Miscellaneous Routines

[proc]
cleanup
()

Category: Miscellaneous Routines

This cleans up internal wxWidgets memory. wxMain() automatically calls this before it exits. If you do not use wxMain(), then you should manually call cleanup() before your app exits.


Miscellaneous Routines

[proc]
delete_instance
( object obj )

Category: Miscellaneous Routines

Deletes an object from memory.


Miscellaneous Routines

[func]
find_window
( integer id, atom parent )

Category: Miscellaneous Routines

Returns: Window pointer

Returns the window identified by its id and parent.


Miscellaneous Routines

[func]
from_utf8
( sequence utf8 )

Category: Miscellaneous Routines

Converts a sequence with UTF8 encoded text into a unicode string that can be used like a normal string.

See also to_utf8()


Miscellaneous Routines

[func]
get_display_size
()

Category: Miscellaneous Routines

Returns the display size in pixels.


Miscellaneous Routines

[func]
get_key_state
( integer keycode )

Category: Miscellaneous Routines

Returns: True or false

Returns 1 if specified key (see Key Codes for a list of codes to use) is currently pressed down.


Miscellaneous Routines

[func]
get_sys_color
( atom color )

Category: Miscellaneous Routines

Returns: pointer to wxColour Available system colors are:


Miscellaneous Routines

[func]
get_sys_metric
( integer metric )

Category: Miscellaneous Routines

Returns: atom

Available metrics are:


Miscellaneous Routines

[proc]
launch_default_browser
( sequence url )

Category: Miscellaneous Routines

Launches the user's default browser to open the specified url.


Miscellaneous Routines

[func]
message_box
( sequence text, sequence title, atom ok )

Category: Miscellaneous Routines

Returns: Selected button ID

Creates a message box dialog, with style ok.

Allowable styles are:

Possible return values are:


Miscellaneous Routines

[func]
mkdir
( sequence directory, object perm, integer flags )

Category: Miscellaneous Routines

Creates a directory with the (optional) given permissions.

If the flags contain wxPATH_MKDIR_FULL flag, try to create each directory in the path and also don't return an error if the target directory already exists.


Miscellaneous Routines

[proc]
request_user_attention
( atom frame, atom flags )

Category: Miscellaneous Routines

Use a system-dependent way to attract users attention to the window when it is in background.

flags may have the value of either wxUSER_ATTENTION_INFO (default) or wxUSER_ATTENTION_ERROR which results in a more drastic action. When in doubt, use the default value.

Note that this function should normally be only used when the application is not already in foreground.

This function is currently implemented for Win32 where it flashes the window icon in the taskbar, and for wxGTK with task bars supporting it.


Miscellaneous Routines

[func]
to_utf8
( sequence string )

Category: Miscellaneous Routines

Returns a sequence with the specified string in UTF8 encoding.

See also from_utf8()


Miscellaneous Routines

[proc]
wxMain
( atom topWindow )

Category: Miscellaneous Routines

This starts the event loop and your main application.


Miscellaneous Routines

[proc]
wx_execute
( sequence command, integer flag )

Category: Miscellaneous Routines

flag can be a combination of:


Miscellaneous Routines

[func]
wx_or_all
( sequence a )

Category: Miscellaneous Routines

Executes a bitwise or operation on a sequence of atoms. Use this to convert from a C/C++ style.

Example:


    THING1|THING2|THING3

    wx_or_all( THING1 & THING2 & THING3 )


Miscellaneous Routines

[proc]
wx_shell
( sequence command )

Category: Miscellaneous Routines

Executes a command in the default shell


Miscellaneous Routines

[func]
w_sprintf
( sequence format, object values )

Category: Miscellaneous Routines

A unicode replacement for the builtin sprintf().