- 18.01 (released) ...
- Docked object editor
- Floating object editors
- General use
- Using Constants
- Advanced property manipulation
- Event connection
An object editor is a tool which allows you to edit the properties of a selected object . Common properties include minimum width and height, color, text etc.
The screenshot above shows a floating object editor. The docked object editor is almost identical except that it is located within the EiffelBuild main window.
Docked object editor
The docked object editor is displayed to the right hand side of the EiffelBuild main window. This editor is always displayed and is permanently linked to the layout constructor . This means that whenever the selected object changes in the layout constructor , the docked object editor becomes targeted to this object .
Floating object editors
These object editors appear in their own window, and you may open as many of these as you wish.
To open a new floating object editor, drop an object on , displayed in the main toolbar and also in each existing object editor. The new object editor will then be targeted to the object that was dropped .
As a shortcut to a complete pick and drop transport, you may hold down the Ctrl key while starting the pick , which will immediately open a new floating object editor targeted to the object you clicked.
When an object editor is targeted to an object , you will see that controls are available within the editor to customize that object . Although every different type of object will have different sets of properties that may be modified, the manipulation of these properties is as standardized as possible. Below are some general rules that apply:
- String properties inputted via a text field are updated within the object every time a key is pressed
- Integer properties inputted via a text field are only updated within the object when return is pressed, or the input box looses the focus.
- Almost without exception, a push button which controls a property, will open up a dialog, allowing the property to be edited. Examples are colors, pixmaps and events.
- If when you attempt to modify a property, it returns back to its original value, it means that the value you attempted to enter was invalid. For example, looking at the screen show above, if you enter -50 into the minimum_height text field and press return, it will revert back to 23. This is because the minimum_height of an
EV_BUTTONmay not be set to less than 0. To find allowable values for properties of an object , consult the EiffelVision 2 documentation.
All properties that may be manipulated in an object editor correspond directly to a property of the EiffelVision 2 control that is represented by the object (Displayed in an object editor as type). There is one exception to that rule though, and that is the Name field which is specific to EiffelBuild. This field is used for your identification of the object and as the attribute name in the generated code. For example, when EiffelBuild generates code corresponding to the object targeted in the editor shown above, it would declare the EiffelVision 2 component as - button1: EV_BUTTON
All fields that may use constants have a button marked with the constants symbol , which when selected, modifies the field to allow selection of the desired constant. A combo box is displayed with all valid constants (matching the type of the property) displayed, from which you may select the constant you wish to use. To remove the use of the constant, simply press the constants button again, which removes the constant, and sets the property to a manifest value representing the previous value of the last selected constant.
Advanced property manipulation
Although many of the properties of objects are relatively simple, and can be manipulated with
For all "top level" objects (those contained within the widget selector which are to be generated as individual classes), a check button marked "Generate as client" is available towards the top of the Object Editor. If this is checked, the generated class uses the widget type of the object as a client, otherwise it inherits directly from the widget's class.
As well as being able to manipulate the standard properties of an object , facilities are provided for connecting to the events of an object . Looking at the object editor screenshot above, you will see that there is a button marked Select events which is also available in all targeted editors.
Clicking this button will cause the following dialog to be displayed:
Looking at the screenshot above, you will see that this dialog contains all the action_sequences available for the
If you check a button connected with one of the action sequences, you will be then able to enter the name of a feature that you wish to connect to the action sequence. The screenshot above shows the user has connected a feature named
button_pressed to the
select_actions. When code is generated , this will cause EiffelBuild to generate an empty feature named
button_pressed already connected to the
select_actions of the button.