Biography:



Biography:

Frank Beard

Graduated in 1986 from the University of Houston with a BS degree in Computer Science. From 1986 to 1989, worked as a contractor for the Crew and Thermal Systems Division (Space Shuttle) of NASA’s Johnson Space Center doing real-time data acquisitions systems written in Ada on DEC VAX hardware. From 1989 to 1993, worked as a contractor for the International Space Station at NASA’s Johnson Space Center doing near real-time on-board distributed data storage and retrieval using Ada on real-time LYNX OS. From 1993 to present, working as a contractor to the Navy doing Naval messaging systems written in Ada on HP-UX BLS and Windows NT.

Outline:

I. Introduction to Aonix ObjectAda and GUI Builder

II. GUI Builder Fundamentals

a. Setting up a project

b. Main window

c. Project Manager

d. Menu Designer

e. Project Options

f. GUI Builder package (GB)

III. GUI Builder Widgets

a. Label

b. Text Box

c. Button

d. Frame

e. Check Box

f. Radio Box

g. Combo Box

h. List Box

i. Picture Control

j. Image Control

k. Timer Control

IV. Example Uses.

[pic]

Introduction

Product: Aonix ObjectAda/Gui Builder

Web Address:

Advantages:

- Easy to use for “basic” Windows programming

- Microsoft Visual Tool look and feel

- Fairly intuitive

- 100% Ada

Disadvantages:

- Platform specific

- Not well documented

- Not as advanced as Delphi or Visual Basic

- Assumes knowledge of Windows programming

- Requires more knowledge of API for advanced programming

GUI

Builder

Fundamentals

GUI Builder Fundamentals - Setting up a project

Run from \guibuild\Guibuild.exe

Or

Tools/GUI Builder

Or

“Hammer” icon on toolbar.

[pic]

[pic]

GUI Builder Fundamentals – Main Window

[pic]

Three main components:

Toolbar – containing all the widgets

Main Window – drawing palette

Project Manager – attributes of the objects

GUI Builder Fundamentals – Project Manager

[pic]

[pic]

GUI Builder Fundamentals – Menu Designer

[pic]

Caption - What the user will see

Name - Internal name inside the code

Hot Key - Chosen from the drop-down combo box

Level - Menu or sub-menu designation

Note: Choose a naming convention and stick with it.

GUI Builder Fundamentals – Menu Designer

[pic]

[pic]

*Note – Remember to include the *.RES file in your IDE project.

GUI Builder Fundamentals – Project Options

General Tab

[pic]

Options/Project Options - Accessed from the main toolbar

- Which windows stay on top

- Grid size

- Tab spacing

GUI Builder Fundamentals – Project Options

Current Project Tab

[pic]

Options/Project Options - Name of the “main” procedure

- Context clauses, visible to all windows

- Resource files, for images, menus etc.

GUI Builder Fundamentals – GB Package

• GB.ads (and GB.adb)

• Located in /guibuild/lib

• This is your “buddy”

• Get to know this package

• Fairly intuitive

• Well laid out

• Defines all the methods for the window objects

GUI

Builder

Widgets

Callbacks

Click

DoubleClick

GotFocus

LostFocus

KeyDown

KeyPressed

KeyUp

Messages

MouseDown

MouseMove

MouseUp

Selected

*Note – Most but probably not exhaustive list.

GUI Builder Widgets - Label

[pic]

[pic]

Used to “label” items

Simply text that will appear on the screen

GUI Builder Widgets - Text Box

[pic]

[pic]

Horizontal and vertical scrolling

Single and multi-line

procedure Text (Obj : in out Object; Val : String);

function Text (Obj : in Object; SLen : gb.INT := -1) return String;

GUI Builder Widgets – Button

[pic]

[pic]

One of the most used

Picture Button & 2-State Picture Button

procedure Caption (Obj : in out Object; Val : String) renames Text;

function Caption (Obj : in Object; SLen : gb.INT := -1) return String

renames Text;

procedure Enabled (Obj : in out Object; Val : gb.BOOL);

function Enabled (Obj : in Object) return gb.BOOL;

procedure EndApplication;

GUI Builder Widgets – Frame

[pic]

[pic]

Used for grouping

Especially important for Radio buttons

GUI Builder Widgets - Check Box

[pic]

[pic]

Check as many as desired

procedure Checked (Obj : in out Object; Val : gb.BOOL);

function Checked (Obj : in Object) return gb.BOOL;

GUI Builder Widgets - Radio Box

[pic]

[pic]

Very similar to CheckBox

Only one per group can be selected

• Use a Frame to group them

procedure Checked (Obj : in out Object; Val : gb.BOOL);

function Checked (Obj : in Object) return gb.BOOL;

GUI Builder Widgets - Combo Box

[pic]

[pic]

Very similar to ListBox

Only one item can be selected

• Pre-define a list or load from external source

• Most of the methods for ListBox work for Combo, with the addition of the Text method

GUI Builder Widgets - List Box

[pic]

[pic]

Single or mult-item selection

• Pre-define a list or load from external source

Properties

function Item (Obj : in gb.ListClass;

Index : Win32.Int) return String;

function ItemCount (Obj : in gb.ListClass) return Win32.Int;

function ItemData (Obj : in gb.ListClass;

Index : Win32.Int) return Win32.Int;

procedure ItemData (Obj : in out gb.ListClass;

Index : Win32.Int; Val : Win32.Int);

function ItemIndex (Obj : in gb.ListClass;

Val : String; StartIndex :

Win32.Int := -1) return Win32.Int;

function SelCount (Obj : in gb.ListClass) return Win32.Int;

function Selected (Obj : in gb.ListClass;

Index : Win32.Int) return Win32.BOOL;

function Sorted (Obj : in gb.ListClass) return Win32.Bool;

function Columns (Obj : in gb.ListClass) return Win32.Bool;

function MultiSelect (Obj : in gb.ListClass) return gb.MultiSelect_t;

function SelectedItem (Obj : in gb.ListClass) return Win32.Int;

Methods

procedure SetColumnWidth (Obj : in out gb.ListClass;

Val : Win32.Int);

procedure AddItem (Obj : in out gb.ListClass;

Item : String; Index : gb.INT := -1);

procedure SelectItem (Obj : in out gb.ListClass;

Item : String);

procedure Clear (Obj : in out gb.ListClass);

procedure Destroy (Obj : in out gb.ListClass);

procedure RemoveItem (Obj : in out gb.ListClass;

Index : gb.INT);

function DispatchMessage (Obj : gb.ListClass;

Message : gb.UINT;

wParam : gb.WPARAM;

lParam : gb.LPARAM) return gb.LRESULT;

procedure UnselectAll (Obj : in out gb.ListClass);

GUI Builder Widgets - Picture Control

[pic]

[pic]

Very similar to Image

• Greater control and more choices of callbacks

Defaults to BMP, DIB, and ICO, but can use others

GUI Builder Widgets - Image Control

[pic]

[pic]

Very similar to Picture

• Basic image display and less callbacks

Defaults to BMP, DIB, and ICO, but can use others

GUI Builder Widgets - Timer Control

[pic]

[pic]

• Extremely useful

• Splash Windows & Timed events

• Interval is in milliseconds

• Is not visible in the user window

procedure Enabled (Obj : in out Object; Val : gb.BOOL);

function Enabled (Obj : in Object) return gb.BOOL;

Example Window

[pic]

Example Window 2

GUI Builder View

[pic]

Example Window 2

Runtime View

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download