Figure 1
File
:
Figure 1
The characteriristics are:
Edit
button open an edit window with the definition of the callback. So, you
can modify and define it there.
If an object can't be resized (prompt, for example), you can move them by clicking in the whole object. Some objects can be resized on one direction only (for example: string editors, scrollbars...), so mouse movements in this direction are ignore.
If you click in an object without move or resize it, the configuration window of the object is opened.
Window
is:
Figure 2
The objects window gives the list of all the objects od the designed window.
You can select one object, and with the button Edit
, opens the
configuration window of this object.
If you want to remove an object, select the object in the list,
and press the Del
button. It's the only way to remove
an object of the designed window.
Figure 2
The Id name
field is the name of the object in the caml program
generated by Camldsgn. The Name
field is the content of the
button. The type of this field is defined by the three buttons
Text
, Image
, Integer
. When you press
the Edit
button in front of this field, Camldsgn open a new
window. This window is an input string window if the type is set to text.
It is the Camlicon window if the type is set to image. It is an input integer
window if the type is set to integer.
The Callback function name is defined in the field Callback
.
The name can be modified in this window, but if you do so, you must edit
the new function, by pressing Edit
button in front of this
field. Otherwise, you will have a compilation error when you compile the
generated file.
The Cancel
button close the window, but all the changes you made
are forgoten. The Ok
button close the window, and update the
design window.
Figure 2
The left part of the window is devoted to menu, the right part to the items of the selected menu.
The three buttons in the left
Add
, Del
, Edit
managed menus. A menu is
added at the end of the list, so displayed at the right of the toolbar.
Configure a menu is simply choosing an Id name
and a
Name
(the label dispalyed in the toolbar).
The three buttons in the right
Add
, Del
, Edit
managed the items of
the selected menu. An item is added at the end of the list.
Configure an item is choosing an Id name
, a
Name
and a Callback
function.
At the bottom of the window, there is a field that content the toolbar
Id name
, and a button to close the window.
Figure 2
With the mouse, you can only move and size the box surrounding all the buttons. The size of the buttons, and there relative position are set in the configure window.
As for all the objects, you have to choose an Id name
. You can
also specify and edit a Callback
function.
The three fileds bellow configure the position and the sizes of the buttons.
The sizes are in the fields Button size: width
and
Button size: height
. The field Delta
gives
the the length between two buttons, verticaly and horizontaly.
The list gives the content of the buttons. You can add a button after
the selected one by pressing Add
. You can add a button before
the selected one by pressing Ins
. You can remove a button by
pressing Del
. When you add a button, a window asks you to select
the type of the content of the new button (string, integer, image), and then
let you edit the content. You can change the content (but not the type) of
the selected button by pressing the button Edit
.
The last field is for choosinf the way of filled the group of buttons.
There is no garanty that all the buttons stay in the surrounded box. You must resize it by hand.
Functions
is:
let name Obj Event =\n
.
Figure 2
You can edit or remove a function with the two buttons Edit
and
Del
. Camldsgn doesn't check if all the callbacks of the objects
have a corresponding function definition.
#open "windows";; #open "camlwin";; #open "image1";; ... #open "imagen";; let win_def = { ... };; let obj1 = { ... };; let obj2 = { ... };; ... let item1 = { ... };; ... let itemn = { ... };; let menu1 = { ... };; ... let toolb = { ... };; let win = { };; let func1 Obj Event = ... ;; ... obj1.xx_callback <- func1;; ...The objects are saved in the Camlwin order, except the items and the menus. They are saved after all the others objects. Then the window is defined, and all the functions are added to the file. The file ends with the callback asignement. So that, you can used objects in the callback functions.