09.03.2015 Views

An IVIB Primer - Unicon

An IVIB Primer - Unicon

An IVIB Primer - Unicon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The application is now complete. Use the makefile or <strong>Unicon</strong> command to compile and link the program and run<br />

the application as described in the Makefile section above. Now you can go back and add labels, or resize<br />

components as needed.<br />

Part II: <strong>An</strong>other Simple <strong>IVIB</strong> Application<br />

The following example demonstrates how to create a simple application that uses modeless dialogs, edit dialog<br />

features, tab sets, and overlays. The application will contain a main screen with a table, overlay and tab set. The<br />

main screen will call an edit dialog that will have cut, copy, paste, undo, and redo features. This example will<br />

illustrate:<br />

1) modeless dialogs<br />

2) tab sets, overlays<br />

3) capturing table events double clicks, right clicks, column clicks<br />

4) copy, cut, paste from clipboard<br />

5) using buttons and keeping selected regions for copy, cut, paste<br />

6) single undo/redo instead of default compound undo/redo<br />

7) tab jumps to components<br />

Modeless Dialogs<br />

We are going to create a main dialog that contains a table of games. After you select one of the games from the<br />

table, a modeless dialog will be displayed. First, create a directory where you can save all the files created for<br />

this application. Change into this directory, and launch Ivib. You will see a blank canvas.<br />

Enter the canvas attributes. Either right click on the Canvas for Dialog or go to the file menu option Canvas-<br />

>Dialog prefs.<br />

On the Code Tab enter:<br />

Name dialogmain<br />

On the Methods Tab, leave the Generate main() procedure checkbox 'on' so the box is checked. We want to put<br />

our main procedure in this file. Leave all the other checkboxes on on the Methods Tab checked also.<br />

On the Attribs Tab, Hit Add and replace Edit me with:<br />

Attrib<br />

Value<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!