stdscreens.eh
Useful builtin screens. More...
Types
Functions
Description
This header defines set of screens which may be used to build user interface.
Message box
MsgBox
is a screen that displays static text and can optionally contain icon.
This screen is convenient for making dialog windows.
Edit box
EditBox
is a screen that allows user to enter and edit text.
List box
Screen that presents a list of strings from which user can pick one. Each string
can optionally be accompanied by icon.
Type details
Screen which displays static text.
Screen that allows user to enter and edit text.
List of strings from which user can pick one.
Function details
Creates new message box with given message and icon.
If
icon is
null
then message box contains no icon.
def MsgBox.get_text(): String;
|
Returns text contained in this message box.
def MsgBox.set_text(text: String);
|
Sets new text to this message box.
def MsgBox.get_image(): Image;
|
Returns image contained in this message box.
def MsgBox.set_image(img: Image);
|
Sets new image to this message box.
Creates new editbox.
Argument
mode must be one of constants defined in
ui_edit.eh.
def EditBox.get_text(): String;
|
Returns text currently contained in this editbox.
def EditBox.set_text(text: String);
|
Sets new text to this editbox.
def EditBox.get_maxsize(): Int;
|
Returns maximum length of text this editbox can store.
def EditBox.set_maxsize(size: Int);
|
Sets new maximum length of text this editbox can store.
Note, that actual maximum length may be overriden by platform.
def EditBox.get_size(): Int;
|
Returns number of characters this editbox currently stores.
def EditBox.get_caret(): Int;
|
Returns current input position.
On most devices this function simply returns cursor position.
On some devices, however, it blocks and asks the user to set position.
Creates new listbox.
Array
strings is used as the initial contents of the list. If
images
is not
null
then it must have the same length as
strings. The contents
of
images array is used as icons for list items. Some elements of
images
array may be
null
, the corresponding list item has no icon in this case.
Menu given as
select argument is added to the screen and returned in an event
when user selects an item from the list.
def ListBox.get_index(): Int;
|
Returns index of the selected item in the listbox.
def ListBox.set_index(index: Int);
|
Sets selection to the item with the specified index in the listbox.
Adds new item to the end of the list.
Argument
img may be
null
.
Inserts new item at the specified position of the list.
Argument
img may be
null
.
Replaces item at the specified position of the list with given one.
def ListBox.delete(at: Int);
|
Removes item at the specified position of the list.
Returns string part of the item at the specified position of the list.
Returns image part of the item at the specified position of the list.
Removes all items from this list.
Returns current number of items in this list.