Most of the functionality in wxRuby is provided through classes, but
there are a number of useful functions provided within the Wx:: module.
This function allows the mouse to be changed into an Hourglass cursor,
when it is moved into your Application’s Main Window. This is often
used to let your user know, that your application is busy processing
information, and won’t accept user input. To return the pointer to
normal, use Wx::end_busy_cursor.
This function returns the pointer to the standard pointer. This is
useful to let the user know when they may start inputing new data into
your application.
This function sends an alert sound to be played to the user. Often this
is used when the user enters something, and it’s not correct, or cannot
type anymore text into a TextCtrl.
This returns the main instance of the Application created for the program.
Generally, in CPP, this is the constant THE_APP. THE_APP constant is set
when you create your Application, and enter the main_loop. If your not
in the main_loop, THE_APP will be invalid, and raise an uninitalized
cosntant error in Ruby.
This checks the given state of a key being pressed or not. If it is pressed,
it will return true, otherwise will return false. You can use normal letters
in a way similar to ‘A’0, or you can use the pre-defined WXK_ constants.
WxRuby Key Codes, WxRuby Key Modifiers
This is a convenience function for XmlResource#get_xrcid.
This shows an application “About” information in a platform native
style. See AboutDialogInfo for more information
about the arguments which describe the application that can be passed to
this method.
String defaultDir,
String defaultFile,
String ext_default,
String wildcard,
Integer style,
Window parent)
This is a convenience method, in which to create a File Dialog, to get an input file.
This function allows a Message Dialog to be displayed, similar to MessageDialog, however
it uses a different set of constants for style. For style, you can specify
the icon with the following constants:
To set the buttons to use, use the following constants:
To detect what the return value is, use the above constants as well.
String title,
Array choices,
Window parent)
This creates a CheckListBox Dialog, in which the user can select
any number of items from a list of choices. It returns the selected choices in
an array back to you.
String title,
String label,
Integer default,
Integer minimum,
Integer maximum,
Window parent)
This creates a SpinCtrl Dialog, in which a user can choose a number
between minimum range and maximum range, with a default value given.
String title,
String default,
Window parent)
This creates a TextCtrl Dialog, in which a user can enter text
for the program to process.
Dialog, TextCtrl, Wx::get_password_from_user
String title,
String default,
Window parent)
This creates a TextCtrl Dialog with TE_PASSWORD style set. This
is similar in operation as Wx::get_text_from_user, the only difference
is that the user will only see * instead of the actual characters typed.
Dialog, TextCtrl, Wx::get_text_from_user
These methods interface with the Log class, in which logging
can be done to log programs progress, or trouble. You can have these
messages displayed to the user as message boxes, which is default, or
you can utilize LogTextCtrl to display log messages
in a TextCtrl.
Returns a combination of the User’s ID, and Full host name.
Wx::get_full_host_name, Wx::get_user_id
Returns the HOSTNAME, or Computer name for the computer.
Returns the HOSTNAME, or Computer name for the computer, plus the domain that
the computer is a member of. Generally this is a fully qualified domain name
that is assigned by the ISP.
Returns the USERNAME of the user currently logged onto the system.
Returns the home directory of the User currently logged onto the system.
On Windows NT/2000/XP/Vista:
C:\Documents and Settings\username
On Linux:
/home/username
On MacOS X:
/Users/username
Returns the current desktop display depth, which should be 16,24,32
Returns the current desktop display resolution in pixels.
Returns the current desktop display resolution in millimeters.
[This page automatically generated from the Textile source at 2023-06-13 21:31:40 +0000]