Contents

GUI Tools: Contents

The Contents lists Help topics available for GUI Tools.

GUI Design

Menu Bar
 Controls
 Properties

GUI Reference

GUI Tools Reference
GUI Tools Manual

GUI Examples

Index of Programs


Menu Bar

Description

The menubar on the GUI Tools control form has the following entries:

File

New

Creates a new design form

Open

Opens an existing GUI description file

Save

Saves the current form to the current GUI description file

Save As

Saves the current form to a new GUI description file

Exit

Exits to GAUSS

Edit

Cut Control

Cuts the currently selected control to the clipboard (Ctrl X)

Copy Control

Copies the currently selected control to the clipboard (Ctrl C)

Paste Control

Pastes the the clipboard control to the form (Ctrl V)

Delete Control

Deletes the currently selected control (Del)

Enable All

Enables all controls on the form (enable = on)

Show All

Displays all controls on the form (visible = on)

Clear Picture

Clears the picture property in the currently selected control

Control

Button

Command Button, returns 1 if clicked, else 0

Check Box

Check Box, returns 1 if checked, else 0

Directory List

Directory List, returns displayed folder as a string

Drive List

Drive List, returns displayed drive as a string

File Browse

File browser, returns displayed file as a string

Frame

Frame, returns nothing

Label | Label, returns nothing
List Box | List Box, returns currently displayed item as a string
Option Button | Option Button, returns 1 if checked, else 0
Picture | Picture, returns nothing
Slider | Slider, returns currently selected value
Textbox | Text Box, returns displayed text as string
Help | User Guide | Displays this help file
About | Displays information on GUI Tools


Controls

Description

The following controls can be added to a form, either using the menu, or by clicking the control in the toolbox.

Button

Command Button, returns 1 if clicked, else 0. When the user clicks a command button, the GUI is hidden and control returns to GAUSS

Check Box

Check Box, returns 1 if checked, else 0. A check box shows a check when clicked.

Directory List

Directory List, returns displayed folder as a string. The folders displayed is linked to the Drive List, if it exists.

Drive List

Drive List, returns displayed drive as a string

File Browse

Standard Windows file browser, returns displayed file as a string. The initial folder is linked to the Directory List, if it exits.

Frame

Frame, returns nothing. Normally the frame should appear behind the other controls

Label | Label, returns nothing. The user cannot change the text in a label.
List Box | List Box, returns currently displayed item as a string. Items are added using the additem property, and removed using the remove item property.
Option Button | Option Button, returns 1 if checked, else 0. Each option button is associated with a group - which can be changed using the group property. Only one option button in any give group can be checked.
Picture | Picture, returns nothing. Selected using standard windows file dialog. The size of the picture is set at design time; the image is stretched to fill the specified size at run time.
Slider | Slider, returns currently selected value. The minimum, maximum and frequency can be adjusted using properties. Mouse sizing does not work for this control - use the properties (height and width) instead.
Textbox | Text Box, returns displayed text as string. Multiline text is enabled.


Properties

Description

The design form and each control have a number of properties. These are described below. Only a subset of properties apply to each control. To change a property of a control, click the control to display its properties, and then click the property name.

Name

Name of the control - this is the name that the property that is returned by this control is stored under by GAUSS.

AddItem | Permits the addition of an item below the current item in a list control.
Alignment | Text alignment of the caption - left, right or center.
Appearance | Control appearance - flat or 3D.

BackColor

The background color of this control.

BorderStyle | Type of border - none or single line.

Caption

The caption or title of this control.
Enabled | Specifies whether the control is enabled or not.

Font

The caption or text font - the Windows font dialog is displayed.

Group | The group associated with a option button - initially specified when the control is first created. Only one option button in any give group can be checked.

Height

The height of the control, in twips *.

Left

The distance of the control from the left edge of the form, in twips *.

Max | The maximum value associated with a slider control.
Min | The minimum value associated with a slider control.
Picture | A picture - the Windows file dialog is displayed.
RemoveItem | Deletes the current item in a list control.

TabIndex

The display order as the user clicks the TAB key.

TabStop

The control is selected using the TAB key if this is true.

Text

The text message that is displayed in this control.

TickFrequency | The frequency of ticks on the slider control.
ToolTipText | The tooltip that will be displayed when the mouse hovers over the control.

Top

The distance of the control from the top edge of the form, in twips *.

Value | The value associated with this control

Visible

Specifies whether the control is visible or not.

Width

The width of the control, in twips *.

WindowState

Form's Window state - normal, minimized or mazimized

* One TWentIeth of a Point, ie 1/20 of a printer's point - here are thus 1,440 Twips to an inch.


Structure

Description

GUI Tools uses a structure to handle the various options. This structure is defined as follows:

    struct gstruct {
    string  command;
    string  text;
    string  title;
    string  prompt;
    scalar  style;
    scalar  splash;
    string  mode;
    string  gaussState;
    string  guiState;
    string  procName;
    string  fileName;
    string array list;
    };


guiClear

Description

Clears an active GUI.

Syntax

guiClear;

Example

guiClear;

This clears any active GUI, and resets the system.


guiEdit

Description

Creates or modifies a user defined GUI.

Syntax

guiEdit (g0);

g0 - GUI structure

Example

g0.filename = guipath $+ "gt13.gui";
guiEdit(g0);

The GUI description file gt13.gui is opened for modification.


guiEnd

Description

Terminates a GUI session from within a proc

Syntax

guiEnd;

Example

guiEnd;

This terminates a GUI session from within a proc.


guiEval

Description

Executes a string consisting of a set of GAUSS expressions.

Syntax

guiEval (str);

str - string, GAUSS expressions

Example

str = "x=14; x^2;";
guiEval(str);

This evaluates the string str as if it had been typed in at the GAUSS prompt.


guiHelp

Description

Displays the GUI tools help file.

Syntax

guiHelp;

Example

library guitools;
guiHelp;

This displays the GUI help file.


guiNew

Description

Creates a new user defined GUI.

Syntax

guiNew (g0);

g0 - GUI structure

Example

guiNew (g0);

This creates a new blank form, ready for editing.


guiPut

Description

Assigns the contents of a control to a GAUSS global symbol.

Syntax

guiPut (ctlname, gaussname);

ctlname | - string, GUI control name
gaussname | - string, GAUSS global symbol

Example

g0.filename = guipath $+ "gt13.gui";
call guiPut("checkbox1", "PrintFlag");

The contents of checkbox1 (either 1 if checked, else 0) is placed in the GAUSS variable printflag.


guiRun

Description

Executes a control or user defined GUI.

Syntax

ret = guiRun (g0);

g0 - GUI structure

Example

g0.filename = guipath $+ "gt13.gui";
call guiRun(g0);

The GUI file gt13.gui is displayed.


guiSet

Description

Initialize an instance of a GUI structure.

Syntax

g0 = guiSet;

g0 - GUI structure

Example

library guitools;
#include guitools.sdf;
struct gstruct g0;
g0 = guiSet;

The structure definition is loaded in guitools.sdf, and g0 is created as an instance of gstruct, and initialized in guiSet.


guiWait

Description

Prompts for a key input..

Syntax

guiWait;

Example

guiWait;

This prompts for a key input.


index

Index of Programs

GUI Examples:

gui1.e      Message Box, OK only
gui2.e      Message Box, button choice
gui3.e      Check box
gui4.e      Option box
gui5.e      Combo box
gui6.e      Text box
gui7.e      Logon box (name and password)
gui8.e      File dialog
gui9.e      Font dialog
gui10.e     Color dialog
gui11.e     Print dialog
gui12.e     GAUSS box
gui13.e     User defined questionnaire
gui14.e     User defined browser
gui15.e     User defined GAUSS interface
gui16.e     User defined optimization front end
gui17.e     New design form
gui18.e     Editing an existing form


Reference

GUI Tools: Reference

Structure

gstruct

Reference

guiClear

guiEdit

guiEnd

guiEval

guiHelp

guiNew

guiPut

guiRun

guiSet

guiWait