Home | Index classes | Index static functions | Index enumerations | Index structure types |
CLASS {Form|_containing_controls} , UNTESTED, DESTRUCTORS :
A form class. It is intended to create your own descendants where a form components configuration is defined and methods are overridden to handle events from form components and from the form itself. In the visual components libray of the AL-IV, all the visual controls are placed on columns which are placed on a form. More complex nesting is not allowed, to exclude too complex configurations which can not fit into small displays.
IMPORT : {Configuration} , {String_functions} .
STR Alias|_form
Form's alias (can be useful o distinct forms while switching in code via a CASE statement).
{Control} Child|ren|_controls[] , READ
The list of all the child controls (not columns, but all the controls on all the columns).
INT Handle|_native , READ
The form handle which is a descriptor to connect the AL-IV object of the form with its native implementation object.
{Screen} Screen_|object_ , INIT
The refernce to the {Screen} object which actually should be the single in an application instance.
|
Closing the form. If the form is main form, the entire application is terminating (correct way). |
|
Form's window handle. This is not the same as the descriptior of the native form's object but a platform-specific reference onto a window handle (in the Microsoft [TM] Windows system). |
|
|
Form caption string. |
|
Changing the form caption string. |
BOOL No_frame|_was_set , READ
Setting (or resetting) form "no frame" mode. This option is platform dependent and can be ignored.
|
BOOL No_borders , READ
Setting (or resetting) form "no borders" mode. This option is platform dependent and can be ignored.
| |
|
Starting operation "moving" the form with the mouse. This option is very platform dependent (and used only in the Windows OS). Call this method only in response to mouse down event. |
|
Setting the form "alpha" value making it semi-transparent with a specified depth value. |
BOOL Custom_colors , READ
Setting colors of form.
INT Custom_foreground|_color , READ
INT Custom_background|_color , READ
| |
|
|
Form client area width. |
|
Form client area height. |
|
Form client area top-left position relative to entire form rectangle. |
|
Setting form size on base of desired client area size. |
Override the 'command' method to handle events launching of
another instance of you application by users.
To provide it firing, use {Single_instance} instead of the {Screen} class.
When the 'command' method is called, it is possible to get the secondary application parameters via usual Count_param and Parameter functions from the {System_functions} class.
Override the 'accept' method to handle drop files event and to return TRUE in case when the drop for a given set of files is acceptable. The files list is available via Count_param and Parameter functions from the {System_functions} class, both in the 'accept' and the 'command' method. Teh 0th parameter is not used as a part of the file list. The 'command' is called to handle the drop files event after the 'accept' was returning TRUE before (when the mouse button is released to perform the allowed drop files operation).
BOOL Do_not_close|_even_on_shutdown|_preventing_system_to_restart_or_shutdown
BOOL Closed|_do_not_try_show_it_again , READ
TRUE if closed. It is not possible to operate further with a closed form.
|
The method to show some text message, usually in a separate dialog window.. |
|
The method to ask some question with 2 possible answers (Yes / No) and waiting for the answer from a user. |
|
Returns current modal form of class {Dialog} shown. Only one modal dialog can be active at once. |
To create and pop up a menu the method Popup_menu is used. Its single parameter is a string containing item definitions separated by new line characters (#NL). It is convenient to use a multi-line string constant started with the symbol @. In such case for all the lines ending with a string literal a new line sequence is added. To organyze nested menu items add following the item which is then parent for a nesting menu, the string constant "(" (and to end the nesting level, the string ")"). Each string contains a menu item definition and for real menu items it should start from the item alias in a form "IDENTIFIER:", where a colon separates a menu item alias from the menu item text definition. It is also possible to specify togethewr with an alias some additional properties such as "disabled" or "checked", placing correspondent string constants comma separated. E.g.:
A separate string "-" creates a visual group separator. A single symbol "&" in a menu item text creates a shortcut symbol which can be used to select the item by a key combination ALT+ the next character. (But in someenvironments like Java such shortcut has not effect). To use the symbol '&' itself as a part of a menu item text, double it. To handle menu items, it is necessary to redefine menu item event handler:
OVERRIDE menu(STR Alias) : ...
Popup_menu(@
"COPY,disabled: &Copy [Ctrl-C]"
"CUT,disabled: C&ut [Ctrl-X]"
"PASTE: &Paste [Ctrl-V]"
"-"
"Mode..."
"("
"AUTO,checked: &Auto"
"Manual: &Manual"
")"
"EXIT: &Exit")
|
STR Current_column|_alias , READ
Current column (used as an implicit parameter in some methods to operate with columns).
|
Selecting a column (by alias) which will be used as the current. While a form is creating, the last column created becomes current. |
|
Returns the active (focused) control of the form. |
|
Setting the active (focused) control of the form. |
{Button} Default_button , READ
Current default button on the form (of the class {Button}). Only one button can be defined as the default at a time on a form. It can be clicked by the keyboard key ENTER if such key is not handled by a current active control on a form. E.g. the ENTER key can be used in a {Memo} control to insert symbols #NL to its text.
|
Setting current default button in the form. |
{Button} Cancel_button , READ
Like for the default button, but uset to store current cancel button. It can be clicked by the keyboard key ESCAPE (if such key is not handled, too).
|
Setting current cancel button in the form. |
{key_info} Key|_information_LOCAL
Information about key pressed (or released) actual while handling keyboard events.
BOOL Can_stop_long_operation|_set_to_FALSE_to_prevent_dialog_show_and_stop_operation
INT In_long_operation|_level
{event} Current_event|_kind_to_use_in_long_operation_dialog_in_default_description
Current (the last) event handling.
STR Alias_current_event
Text alias of a sender control initialted the last event, used while long operations handling (to show a reason of a long operation).
|
The method to access or create an instance of the class {Long_operation}. This is a special form shown when a long operation is detected. |
|
BOOL Ready|_answered , READ
TRUE, if the dialog was already answered.
STR Answer|_set_in_result , READ
A text value which is representing an answer form the user. When the dialog method ready is called this answer is passed and stored here. After returning to a point where the dialog results are handling, your code can analyze this value to decide what to do further.
|
The method to show a dialog form modally. (The form should be descending from the class {Dialog}). |
|
|