[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To start up the Form Designer simply type fdesign without any arguments. (If nothing happens, check whether the package has been installed correctly.) A black window (the main window) will appear on the screen. This is the window in which you can create your forms. Next the control panel appears on the screen. No form is shown yet.
The control panel consists of five parts. The first part is the menu bar, consisting of several groups of menus from which you can make selections or give commands to the program.
Directly below the menu you have a row of buttons for manipulating forms and to invoke few other functions described below.
At the left there is a list of forms you are working on. The list is empty, indicating that there are no forms yet. There's no upper limit on the number of forms You can work on at the same time. You can use this list to switch between forms. Below the forms list is another list of all groups in the form you're currently working on. It will be empty at first because there are no groups yet. Ignore this at the moment as we will come back to groups and their uses later.
Just right to those two lists you find a list of all different types of objects that can be placed on the forms. You can use the mouse to select the type of object you want to add to the form.
On the right side you find a number of buttons to give commands to the program. Each of these buttons is bound to a function key. You can either press the buttons with the mouse or press the corresponding function keys on the keyboard. The functions of these keys will be described below.
To create a new form click on the button labeled "New Form" in the
top-left corner of the control panel, just below the menu bar. A
little popup box will appear, prompting you for the name of the new
form. This is the name under which the application program will know
the form. You will have to provide a name (which must be a legal C
variable name). Type in the name and press <Return>
. Now the
color of the main qwindow for working on forms changes to that of the
background color of the new form. (Actually, each new form gets
created with a box already covering its entire area, what you see is
the color of this box. You can change most properties of this box
using the methods described below. Just its size is fixed to the size
of the form, which can be simply changed by resizing the window.) Note
that the forms name is added to the list of forms in the control
panel.
To add an object to the form choose the type of object in the control panel by clicking in the list of object classes. Next move the mouse into the form you are creating and drag the mouse while pressing the left mouse button. By keeping the mouse button pressed you create a box that has the desired size of the object. Release the button and the object will appear. Note that a red outline appears around the new object. This indicates that the object is selected. In this way you can put all kinds of objects on the form.
It is possible to move objects around or change their sizes. To this end, first select the object by pressing the mouse in it. A red outline will appear around the object. You now will be able to drag the object arund with the mouse. By grabbing the object at one of the four red corners you can change its size. In this way you can change the layout of the objects on the form. It is also possible to select multiple objects and move or scale them simultaneously. See below for details.
To change the objects attributes, e.g., the label, of an object, click
the mouse inside the object to select it. Next press the function key
<F1>
or click on the button labeled "F1 attribs" in the
control panel or select "Object attributes" from the "Object" menu.
You may also double-clicking with the right mouse button on the
object. A new form will appear in which you can change all the
different attributes. Their meanings should be clear (if you have read
the documentation on the Forms Library). Change the attributes by
pressing a mouse button on them. A menu will appear in which you can
make the required choice. Change the attributes you want to change and
finally press the button labeled "Accept". Press "Restore" to restore
the original attributes. See below for more information about changing
attributes.
In this way you can create the forms you want to have. Note that you
can work on different forms at the same moment. Just add another form
in the way described above and use the list of forms to switch between
them. After you have created all your forms select "Save" from the
"File" menu to save them to disk. It will ask you for a file name
using the file selector. In this file selector you can walk through
the directory tree to locate the place where you want to save the
file. Next, you can type in the name of the file (or point to it when
you want to overwrite an existing file). The name should end with
.fd
. So for example, choose `ttt.fd'. The program now
creates three files: `ttt.c', `ttt.h' and `ttt.fd'.
`ttt.c' contains a readable piece of C code that creates the
forms you designed. The file `ttt.h' contains the corresponding
header file for inclusion in your application program. The file
`ttt.fd' contains a description of the forms in such a way that
the Form Designer can read it back in later. The application program
now simply has to call the routines with names like
create_form_xxx()
(replace xxx
with the names you gave
to the forms) to create the different forms you designed.
These are the basic ideas behind the Form Designer. In the following chapters we describe the program in more detail.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Build Daemon user on November 7, 2009 using texi2html 1.82.