Summary:
See also: Built-in classes
The Interface class is a built-in class provided to manipulate the user interface.
ui.Interface
Class Methods | |
Name | Description |
frontCall( module STRING, name STRING,
parameter-list, returning-list ) |
Calls the front end function name of the module module. See Front End Functions for more details. |
getDocument() RETURNING om.DomDocument |
Returns the DOM document owning the Abstract User Interface tree. |
getFrontEndName() RETURNING STRING |
Returns the type of the front end ( 'Gdc' , 'Console'
). |
getFrontEndVersion() RETURNING STRING |
Returns the front end version string. |
getRootNode() RETURNING om.DomNode |
Returns the root DOM node of the Abstract User Interface tree. |
loadStartMenu( file STRING ) |
Loads the start menu defined in an XML file into the AUI tree. See StartMenus for more details. |
loadToolBar( file STRING ) |
Loads the toolbar defined in an XML file into the AUI tree. See Toolbars for more details. |
loadTopMenu( file STRING ) |
Loads the topmenu defined in an XML file into the AUI tree. See TopMenus for more details. |
loadActionDefaults( file STRING
) |
Loads the default decoration for actions from a specific XML file into the AUI tree. See Action Defaults for more details. |
loadStyles ( file STRING ) |
Loads styles defined in an XML file into the AUI tree. See Prensentation Styles for more details. |
setName( name STRING ) |
Sets the name to identify the program on the front-end. |
getName() RETURNING STRING |
Returns the identifier of the program. |
setText( title STRING ) |
Defines a title for the program. |
getText() RETURNING STRING |
Returns the title of the program. |
setImage( name STRING ) |
Sets the name of the icon to be used for this program. |
getImage() RETURNING STRING |
Returns the name of the icon. |
setType( type STRING ) |
Defines the type of program. Values can be 'normal' , 'container'
or 'child' . |
getType() RETURNING STRING |
Returns the type of the program. |
setContainer( name STRING ) |
Defines the name of the parent container of this program. |
getContainer() RETURNING STRING |
Returns the name of the parent container of this program. |
getChildCount() RETURNING INTEGER |
Returns the number of children in this container. |
getChildInstances( name STRING ) RETURNING INTEGER |
Returns the number of children identified by name. |
refresh() |
Synchronizes the front end with the current AUI tree. |
01
MAIN02
MENU "Test"03
COMMAND "Get"04
DISPLAY "Name = " || ui.Interface.getFrontEndName()05
DISPLAY "Version = " || ui.Interface.getFrontEndVersion()06
COMMAND "Exit"07
EXIT MENU08
END MENU09
END MAIN
01
MAIN02
DEFINE n om.DomNode03
MENU "Test"04
COMMAND "SaveUI"05
LET n = ui.Interface.getRootNode()06
CALL n.writeXml("auitree.xml")07
COMMAND "Exit"08
EXIT MENU09
END MENU10
END MAIN
The WCI parent program:
01
MAIN02
CALL ui.Interface.setName("main1")03
CALL ui.Interface.setText("This is the MDI container")04
CALL ui.Interface.setType("container")05
CALL ui.Interface.loadStartMenu("appmenu")06
MENU "Main"07
COMMAND "Help" CALL help()08
COMMAND "About" CALL aboutbox()09
COMMAND "Exit"10
IF ui.Interface.getChildCount()>0 THEN11
ERROR "You must first exit the child programs."12
ELSE13
EXIT MENU14
END IF15
END MENU16
END MAIN
The WCI child program:
01
MAIN02
CALL ui.Interface.setName("prog1")03
CALL ui.Interface.setText("This is module 1")04
CALL ui.Interface.setType("child")05
CALL ui.Interface.setContainer("main1")06
MENU "Test"07
COMMAND "Exit"08
EXIT MENU09
END MENU10
END MAIN
01
MAIN02
DEFINE cnt INTEGER03
OPEN WINDOW w WITH FORM "myform"04
FOR cnt=1 TO 1005
DISPLAY BY NAME cnt06
CALL ui.Interface.refresh()07
SLEEP 108
END FOR09
END MAIN