mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
create 18.11
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2112 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
[[Property:title|Create an object]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|b2ef8e81-a045-dce2-725f-c8db5ab1b6db]]
|
||||
An EiffelBuild [[EiffelBuild Notation|object]] is a representation of an EiffelVision 2 component and its properties.
|
||||
|
||||
To create a new instance of an object, [[EiffelBuild Notation|pick]] a type from the [[Type selector|type selector]] and [[EiffelBuild Notation|drop]] onto an existing [[EiffelBuild Notation|object]] (Accessible from the [[Layout constructor|layout constructor]] or [[Builder window|builder window]] ). You will only be able to complete the [[EiffelBuild Notation|drop]] if the targeted [[EiffelBuild Notation|object]] will accept a new object of the transported type.
|
||||
|
||||
{{note|Once an [[EiffelBuild Notation|object]] has been [[Create an object|created]] , it will always be contained in a parent [[EiffelBuild Notation|object]] until [[Delete an object|deleted]] . }}
|
||||
|
||||
==Creating Window and Dialog Objects==
|
||||
|
||||
Window and dialog objects are created by picking a type from the [[Type selector|type selector]] and dropping into the [[Widget selector|widget selector]] . If the target of the drop is a directory within the widget selector, the new object is created within that directory, otherwise in the root of the project location. Window and dialog objects are generated as individual classes by EiffelBuild.
|
||||
|
||||
{{note|If there are no other windows or directories in the project, the newly created object is set as the root window.}}
|
||||
|
||||
==Creating objects for re-use==
|
||||
|
||||
If you wish to create an object that may be re-used in multiple locations within your EiffelBuild project, pick the type from the [[Type selector|type selector]] and drop into the [[Widget selector|widget selector]] . This ensures that at generation time, the object is generated as a seperate class (as with all objects in the [[Widget selector|widget selector]] ). Objects within the [[Widget selector|widget selector]] may be used in a client fashion within other object structures as required, and any changes made to these objects are reflected at all locations in which they are used.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Type selector|Type selector]] <br/>
|
||||
[[Reparent an Object|Reparent an object]] <br/>
|
||||
[[Delete an object|Delete an object]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[[Property:title|Delete an object]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|87dbc23d-4f9c-bd2a-8451-30031b494d37]]
|
||||
To remove an [[EiffelBuild Notation|object]] from your EiffelBuild system, [[EiffelBuild Notation|pick]] the object you wish to delete, and [[EiffelBuild Notation|drop]] it on [[Image:icon-delete-small-color]] in the [[Main toolbar|main toolbar]] .
|
||||
|
||||
You may also delete via the keyboard by pressing the delete key while the tool containing the objects representation has the focus. Whichever [[EiffelBuild Notation|object]] has the selection is deleted.
|
||||
|
||||
{{note|To restore a deleted object, you may use the [[History|History]] }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[History|History]] <br/>
|
||||
[[Type selector|Type selector]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
[[Property:title|EiffelBuild: Creating a new project]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|8668676c-a189-5512-319e-34d70d4039e3]]
|
||||
When a project is not open in Build, there are only two menu options available. 'File' and 'Help'. To create a new project, select 'file', 'New project' as illustrated below:
|
||||
|
||||
[[Image:new-project]]
|
||||
|
||||
This will bring up a directory dialog from which you can select the directory in which you wish to create the new Build project.
|
||||
|
||||
Selecting a directory that does not already contain a Build project will create a new project in that directory and the Build tools will become available for development of the newly created project. If a directory was selected that already contains a Build project, the following dialog will be displayed:
|
||||
|
||||
[[Image:overwrite-project]]
|
||||
|
||||
Selecting 'Ok' will create a new project, overwriting the existing project, and the Build tools will become available for development of the newly created project.
|
||||
|
||||
Selecting 'Cancel' will return you to the directory selection dialog, from which you can select the directory in which you wish to create the new Build project.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Retrieving a project from a Build project file|Retrieving a project from a Build project file]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelBuild: Starting a project]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|803e2034-dec3-340c-e68e-fdbaefac8a5a]]
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
[[Property:title|Retrieving a project from a Build project file]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|556cfd8a-f4df-9778-cbb1-eb4a9d795f01]]
|
||||
When a project is not open in Build, there are only two menus available, 'File' and 'Help'. To retrieve an existing project, select 'file', 'Open Project
|
||||
|
||||
[[Image:open-project]]
|
||||
|
||||
A directory dialog will be displayed from which you can select the Build project file that you wish to retrieve. All build project files are named 'build_project.bpr' and are qualified by the directory in which they reside.
|
||||
|
||||
You may also open a recent EiffelBuild project via the 'Recent Projects' entry of the 'file' menu as shown below:
|
||||
|
||||
[[Image:recent-projects]]
|
||||
|
||||
This list contains the most recent projects that have been used within EiffelBuild, and if none are available, this list is empty and the menu option disabled.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: Creating a new project|Creating a new project]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
[[Property:title|Import a project]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|ad0b96e1-ca74-5344-44f1-e066205fb76d]]
|
||||
The contents of an existing project may be imported into the currently open project, permitting re-use of existing structures. All versions of EiffelBuild before 5.4 limited each project to a single titled window, with 5.4 removing this limitation. The ability to import multiple EiffelBuild projects into a single project is useful for maintaining larger systems with many windows.
|
||||
|
||||
To import the contents of an existing project, select 'Import Project' from the 'File' menu as illustrated below:
|
||||
|
||||
[[Image:import-project]]
|
||||
|
||||
Upon selection of the menu item, a file dialog is displayed prompting for the EiffelBuild project to be imported (".bpr" files) . Selecting a valid EiffelBuild project file causes the import to commence, during which, EiffelBuild is unresponsive. Please be patient, as importing a large EiffelBuild project may take a little while, depending on the speed of the system.
|
||||
|
||||
Upon completion of the import, there are two possible outcomes:
|
||||
* No name clashes occurred: No names from the imported project clashes with those of the open project. In this case, notification of success is displayed in the status bar for a short period of time.
|
||||
* One or more name clashes occurred: One or more objects or constants from the imported project had names that matched that of objects in the open project. As the names are used directly in the generated code, they must be unique within their scope (accessible within the code), and therefore EiffelBuild must resolve these clashes. A dialog is displayed on screen showing all the names that were resolved by EiffelBuild:
|
||||
[[Image:import-project-clashes]]
|
||||
|
||||
{{note|If a name clash occurs, the names of the imported project are modified, not the open project. }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelBuild How To's]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|1df547c8-ca5b-f014-5b4f-a39ecefaa746]]
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
[[Property:title|Reparent an Object]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|bf920606-6a40-83fc-5069-034d32f8cd7a]]
|
||||
To reparent an [[EiffelBuild Notation|object]] , you need to [[EiffelBuild Notation|pick]] the [[EiffelBuild Notation|object]] and [[EiffelBuild Notation|drop]] it on the [[EiffelBuild Notation|object]] you wish it to be parented in. The [[EiffelBuild Notation|object]] will be removed from its current parent, and inserted in the new parent at the next available position.
|
||||
|
||||
When an [[EiffelBuild Notation|object]] is inserted into a parent, it is always added at the next available position. If you wish to place an [[EiffelBuild Notation|object]] at a particular position within a parent, you must hold down the '''Shift''' key, and drop on an [[EiffelBuild Notation|object]] already contained in parent, Your [[EiffelBuild Notation|object]] will then be inserted in the parent, in the position preceding the child [[EiffelBuild Notation|object]] that you dropped on.
|
||||
|
||||
You can access [[EiffelBuild Notation|objects]] from both the [[Builder window|builder window]] and [[Layout constructor|layout constructor]] .
|
||||
|
||||
{{note|Although window and dialog objects may be accessed within the [[Widget selector|widget selector]] , it is not possible to build into these objects, you should use the [[Layout constructor|layout constructor]] or [[Builder window|builder window]] directly in this situation. }}
|
||||
|
||||
For more information about an [[EiffelBuild Notation|objects]] capacity and permitted children, see the [[EiffelVision Introduction|EiffelVision 2]] documentation.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Create an object|Create an object]] <br/>
|
||||
[[Delete an object|Delete an object]] <br/>
|
||||
[[Builder window|Builder window]] <br/>
|
||||
[[Layout constructor|Layout constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|Save a project]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|f2c46797-34c5-5de7-fcad-3447c3db61f5]]
|
||||
To save the project that is currently open, select '''Save''' from the '''File''' menu or click on [[Image:icon-save-color]] in the [[Main toolbar|main toolbar]] .
|
||||
|
||||
Alternatively, you may use the keyboard shortcut - '''Ctrl+S'''
|
||||
|
||||
{{note|If no changes have been made to the system, the save command will be disabled. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: Key shortcuts|Key shortcuts]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
[[Property:title|Builder window]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|e82ca336-cab6-bc60-6ddc-b359a7c86811]]
|
||||
The Builder window provides a view of the [[EiffelBuild Notation|objects]] in your system, in which the [[EiffelBuild Notation|objects]] may be manipulated.
|
||||
|
||||
This window may either be shown or hidden (default). To change between these two states, click [[Image:icon-builder-window-color]] on the [[Main toolbar| main toolbar]] , or select '''Show/Hide builder window''' from the '''View''' menu.
|
||||
|
||||
[[Image:builder-window]]
|
||||
|
||||
The content of this window is a representation of the [[EiffelBuild Notation|objects]] you have defined in your project. Each [[EiffelBuild Notation|object]] is represented by the [[EiffelVision Introduction|EiffelVision 2]] control matching its type. For example, an [[EiffelBuild Notation|object]] representing an <eiffel>EV_BUTTON</eiffel> will be displayed in here using an <eiffel>EV_BUTTON</eiffel>. As this view provides direct access to the objects ( [[EiffelBuild Notation|Pick]] any of the controls in this window), it enables you to build your interface within a view which provides rich visual feedback.
|
||||
Because this window is just a view of the [[EiffelBuild Notation|objects]] , it will be always synchronized with the [[Layout constructor| layout constructor]] . This means you can [[Reparent an Object| re-parent objects]] , using the [[EiffelBuild Notation|pick and drop]] transport method, seamlessly between the two views. <br/>
|
||||
|
||||
{{note|Holding Ctrl while right clicking on an [[EiffelBuild Notation|object]] in the Builder Window creates a new [[Object editor|object editor]] targeted to the [[EiffelBuild Notation|object]] . Holding Ctrl and Shift while right clicking on an [[EiffelBuild Notation|object]] , highlights it within the [[Layout constructor|layout constructor]] .}}
|
||||
|
||||
==Visual Differences==
|
||||
|
||||
Although the builder window attempts to show you the interface you are developing, it is not a completely accurate representation (Unlike the [[Display window|display window]] ). The main difference is that all [[EiffelBuild Notation|objects]] representing descendents of EV_CONTAINER are parented in a frame. This was implemented so that you would be able to easily manipulate the containers.
|
||||
|
||||
Imagine that this was not the case, and each container [[EiffelBuild Notation|object]] was just represented by an [[EiffelVision Introduction|EiffelVision 2]] object matching its type. Because these containers have no visible screen space when filled with children, manipulation of them would have been difficult, and the functionality of this view would be compromised.
|
||||
|
||||
In the screenshot above, you can see that there are two [[EiffelBuild Notation|objects]] representing containers in your project, an <eiffel>EV_VERTICAL_BOX</eiffel>, and an <eiffel>EV_HORIZONTAL_BOX</eiffel> (Excluding the <eiffel>EV_TITLED_WINDOW</eiffel> [[EiffelBuild Notation|object]] represented by this window).
|
||||
|
||||
The properties of the [[EiffelBuild Notation|objects]] in you system are always reflected in this window, with a few exceptions:
|
||||
* `user_can_resize`, `maximum_width`, `maximum_height` and `title_string` are not reflected in this window.
|
||||
* `minimum_width` and `minimum_height` are not reflected in any of the controls representing [[EiffelBuild Notation|objects]] within this window.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Display window|Display window]] <br/>
|
||||
[[Layout constructor| Layout constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
[[Property:title|Component selector]]
|
||||
[[Property:weight|8]]
|
||||
[[Property:uuid|c70ce7e5-e720-ca96-8f1f-5024e9d6dabe]]
|
||||
The component selector allows you to build and retrieve user defined [[EiffelBuild Notation|components]] for use in your project.
|
||||
|
||||
[[Image:component-selector]]
|
||||
|
||||
==Creating a component==
|
||||
|
||||
To define a new [[EiffelBuild Notation|component]] , [[EiffelBuild Notation|pick]] the [[EiffelBuild Notation|object]] that you wish to create the component from, and then [[EiffelBuild Notation|drop]] it anywhere in the component selector. The following dialog will appear:
|
||||
|
||||
[[Image:component-namer]]
|
||||
|
||||
Modify the suggested name as desired, and then click '''OK''' to create the new component. If you click '''Cancel''', the component will not be created.
|
||||
|
||||
The component that has been created will contain enough information to allow a copy to be built of the existing object. This includes all the children of the original object (to any depth) and the properties (width, height, color etc)of all objects within the structure. The only properties of the objects that will not be set inside a component are the user defined names, and any events connected to the objects.
|
||||
|
||||
==Using a component==
|
||||
To create a new set of [[EiffelBuild Notation|objects]] from a [[EiffelBuild Notation|component]] , [[EiffelBuild Notation|pick]] the [[EiffelBuild Notation|component]] , and [[EiffelBuild Notation|drop]] onto an [[EiffelBuild Notation|object]] representation. If an object is full, or does not allow other objects of the new type to be contained, then you will not be able to [[EiffelBuild Notation|drop]] on it. <br/>
|
||||
|
||||
If the [[EiffelBuild Notation|pick and drop]] completed successfully, then you should have a new set of objects matching the structure of the [[EiffelBuild Notation|component]] .
|
||||
<span id="delete_component"></span>
|
||||
==Deleting a component==
|
||||
|
||||
To remove a [[EiffelBuild Notation|component]] from your EiffelBuild system, [[EiffelBuild Notation|pick]] it, and then [[EiffelBuild Notation|drop]] it on [[Image:icon-delete-small-color]] in the [[Main toolbar| main toolbar]] .
|
||||
|
||||
{{note|The deletion of a [[EiffelBuild Notation|component]] cannot be undone. }}
|
||||
|
||||
==Viewing a component==
|
||||
|
||||
To view an existing component, use the [[Component viewer|component_viewer]] .
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Component viewer|Component_viewer]] <br/>
|
||||
[[Builder window|Builder window]] <br/>
|
||||
[[Layout constructor| Layout Constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
[[Property:title|Component viewer]]
|
||||
[[Property:weight|10]]
|
||||
[[Property:uuid|51a8cb3e-7486-7ab4-b608-95acfedd32f7]]
|
||||
The Component viewer allows you to view the structure of a [[EiffelBuild Notation|component]] without having to create new [[EiffelBuild Notation|objects]] from the [[EiffelBuild Notation|component]] .
|
||||
|
||||
This tool is displayed in a separate window, and may either be shown or hidden (default). To change between these two states, click [[Image:icon-component-viewer-color]] on the [[Main toolbar| main toolbar]] , or select '''Show/Hide component viewer''' from the '''View''' menu.
|
||||
|
||||
[[Image:component-viewer]]
|
||||
|
||||
==Targeting a component==
|
||||
|
||||
To target a [[EiffelBuild Notation|component]] into the tool, [[EiffelBuild Notation|pick]] the [[EiffelBuild Notation|component]] from the [[Component viewer|component_viewer]] , and [[EiffelBuild Notation|drop]] on the [[Image:icon-component-viewer-color]] displayed in the tool bar of the component viewer (See screenshots above). Any existing component displayed is simply removed.
|
||||
|
||||
Alternatively, you can hold down the Ctrl key while starting a [[EiffelBuild Notation|pick]] on a [[EiffelBuild Notation|component]] in the [[Component selector| component_selector]] . This will automatically target the [[EiffelBuild Notation|component]] to the component viewer. If the viewer is currently hidden, it will also make it visible.
|
||||
|
||||
==View types==
|
||||
|
||||
Looking at the left-hand screenshot above, you can see that the [[Image:icon-component-display-view-color]] button is depressed, meaning the component viewer is in display view mode. Clicking on [[Image:icon-component-build-view-color]] will put the component viewer into build mode view as shown in the right-hand screenshot. These modes are mutually exclusive and are described below:
|
||||
* '''Builder view''' - This view is similar to the view used by the [[Display window|display window]] . i.e. the [[EiffelVision Introduction|EiffelVision 2]] controls are displayed exactly as is defined in the [[EiffelBuild Notation|component]] .
|
||||
* '''Display view''' - This view is similar to the view used by the [[Builder window|builder window]] . i.e. all [[EiffelVision Introduction|EiffelVision 2]] containers are represented by frames so they are immediately visible. This makes the actual structure represented by the [[EiffelBuild Notation|component]] completely visible.
|
||||
|
||||
{{note|The type of the "root_object" within the component is displayed in the toolbar of the component viewer. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Builder window|Builder window]] <br/>
|
||||
[[Layout constructor| Layout constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
[[Property:title|Constants]]
|
||||
[[Property:weight|12]]
|
||||
[[Property:uuid|f658bc39-da5f-1f12-ccf6-16b9c08732c2]]
|
||||
EiffelBuild supports the use of constants, permitting you to define a particular value and use it comprehensively throughout your system. If a constant is in use, any changes are reflected immediately in all clients, providing a quick way of globally changing object properties. The Eiffel code generated by EiffelBuild, generates all constants as actual Eiffel constants for use in your system.
|
||||
|
||||
The following constant types are supported by EiffelBuild:
|
||||
* '''String''' - Representing the Eiffel STRING type.
|
||||
* '''Integer''' - Representing the Eiffel INTEGER type.
|
||||
* '''Directory''' - Representing a directory location, of type STRING.
|
||||
* '''Pixmap''' - Representing an EV_PIXMAP, and either absolute, or built from a directory constant.
|
||||
* '''Font''' - Representing a font, of type EV_FONT.
|
||||
* '''Color''' - Representing a color, of type EV_COLOR.
|
||||
|
||||
|
||||
==Constants Dialog==
|
||||
|
||||
Modification to all constant types is performed from the constants dialog, accessible from the [[Main toolbar|main toolbar]] via the [[Image:icon-format-onces-color]] button. The constants dialog has the following appearance:
|
||||
|
||||
[[Image:constants-dialog]]
|
||||
|
||||
The screenshot above, shows the constants dialog displayed for a project containing twelve constants, a few of each available type. Each of the constants in the project are displayed in the multi column list occupying most of the dialog.
|
||||
|
||||
The "Type", "Name" and "Value" fields displayed along the bottom of the dialog are used to permit addition and modification of constants. The "OK" button displayed in the top right hand corner of the dialog closes the dialog when modifications to the constants are complete.
|
||||
===Adding a new constant===
|
||||
|
||||
To add a new constant to your project, select the type of the constant that you wish to add from the "Type" combo box. Depending on the type of constant selected, the remaining fields, and associated buttons will be modified appropriately, and the steps required to add the constant differ:
|
||||
* '''String''' and '''Integer''' - Enter the name in the "Name" field, and value in the "Value" field. The "New" button is only enabled when the name is valid, and a valid entry is set, and clicking it adds the new constant.
|
||||
* '''Directory''' - Enter a name for the directory in the "Name" field, and then select "New" which displays a choose directory dialog. Selecting a directory from this dialog and pressing "OK" adds the new directory constant to the project.
|
||||
* '''Pixmap''' - Select the "New" button, which brings up the Pixmap Constant Dialog enabling you to select a constant. The use of this dialog is described further down this page.
|
||||
* '''Font''' - Enter a name in the "Name" field, and then select "New" which displays a font dialog. Selecting a font from this dialog and pressing "OK" adds the new font constant to the project.
|
||||
* '''Color''' - Enter a name in the "Name" field, and then select "New" which displays a color dialog. Selecting a color from this dialog and pressing "OK" adds the new color constant to the project.
|
||||
|
||||
{{note|After adding a new constant, it is immediately displayed with all constants in the dialog. }}
|
||||
|
||||
|
||||
===Modifying an existing constant===
|
||||
|
||||
To modify a constant that already exists, select the constant in the multi column list, and depending on the type of the constant, perform the following:
|
||||
* '''String''' and '''Integer''' - Modify the value, which in turn, enables the "Modify" button, which must be selected for the value to change. Note that if you change the name, the "New" button is enabled as this will now add a new constant.
|
||||
* '''Directory''' - Select the "Modify" button which displays a directory dialog, permitting selection of the new value.
|
||||
* '''Pixmap''' - Select the "Modify" button which displays the Pixmap Constant Dialog, in a mode which permits you to select the new pixmap you wish to use.
|
||||
* '''Font''' - Select the "Modify" button which displays a font dialog, permitting selection of the new font.
|
||||
* '''Color''' - Select the "Modify" button which displays a color dialog, permitting selection of the new color.
|
||||
|
||||
===Removing constants===
|
||||
|
||||
To remove a constant from the project, select it in the multi column list, and select the "Remove" button, or press the delete key. If the constant is not in use within the system, it will be removed, otherwise the following dialog is displayed:
|
||||
|
||||
[[Image:constant-in-use]]
|
||||
|
||||
As objects are reliant on the constant you are removing, you must confirm that you really wish to remove it from the system. If you select "OK", the constant is removed, and the object property relying on that constant is converted to a manifest value. For example, if you are using an Integer constant with a value of 100, and you remove the constant, the property no longer references the constant, but is set explicitly to 100.
|
||||
|
||||
{{note|You may sort the constants displayed in the dialog, by clicking the associated column header. }}
|
||||
|
||||
==String constant==
|
||||
|
||||
A String constant represents an Eiffel STRING, and may be any valid STRING. For example, in the generated constants file, for a String constant named `modify_button_text`, the following code is generated:
|
||||
<code>
|
||||
modify_button_text: STRING
|
||||
-- `Result' is STRING constant named modify_button_text.
|
||||
once
|
||||
Result := "Modify"
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Integer constant==
|
||||
|
||||
A Integer constant represents an Eiffel INTEGER, and may be any valid INTEGER value. For example, in the generated constants file, for an Integer constant named `medium_padding`, the following code is generated:
|
||||
<code>
|
||||
medium_padding: INTEGER
|
||||
-- `Result' is INTEGER constant named medium_padding.
|
||||
once
|
||||
Result := 8
|
||||
end</code>
|
||||
|
||||
==Directory constant==
|
||||
|
||||
A Directory constant is an Eiffel representation of a directory, as a STRING value. For example, in the generated constants file, for a Directory constant named `pixmap_location`, the following code is generated:
|
||||
<code>
|
||||
pixmap_location: STRING
|
||||
-- `Result' is DIRECTORY constant named pixmap_location.
|
||||
once
|
||||
Result := "C:\pixmaps"
|
||||
end</code>
|
||||
|
||||
|
||||
==Pixmap constant==
|
||||
|
||||
A pixmap constant is a representation of a pixmap image, and two types are available:
|
||||
* '''Absolute''' - The generated code contains a constant of type EV_PIXMAP, built from a single, absolute path, based on the location of the original pixmap on disk as follows:
|
||||
<code>
|
||||
main_pixmap: EV_PIXMAP
|
||||
-- `Result' is PIXMAP constant named main_pixmap.
|
||||
local
|
||||
a_file_name: FILE_NAME
|
||||
once
|
||||
create Result
|
||||
create a_file_name.make_from_string ("C:\pixmaps\main_pixmap.png")
|
||||
-- Now set `Result' based on `a_file_name'.
|
||||
set_with_named_file(Result, a_file_name)
|
||||
end</code>
|
||||
|
||||
* '''Relative''' - The generated code contains a constant of type EV_PIXMAP, built from a file name and a directory constant. This type of pixmap constant is the most frequently used, as it is more flexible. By redefining the value of the directory constant on which it is based, your systems may easily account for the installation location of the pixmap. A relative Pixmap constant is generated as follows:
|
||||
<code>
|
||||
main_pixmap: EV_PIXMAP
|
||||
-- `Result' is PIXMAP constant named main_pixmap.
|
||||
local
|
||||
a_file_name: FILE_NAME
|
||||
once
|
||||
create Result
|
||||
create a_file_name.make_from_string (pixmap_location)
|
||||
a_file_name.set_file_name("main_pixmap.png")
|
||||
-- Now set `Result' based on `a_file_name'.
|
||||
set_with_named_file(Result, a_file_name)
|
||||
end</code>
|
||||
|
||||
Where `pixmap_location` is the name of the Directory constant to which the pixmap is relative.
|
||||
|
||||
|
||||
==Font constant==
|
||||
|
||||
A Font constant represents an EV_FONT. For example, in the generated constants file, for a font constant named `times_new_roman`, the following code is generated:
|
||||
<code>
|
||||
times_new_roman: EV_FONT
|
||||
-- `Result' is EV_FONT constant named `times_new_roman'.
|
||||
once
|
||||
create Result
|
||||
Result.set_family (feature {EV_FONT_CONSTANTS}.Family_roman)
|
||||
Result.set_weight (feature {EV_FONT_CONSTANTS}.Weight_regular)
|
||||
Result.set_shape (feature {EV_FONT_CONSTANTS}.Shape_regular)
|
||||
Result.set_height_in_points (12)
|
||||
Result.preferred_families.extend ("Times New Roman")
|
||||
end</code>
|
||||
|
||||
==Color constant==
|
||||
|
||||
A Color constant represents an EV_COLOR. For example, in the generated constants file, for a color constant named `red`, the following code is generated:
|
||||
<code>
|
||||
red: EV_COLOR
|
||||
-- `Result' is EV_COLOR constant named `red'.
|
||||
once
|
||||
Result := create {EV_COLOR}.make_with_8_bit_rgb (255, 0, 0)
|
||||
end</code>
|
||||
|
||||
===Pixmap constant dialog===
|
||||
|
||||
The Pixmap Constant dialog is used to select pixmaps for addition to an EiffelBuild project, and is displayed from the Constants dialog when necessary. The Pixmap Constant dialog has the following appearance:
|
||||
|
||||
[[Image:pixmap-selection-dialog]]
|
||||
|
||||
An individual pixmap may be selected, or a whole directory of pixmaps may be selected from this dialog for addition. In the screenshot above, a directory containing two pixmaps was selected. The "Build from" option at the bottom of the dialog permits you to select if you wish to add an absolute or relative pixmap, and if multiple pixmaps are being added, the currently selected pixmap from the list above is active. The relative "DIRECTORY" for relative pixmaps is filled in automatically if EiffelBuild finds a directory constant in the system that matches the path chosen. If not, you may enter a name in this field to create a new directory matching the required path. If you do not enter a directory name for one or more relative pixmaps, upon closing the dialog, you will be prompted to enter a name for a directory constant used for these pixmaps.
|
||||
{{note|If you are selecting new pixmaps, and they appear in the dialog as unchecked, it means that an equivalent pixmap already exists in the project. }}
|
||||
|
||||
|
||||
==Loading constants==
|
||||
|
||||
The generation of an EiffelBuild project creates two constants classes, an interface class and an implementation class, named to match the setting from the [[EiffelBuild: Project settings window|project settings]] . For example, if you have specified the name "constants" for the constants, two classes are generated, <eiffel>CONSTANTS</eiffel> and the implementation, <eiffel>CONSTANTS_IMP</eiffel>.
|
||||
|
||||
By default, all constant values are hard coded into the implementation class, but it is possible to set these to be loaded from an external file upon execution of the generated system. To do this, the "Load constants from file" setting of the [[EiffelBuild: Project settings window|project settings]] must be checked, which causes a file "constants.txt" to be generated, containing the definitions of all Integer and String constant values. As the system is executed, the values of these constants are loaded from the file, and by providing different versions of the file, at the time of deployment, multiple languages may be accounted for in your generated system.
|
||||
|
||||
==Using constants==
|
||||
|
||||
Constants may be associated to properties of your [[EiffelBuild Notation|objects]] via an [[Object editor|object editor]] targeted to that [[EiffelBuild Notation|object]] . The [[Image:icon-format-onces-color]] button denotes the use of a constant value. For more information regarding using constants, in [[Object editor|object editors]] , see [[Object editor|object editor]] .
|
||||
|
||||
When an EiffelBuild project is generated, all constants are added to a class, inherited by each window class. There is an "_IMP" and interface versions of these classes as with each window. For more information regarding the generation of constants, see [[EiffelBuild: Code Generation|code generation]] .
|
||||
{{note|To modify pixmap constants based on the current installation of an EiffelBuild generated interface, simply redefine the Directory constant used to access the pixmaps within the interface constants class (not "_IMP"), which is not re-generated if it already exists. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: Code Generation|Code generation]] <br/>
|
||||
[[Object editor|Object editor]] <br/>
|
||||
[[EiffelBuild: Project settings window|Project settings]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
[[Property:title|Display window]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|baed48d9-3a5a-c1a3-be32-dae7cab6071b]]
|
||||
The Display window provides a view of the [[EiffelBuild Notation|objects]] in your system, but unlike the [[Layout constructor|layout constructor]] and [[Builder window|builder window]] , the objects cannot be manipulated.
|
||||
|
||||
This window may either be shown or hidden (default). To change between these two states, click [[Image:icon-display-window-color]] on the [[Main toolbar|main toolbar]] , or select '''Show/Hide display window''' from the '''View''' menu.
|
||||
|
||||
[[Image:display-window]]
|
||||
|
||||
This view is provided so that you can really see what your project will look like when it has been generated and is running as a stand alone [[EiffelVision Introduction|EiffelVision 2]] system.
|
||||
|
||||
All properties that have been set on the [[EiffelBuild Notation|objects]] in your project are set in the [[EiffelVision Introduction|EiffelVision 2]] control matching its type.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Builder window|Builder window]] <br/>
|
||||
[[Layout constructor|Layout constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
[[Property:title|EiffelBuild: Code Generation]]
|
||||
[[Property:weight|15]]
|
||||
[[Property:uuid|536487f0-f681-3812-87cf-3580c51ef8dd]]
|
||||
To generate Eiffel code representing your system, select '''Generate code''' from the '''Project''' menu or click [[Image:icon-code-generation-color]] on the [[Main toolbar|main toolbar]] .
|
||||
The length of time taken to generate your code is dependent on the speed of the system you are running, and the size of your interface, but typically takes a couple of seconds. A progress bar is displayed during the generation of your system.
|
||||
|
||||
The code will be generated according to the options you selected in the [[EiffelBuild: Project settings window|project settings]] .
|
||||
|
||||
==Generated classes==
|
||||
|
||||
The generation of an EiffelBuild project causes the following files to be generated:
|
||||
* A constants class and its respective implementation class. For example, if the constants class is named as "constants" in the [[EiffelBuild: Project settings window|project settings]] , two classes, CONSTANTS and CONSTANTS_IMP are generated.
|
||||
* A class and implementation class for each window, dialog and "top level" widget in the system (each of which is contained in the [[Widget selector|widget selector]] ), named to correspond with the name attribute of the object. For example, for a window in the project named "main_window", the files MAIN_WINDOW and MAIN_WINDOW_IMP are generated.
|
||||
* An optional file named "constants.txt" which contains definitions of all INTEGER and STRING constants. This is only generated if "Load constants from file" is selected in the [[EiffelBuild: Project settings window|project settings]] . The generated code loads the constants from this file, and allows simple modification for localization, i.e. for foreign languages provide a different version of this file with all strings converted.
|
||||
|
||||
For each "top level" widget class in the system (contained in the [[Widget selector|widget selector]] ), the following class hierarchy is generated:
|
||||
|
||||
[[Image:class-project-diagram]]
|
||||
|
||||
If the "generate as client" option is selected for a particular object (changeable from the [[Object editor|object editor]] , only for objects contained in the [[Widget selector|widget selector]] ), a client supplier relationship exists between the generated widget class and the EiffelVision widget, as illustrated below:
|
||||
|
||||
[[Image:class-project-diagram-client]]
|
||||
|
||||
{{note|All other diagrams on this page show only the non client version of the settings, where the generated widget inherits from the EiffelVision class. }}
|
||||
|
||||
==Project build type==
|
||||
|
||||
If [[Build Tab|build type]] is selected as '''Project''' in the [[EiffelBuild: Project settings window|project settings]] , then all the classes listed above in "Generated classes" are generated, along with the following:
|
||||
* A project configuration file called "build_project.ecf".
|
||||
* An application class which launches the root window of the project.
|
||||
|
||||
The generated files comprise a complete project with a configuration file enabling you to compile and execute the generated system as is. The following diagram illustrates the hierarchy of the generated project, showing only the root window of the project:
|
||||
|
||||
[[Image:complete-project-diagram]]
|
||||
|
||||
|
||||
==Modifying code after generation==
|
||||
|
||||
The choice to generate an interface and an implementation class for the windows and constants was to enable modification of the interface using EiffelBuild, once you had hand edited code. The rule is that the implementation classes are re-generated every time, but the interface classes are not. It follows from this that you should not add hand written code to the implementation classes (ending in _IMP), as any changes you make will be lost when re-generation takes place.
|
||||
|
||||
Using this mechanism, you can generate your initial system using EiffelBuild, and implement any event features that have been generated (in the interface) by EiffelBuild. If you then decide that you wish to modify the look and the feel of the interface, you can return to EiffelBuild, make the necessary adjustments and then re-generate the system.
|
||||
|
||||
{{note|When returning to EiffelBuild to modify the interface, if you delete or rename controls, then it is quite possible that you will break your existing code. Care should be taken with all changes of this type. }}
|
||||
|
||||
Looking at a generated system, you will see that the [[Object editor|events]] connected to your controls are defined as deferred in the implementation and actually implemented in the interface class. This means that if you return to EiffelBuild with a previously generated system, and add a new event to a control, then you will have to implement the definition in the interface class yourself (as the class interface class is not re-generated).
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: Project settings window|Project settings]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
[[Property:title|Docking]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|1434e995-4445-cbce-187c-cd7e078197e9]]
|
||||
The docking mechanism permits customization of the EiffelBuild interface through the re-ordering of tools to suit your preferences. You may simply "drag" one of the supported tools to a new location as desired. The [[Type selector|Type Selector]] , [[Component selector|Component Selector]] and [[Widget selector|Widget Selector]] all support docking.
|
||||
|
||||
==Performing a dock==
|
||||
|
||||
To dock one of the three supported tools, press and hold the left mouse button on the title of the tool, and move the mouse so that it points to the new location for the tool. Upon releasing the mouse button, the dock completes, and based on the mouse location, the following may occur:
|
||||
* '''Re-positioning in the main window''' - If the mouse is held over the three part vertical split area displayed to the left hand side of the EiffelBuild window, the position of the tool within this structure may be modified, providing simple re-ordering. A small grayed area indicates the insertion position of the tool, only displayed if the tools position will be changed upon release. The gray area indicating the new insertion point has the following appearance:
|
||||
|
||||
|
||||
[[Image:docking-insert]]
|
||||
|
||||
|
||||
In this case, the tool being docked will be moved to immediately above the component selector. If no feedback is provided regarding the insertion, upon releasing the mouse button to complete the dock, the tool is moved to an external window.
|
||||
* '''Docking externally''' - Completing a dock while not above the left hand area of the main window, or if no insert feedback is provided, causes the tool to be moved from its current location to an external window. A tool that is docked externally has the following appearance:
|
||||
|
||||
|
||||
[[Image:docked-external]]
|
||||
|
||||
|
||||
The tool may now be freely moved to any location on screen, in the same fashion as you would move any standard window. The window in which the tool is contained is always displayed "on top" of the main window. There are two methods of restoring the dialog back to its original location in the main window:
|
||||
** '''Docking back''' - Start a drag from the title of the tool, and point the mouse to the position in which you wish to insert the tool within the main window. If the position is valid, feedback (the gray bar) is displayed, and completing the dock closes the dialog, and re-inserts the tool. If no feedback is provided, the pointed position is not valid, and completing the dock simply moves the window to that position on screen.
|
||||
** '''Closing the window''' - Clicking the cross displayed to the right hand side of the windows title bar causes the window to be destroyed, and the tool contained to be restored back to its original position within the main window.
|
||||
|
||||
|
||||
{{note|The position of tools that have been docked, is maintained automatically between EiffelBuild sessions. When a new project is opened, they are restored to the positions that they had during the last use. }}
|
||||
|
||||
==Main window with externally docked tools==
|
||||
|
||||
The following screenshot illustrates the appearance of the main window with all dockable tools external:
|
||||
|
||||
|
||||
[[Image:main-window-with-docked-tools]]
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: General interface description|General interface description]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
[[Property:title|EiffelBuild: Key shortcuts]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|ac57a648-456c-e423-e141-2f1f0eff95cb]]
|
||||
Many operations in EiffelBuild do not require the use of the mouse. The same effect can be achieved through the keyboard only.
|
||||
|
||||
This page gathers all the keyboard shortcuts available in the environment.
|
||||
|
||||
==Key shortcut reference==
|
||||
{|
|
||||
|-
|
||||
| '''Key shortcut'''
|
||||
| '''action'''
|
||||
|-
|
||||
| ''- file shortcuts -''
|
||||
|-
|
||||
| Ctrl+O
|
||||
| Open project.
|
||||
|-
|
||||
| Ctrl+N
|
||||
| New Project.
|
||||
|-
|
||||
| Ctrl+S
|
||||
| Save project
|
||||
|-
|
||||
| ''- code generation shortcuts -''
|
||||
|-
|
||||
| Ctrl+G
|
||||
| Generate code from project.
|
||||
|-
|
||||
| ''- miscellaneous shortcuts -''
|
||||
|-
|
||||
| Delete
|
||||
| Delete object from currently selected tool.
|
||||
|-
|
||||
| Ctrl+T
|
||||
| Tool always on top.
|
||||
|}
|
||||
|
||||
'''Note''': These shortcuts are not always available and are dependent on the state of EiffelBuild. For example, Ctrl+S does nothing if there is no modified project open.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: General interface description|General interface description]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
[[Property:title|EiffelBuild window overview]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|7a64cd29-c65d-88e9-4eb2-4123825e4a86]]
|
||||
==Window layout==
|
||||
|
||||
The use of EiffelBuild is based around one main window which remains throughout the execution. The appearance of the main window is as follows:
|
||||
|
||||
[[Image:main-window]]
|
||||
|
||||
The window contains several different tools, highlighted below:
|
||||
* The [[Type selector|type selector]] - Situated at the top left of the window, this tool contains all the available EiffelVision 2 types available for interface construction.
|
||||
* The [[Component selector| component selector]] - Situated in the middle left of the window, below the [[Type selector|type selector]] , this tool contains all the user defined components.
|
||||
* The [[Widget selector|widget selector]] - Situated in the bottom left of the window contains all of the EiffelVision 2 windows contained in the open project. Each of these windows are generated by EiffelBuild as separate classes.
|
||||
* The [[Layout constructor| layout constructor]] tool - Situated in the middle of the window, this tool displays a graphical representation of the interface that is currently being built.
|
||||
* The docked [[Object editor|object editor]] - Situated to the right hand side of the window, this object editor automatically targets itself to the selected [[EiffelBuild Notation|object]] in the [[Layout constructor| layout constructor]] .
|
||||
|
||||
The [[Type selector|type selector]] , [[Component selector|component selector]] and [[Widget selector|widget selector]] may all be docked from their original position, permitting re-ordering and customization of the main window. Each of these may be docked external to the main window, permitting each to be displayed in their own movable window. For more information regarding the docking mechanism, see [[Docking|docking]] .
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Main toolbar| Main toolbar]] <br/>
|
||||
[[Layout constructor| Layout constructor]] <br/>
|
||||
[[Type selector|Type selector]] <br/>
|
||||
[[Object editor|Object editor]] <br/>
|
||||
[[Component selector| Component_selector]] <br/>
|
||||
[[Docking| Docking]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelBuild: General interface description]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|e16b365e-469e-e2ab-e955-7f4e81630fe3]]
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
[[Property:title|Main toolbar]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|66eef528-98c1-f238-9e67-694245941aca]]
|
||||
At the top of the EiffelBuild development window, one toolbar is displayed by default, as shown below:
|
||||
[[Image:toolbar]]
|
||||
|
||||
The complete list of the icons in the toolbar is displayed below. <br/>
|
||||
{|
|
||||
|-
|
||||
| Icon
|
||||
| Command
|
||||
|-
|
||||
| [[Image:icon-delete-small-color]]
|
||||
| Delete [[EiffelBuild Notation|object]] / [[EiffelBuild Notation|component]] .
|
||||
|-
|
||||
| [[Image:icon-save-color]]
|
||||
| [[Save a project|Save]] current project.
|
||||
|-
|
||||
| [[Image:icon-object-editor-color]]
|
||||
| New [[Object editor|object editor]]
|
||||
|-
|
||||
| [[Image:icon-undo-color]]
|
||||
| [[History|Undo]] last action.
|
||||
|-
|
||||
| [[Image:icon-cmd-history-color]]
|
||||
| Display full [[History|history]] .
|
||||
|-
|
||||
| [[Image:icon-redo-color]]
|
||||
| [[History|Redo]] last undone action.
|
||||
|-
|
||||
| [[Image:icon-code-generation-color]]
|
||||
| [[EiffelBuild: Code Generation|Generate]] code.
|
||||
|-
|
||||
| [[Image:icon-system-color]]
|
||||
| Display [[EiffelBuild: Project settings window|project settings]] .
|
||||
|-
|
||||
| [[Image:icon-builder-window-color]]
|
||||
| Show/hide [[Builder window|builder window]] .
|
||||
|-
|
||||
| [[Image:icon-display-window-color]]
|
||||
| Show/hide [[Display window|display window]] .
|
||||
|-
|
||||
| [[Image:icon-component-viewer-color]]
|
||||
| Show/hide [[Component viewer|component viewer]] .
|
||||
|-
|
||||
| [[Image:icon-format-onces-color]]
|
||||
| Display [[Constants|Constants]] dialog.
|
||||
|-
|
||||
| [[Image:icon-cut-color]]
|
||||
| Cut selected object to clipboard.
|
||||
|-
|
||||
| [[Image:icon-copy-color]]
|
||||
| Copy selected object to clipboard.
|
||||
|-
|
||||
| [[Image:icon-past-color]]
|
||||
| Paste contents of clipboard.
|
||||
|-
|
||||
| [[Image:icon-clipboard-color]]
|
||||
| View clipboard contents.
|
||||
|}
|
||||
|
||||
|
||||
The screenshot at the top of this page shows all of the buttons enabled. As the state of the currently open project changes, the state of each of these buttons is updated to reflect this. For example, immediately after saving the project, the save button is disabled until the project is modified again.
|
||||
|
||||
{{note|It is not possible to customize the toolbar. }}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
[[Property:title|EiffelBuild Notation]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|82803f2a-4089-a426-29b8-1799b2a9c1a5]]
|
||||
This page contains descriptions of terms found within the EiffelBuild documentation.
|
||||
|
||||
==Object==
|
||||
|
||||
An EiffelBuild object is a representation of a Vision2 component and its properties. When developing with EiffelBuild, you manipulate objects to build the desired interface.
|
||||
|
||||
Each object type has a different set of properties that may be manipulated, and these correspond directly to the properties available within the [[EiffelVision Introduction|EiffelVision 2]] type. There is property which is specific to an EiffelBuild object, '''Name''' which is used for your identification purposes and as the attribute name in the generated code.
|
||||
|
||||
For more information on manipulating objects within EiffelBuild, see:
|
||||
* How to [[Create an object|create an object]]
|
||||
* How to [[Reparent an Object| reparent an object]] .
|
||||
* [[Object editor|Object editor]] for details on modifying object properties.
|
||||
|
||||
Within EiffelBuild, there may be multiple views of a single object displayed simultaneously. Any modifications to an object will immediately update all views. Both the [[Layout constructor| layout constructor]] and the [[Builder window|builder window]] provide views of the objects within your project, and in these, the objects may be manipulated. The [[Display window|display window]] also provides a view of the objects in your system, except the objects cannot be manipulated from this view. It can be thought of as a preview of the project you are developing.
|
||||
<span id="component"></span>
|
||||
==Component==
|
||||
|
||||
EiffelBuild components are templates representing user defined object structures. From a component, you can quickly build a matching structure of objects. Components are available in EiffelBuild so that you do not repeatedly create the same structures over and over again while developing your projects.
|
||||
|
||||
You specify a new component by creating it from an existing object structure. See [[Component selector| component_selector]] for more detailed instructions on the use of components.
|
||||
|
||||
To view an existing component, use the [[Component viewer|component_viewer]] .
|
||||
|
||||
It is not possible to modify a component once created, except to [[Component selector| delete]] it.
|
||||
<span id="pick_and_drop"></span>
|
||||
==Pick and Drop==
|
||||
|
||||
The pick and drop mechanism is one of Eiffel Software 's exclusive technologies and is provided by [[EiffelVision Introduction|EiffelVision 2]] . In EiffelBuild, it allows you to easily send data from a component of the interface to another.
|
||||
|
||||
You can '''Pick''' a reference to a '''development object''', such as an object or component with a single click of the '''right''' mouse button. Then as you start moving the mouse around - not pressing any of its buttons - a pebble tracks the cursor position, and a line continuously connects the pebble to the object's original position.
|
||||
|
||||
You may terminate this situation in either of two ways:
|
||||
* If the pebble you are dragging is the regular cursor, you can right-click again to confirm the pick-and-drop and so effectively send the dragged development object to the targeted component. This is known as '''Dropping'''.
|
||||
Right-clicking when the pebble is the '''no''' cursor, will only stop the pick-and-drop because the component you are hovering with the mouse does not accept your development object.
|
||||
|
||||
* If, for any reason, you change your mind, you can cancel the pick-and-drop by left-clicking anywhere or by pressing the Escape key.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
[[Property:title|EiffelBuild Preferences]]
|
||||
[[Property:weight|14]]
|
||||
[[Property:uuid|6255b3d8-392a-7cae-4c15-90515664a9b6]]
|
||||
The EiffelBuild preferences are used to handle all user defined preferences. For example, each time a dialog is displayed with a "do not show again" option, your chosen setting is recorded in the preferences. Various properties of the EiffelBuild interface are recorded by the preferences, on a user by user basis, permitting you to adapt the behavior of EiffelBuild to suit your needs.
|
||||
|
||||
During use of EiffelBuild, many settings and options that you select, will modify the preferences, ensuring the desired behavior is maintained. To access all of the available EiffelBuild preferences, you may use the Preferences dialog, accessible from the "View", "Preferences", "Preferences..." menu option. The preference dialog has the following appearance:
|
||||
|
||||
[[Image:preferences-dialog]]
|
||||
|
||||
To the left hand side of the dialog is a tree, containing the preferences structure, while on the right, the actual preferences in the selected tree node are displayed. To modify the value of a particular preference, double click on its "Literal Value" which displays a small dialog permitting modification of the value. Dependent on the type of the property, the dialog displayed may change appropriately.
|
||||
|
||||
The button marked "Restore Defaults" in the lower left hand corner of the dialog, may be selected to restore the preferences back to their defaults when EiffelBuild was first launched.
|
||||
|
||||
When you have finished modifying the preferences, select the "Close" button to close the dialog.
|
||||
|
||||
{{note|The preferences are saved automatically by EiffelBuild, even if the open project is not saved, the preferences are saved whenever a property changes. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: General interface description|General interface description]] <br/>
|
||||
[[EiffelBuild Reference|EiffelBuild reference]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
[[Property:title|Build Tab]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|ca866291-46b8-6b7f-2492-37c228d53a8f]]
|
||||
This tab contains information about the type of project you wish to build, and associated information.
|
||||
|
||||
Here is the appearance of the Build tab when 'build type' is selected as 'Project':
|
||||
|
||||
[[Image:project-build]]
|
||||
|
||||
If 'build'_type' is selected as 'Class', then the tab will have the following appearance:
|
||||
|
||||
[[Image:project-build-class]]
|
||||
|
||||
The options available in this tab are as follows:
|
||||
* <span id="build_type"></span> '''Build type'''
|
||||
Select 'Project' if you wish to generate a complete project including an ace file, and an application class, which will launch the GUI you are developing.
|
||||
|
||||
Select `Class` if you wish to generate a single class that represents the GUI you are developing. This option is useful if you wish to incorporate your current project into an existing EiffelVision 2 system.
|
||||
|
||||
* '''Always rebuild ace'''
|
||||
This option causes the ace file to be completely re-generated every time you generate your project. If you do not wish the ace file to be re-generated, then disable this option. This check box is only available if 'build type' is set to 'project'.
|
||||
|
||||
* '''Project name'''
|
||||
This entry will be added to the generated ace file as the SYSTEM attribute. The executable built from compiling this ace file will have this name. This option is only available if you have specified 'build_type' as 'Project'.
|
||||
|
||||
* '''Application class name'''
|
||||
This entry will be the class name for the generated EiffelVision 2 application which will launch your GUI. This option is only available if you have specified 'build_type' as 'Project'.
|
||||
|
||||
* '''Constants class name'''
|
||||
This entry is used as the name of the constants class generated by EiffelBuild to define all [[Constants|constants]] contained in your project. Two classes are actually generated from this name, an implementation and an interface class. For example, if you specify a name "constants", two classes, <eiffel>CONSTANTS_IMP</eiffel> and <eiffel>CONSTANTS</eiffel> (inheriting from <eiffel>CONSTANTS_IMP</eiffel>) are generated, and all other classes generated by EiffelBuild, inherit <eiffel>CONSTANTS</eiffel> for access to these constants.
|
||||
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: Code Generation|Code generation]] <br/>
|
||||
[[EiffelBuild: Project settings window|Project settings window]] <br/>
|
||||
[[Generation Tab|Generation tab]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
[[Property:title|Generation Tab]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|a332d8b6-3156-086b-0c71-a92b1725322d]]
|
||||
This tab contains information about the available code generation options.
|
||||
|
||||
Here is the appearance of the Generation tab with default settings for a Build project:
|
||||
|
||||
[[Image:project-generation]]
|
||||
|
||||
The options available in this tab are as follows:
|
||||
* '''Attribute declarations'''
|
||||
** '''Local''' - All attributes (corresponding to widgets and items generated by EiffelBuild) are declared as local variables.
|
||||
** '''Attributes''' -- All attributes are declared as attributes of the class with the following export status:
|
||||
*** '''Exported''' - All attributes are exported to ANY.
|
||||
*** '''Export only named''' - Only those attributes that have been named are exported to ANY while unnaned attributes are not exported..
|
||||
*** '''Export None''' - None of the attributes are exported.
|
||||
** '''Grouped''' - Should different objects of same type be declared individually, or grouped?<br/>
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
[[Property:title|EiffelBuild: Project settings window]]
|
||||
[[Property:weight|13]]
|
||||
[[Property:uuid|7844e875-28d8-8710-385c-c62d1be6a9e0]]
|
||||
This is where global settings regarding your project are going to be made. In here you can specify:
|
||||
* The type of project you wish to generate
|
||||
* The system name
|
||||
* Class names
|
||||
* Code generation options
|
||||
|
||||
The project window can be raised by clicking [[Image:icon-display-window-color]] on the [[Main toolbar| main toolbar]] , or by selecting '''Settings...''' from the '''Project''' menu.
|
||||
|
||||
The window is organized as two tabs:
|
||||
# [[Build Tab|Build]]
|
||||
# [[Generation Tab|Generation]]
|
||||
|
||||
All options are enabled and saved into the project settings file, 'build_project.bpr' as soon as the window is closed.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[EiffelBuild: Code Generation|Code generation]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
[[Property:title|History]]
|
||||
[[Property:weight|11]]
|
||||
[[Property:uuid|5bc08c08-be0d-bebd-dcfe-ec20b40c1e26]]
|
||||
EiffelBuild has an limitless undo/redo mechanism built in. However, this mechanism only applies to the structure of the [[EiffelBuild Notation|objects]] you are developing in your project.
|
||||
|
||||
For example, every time you [[Create an object|create]] , [[Reparent an Object| reparent]] or [[Delete an object|delete]] an [[EiffelBuild Notation|object]] in your project, this is recorded in the history. If you modify properties of an [[EiffelBuild Notation|object]] (Using an [[Object editor|object editor]] ), these modifications are not recorded in the history.
|
||||
|
||||
==Undo==
|
||||
|
||||
To undo a change, click [[Image:icon-undo-color]] on the [[Main toolbar| main toolbar]] You can repeatedly undo, until you get to the beginning of the history, at which point, this button is disabled.
|
||||
|
||||
==Redo==
|
||||
|
||||
To redo a change (only applicable after one ore more undo's), click [[Image:icon-redo-color]] on the [[Main toolbar| main toolbar]] . You can repeatedly redo, until the history becomes current again, and at which point, this button is disabled.
|
||||
|
||||
==History window==
|
||||
|
||||
[[Image:history-window]]
|
||||
|
||||
The screenshot above shows the appearance of the history window.
|
||||
|
||||
This visibility of the window may be toggled by clicking [[Image:icon-cmd-history-color]] on the [[Main toolbar| main toolbar]] . You may also select '''History''' from the '''View''' menu to show the history window, and click the '''Close''' button to close the window manually.
|
||||
|
||||
Looking at the screenshot above, you will see that the last action in the history list is selected. This is always the case while working, until you start undoing your changes. To go back six steps, so that (in this case), there is just the one BUTTON added to the HORIZONTAL_BOX, you could click the undo button on the [[Main toolbar| main toolbar]] six times, or you can simply select the third item in this list. both have the same effect. You can also redo by selecting an item below the currently selection in the history list (Only possible after an undo).
|
||||
|
||||
If you execute an action which will be added to the history while the history is not at the final position, all history events after this current position will be removed, and the history will be up to date again.
|
||||
|
||||
{{note|If you use the history list to move through many recorded actions at once, there may be a slight delay dependent on the systems complexity and steps moved. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Builder window|Builder window]] <br/>
|
||||
[[Layout constructor| Layout constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelBuild Reference]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|15b53149-5a31-9a1a-e9ad-739174678064]]
|
||||
EiffelBuild is the high-level interface builder by Eiffel Software which allows you to develop graphical user interface (GUI) applications simply and quickly.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
[[Property:title|Layout constructor]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|eb93c9bf-53b3-6718-5c30-d17133633c6f]]
|
||||
The layout constructor provides a view of the [[EiffelBuild Notation|objects]] you have defined in your system, in which the [[EiffelBuild Notation|objects]] may be manipulated. The root node of the tree is the object currently selected within the [[Widget selector|widget selector]] and objects may be added/moved within the displayed widget structure by picking and dropping the objects as required. For example, in the screenshot below, you could add another list to the vertical box, by picking a list from the [[Type selector|type selector]] and dropping it on the vertical box object.
|
||||
|
||||
|
||||
[[Image:layout-constructor]]
|
||||
|
||||
|
||||
Each item in the tree represents one object. The screenshot above represents the following [[EiffelVision Introduction|EiffelVision 2]] interface definition - An EV_TITLED_WINDOW containing one child, of type EV_VERTICAL_BOX. Within the vertical box there is an EV_HORIZONTAL_BOX and an EV_LIST. The list is empty, but the horizontal box contains three different objects of type EV_BUTTON.
|
||||
|
||||
{{note|The widget displayed as the root of the Layout Constructor is the currently selected object in the [[Widget selector|Widget Selector]] . To edit the contents of a different widget, select the widget you wish to manipulate from the [[Widget selector|widget selector]] .}}
|
||||
|
||||
The information displayed, only shows you the structure of the [[EiffelBuild Notation|objects]] , and although it gives you an indication of the final appearance of the interface you are building, you cannot see the details of the interface. i.e. color, sizes, tool tips etc. To view an accurate representation of the widget structure you are building, show the [[Display window|Layout window]] .
|
||||
|
||||
All [[EiffelBuild Notation|objects]] displayed in the Layout Constructure are [[EiffelBuild Notation|pickable]] , so can be easily manipulated, e.g. [[Delete an object|deleted]] or [[Reparent an Object|reparented]] .
|
||||
|
||||
{{note|If the [[EiffelBuild Notation|object]] in the tree has the '''Name''' property set, then the text corresponds to the name, otherwise, the text is the type of the [[EiffelBuild Notation|object]] . }}
|
||||
|
||||
If you have just started a new project, then the layout constructor will only contain one tree item, TITLED_WINDOW.
|
||||
==Selection==
|
||||
|
||||
The currently selected object within the Layout Constructor is automatically targetted to the docked [[Object editor|object editor]] which is situated to the right hand side of the main EiffelBuild Window. This enables you to quickly and easily edit the properties of the selected object. Note that Ctrl-right clicking on an object in the Layout Constructor displays a floating [[Object editor|object editor]] targeted to that object.
|
||||
|
||||
==Expanding/Collapsing==
|
||||
|
||||
To Expand all of the items displayed in the layout constructor, select '''Expand layout tree''' from the '''View''' menu, or select the small cross icon displayed at the top of the tool.
|
||||
|
||||
Similarly, if you wish to collapse all of the items in the layout constructor, select '''Collapse layout tree''' from the '''View''' menu.
|
||||
|
||||
|
||||
==Highlighting an Object==
|
||||
An [[EiffelBuild Notation|object]] contained in a system may be highlighted in the Layout Constructor by [[EiffelBuild Notation|picking]] it, and [[EiffelBuild Notation|dropping]] on the button displayed at the top of the Layout Constructor. Clicking this button with the mouse has no effect. The ability to highlight an object in this fashion proves to be particularly useful when building directly into the [[Builder window|builder window]] , as a particular object may be quickly highlighted in the Layout Constructor, and its properties edited.
|
||||
|
||||
==Locked Objects==
|
||||
|
||||
Objects that are instances of other objects are displayed as locked objects within the Layout Constructor as illustrated below:
|
||||
|
||||
|
||||
[[Image:layout-constructor-locked]]
|
||||
|
||||
|
||||
The object of type OK_CANCEL_BUTTONS is a locked instance of another object as illustrated by the locked icon displayed on top of it's type icon. As a locked object is simply an instance of another object, its internal structure may not be manipulated directly within the Layout Constructor. To change the structure of a locked object, you must directly change the object of which it is an instance.
|
||||
To add a locked object to your interface, simply pick the object that you wish to re-use from the [[Widget selector|widget selector]] and drop it into the desired parent object within the Layout Constructor. In this case, the instance of the OK_CANCEL_BUTTONS object is actually comprised of a number of widgets which may only be modified through manipulation of the original OK_CANCEL_BUTTONS_OBJECT. Changes made to this original object are then applied to all instances within your interface structures.
|
||||
|
||||
You may convert an existing widget structure into a locked instance of a widget by picking the object to be used as the root of the structure (may not be locked) and dropping it into the [[Widget selector|widget selector]] . This creates a new "top level" object within the [[Widget selector|widget selector]] and places a locked instance of this at the original location in the widget structure where it was picked from.
|
||||
|
||||
{{note|Double clicking on a locked object within the Layout Constructor, targets the object of which it is an instance to the Layout Constructor. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Builder window|Builder window]] <br/>
|
||||
[[Object editor|Object editor]] <br/>
|
||||
[[Display window|Layout window]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
[[Property:title|Object editor]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|f00025e2-f39b-d0a2-9b2b-207768771905]]
|
||||
An object editor is a tool which allows you to edit the properties of a selected [[EiffelBuild Notation|object]] . Common properties include minimum width and height, color, text etc.
|
||||
|
||||
An object editor can only reference one [[EiffelBuild Notation|object]] at once, and when not empty, it is considered to be "targeted" to the [[EiffelBuild Notation|object]] whose properties it references.
|
||||
|
||||
[[Image:object-editor]]
|
||||
|
||||
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| layout constructor]] . This means that whenever the selected [[EiffelBuild Notation|object]] changes in the [[Layout constructor| layout constructor]] , the docked object editor becomes targeted to this [[EiffelBuild Notation|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, [[EiffelBuild Notation|drop]] an [[EiffelBuild Notation|object]] on [[Image:icon-object-editor-color]] , displayed in the [[Main toolbar| main toolbar]] and also in each existing object editor. The new object editor will then be targeted to the [[EiffelBuild Notation|object]] that was [[EiffelBuild Notation|dropped]] .
|
||||
|
||||
{{note|If the [[EiffelBuild Notation|object]] targeted to floating object editor is deleted, then the editor will be destroyed. This helps stop the screen becoming cluttered with empty editors. }}
|
||||
|
||||
As a shortcut to a complete [[EiffelBuild Notation|pick and drop]] transport, you may hold down the Ctrl key while starting the [[EiffelBuild Notation|pick]] , which will immediately open a new floating object editor targeted to the [[EiffelBuild Notation|object]] you clicked.
|
||||
|
||||
==General use==
|
||||
|
||||
When an object editor is targeted to an [[EiffelBuild Notation|object]] , you will see that controls are available within the editor to customize that [[EiffelBuild Notation|object]] . Although every different type of [[EiffelBuild Notation|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 <eiffel>EV_BUTTON</eiffel> may not be set to less than 0. To find allowable values for properties of an [[EiffelBuild Notation|object]] , consult the [[EiffelVision Introduction|EiffelVision 2]] documentation.
|
||||
|
||||
All properties that may be manipulated in an object editor correspond directly to a property of the [[EiffelVision Introduction|EiffelVision 2]] control that is represented by the [[EiffelBuild Notation|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 [[EiffelBuild Notation|object]] and as the attribute name in the generated code. For example, when EiffelBuild generates code corresponding to the [[EiffelBuild Notation|object]] targeted in the editor shown above, it would declare the EiffelVision 2 component as - button1: EV_BUTTON
|
||||
|
||||
{{note|You may have as many object editors targeted to the same [[EiffelBuild Notation|object]] as you wish. Whenever a change is made to the [[EiffelBuild Notation|object]] through one of the editors, all other editors targeted to that [[EiffelBuild Notation|object]] are synchronized. }}
|
||||
|
||||
==Using Constants==
|
||||
|
||||
All fields that may use constants have a button marked with the constants symbol [[Image:icon-format-onces-color]] , 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 [[EiffelBuild Notation|objects]] are relatively simple, and can be manipulated with <eiffel>STRING</eiffel> or <eiffel>INTEGER</eiffel> values, there are others that require more complicated control mechanisms. The following [[EiffelBuild Notation|object]] properties have more complicated interfaces warranting further explanation:
|
||||
* [[Merging radio button groups]]
|
||||
* [[Positioning table children]]
|
||||
* [[Positioning fixed children]]
|
||||
|
||||
For all "top level" objects (those contained within the [[Widget selector|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.
|
||||
<span id="events"></span>
|
||||
==Event connection==
|
||||
|
||||
As well as being able to manipulate the standard properties of an [[EiffelBuild Notation|object]] , facilities are provided for connecting to the events of an [[EiffelBuild Notation|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.
|
||||
|
||||
{{note|The button will be marked '''Modify events''' when one or more events are already selected for the current [[EiffelBuild Notation|object]] . }}
|
||||
|
||||
Clicking this button will cause the following dialog to be displayed:
|
||||
|
||||
[[Image:event-selection-dialog]]
|
||||
|
||||
Looking at the screenshot above, you will see that this dialog contains all the action_sequences available for the <eiffel>EV_BUTTON</eiffel> to which the object editor is targeted.
|
||||
|
||||
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 [[EiffelBuild: Code Generation|code is generated]] , this will cause EiffelBuild to generate an empty feature named `button_pressed` already connected to the `select_actions` of the button.
|
||||
|
||||
{{note|You will only be allowed to enter valid and unique Eiffel feature names. If a name is invalid, it will be highlighted in red, and a dialog will warn you when you attempt to close the dialog. }}
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Create an object|Create an object]] <br/>
|
||||
[[Delete an object|Delete an object]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[[Property:title|Merging radio button groups]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|069fa6c5-ed77-9cd3-f565-d41d43c406fe]]
|
||||
If the current [[Object editor|object editor]] contains an <eiffel>EV_CONTAINER</eiffel> [[EiffelBuild Notation|object]] , then the following control will be available:
|
||||
|
||||
[[Image:empty-radio-merge]]
|
||||
|
||||
With this control, you can merge two or more instances of <eiffel>EV_CONTAINER</eiffel> together, so that any <eiffel>EV_RADIO_BUTTON</eiffel> contained are grouped.
|
||||
|
||||
==Merging==
|
||||
|
||||
To create a new merge, [[EiffelBuild Notation|pick]] an [[EiffelBuild Notation|object]] of type <eiffel>EV_CONTAINER</eiffel>, and [[EiffelBuild Notation|drop]] it anywhere on the control. This will merge the radio button group of the <eiffel>EV_CONTAINER</eiffel> referenced in the object editor, to the transported one. Each merge, will show up as a new item in the control.
|
||||
{{note|Container objects may only be grouped once, and as such, you will not be permitted to add an [[EiffelBuild Notation|object]] that is already contained in the list. }}
|
||||
|
||||
|
||||
==Unmerging==
|
||||
|
||||
To unmerge a container [[EiffelBuild Notation|object]] from a group, [[EiffelBuild Notation|pick]] the representation of that [[EiffelBuild Notation|object]] from the list, and [[EiffelBuild Notation|drop]] on [[Image:icon-delete-small-color]] . This will unmerge the [[EiffelBuild Notation|object]] from the current group of containers.
|
||||
|
||||
==Locating group member==
|
||||
|
||||
To locate the [[EiffelBuild Notation|object]] referenced by a list item in the control, left click the item that you wish to locate. This will display the representation of the associated [[EiffelBuild Notation|object]] within the [[Layout constructor|layout constructor]] , and the associated icon will be animated for a short period of time.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
[[Property:title|Positioning fixed children]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|2c465f1b-99d6-7689-67ff-e9b45145a0c0]]
|
||||
If the current [[EiffelBuild Notation|object]] in the object editor is of type <eiffel>EV_FIXED</eiffel>, a button marked "position children..." will be contained in the object editor. Click this button, to display the following window:
|
||||
|
||||
[[Image:fixed-child-positioner]]
|
||||
* '''Moving''' - Press and hold the left mouse button within the selected child, and move the mouse.
|
||||
* '''Resizing''' - Move the mouse over the border of the child, until the cursor changes to a resize cursor, then press and hold the left mouse button to re-size the child.
|
||||
|
||||
{{note|As placing a child in an <eiffel>EV_FIXED</eiffel> does not modify the size of the child, it is possible that some children have a size of 0x0 pixels, and hence do not show up in the diagram. In this case, there will be the following displayed in the status bar "Widget is 0x0 pixels, click HERE to enlarge". If you subsequently click on the status bar, then the widget will be enlarged to a more useful size. }}
|
||||
|
||||
==Grid Properties==
|
||||
|
||||
The grid properties are displayed in the bottom right hand side of the window. You may modify the following attributes:
|
||||
* '''Snap to grid''' - Select this option if you wish all widget coordinates to be snapped to the grid displayed in the window.
|
||||
* '''Visible''' - If selected, then the grid is visible.
|
||||
* '''Grid size''' - The spacing between grid elements in pixels.
|
||||
|
||||
When you have finished manipulating the children of the table, click the button marked "Done" to close the dialog.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[[Property:title|Positioning table children]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|7e302887-c3fd-1f30-866e-545aba53454e]]
|
||||
If the current [[EiffelBuild Notation|object]] in the object editor is of type <eiffel>EV_TABLE</eiffel>, a button marked "position children..." is contained in the object editor. Click this button, to display the following window:
|
||||
|
||||
[[Image:table-child-positioner]]
|
||||
|
||||
Each of the children are displayed on a grid representing the table cells that each occupies (by default 1x1). To manipulate a child of the table, click the left mouse button inside the desired child, and it will be highlighted in red. You may the manipulate the selected child in the following ways:
|
||||
* '''Moving''' - Press and hold the left mouse button within the selected child, and move the mouse.
|
||||
* '''Resizing''' - Move the mouse over the border of the child, until the cursor changes to a resize cursor, then press and hold the left mouse button to re-size the child.
|
||||
|
||||
{{note|Each child, may only occupy a unique set of cells within the table, and if you attempt to move or re-size a child to an invalid position, it will be displayed in gray. }}
|
||||
|
||||
When you have finished manipulating the children of the table, click the button marked "Done" to close the dialog.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[[Property:title|Type selector]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|893343c2-417f-90c5-147e-941bc232fe43]]
|
||||
The type selector contains all the available EiffelVision 2 types supported by EiffelBuild. These are the basic building blocks for your system.
|
||||
|
||||
[[Image:type-selector]]
|
||||
|
||||
The types are organized into three groups - Primitives, Containers and Items. All types that may be used in EiffelBuild have a text in uppercase, corresponding to their type in [[EiffelVision Introduction|EiffelVision 2]] . For example, looking at the screenshot above, the <eiffel>BUTTON</eiffel> item represents an <eiffel>EV_BUTTON</eiffel>, and the <eiffel>COMBO_BOX</eiffel> item represents <eiffel>EV_COMBO_BOX</eiffel>.
|
||||
|
||||
{{note|The types available in the type selector are fixed, and cannot be modified. Almost all [[EiffelVision Introduction|EiffelVision 2]] components are available. }}
|
||||
|
||||
==Creating a new object==
|
||||
[[EiffelBuild Notation|Objects]] are the building blocks used in EiffelBuild to construct your interface. To create a new [[EiffelBuild Notation|object]] for use in your system, [[EiffelBuild Notation|pick]] the type corresponding to the type of object you wish to create,and [[EiffelBuild Notation|drop]] onto an [[EiffelBuild Notation|object]] representation. If an object is full, or does not allow other objects of the new type to be contained, then you will not be able to [[EiffelBuild Notation|drop]] on it. <br/>
|
||||
|
||||
For example, if you have just started a new project, [[EiffelBuild Notation|pick]] HORIZONTAL_BOX from the type selector, and drop it on the <eiffel>EV_TITLED_WINDOW</eiffel> [[EiffelBuild Notation|object]] displayed in the [[Layout constructor| layout constructor]] . This will build you a new [[EiffelBuild Notation|object]] of type <eiffel>EV_HORIZONTAL_BOX</eiffel>, parented in the window. If you then [[EiffelBuild Notation|pick]] a BUTTON from the type selector, you will not be able to [[EiffelBuild Notation|drop]] it on the <eiffel>EV_TITLED_WINDOW</eiffel>, as a window may only contain one child and is therefore currently full. You may however, [[EiffelBuild Notation|drop]] on the <eiffel>EV_HORIZONTAL_BOX</eiffel> object you had just created, as the box is empty, and has space for multiple children. Doing so, will create a new [[EiffelBuild Notation|object]] of type <eiffel>EV_BUTTON</eiffel>, parented in the box.
|
||||
|
||||
This shows how simple it is to Build new [[EiffelBuild Notation|objects]] in EiffelBuild, you just need access to the parent [[EiffelBuild Notation|object]] to [[EiffelBuild Notation|drop]] the selected type into.
|
||||
|
||||
You may drop an object directly from the Type Selector into the [[Widget selector|widget selector]] which creates the object as a "top level object" ensuring that upon generation, it is represented by an individual set of classes. These top level objects may then be re-used within your interface as desired.
|
||||
|
||||
{{note|To understand the types accepted, and the capacity of objects, you should consult the [[EiffelVision Introduction|EiffelVision 2]] library reference. }}
|
||||
|
||||
==Changing the type of an existing object==
|
||||
|
||||
Why would you want to change the type of an existing [[EiffelBuild Notation|object]] , when you could just delete it and create a new [[EiffelBuild Notation|object]] ?
|
||||
|
||||
Imagine you have spent some time constructing a complicated interface. You have an EV_VERTICAL_BOX with children many levels deep. You realize that you wanted the <eiffel>EV_VERTICAL_BOX</eiffel> to be of type <eiffel>EV_HORIZONTAL_BOX</eiffel>. If you delete the object, all children contained will also be deleted, which in this case, is not what you want. Changing the type of the object does actually delete the object internally, but will automatically re-parent all of its children into the new object.
|
||||
|
||||
To perform a type change, [[EiffelBuild Notation|pick]] the [[EiffelBuild Notation|object]] that you wish to change, and [[EiffelBuild Notation|drop]] it on an item in the type selector representing the desired new type. All existing children of the old [[EiffelBuild Notation|object]] will be automatically re-parented in the new object.
|
||||
|
||||
The following rules govern if the type of an existing object may be changed to a new type:
|
||||
* The parent of the existing [[EiffelBuild Notation|object]] must accept children of type corresponding to the new type.
|
||||
* The new type must be able to accept all of the existing [[EiffelBuild Notation|objects]] children.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Layout constructor|Layout constructor]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
[[Property:title|Widget selector]]
|
||||
[[Property:weight|9]]
|
||||
[[Property:uuid|0626dd3a-28f2-ade6-8e6a-f992c2198fd6]]
|
||||
The Widget Selector allows you to manage windows, dialogs and "top level" objects within the EiffelBuild project, with all windows accessible through this tool. Using the widget selector, you may add new windows to your project; delete windows; assign a root window (launched from the generated application); and group windows into directories. All objects contained in the Widget Selector are generated as individual classes at generation time. The Widget Selector has the following appearance:
|
||||
|
||||
[[Image:window-selector]]
|
||||
|
||||
==Adding Objects==
|
||||
|
||||
To add an Object to your project, [[EiffelBuild Notation|pick]] the object type from the [[Type selector|type selector]] , and [[EiffelBuild Notation|drop]] into the Widget Selector. There are two possible drop targets within the widget selector:
|
||||
* '''The Widget Selector itself''' - The newly created object is added to the root directory of the project.
|
||||
* '''A Directory node''' - The newly created object is added to the directory that was the target of the drop.
|
||||
Both of these outcomes create a new object in your project that is to be generated as an individual class during code generation.
|
||||
{{note|The selected object in the Widget Selector is automatically targeted as the root window of the [[Layout constructor|layout constructor]] , permitting building. You may not build directly into the representation of an object within the Widget Selector, as this must be performed within the [[Layout constructor|layout constructor]] or [[Builder window|builder window]] . }}
|
||||
|
||||
|
||||
==Root Window==
|
||||
|
||||
The root window of a project is launched by the application class of the generated EiffelBuild project when executed. By assigning a window as a root, you ensure that it will be displayed on screen as the "root" window of the generated system when the system is launched.
|
||||
|
||||
The root window of the project is highlighted with a star, indicating that it is the root. Looking at the screenshot at the top of this page, the window named "main_window" is currently flagged as the root window of the project. To set a window as the root window of the project, select the window in the Widget Selector, and press the [[Image:icon-titled-window-main-small-color]] button displayed at the top of the Widget Selector.
|
||||
==Directories==
|
||||
|
||||
The ability to add directories to your project permit organization of objects into sub groups as necessitated by your design. To add a directory to the project, select the [[Image:icon-new-cluster-small-color]] button displayed at the top of the Widget Selector, which displays the following dialog, prompting for the name of the directory to add:
|
||||
|
||||
[[Image:new-directory-dialog]]
|
||||
|
||||
Enter a unique name that is not already in use, and select "OK" to add the directory to your project. The newly added directory is then visible, as a node in the Widget Selector.
|
||||
|
||||
{{note|Creating a new directory in the Widget Selector causes the actual directory on the disk to be created immediately. }}
|
||||
|
||||
You may insert objects into a directory, or move an object between directories by [[EiffelBuild Notation|picking]] the object from its representation in the Widget Selector, and [[EiffelBuild Notation|dropping]] on the desired directory. Each object contained in the Widget Selector is generated as a seperate class and the parent directory is used as the generated location on disk.
|
||||
{{note|If you move an object between directories within an EiffelBuild project that has already generated the Eiffel code for that object, the code files are moved immediately on the disk. }}
|
||||
|
||||
Directories may be nested as deeply as required, and the following buttons are available to help with directory nesting:
|
||||
* [[Image:directory-search-small]] Selecting this button recursively adds all directories from the current project location to the project.
|
||||
* [[Image:icon-show-hide-directory-color]] Selecting this button causes all directories included within the project that do not contain one or more objects to be hidden/shown within the Widget Selector.
|
||||
Note that any directories that do not contain objects or have object nested within their structure recursively are displayed grayed out to indicate that there are no objects within.
|
||||
==Expanding==
|
||||
|
||||
The [[Image:icon-expand-all-small-color]] button displayed at the top of the Widget Selector expands all nodes contained.
|
||||
|
||||
==Client Representations==
|
||||
|
||||
All objects within the Widget Selector that are used as clients within other object structures have client information displayed as subnodes of their representation, as illustrated in the following screenshot:
|
||||
|
||||
[[Image:widget-selector-clients]]
|
||||
|
||||
The OK_CANCEL_BUTTONS object is used is used in two different places within the project: once within INPUT_DIALOG and once within MAIN_WINDOW. If you select the tree node representing the instance of OK_CANCEL_BUTTONS within MAIN_WINDOW, the MAIN_WINDOW is targetted to the [[Type selector|type selector]] with the instance of the OK_CANCEL_BUTTONS object selected.
|
||||
|
||||
To use an instance of a widget contained within the Widget Selector as a client, simply pick the representation of the object and drop into the desired parent object within the [[Type selector|type selector]]
|
||||
|
||||
{{seealso| [[Layout constructor|Layout constructor]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
[[Property:title|EiffelBuild Version History]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|8cc0540e-8ee7-c005-0534-a2ed62f41c96]]
|
||||
|
||||
== 7.3 Release ==
|
||||
* Fixed a crash which could occur when generating a project.
|
||||
* Fixed a crash when saving a project if it contained a pixmap with no path specified.
|
||||
|
||||
==6.8 Release==
|
||||
* Fixed bug#13069 and bug#17427 for the incorrect generated code of the '''change_actions''' on an EV_SPIN_BUTTON.
|
||||
* Fixed the icon view mode display for widgets where content was shown incorrectly in previous releases.
|
||||
* Fixed code generation of widgets when generated as clients.
|
||||
|
||||
==6.7 Release==
|
||||
Updated the generated code to the latest Eiffel syntax as specified by ECMA.
|
||||
|
||||
==6.5 Release==
|
||||
* Fixed bug#15947 to make the generated code compile in void-safe mode.
|
||||
* Fixed bug#13296 when retrieving a project using an EV_SPIN_BUTTON element.
|
||||
* Fixed bug#12880 by improving speed of key navigation which was slowed down by attempting to refresh the object editor each time a new widget was highlighted. Now it is only done when the highlight doesn't change for a while.
|
||||
|
||||
==6.0 Release==
|
||||
* Code generation includes the facility of closing the application when last window is closed.
|
||||
* The EiffelBuild binary has been renamed into '''esbuilder'''.
|
||||
* Fixed crash when generating code which included a combo box in read-only mode.
|
||||
* Fixed bug#12920 where pressing a digit while dropping was not adding x-time the selected widgets (where x is the digit pressed).
|
||||
* Fixed bug#12210 where pixmaps set on a menu would be incorrectly displayed in the generated executable (The last added one will always be shown for all menu entries with a pixmap).
|
||||
* Fixed bug#11878 where EiffelBuild would crash when saving a project just after removing an event.
|
||||
* Fixed bug#11738 where EiffelBuild would crash when picking and dropping a top level widget into the Generate button.
|
||||
|
||||
==5.7 Release==
|
||||
* Fixed positioning bug when moving items within their current parent by dropping on another item in that parent with the shift key held down.
|
||||
* Fixed bug where modifying the "User can resize" property of a window while the tools were always shown on top stopped the tools from being shown on top.
|
||||
* Added support for multi-line tooltips.
|
||||
* Added support for `is_item_expanded` from EV_SPLIT_AREA.
|
||||
* Added the ability to specify a directory for generation, into which location all files are to be generated.
|
||||
* Event selection dialogs now contain the name of the object to which they refer in their title for cases where multiple dialogs are open simultaneously
|
||||
* The project settings dialog is now completely navigatable via the keyboard on Windows platforms.
|
||||
* Added support for Ctrl+Z and Ctrl+Y to navigate through the history.
|
||||
* The font selection dialog now shows the currently selected font when displayed.
|
||||
* Deleting an object that is contained within an object editor now clears the contents of the object editor.
|
||||
* Preferences window now has the focus when displayed so it is fully navigatable via the keyboard.
|
||||
* Code generation improved to allow the modifying of constants and subsequent update of the interface, permitting multiple languages to be supported.
|
||||
|
||||
==5.6 Release==
|
||||
* Added support for the generation of any widget as a class. You now may place widgets within the "Widget Selector" to enable this. The "Widget Selector" is simply the old "Widget Selector" renamed.
|
||||
* Added clipboard functionality, permitting the copying/pasting of objects.
|
||||
* Added support for new constant types: Font and Color.
|
||||
|
||||
==5.5 Release==
|
||||
* Added support for EV_RICH_TEXT which has been added to EiffelVision2.
|
||||
* Notebook item texts may now be set to string constants.
|
||||
* Better support for corrupt installations with warning dialogs now displayed.
|
||||
* Fixed bug with generated code for notebooks often hiding the first item when they were actually displayed.
|
||||
|
||||
==5.4 Release==
|
||||
* Added support for multiple windows, including dialogs.
|
||||
* Added support for constants of type Integer, String, Directory and Pixmap.
|
||||
* New tool, "Widget Selector" added to handle organization of windows, including the ability to define subdirectories in a project, and group windows accordingly.
|
||||
* Tip of the day dialog added.
|
||||
* Recent projects are now available from the "File" menu.
|
||||
* The contents of EiffelBuild projects may now be imported.
|
||||
* The ability to reset the minimum dimensions of widgets have been added. In the previous version, it was not possible to complete undo the effects of setting a widgets minimum size.
|
||||
* Preferences added, which allow you to customize the default behavior of EiffelBuild. For example, dialogs may be displayed or hidden as desired.
|
||||
* The layout of EiffelBuild and its tools is now maintained between sessions.
|
||||
* Docking added, permitting the re-ordering of particular tools within the interface, including making them "float" externally.
|
||||
* Smarter code generation options, permitting only named attributes to be exported.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelBuild]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|2af28db0-bc8f-daa6-daf2-18b08a11b606]]
|
||||
EiffelBuild is the high-level interface builder by Eiffel Software which allows you to develop graphical user interface (GUI) applications simply and quickly.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
[[Property:uuid|D1DDF411-5387-4A81-9A85-3EF8A2A4220D]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:title|How to build a concurrent graphical application: EiffelVision with SCOOP]]
|
||||
==How can I build a concurrent graphical application in Eiffel?==
|
||||
|
||||
Eiffel has a great library for producing graphical applications: EiffelVision. Eiffel also has a powerful concurrency mechanism: SCOOP.
|
||||
|
||||
How do you make the two work together? This note gives you simple guidelines to ensure that the EiffelVision-SCOOP marriage is a harmonious and productive one.
|
||||
|
||||
The first question: why does the problem even exist? Let's go back to the pre-SCOOP days. Any graphical application has an "event loop", which keeps watching for graphical user events, such as a mouse click, and triggering the corresponding application responses, such as saving a file (if the user clicked ''OK'' on a ''File Save'' dialog). If you were using multithreading, the event loop would run in the main thread, also called the GUI (Graphical User Interface) thread.
|
||||
|
||||
Enter SCOOP. The old technique cannot work because a processor stuck in a loop cannot process any logged call! If you perform calls on a graphical widget, say the ''OK'' button, they will be logged right away, but they can only execute once the processor has exited its event loop. Not what you want.
|
||||
|
||||
So here is what you should do:
|
||||
|
||||
In a creation procedure used to initialize GUI objects, create an <eiffel>EV_APPLICATION</eiffel> object, using an instruction such as
|
||||
create my_app
|
||||
with <eiffel>my_app</eiffel> of type <eiffel>EV_APPLICATION</eiffel>. (This may be a root creation procedure or a creation procedure of a separate object in case the root processor is going to be used for other operations.)
|
||||
|
||||
Then in the same creation procedure create all the GUI elements. They will all be in the same processor that created the <eiffel>EV_APPLICATION</eiffel> object.
|
||||
|
||||
After that start the application, using
|
||||
my_app.launch
|
||||
In the pre-SCOOP world, launch would start the event loop. Here it only creates a separate object (of type <eiffel>EV_APPLICATION_HANDLER</eiffel>), which will run the event loop, forwarding events to the <eiffel>EV_APPLICATION</eiffel> object.
|
||||
|
||||
This is all the creation procedure should do. Make sure it terminates with the preceding step. Otherwise, the event loop will never run!
|
||||
|
||||
Now you can start using EiffelVision as you are used to, by sending GUI requests to the <eiffel>EV_APPLICATION</eiffel> object:
|
||||
|
||||
* For requests coming from the same processor just use the <eiffel>EV_APPLICATION</eiffel> object directly.
|
||||
* For requests coming from another processor, you can get the access through the feature <eiffel>ev_separate_application</eiffel> of class <eiffel>EV_SHARED_APPLICATION</eiffel>.
|
||||
|
||||
Note that only one <eiffel>EV_APPLICATION</eiffel> object can be used, therefore all GUI objects have to be created in the region of this object.
|
||||
|
||||
That's all! Happy concurrent Eiffeling.
|
||||
@@ -0,0 +1,86 @@
|
||||
[[Property:title|Converting EiffelVision 2 Systems to Void-Safety]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|96e01318-700b-da6e-42d1-14fee219daf5]]
|
||||
==Introduction==
|
||||
|
||||
In order to convert systems that employ EiffelVision 2 (Vision2) to [[Void-safe Programming in Eiffel|void-safety]], some adjustments may be needed depending on its usage. This page describes the various usage scenarios of Vision2 that will need to be converted in order to adhere to void-safety.
|
||||
<!--break-->
|
||||
==Inheritance Purely from an Interface Class==
|
||||
|
||||
If you have classes that inherit from a Vision2 interface class such as EV_DRAWING_AREA, the first change that has to be made is to alter <eiffel>`initialize'</eiffel> so that any types that are attached (i.e. types that remain non-void throughout the lifetime of its container [parent object]) are instantiated via <eiffel>`create_interface_objects'</eiffel>. This feature needs to be redefined if the type from Vision2 is instantiable. If not, then it may need to be made effective (such as when the class inherits directly from EV_ANY). It is important that any attached types in the interface class are instantiated in <eiffel>`create_interface_objects'</eiffel> and these objects are initialized via <eiffel>`initialize'</eiffel>. Attached types should not be instantiated in <eiffel>`initialize'</eiffel> due to the Bridge Pattern implementation, and initialization of these types in <eiffel>`create_interface_objects'</eiffel> MUST be performed in <eiffel>`initialize'</eiffel>, otherwise unexpected behavior may occur as the Bridge Pattern has not been fully set up at this point in time.
|
||||
|
||||
Example from EV_TIMEOUT
|
||||
<code>
|
||||
create_interface_objects
|
||||
-- <Precursor>
|
||||
do
|
||||
create actions
|
||||
end
|
||||
|
||||
create_implementation
|
||||
-- Create implementation of timeout.
|
||||
do
|
||||
create {EV_TIMEOUT_IMP} implementation.make
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Inheritance from an Implementation Interface Class with Associating Interface Class==
|
||||
|
||||
If you have an existing, custom platform-dependent implementation, a few more changes will be needed above and beyond those required for the interface class.
|
||||
|
||||
For interface class changes, now the interface object is passed to the implementation after creation, via <eiffel>`assign_interface'</eiffel>. This means that <eiffel>`make'</eiffel> no longer takes an argument (see <eiffel>`create_implementation'</eiffel> above). This also means that to adhere to void-safety all of the types are now created and initialized via the creation routine of the implementation object.
|
||||
|
||||
An example from the conversion of the Windows implementation of EV_BUTTON_IMP:
|
||||
|
||||
<code>
|
||||
make (an_interface: like interface)
|
||||
-- Create `Current' with interface `an_interface'.
|
||||
do
|
||||
base_make (an_interface)
|
||||
wel_make (default_parent, "", 0, 0, 0, 0, 0)
|
||||
extra_width := 20
|
||||
text_alignment := default_alignment
|
||||
-- Retrieve the theme for the button.
|
||||
open_theme := application_imp.theme_drawer.open_theme_data (wel_item, "Button")
|
||||
end
|
||||
|
||||
initialize
|
||||
-- Initialize `Current'.
|
||||
do
|
||||
Precursor {EV_PRIMITIVE_IMP}
|
||||
set_default_font
|
||||
end
|
||||
|
||||
interface: EV_BUTTON;
|
||||
</code>
|
||||
|
||||
would become:
|
||||
|
||||
<code>
|
||||
make
|
||||
-- Initialize `Current'.
|
||||
do
|
||||
wel_make (default_parent, "", 0, 0, 0, 0, 0)
|
||||
extra_width := 20
|
||||
text_alignment := default_alignment
|
||||
-- Retrieve the theme for the button.
|
||||
open_theme := application_imp.theme_drawer.open_theme_data (wel_item, "Button")
|
||||
Precursor {EV_PRIMITIVE_IMP}
|
||||
set_default_font
|
||||
end
|
||||
|
||||
interface: detachable EV_BUTTON note option: stable attribute end;
|
||||
</code>
|
||||
|
||||
The following steps are needed during the conversion:
|
||||
|
||||
* The attribute <eiffel>`interface'</eiffel> needs to be made a stable attribute. The converted <eiffel>`interface'</eiffel> attribute shows the syntax for doing so.
|
||||
|
||||
* Copy any initialization of the widget from <eiffel>`make'</eiffel> to <eiffel>`initialize'</eiffel> excluding <eiffel>`base_make'</eiffel> setup. Any initialization code that relies on <eiffel>`interface'</eiffel> would have to be rewritten so that <eiffel>`interface'</eiffel> gets passed to the new creation routine, which in turn calls the original <eiffel>`make'</eiffel>. See <eiffel>EV_PRINT_PROJECTOR_IMP</eiffel> on Windows <eiffel>`make_with_context'</eiffel> for an example of this.
|
||||
|
||||
* Remove <eiffel>`make'</eiffel>, rename <eiffel>`initialize'</eiffel> to <eiffel>`make'</eiffel>, and make sure that any calls to Precursor do not override any settings set in <eiffel>`initialize'</eiffel>. The ordering may need to be changed in order to make the code void-safe. See <eiffel>EV_POPUP_WINDOW_IMP.make</eiffel> (Windows implementation) where the setting of <eiffel>`user_can_resize'</eiffel> is performed after the Precursor call so that is doesn't get overriden.
|
||||
|
||||
|
||||
{{SeeAlso|[[Void-Safe Programming in Eiffel]]}}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|EiffelVision 2 Class Reference]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|bb50444f-5fd1-9136-a224-0ce37d3bd856]]
|
||||
==View the [[ref:libraries/vision2/reference/index|EiffelVision 2 Class Reference]] ==
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[[Property:title|Accelerator Sample]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|e3a8eac2-94c6-287a-314b-b4d056f9c1ad]]
|
||||
[[Image:accelerator|accelerator]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\vision2\accelerator\''.
|
||||
* Choose ''accelerator.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
|
||||
==Running==
|
||||
After launching the application, you will see a window displayed with a similar appearance to the one above. When the window has the focus, the key combination Ctrl + Q will exit the application.
|
||||
==Under the Hood==
|
||||
An EV_ACCELERATOR is created and associated with the EV_TITLED_WINDOW used for the main window of the application. The association is made by adding the accelerator to the accelerators list of the window.
|
||||
This sample contains the following class:
|
||||
* ACCELERATOR
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[ref:libraries/vision2/reference/ev_accelerator_chart|EV_ACCELERATOR]] <br/>
|
||||
[[ref:libraries/vision2/reference/ev_key_chart|EV_KEY]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
[[Property:title|Cursor Sample]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|8a00cb23-d093-1b2f-9caf-213e570f96a9]]
|
||||
[[Image:cursor-test|cursor_test]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\vision2\cursor\''.
|
||||
* Choose ''cursor.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the application, you will see a window displayed with a similar appearance to the one above. Selecting "File", "Close" or pressing the close icon at any time will exit the application.
|
||||
|
||||
To the right hand side of the window you will see an EV_MULTI_COLUMN_LIST containing rows, each with an associated EV_PIXMAP. If you select one of the rows of the list, then press the button marked "Apply", the cursor displayed when over the label displayed to the right hand side of the window will be pixmap of the currently selected list row.
|
||||
==Under the Hood==
|
||||
|
||||
The pixmaps used in the EV_MULTI_COLUMN_LIST were standard pixmaps provided with EiffelVision 2, accessible through EV_STOCK_PIXMAPS. set_pixmap was used to set the EV_PIXMAP of the EV_MULTI_COLUMN_LIST_ROW. An agent was added to the select_actions of the EV_BUTTON which calls set_pointer_style on the desired widget.
|
||||
|
||||
This sample contains the following class:
|
||||
* CURSOR_TEST
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
[[Property:title|Gauges Sample]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|91aa8c8b-7cc9-06c1-a6f0-96844ff078d5]]
|
||||
[[Image:gauges|gauges]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\vision2\gauges\''.
|
||||
* Choose ''gauges.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the application, you will see a window displayed with a similar appearance to the one above. The spin buttons at the top of the window control the current minimum, maximum and value of the three gauges displayed below. Modifying the values of the spin buttons will alter the three gauges in real time. Also, if you interact with one of the three gauges, any change in one, will be reflected in the others and in the spin buttons.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
The change_actions of each EV_GAUGE are used to synchronize all of the gauges.
|
||||
|
||||
This sample contains the following class:
|
||||
* GAUGES
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
EV_GAUGE <br/>
|
||||
EV_SCROLL_BAR <br/>
|
||||
EV_RANGE <br/>
|
||||
EV_PROGRESS_BAR <br/>
|
||||
EV_SPIN_BUTTON }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[[Property:title|EiffelVision 2 Samples]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|79c05bf8-367e-001d-0c13-f668e34fa5b0]]
|
||||
EiffelVision 2 ships with a number of samples provided to demonstrate different aspects of the library. If you are a new EiffelVision 2 user then it is suggested that you first compile and run the
|
||||
|
||||
* [[Widgets Sample|Widgets]] sample. Demonstrates both the appearance and behavior of the available widgets.
|
||||
|
||||
Then explore other samples:
|
||||
* [[Accelerator Sample|Accelerator]] - Demonstrates the use of an [[ref:libraries/vision2/reference/ev_accelerator_chart|EV_ACCELERATOR]] .
|
||||
* [[Cursor Sample|Cursor]] - Demonstrates how to modify the displayed [[ref:libraries/vision2/reference/ev_cursor_chart|EV_CURSOR]] for an [[ref:libraries/vision2/reference/ev_widget_chart|EV_WIDGET]] .
|
||||
* [[Gauges Sample|Gauges]] - Demonstrates different types of [[ref:libraries/vision2/reference/ev_gauge_chart|EV_GAUGE]] .
|
||||
* [[Standard_dialogs Sample|Standard_dialogs]] - Demonstrates different types of [[ref:libraries/vision2/reference/ev_standard_dialog_chart|EV_STANDARD_DIALOG]] .
|
||||
* [[Viewport Sample|Viewport]] - Demonstrates [[ref:libraries/vision2/reference/ev_viewport_chart|EV_VIEWPORT]] .
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
[[Property:title|Standard_dialogs Sample]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|31d0608e-0136-b3db-0745-9e8697dcc60d]]
|
||||
[[Image:standard-dialogs|Standard_dialogs]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\vision2\standard_dialogs\''.
|
||||
* Choose ''standard_dialogs.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the application, you will see a window displayed with a similar appearance to the one above. If you select an item from the "Standard Dialog" menu, a dialog of that type will be displayed. Selecting "Exit" from the "File" menu will exit the application.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
This sample contains the following class:
|
||||
* STANDARD_DIALOGS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
[[Property:modification_date|Wed, 12 Sep 2018 00:07:36 GMT]]
|
||||
[[Property:publication_date|Wed, 12 Sep 2018 00:07:36 GMT]]
|
||||
[[Property:title|Viewport Sample]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|e8722685-0343-c411-83b1-32f0c4e0175b]]
|
||||
[[Image:viewport|viewport]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\vision2\viewport\''.
|
||||
* Choose ''viewport.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the application, you will see a window displayed with a similar appearance to the one above. Modifying the values of the spin buttons will alter the position of the pixmapped button, relative to the viewport in which it is contained.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
The features set_x_offset and set_y_offset are used to modify the position of the EV_VIEWPORT relative to the EV_BUTTON contained within.
|
||||
|
||||
This sample contains the following class:
|
||||
* VIEWPORT
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[ref:libraries/vision2/ev_viewport_chart.html|EV_VIEWPORT]] <br/>
|
||||
[[ref:libraries/vision2/ev_spin_button_chart.html|EV_SPIN_BUTTON]] <br/>
|
||||
[[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
[[Property:title|Widgets Sample]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|04aa62bd-ef9c-152c-5c69-4fe7e750649f]]
|
||||
[[Image:widgets|widgets]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\vision2\widgets\''.
|
||||
* Choose ''widgets.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the application, you will see a window displayed with a similar appearance to the one above. You may exit the application at any time, by clicking on the close icon, or you may select "exit" from the "File" menu. Selected "Help", "about" displays a dialog with details about the application.
|
||||
|
||||
The left hand side of the main window contains a tree, showing the widgets available within EiffelVision 2. If you select one of these widgets in the tree, then the type of widget you selected will be displayed in the middle of the main_window. Controls will also the be available to the right hand side of the widget, which allow you to modify its state. These controls do not represent all the available feature of the widget, but demonstrate many of the most common. The text area below the currently selected widget displays the events that have occurred on the widget. Only those events inherited by EV_WIDGET are displayed.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
This sample contains the following classes:
|
||||
* ABOUT_DIALOG
|
||||
* COLORIZABLE_CONTROL
|
||||
* CONTAINER_CONTROL
|
||||
* DESELECTABLE_CONTROL
|
||||
* DRAWABLE_CONTROL
|
||||
* GAUGE_CONTROL
|
||||
* ITEM_LIST_CONTROL
|
||||
* MAIN_WINDOW
|
||||
* PIXMAPABLE_CONTROL
|
||||
* SELECTABLE_CONTROL
|
||||
* SENSITIVE_CONTROL
|
||||
* TEXT_COMPONENT_CONTROL
|
||||
* TEXTABLE_CONTROL
|
||||
* WIDGET_CONTROL
|
||||
* WIDGETS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
[[Property:title|EiffelVision Introduction]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|f964651a-e36d-4e9e-00ea-37803a26373a]]
|
||||
The EiffelVision 2 library offers an object-oriented cross-platform framework for graphical user interface (GUI) development. Using EiffelVision 2, developers can access all necessary GUI components, called [[Widgets|widgets]] (buttons, windows, list views, etc.) as well as truly graphical elements such as points, lines, arcs, polygons and the like—to develop a modern, functional and professional graphical interactive application.
|
||||
|
||||
EiffelVision 2 has played a major role at Eiffel Software and provided numerous Eiffel projects with a powerful, portable graphics development platform. EiffelStudio is totally reliant on EiffelVision 2 for its graphical elements and overall interaction with the user.
|
||||
|
||||
|
||||
==Scope==
|
||||
|
||||
The EiffelVision 2 library addresses all the major needs of developers of systems supporting modern graphical interfaces. EiffelVision 2 runs on Microsoft Windows and all major variations of Unix (including Linux). All versions are fully source-compatible: with only a recompile, applications will run on every supported platform with the native look-and-feel.
|
||||
|
||||
EiffelVision 2 provides an effective way of building advanced graphical applications using user interface standards and toolkits (such as Microsoft Windows and GTK) without having to learn the details of the toolkits. Instead, you can use EiffelVision 2 to work entirely in terms of high level abstractions representing windows, buttons, labels, graphical figures, menus, etc., and apply clearly understandable operations to the corresponding objects.
|
||||
|
||||
|
||||
==Architecture==
|
||||
|
||||
EiffelVision 2 relies on a two-tiered architecture illustrated by the following figure.
|
||||
|
||||
|
||||
[[Image:vision2--figure1]]
|
||||
|
||||
|
||||
The two tiers play complementary roles:
|
||||
* At the top level, EiffelVision 2 provides a fully portable graphics library.
|
||||
* At the lower level, platform-specific libraries cover the graphical mechanisms of graphics platforms such as Windows and GTK.
|
||||
|
||||
The lower tier serves for the implementation of the upper tier, but can also be used independently. For example [[WEL]] has had resounding success with Windows developers who need an advanced mechanism for building Windows-specific graphical applications, taking advantage of every facility of the Windows API (Application Programming Interface) and of the Eiffel approach, but do not need portability on the client side. The GEL library is a '''wrapper''' library, automatically generated from the entire GTK API by a tool named '''The Gote Converter'''.
|
||||
|
||||
|
||||
==Features==
|
||||
|
||||
As stated before, the library has undergone some drastic changes since the previous release. Names have been changed to improve consistency. Contracts have been added wherever possible. The following is a summary of the other re-engineered aspects of the library:
|
||||
* Taking full advantage of the '''agent''' mechanism of Eiffel, [[uuid:fc32d1b5-72d6-2955-18fd-bce988ed8323|events]] are now triggered through '''action sequences''' (lists of actions) that will be executed in order. This system does not require separate classes to be written for each event, however the command pattern can still be used if desired.
|
||||
* The [[EiffelVision Pick and Drop|Pick-and-Drop]] mechanism now relies on the Eiffel type system. A '''pebble''' (some transportable object) is now any Eiffel class and can always be dropped on a widget that accepts the type (or a more general type) of that pebble.
|
||||
* [[Containers|containers]] ( [[Widgets|widgets]] that contain other [[Widgets|widgets]] ) are now derived from [[EiffelBase]] classes. For example you can now insert [[Widgets|widgets]] in any position and iterate over them.
|
||||
|
||||
|
||||
==Design==
|
||||
|
||||
EiffelVision 2 provides programmers with high-level classes that provide all mechanisms and data structures needed to build advanced user interfaces for deployment on almost all platforms without having to worry about detailed requirements of of those platforms (toolkits).
|
||||
|
||||
The abstract design has been derived from an analysis of user interfaces. Therefore we have classes with names like MENU, WINDOW, BUTTON, LINE or POLYGON. The features of these classes are simple, clearly defined properties or commands, like the feature `minimize` (a command) on WINDOW or `text` (a property of type STRING) on BUTTON.
|
||||
|
||||
{{note| All class names in EiffelVision 2 are pre-pended with EV_ to avoid name clashes with existing classes. Thus, <eiffel>BUTTON</eiffel> becomes <eiffel>EV_BUTTON</eiffel>, etc. }}
|
||||
|
||||
|
||||
==Properties==
|
||||
|
||||
When talking about a property of a class, like `text`, in fact we are talking about multiple features. One is a query of the state of the property, in this case simply the query `text`. The other is the set-routine, which is by convention named `set_text` taking exactly one argument of the type of the property. A property can be read-only, which means that it cannot be set by clients of the class.
|
||||
<code>
|
||||
text: STRING
|
||||
|
||||
set_text (a_text: STRING)
|
||||
...
|
||||
do
|
||||
...
|
||||
end
|
||||
</code>
|
||||
|
||||
Boolean properties have a different convention. Instead of one set-routine, it has one enable-routine and one disable-routine. The first one sets the property to true, and the second to false. This has been done this way because sometimes these enable/disable features have trivial equivalents, for example for feature `enable_visible` a clearer name is `show`.
|
||||
<code>
|
||||
is_sensitive: BOOLEAN
|
||||
|
||||
enable_sensitive
|
||||
...
|
||||
do
|
||||
...
|
||||
end
|
||||
|
||||
|
||||
disable_sensitive
|
||||
...
|
||||
do
|
||||
...
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==Implementation==
|
||||
|
||||
For flexibility, EiffelVision 2 is built using the bridge pattern. This means that every platform-dependent component of the library consist of two classes, plus an implementation class for each platform (currently two). One is the <eiffel>interface</eiffel>. All the features of interfaces do nothing except delegate the call to the implementation object which is coupled to it. This object has the static type of the implementation-interface with the name of the interface class, with an "<eiffel>_I</eiffel>" suffix. The implementation classes (with an "<eiffel>_IMP</eiffel>" suffix) then inherit from this implementation-interface class to implement platform-specific features. At run time, these platform-specific implementation objects (instantiated from the "<eiffel>_IMP</eiffel>" classes) are then polymorphically attached to the to the "<eiffel>_I</eiffel>"-typed attributes (typically named "implementation") to provide the platform-specific services.
|
||||
|
||||
{{SeeAlso| The book titled ''Design Patterns: Elements of Reusable Object-Oriented Software'' by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, contains a complete description of the Bridge Pattern.}}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
[[Property:title|Events]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|fc32d1b5-72d6-2955-18fd-bce988ed8323]]
|
||||
An event is considered to be an external action that occurs during a program's execution. Correctly dealing with events is vital part of developing an EiffelVision 2 application. For example, if a user clicks on a button, you will want to respond to this event by calling a routine that deals with the request. EiffelVision 2 contains action sequences for all kinds of widget events. To view the kind of events available to every widget, click [[ref:libraries/vision2/reference/ev_widget_action_sequences_chart|here]]. The Events cluster contains classes for event handling within EiffelVision 2.
|
||||
|
||||
|
||||
==How Do I Connect to an Event?==
|
||||
|
||||
Every widget and item has an action sequence associated with it that relates to some kind of event. For example an [[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]] has a <code>select_actions</code> action sequence. This gets fired when the user selects (clicks) the button. To have a procedure called on this event, you need to create an agent based on this procedure, and then add this to the action sequence (via extend). For a more detailed description of agents and their uses click [[ET: Agents|here]] .
|
||||
|
||||
An example of adding an agent to an action_sequence:
|
||||
<code>
|
||||
my_button.select_actions.extend (agent print ("Button Clicked!%N"))
|
||||
</code>
|
||||
|
||||
All EiffelVision 2 action sequences inherit from [[ref:libraries/vision2/reference/ev_action_sequence_chart|EV_ACTION_SEQUENCE]] and when it is called, all of the agents held within are fired, thus calling all of the procedures represented by the agents. The signature of any agent that you place in an action sequence must conform to those of the action sequence's actual generic parameter(s).
|
||||
|
||||
When you want an agent to be called from a certain action sequence and the signatures do not match, you may use [[ref:libraries/vision2/reference/ev_action_sequence_chart|force_extend]] . This will call your agent but there are no guarantees as to the arguments passed to your procedure.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
[[Property:title|Figures]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|c12fee6e-5e99-ae59-8ac5-f57abb4c1878]]
|
||||
{{ReviewRequested}}
|
||||
|
||||
|
||||
The EiffelVision 2 figure cluster provides a high-level way of drawing on an [[ref:libraries/vision2/reference/ev_drawable_chart|EV_DRAWABLE]] descendant. It offers a number of advantages:
|
||||
* The model (tree of figures) is separated from the graphical representation by using projectors that take a "world" (an entire set of figures) and project it onto any device, not just a drawing area.
|
||||
* Instead of drawing with static APIs like <code>draw_line</code>, you can use real figure objects, which internally remember their location, rotation and scaling; later on you can perform limitless transformations on them, either individually or as part of an entire branch in the tree of figures: move, rotation, scaling, change of color...
|
||||
* For projection devices that support the mouse, pointer events propagate to the affected figures.
|
||||
|
||||
|
||||
==Figure Classes==
|
||||
|
||||
Every basic figure class inherits from [[ref:libraries/vision2/reference/ev_atomic_figure_chart|EV_ATOMIC_FIGURE]]. An atomic figure has the property of having its own graphical representation. [[ref:libraries/vision2/reference/ev_figure_group_chart|EV_FIGURE_GROUP]] on the other hand is a collection of figures. Finally, [[ref:libraries/vision2/reference/ev_figure_chart|EV_FIGURE]] is the common ancestor to those two. Since [[ref:libraries/vision2/reference/ev_figure_group_chart|EV_FIGURE_GROUP]] is a collection of EV_FIGUREs, it can contain both atomic figures and subgroups, thus forming a tree of figures.
|
||||
|
||||
Any "branch" of that tree that wishes to be drawn (i.e. rendered to a device or file) (especially the top-level root) must be a figure group of type [[ref:libraries/vision2/reference/ev_figure_world_chart|EV_FIGURE_WORLD]]. It inherits from [[ref:libraries/vision2/reference/ev_figure_group_chart|EV_FIGURE_GROUP]], and adds some features for grid and background color, required for drawing.
|
||||
|
||||
===Figures===
|
||||
|
||||
{| border="1"
|
||||
|-
|
||||
| class
|
||||
| open/closed
|
||||
| points
|
||||
| description
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_arc_chart|EV_FIGURE_ARC]]
|
||||
| open
|
||||
| 2
|
||||
| a segment of an open ellipse
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_dot_chart|EV_FIGURE_DOT]]
|
||||
| open
|
||||
| 1
|
||||
| a single point
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_ellipse_chart|EV_FIGURE_ELLIPSE]]
|
||||
| closed
|
||||
| 2
|
||||
| an ellipse inside imaginary rectangle
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_equilateral_chart|EV_FIGURE_EQUILATERAL]]
|
||||
| closed
|
||||
| 2
|
||||
| a figure with any number of sides of the same length
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_line_chart|EV_FIGURE_LINE]]
|
||||
| open
|
||||
| 2
|
||||
| a straight line between two points
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_picture_chart|EV_FIGURE_PICTURE]]
|
||||
| open
|
||||
| 1
|
||||
| an image positioned by its top-left point
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_pie_slice_chart|EV_FIGURE_PIE_SLICE]]
|
||||
| closed
|
||||
| 2
|
||||
| a part of a closed ellipse
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_polygon_chart|EV_FIGURE_POLYGON]]
|
||||
| closed
|
||||
| *
|
||||
| a figure defined by any number of points
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_polyline_chart|EV_FIGURE_POLYLINE]]
|
||||
| open
|
||||
| *
|
||||
| a figure consisting of any number of connecting lines
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_rectangle_chart|EV_FIGURE_RECTANGLE]]
|
||||
| closed
|
||||
| 2
|
||||
| a figure with four sides
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_star_chart|EV_FIGURE_STAR]]
|
||||
| open
|
||||
| 2
|
||||
| any number of lines emerging from a center point
|
||||
|-
|
||||
| [[ref:libraries/vision2/reference/ev_figure_text_chart|EV_FIGURE_TEXT]]
|
||||
| open
|
||||
| 1
|
||||
| a string positioned by its top-left point displayed in the specified font
|
||||
|}
|
||||
|
||||
|
||||
A closed figure is a figure that has some area enclosed when drawn that can optionally be filled with a color. Closed figures inherit [[ref:libraries/vision2/reference/ev_closed_figure_chart|EV_CLOSED_FIGURE]] which gives them the property <code>fill_color</code>. Open figures inherit [[ref:libraries/vision2/reference/ev_atomic_figure_chart|EV_ATOMIC_FIGURE]] directly, as does [[ref:libraries/vision2/reference/ev_closed_figure_chart|EV_CLOSED_FIGURE]].
|
||||
|
||||
===Points===
|
||||
|
||||
Central in the design of the figures are points. Figures are defined from their points. For example, an ellipse is not a center point with two radii, but is instead the largest fitting ellipse inside an imaginary rectangle, so of two points.
|
||||
|
||||
As you can see in the table above, each figure has a certain number of points. These values can be 1, 2 or * (any number). For each value there is a class the figure inherits from. These are:
|
||||
* 1 (figure has one point): [[ref:libraries/vision2/reference/ev_single_pointed_figure_chart|EV_SINGLE_POINTED_FIGURE]].
|
||||
* 2 (figure has two points): [[ref:libraries/vision2/reference/ev_double_pointed_figure_chart|EV_DOUBLE_POINTED_FIGURE]].
|
||||
* * (figure has zero or more points): [[ref:libraries/vision2/reference/ev_multi_pointed_figure_chart|EV_MULTI_POINTED_FIGURE]].
|
||||
|
||||
These classes offer features to handle the given number of points. [[ref:libraries/vision2/reference/ev_single_pointed_figure_chart|EV_SINGLE_POINTED_FIGURE]] offers the feature:
|
||||
|
||||
<code>
|
||||
point: EV_RELATIVE_POINT
|
||||
</code>
|
||||
|
||||
[[ref:libraries/vision2/reference/ev_double_pointed_figure_chart|EV_DOUBLE_POINTED_FIGURE]] inherits [[ref:libraries/vision2/reference/ev_single_pointed_figure_chart|EV_SINGLE_POINTED_FIGURE]] for its first point, which is renamed to <eiffel>point_a</eiffel>. It adds <eiffel>point_b</eiffel>, so it has the features:
|
||||
|
||||
<code>
|
||||
point_a: EV_RELATIVE_POINT
|
||||
point_b: EV_RELATIVE_POINT
|
||||
</code>
|
||||
|
||||
[[ref:libraries/vision2/reference/ev_multi_pointed_figure_chart|EV_MULTI_POINTED_FIGURE]] internally holds an array of points:
|
||||
|
||||
<code>
|
||||
i_th_point (i: INTEGER): EV_RELATIVE_POINT
|
||||
</code>
|
||||
|
||||
===Relative Point===
|
||||
|
||||
The points that the figures use are of type [[ref:libraries/vision2/reference/ev_relative_point_chart|EV_RELATIVE_POINT]]. Each point is relative to the location of the parent figure group (<code>point</code>), which is relative to the location of its parent figure group, and so on up to the top-level (world) figure group. Thus, each figure is defined by a set of relative points and a reference point (<code>origin</code>). If the reference point is not attached (as may be the case for immediate children of the top-level group, when it has no point object), the subordinate relative points are relative to point (0,0). The absolute coordinates are calculated only when needed by adding the absolute coordinates of the reference point to the relative coordinates.
|
||||
|
||||
{{note|Even the top-level (world) figure group can be "moved" by calling its <code>set_point</code> feature, passing a new relative point. However, if this is done, then THAT relative point is relative to point (0,0). If you do this, do so before <code>extend</code>-ing it with figures and sub-groups so that they receive the point in question as their reference point.}}
|
||||
|
||||
|
||||
==Figure Worlds==
|
||||
|
||||
In order to put the figures you want to display in a context, you insert them (or the figure groups that contain them) into a top-level a "figure world" object: an instance of [[ref:libraries/vision2/reference/ev_figure_world_chart|EV_FIGURE_WORLD]]. This is a descendant of [[ref:libraries/vision2/reference/ev_figure_group_chart|EV_FIGURE_GROUP]] and hence works in the same way. This figure world is later associated with one or more projectors. [[ref:libraries/vision2/reference/ev_figure_world_chart|EV_FIGURE_WORLD]], as previously mentioned, adds a number of features to [[ref:libraries/vision2/reference/ev_figure_group_chart|EV_FIGURE_GROUP]]. These extra features are needed for graphical representation by a projector. One is the background color. This feature is used to erase the canvas for a graphical projector in the specified color. The other features are to manage the grid.
|
||||
|
||||
|
||||
==Projectors==
|
||||
|
||||
A projector is an object that knows what a figure world should look like. The figure world itself is only a hint of its representation. For example, if a line is "20" long, this might mean 20 pixels, miles, centimeters or whatever. It is up to the projector to interpret units. Also, color might be interpreted as gray scale. Typically, a projector will do the best possible job projecting the "world" of figures onto its device.
|
||||
|
||||
With EiffelVision come these projectors:
|
||||
* [[ref:libraries/vision2/reference/ev_postscript_projector_chart|EV_POSTSCRIPT_PROJECTOR]]
|
||||
* [[ref:libraries/vision2/reference/ev_drawing_area_projector_chart|EV_DRAWING_AREA_PROJECTOR]]
|
||||
* [[ref:libraries/vision2/reference/ev_pixmap_projector_chart|EV_PIXMAP_PROJECTOR]]
|
||||
The first one maps figure worlds to a postscript file. The other two are descendants of [[ref:libraries/vision2/reference/ev_widget_projector_chart|EV_WIDGET_PROJECTOR]], and can project on widgets that inherit from [[ref:libraries/vision2/reference/ev_drawable_chart|EV_DRAWABLE]], two of which are [[ref:libraries/vision2/reference/ev_drawing_area_chart|EV_DRAWING_AREA]] and [[ref:libraries/vision2/reference/ev_pixmap_chart|EV_PIXMAP]], eventually using double-buffering, which normally results in a smoother animation but requires fast copying from memory to the video buffer (and thus can be slow if the display is remote).
|
||||
|
||||
|
||||
==Events==
|
||||
|
||||
The other features of drawing area and widget is that they generate pointer events. These events are translated by projectors to the map of the figure world. These projectors send the event to the appropriate figure. Every figure is set up to receive all the common pointer events, including Pick-and-Drop events:
|
||||
* <eiffel>pointer_motion_actions</eiffel>
|
||||
* <eiffel>pointer_button_press_actions</eiffel>
|
||||
* <eiffel>pointer_double_press_actions</eiffel>
|
||||
* <eiffel>pointer_button_release_actions</eiffel>
|
||||
* <eiffel>pointer_enter_actions</eiffel>
|
||||
* <eiffel>pointer_leave_actions</eiffel>
|
||||
* <eiffel>pick_actions</eiffel>
|
||||
* <eiffel>conforming_pick_actions</eiffel>
|
||||
* <eiffel>drop_actions</eiffel>
|
||||
There are no events for keyboard focus and no key press events. If you need to use these events, use them from pixmap or drawing area.
|
||||
|
||||
When using events, keep the z-order in mind. This is the order in which the figures are stacked in the "figure world". The first item of a figure group is the figure that is the farthest away. Any figure can be obscured by (visible) figures in front of it. Events are only received by a figure when the (mouse) pointer is over its exposed areas, i.e. areas not obscured by (visible) figures in front of it. If a figure is fully obscured by visible figures in front of it, then it will receive no pointer events.
|
||||
|
||||
|
||||
==Rotation and Scaling==
|
||||
|
||||
Relative Points, which supply the location, scale and orientation for EV_FIGURE_... objects, also support rotation and scaling. Both rotation and scaling can be entered at any point in the tree of relative points. One of the most useful of these points is the <code>point</code> of an [[ref:libraries/vision2/reference/ev_figure_group_chart|EV_FIGURE_GROUP]], which rotation and/or scaling will then propagate down the tree to all the contained figures and sub-groups, by way of something like <eiffel>my_figure_group.point.set_angle (...)</eiffel>. Rotation is in radians progressing counter-clockwise from the positive X axis. Scaling is multiplied into the chain of relative points. This means that when a relative point which is the root of a tree of several points is moved, the entire tree is moved. When it is scaled the entire tree is scaled, and the same for rotation.
|
||||
|
||||
The scaling factor has two components: horizontal (x) and vertical (y), which can be set separately or together. If the x/y scaling factor is 0.5, everything at that point and below in the tree is displayed at half its normal size.
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
[[Property:title|EiffelVision Library Reference Manual]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|b343b38b-c8b2-4247-072d-ecc1bc3e387a]]
|
||||
EiffelVision 2 is a platform-independent Graphical User Interface (GUI) library that allows easy, simultaneous development of Windowed applications for both Windows- & Unix-based platforms. Heavily relying on the EiffelBase library, EiffelVision 2 has been designed primarily with ease of use in mind. By reusing EiffelBase structures, existing, as well as new Eiffel users will find EiffelVision to be surprising intuitive and easy to use. In very little time, users will be producing professional Windowed application skeletons which will run on a multitude of platforms with no change of source code.
|
||||
|
||||
The EiffelVision 2 library includes the following interface clusters:
|
||||
|
||||
* The [[Kernel| kernel]] cluster includes classes that are key to an EiffelVision 2 application. The most important class in this cluster is [[ref:libraries/vision2/reference/ev_application_chart| EV_APPLICATION]] which is the main entry point for all EiffelVision 2 applications.
|
||||
|
||||
* The [[Widgets| widgets]] cluster contains classes used to create EiffelVision 2 widgets. Widgets are the visible objects that the user sees and interacts with in the application. Examples of widgets are windows, buttons and labels.
|
||||
|
||||
* The [[Items| items]] cluster includes the classes needed to create items. Items are widgets that can only be contained within a certain type of widget. Example: [[ref:libraries/vision2/reference/ev_list_chart| EV_LIST]] widgets may only contain objects of type [[ref:libraries/vision2/reference/ev_list_item_chart|EV_LIST_ITEM]] . Items provide an abstract way of dealing with an item-widget's internal data structures and provide, in many cases, the same functionality that a widget does.
|
||||
|
||||
* The [[Events| events]] cluster contains classes that allow for user-initiated events, such as the clicking of a button to be dealt with via the use of a linked list of agents ([[ref:libraries/vision2/reference/ev_action_sequence_chart|EV_ACTION_SEQUENCE]]). An Agent can be thought of as an object that encapsulates a certain procedure. When a user clicks a button on the screen, the corresponding [[ref:libraries/vision2/reference/ev_button_chart| EV_BUTTON]] object has its <eiffel>pointer_button_press_actions</eiffel> fired, and this, in turn, fires all of the agents held within this list, thus calling all of the procedures represented by the agents. Every widget and item has a number of [[ref:libraries/base/reference/action_sequence_chart|ACTION_SEQUENCE]] objects, each of which are linked to a certain type of event. To link any number of different procedure calls with an event, it is only necessary to <eiffel>extend</eiffel> the action-sequence list associated with that event, with agents representing those calls.
|
||||
|
||||
* The [[Properties| properties]] cluster contains classes that allow for the customization of Vision 2 widgets and items. Classes such as [[ref:libraries/vision2/reference/ev_colorizable_chart|EV_COLORIZABLE]] and [[ref:libraries/vision2/reference/ev_fontable_chart|EV_FONTABLE]] contain routines that allow for (respectively) color and font to be altered for a widget.
|
||||
|
||||
* The [[Support| support]] cluster includes classes that provide more professional touches to an application, whether these are keyboard shortcuts ([[ref:libraries/vision2/reference/ev_accelerator_list_chart|EV_ACCELERATOR_LIST]]) or graphical output ([[ref:libraries/vision2/reference/ev_graphical_format_chart|EV_GRAPHICAL_FORMAT]]) for drawable widgets such as [[ref:libraries/vision2/reference/ev_pixmap_chart|EV_PIXMAP]] .
|
||||
|
||||
* The [[Figures| figures]] cluster allows for the projection of two-dimensional shapes (figures) onto an [[ref:libraries/vision2/reference/ev_drawable_chart|EV_DRAWABLE]] or printer via the use of an [[ref:libraries/vision2/reference/ev_projector_chart|EV_PROJECTOR]] .
|
||||
|
||||
To see differences between released versions of EiffelVision, click [[Revisions and Bug Fixes|Here]]
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[[Property:title|Items]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|3143511c-28bd-cc5c-c710-700796778982]]
|
||||
An EiffelVision 2 "item" is an object that is used to display information inside certain primitives. For example, [[ref:libraries/vision2/reference/ev_list_chart|EV_LIST]] may hold items of type [[ref:libraries/vision2/reference/ev_list_item_chart|EV_LIST_ITEM]]. All EiffelVision 2 items are descendants of [[ref:libraries/vision2/reference/ev_item_chart|EV_ITEM]], which in turn is a descendant of [[ref:libraries/vision2/reference/ev_pixmapable_chart|EV_PIXMAPABLE]], which means that an item can display a [[ref:libraries/vision2/reference/ev_pixmap_chart|EV_PIXMAP]] object.
|
||||
|
||||
|
||||
==Item Holders==
|
||||
|
||||
Below is a structure showing some of the EiffelVision 2 item-containing components and the items that they accept:
|
||||
* [[ref:libraries/vision2/reference/ev_list_chart|EV_LIST]] accepts items of type:
|
||||
** [[ref:libraries/vision2/reference/ev_list_item_chart|EV_LIST_ITEM]]
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_combo_box_chart|EV_COMBO_BOX]] accepts items of type:
|
||||
** [[ref:libraries/vision2/reference/ev_list_item_chart|EV_LIST_ITEM]]
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_window_chart|EV_WINDOW]] accepts items of type (use <code>set_menu_bar</code>):
|
||||
** [[ref:libraries/vision2/reference/ev_menu_bar_chart|EV_MENU_BAR]] accepts items of type:
|
||||
*** [[ref:libraries/vision2/reference/ev_menu_chart|EV_MENU]] accepts items of type:
|
||||
**** [[ref:libraries/vision2/reference/ev_menu_chart|EV_MENU]]
|
||||
**** [[ref:libraries/vision2/reference/ev_menu_item_chart|EV_MENU_ITEM]]
|
||||
**** [[ref:libraries/vision2/reference/ev_menu_separator_chart|EV_MENU_SEPARATOR]]
|
||||
**** [[ref:libraries/vision2/reference/ev_radio_menu_item_chart|EV_RADIO_MENU_ITEM]]
|
||||
**** [[ref:libraries/vision2/reference/ev_check_menu_item_chart|EV_CHECK_MENU_ITEM]]
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_multi_column_list_chart|EV_MULTI_COLUMN_LIST]] accepts items of type:
|
||||
** [[ref:libraries/vision2/reference/ev_multi_column_list_row_chart|EV_MULTI_COLUMN_LIST_ROW]]
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_tool_bar_chart|EV_TOOL_BAR]] accepts items of type:
|
||||
** [[ref:libraries/vision2/reference/ev_tool_bar_button_chart|EV_TOOL_BAR_BUTTON]]
|
||||
** [[ref:libraries/vision2/reference/ev_tool_bar_radio_button_chart|EV_TOOL_BAR_RADIO_BUTTON]]
|
||||
** [[ref:libraries/vision2/reference/ev_tool_bar_separator_chart|EV_TOOL_BAR_SEPARATOR]]
|
||||
** [[ref:libraries/vision2/reference/ev_tool_bar_toggle_button_chart|EV_TOOL_BAR_TOGGLE_BUTTON]]
|
||||
|
||||
* EV_TREE accepts items of type:
|
||||
** [[ref:libraries/vision2/reference/ev_dynamic_tree_item_chart|EV_DYNAMIC_TREE_ITEM]] accepts items of type:
|
||||
*** [[ref:libraries/vision2/reference/ev_dynamic_tree_item_chart|EV_DYNAMIC_TREE_ITEM]]
|
||||
*** [[ref:libraries/vision2/reference/ev_tree_item_chart|EV_TREE_ITEM]]
|
||||
** [[ref:libraries/vision2/reference/ev_tree_item_chart|EV_TREE_ITEM]] accepts items of type:
|
||||
*** [[ref:libraries/vision2/reference/ev_dynamic_tree_item_chart|EV_DYNAMIC_TREE_ITEM]]
|
||||
*** [[ref:libraries/vision2/reference/ev_tree_item_chart|EV_TREE_ITEM]]
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
[[Property:title|Kernel]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|d830dc77-cd77-1f52-0e39-e0ec1cffa028]]
|
||||
The kernel cluster contains classes that provide functionality common to most Windowed application. These classes are considered the core of any EiffelVision 2 application. The most important of these classes is [[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]]. This class is used to initialize the graphical toolkit and event loop of your EiffelVision 2 application. Kernel also includes classes such as [[ref:libraries/vision2/reference/ev_timeout_chart| EV_TIMEOUT]] that calls procedures (via agents) at specified intervals, and [[ref:libraries/vision2/reference/ev_color_chart| EV_COLOR]] which is used for coloring widgets and items. To start programming with EiffelVision 2, you first have to correctly initialize [[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]].
|
||||
|
||||
|
||||
==Launching Your Application with EV_APPLICATION — The Heart of All EiffelVision 2 Systems==
|
||||
|
||||
[[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]] is the basis for every EiffelVision 2 application and is considered the most important class in the library. It is responsible for initializing the underlying toolkit that is driving the windowing system on the platform that you compile your system on. It is also where the main event loop that drives your application is executed.
|
||||
|
||||
{{note|It is an '''error''' to attempt to create any EiffelVision 2 components before the application object has been created (see the Flat Contracts view of [[ref:libraries/vision2/reference/ev_environment_chart|EV_ENVIRONMENT]]). }}
|
||||
|
||||
You may inherit [[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]] or use it as a client in order to create your EiffelVision 2 application. A simple method of using EV_APPLICATION is as follows:
|
||||
|
||||
# Create an instance of EV_APPLICATION.
|
||||
# Create one or more windows for your application.
|
||||
# Launch the application.
|
||||
|
||||
An example of an EiffelVision 2 application using inheritance from [[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]] is shown below.
|
||||
|
||||
<code>
|
||||
class
|
||||
HELLOWORLD_APP
|
||||
|
||||
inherit
|
||||
EV_APPLICATION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature
|
||||
|
||||
make
|
||||
-- Create the application.
|
||||
local
|
||||
helloworld_window: EV_TITLED_WINDOW
|
||||
do
|
||||
default_create
|
||||
create helloworld_window
|
||||
helloworld_window.set_title ("Helloworld!")
|
||||
helloworld_window.close_request_actions.extend (agent destroy)
|
||||
helloworld_window.show
|
||||
launch
|
||||
end
|
||||
|
||||
end
|
||||
</code>
|
||||
|
||||
The following EiffelVision 2 application functions identically, but instead of inheriting from [[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]], it is used in a client/supplier relationship.
|
||||
|
||||
<code>
|
||||
class
|
||||
HELLOWORLD_APP
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature
|
||||
|
||||
make
|
||||
-- Create the EiffelVision 2 application with a helloworld window.
|
||||
local
|
||||
app: EV_APPLICATION
|
||||
helloworld_window: EV_TITLED_WINDOW
|
||||
do
|
||||
create app
|
||||
create helloworld_window
|
||||
helloworld_window.set_title ("Helloworld!")
|
||||
helloworld_window.close_request_actions.extend (agent app.destroy)
|
||||
helloworld_window.show
|
||||
app.launch
|
||||
end
|
||||
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
==What Does Launch Actually Do?==
|
||||
|
||||
In EiffelVision 2, to launch an application means to pass control to the underlying graphical toolkit. Simply creating an application does not launch it. An explicit call to <eiffel>launch</eiffel> is required for the event processing to begin.
|
||||
|
||||
{{note|An EiffelVision 2 system is event based. This means that the way you control the execution within an EiffelVision 2 system is by responding appropriately to [[Events|events]] as they occur. Therefore, if you call launch on an [[ref:libraries/vision2/reference/ev_application_chart|EV_APPLICATION]], the processing for the application will continue indefinitely unless you have provided a way to exit the application. It is essential to initialize your components correctly, so your application can be exited (i.e. call <eiffel>destroy</eiffel> on the application object). }}
|
||||
|
||||
|
||||
==Building Your Application Skeleton==
|
||||
|
||||
Now that you have a basic application skeleton set up, you can now:
|
||||
* [[Widgets|Create widgets and set their properties.]]
|
||||
* [[Containers|Add containers (that control widget layout) to your window(s), then place your created widgets in those containers.]]
|
||||
* [[Events|Add code to respond to user actions with agents and action sequences.]]
|
||||
|
||||
Once you have learned the basics of GUI programming within EiffelVision 2, you will be well on your way to creating powerful multi-platform applications. The Application Programming Interface (API) of EiffelVision 2 has been designed in a way to ensure that the library is as intuitive, consistent and stylistic as possible. Heavy reuse of components from the EiffelBase library is one of the main ingredients that makes this possible.
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
[[Property:title|EiffelVision Pick and Drop]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|309203de-6536-fe26-4f73-cb1f4a450e6f]]
|
||||
Pick-and-Drop is a unique user-interface action that permits a user to request an action be performed on a specified object. It is a more-ergonomic alternative to the typical drag-and-drop or "select-and-click" user operations found in most modern graphical user interfaces. Users of EiffelStudio have come to value Pick-and-Drop as both intuitive, and easier on the wrist and fingers with long-term use.
|
||||
|
||||
Pick-and-Drop uses the metaphor of '''pebbles and holes'''. The typical method of doing a pick-and-drop is that the end user selects the object to receive an action with a single right-click of the mouse. At that point, the mouse arrow turns into a "pebble" connected to the "point of picking" via a visible "band". This "pebble" is often a symbol representing the type of object that was "picked". In the case of the screen-shot below, it is a blue ellipse: the "pebble" symbol for a class.
|
||||
|
||||
[[Image:EiffelStudio during class pick and drop2|thumbnail|360px|center|EiffelStudio During Class Pick-and-Drop]]
|
||||
|
||||
|
||||
The "pebble" may then be dropped into any compatible "hole" (drop target—a widget configured to accept "pebbles" of this type). Such "receiving" widgets are often tool-bar buttons or editing areas (or in the case of the screen-shot above, the editor "tab" bar), but can be any widget that inherits from [[ref:libraries/vision2/reference/ev_pick_and_dropable_chart|EV_PICK_AND_DROPABLE]] and is properly configured. The user then can either "drop the pebble into the hole" with a second right-click (on the receiving object), or may cancel the operation by single-clicking the left mouse button.
|
||||
|
||||
[[Image:EiffelStudio after class pick and drop2|thumbnail|360px|center|EiffelStudio After Class Pick-and-Drop]]
|
||||
|
||||
|
||||
{{note|See [[uuid:a3789781-153b-7f4d-bb94-4bdf8923fb56|Retargeting Through Pick-and-Drop]] to see how EiffelStudio uses the Pick-and-Drop user interface.}}
|
||||
|
||||
|
||||
Because the Pick-and-Drop operation has been so popular, classes have been added to the EiffelVision 2 library to make implementing this user interface very easy.
|
||||
|
||||
From a technical viewpoint, Pick-and-Drop is a mechanism which allows data to be transported from a '''source''' object to a '''target'''. Any EiffelVision 2 object inheriting from [[ref:libraries/vision2/reference/ev_pick_and_dropable_chart|EV_PICK_AND_DROPABLE]] can be used to transport or receive data.
|
||||
|
||||
|
||||
==A Simple Pick-and-Drop Example==
|
||||
|
||||
The two necessary components for a Pick-and-Drop operation are a '''source''' and a '''target''', both of which must [[uuid:b8c10baa-4f50-adfe-a6f8-9cb56a8f1917#Conformance|conform]] to [[ref:libraries/vision2/reference/ev_pick_and_dropable_chart|EV_PICK_AND_DROPABLE]]. The data that is to be transported is known as a '''pebble'''.
|
||||
|
||||
The following steps need to be undertaken to set up a simple pick and drop:
|
||||
* Set the '''source''' by calling set_pebble.
|
||||
* Set one or more '''targets''' by adding an [[ET: Agents|agent]] to their <eiffel>drop_actions</eiffel> list. To make the '''target''' accept that type of '''pebble''', the arguments of the [[ET: Agents|agent]] must match the type of the '''pebble''' to be transported for the '''source'''. Otherwise the transport will not be permitted.
|
||||
|
||||
A simple example of this is demonstrated here:
|
||||
<code>
|
||||
button1.set_pebble ("A PND transport has occured%N")
|
||||
button2.drop_actions.extend (agent print (?))
|
||||
</code>
|
||||
|
||||
Because <eiffel>print</eiffel> takes an argument of type [[ref:libraries/base/reference/string_8_chart|STRING_8]], button2 becomes a valid drop-target for the pebble contained by button1. Right clicking the mouse pointer over the '''source''' will start the transport, and right clicking with the mouse pointer over a valid '''target''' will complete the transport. The transport can be canceled anytime with a simple left click, just as you would do in EiffelStudio.
|
||||
|
||||
{{note|Any type of object can be used as the '''pebble'''. When a transport completes, the '''pebble''' that was transported is passed as an argument to all agents in the '''target's''' <code>drop_actions</code> list to which the '''pebble''' [[uuid:b8c10baa-4f50-adfe-a6f8-9cb56a8f1917#Conformance|conforms]].}}
|
||||
|
||||
|
||||
==Three Different Modes of Transport==
|
||||
|
||||
There are three different modes of transport available for pick and drop. They are listed below with details of their use:
|
||||
* Pick and Drop Mode. <br/>
|
||||
::This is the default mode for pick and drop, but can be set by calling <eiffel>set_pick_and_drop_mode</eiffel> on the '''source''' object. Right clicking on a '''source''' starts the transport and right clicking on a valid '''target''' completes the transport. During execution, a band is drawn from the screen position where the pick started to the current mouse position. Pressing the left mouse button or the escape key during execution will end the transport.
|
||||
* Drag and Drop Mode <br/>
|
||||
::This mode can be set by calling <eiffel>set_drag_and_drop_mode</eiffel> on the '''source''' object. Left clicking on a '''source''' starts the transport and releasing the left mouse button over a valid '''target''' completes the transport. During execution, a band is drawn from the screen position where the pick started to the current mouse position. Releasing the left mouse button or pressing the escape key during execution will end the transport.
|
||||
* Target Menu Mode <br/>
|
||||
::This mode can be set by calling <eiffel>set_target_menu_mode</eiffel> on the '''source''' object. Right clicking on a '''source''' brings up a menu of all the valid drop '''targets''' in the system. Selecting one of these targets completes the transport.
|
||||
|
||||
|
||||
==Accept and Deny Cursors==
|
||||
|
||||
When <eiffel>mode_is_pick_and_drop</eiffel> or <eiffel>mode_is_drag_and_drop</eiffel> then the shape of the mouse cursor changes to reflect whether the current GUI component below the mouse accepts the pebble or not. Calling <eiffel>set_accept_cursor</eiffel> or <eiffel>set_deny_cursor</eiffel> on the '''source''' object allows you to customize the Accept- and Deny-Cursor respectively—used to represent a valid or invalid '''target''' respectively while the mouse pointer (pebble) is being moved around. The default Accept-Cursor is the standard mouse pointer. The default Deny-Cursor is a red circle with a diagonal line across it: the universal "not permitted" symbol.
|
||||
|
||||
Example:
|
||||
|
||||
<eiffel>
|
||||
add_some_widgets
|
||||
-- Add some widgets with a Pick-and-Drop example into `main_window'.
|
||||
local
|
||||
my_hbox: EV_HORIZONTAL_BOX
|
||||
my_button1: EV_BUTTON
|
||||
my_button2: EV_BUTTON
|
||||
bullseye_pix_buffer: EV_PIXEL_BUFFER
|
||||
bullseye_ptr_style: EV_POINTER_STYLE
|
||||
do
|
||||
create my_hbox
|
||||
create my_button1.make_with_text ("Button1")
|
||||
create my_button2.make_with_text ("Button2")
|
||||
my_hbox.extend (my_button1)
|
||||
my_hbox.extend (my_button2)
|
||||
my_hbox.extend (create {EV_BUTTON}.make_with_text ("Button3"))
|
||||
main_window.extend (my_hbox)
|
||||
|
||||
my_button2.set_pebble ("A Pick-and-Drop has occurred.")
|
||||
my_button1.drop_actions.extend (agent my_button1.set_text (?))
|
||||
my_button1.drop_actions.extend (agent io.put_string (?))
|
||||
create bullseye_pix_buffer.make_with_size (32, 32)
|
||||
bullseye_pix_buffer.set_with_named_file ("BULLSEYE.png")
|
||||
create bullseye_ptr_style.make_with_pixel_buffer (bullseye_pix_buffer, 32, 32)
|
||||
my_button2.set_accept_cursor (bullseye_ptr_style)
|
||||
end
|
||||
</eiffel>
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
[[Property:title|Properties]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|0d46c1eb-bce4-2d67-0272-da4aa5950c65]]
|
||||
The Properties cluster contains all the common properties available for EiffelVision 2 [[Widgets|widgets]] and [[Items|items]]. Every EiffelVision 2 widget has the same set of properties inherited from EV_WIDGET, but many widgets also inherit additional properties, further refining the behavior of the widget.
|
||||
|
||||
EV_WIDGET inherits the following properties:
|
||||
* [[ref:libraries/vision2/reference/ev_pick_and_dropable_chart|EV_PICK_AND_DROPABLE]]
|
||||
** For an overview of the Pick and Drop mechanism, click [[EiffelVision Pick and Drop|here]] .
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_sensitive_chart|EV_SENSITIVE]]
|
||||
** If an EiffelVision 2 component inherits from [[ref:libraries/vision2/reference/ev_sensitive_chart|EV_SENSITIVE]], it can be made to ignore events. <br/>
|
||||
:::Use <eiffel>disable_sensitive</eiffel> to disable event handling, and <eiffel>enable_sensitive</eiffel> to restore event handling.
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_colorizable_chart|EV_COLORIZABLE]]
|
||||
** If a EiffelVision 2 component inherits from [[ref:libraries/vision2/reference/ev_colorizable_chart|EV_COLORIZABLE]], it has facilities for modifying its foreground and background colors. <br/>
|
||||
:::Use <eiffel>set_foreground_color</eiffel> to set <eiffel>foreground_color</eiffel> and <eiffel>set_background_color</eiffel> to set <eiffel>background_color</eiffel>. <br/>
|
||||
:::Use <eiffel>set_default_colors</eiffel> to restore the colors to their defaults.
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_help_contextable_chart|EV_HELP_CONTEXTABLE]]
|
||||
** If a EiffelVision 2 component inherits from [[ref:libraries/vision2/reference/ev_help_contextable_chart|EV_HELP_CONTEXTABLE]], facilities are provided for associating help to the component when F1 or Shift F1 is pressed.
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_positioned_chart|EV_POSITIONED]]
|
||||
** If a EiffelVision 2 component inherits from [[ref:libraries/vision2/reference/ev_positioned_chart|EV_POSITIONED]], it is possible to query its current position, size and minimum size. <br/>
|
||||
:::Use <eiffel>x_position</eiffel> and <eiffel>y_position</eiffel> to find its position relative to its parent. <br/>
|
||||
:::Use <eiffel>width</eiffel> and <eiffel>height</eiffel> to find its size. <br/>
|
||||
:::Use <eiffel>minimum_width</eiffel> and <eiffel>minimum_height</eiffel> to find its minimum size.
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]]
|
||||
** If a EiffelVision 2 component inherits from [[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]], it is able make calls on its parent. Use <eiffel>parent</eiffel> to make calls on the current parent.
|
||||
|
||||
|
||||
{{note|[[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]] has no features for setting the parent. In EiffelVision 2, a child has no features for setting its parent, while a parent such a descendant of EV_CONTAINER contains routines for adding children (one example is <eiffel>extend</eiffel>). }}
|
||||
|
||||
|
||||
The following are several more properties used within EiffelVision 2:
|
||||
* [[ref:libraries/vision2/reference/ev_deselectable_chart|EV_DESELECTABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_drawable_chart|EV_DRAWABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_fontable_chart|EV_FONTABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_pixmapable_chart|EV_PIXMAPABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_positionable_chart|EV_POSITIONABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_selectable_chart|EV_SELECTABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_textable_chart|EV_TEXTABLE]]
|
||||
* [[ref:libraries/vision2/reference/ev_tooltipable_chart|EV_TOOLTIPABLE]]
|
||||
|
||||
For a full list of properties available, see the "interface/properties" sub-cluster of the EiffelVision 2 library.
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
[[Property:title|Support]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|fd72dc5e-32bd-55aa-0e2e-2c7af69c72fd]]
|
||||
The support cluster contains many classes providing useful facilities within the library. Many of the classes within this cluster are constants classes, which are filled with constants values for specific contexts, generally indicated by their names. The following constants classes are available within this cluster:
|
||||
|
||||
* [[ref:libraries/vision2/reference/ev_character_format_constants_chart|EV_CHARACTER_FORMAT_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_dialog_constants_chart|EV_DIALOG_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_drawable_constants_chart|EV_DRAWABLE_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_font_constants_chart|EV_FONT_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_key_constants_chart|EV_KEY_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_paragraph_constants_chart|EV_PARAGRAPH_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_pointer_constants_chart|EV_POINTER_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_pointer_style_constants_chart|EV_POINTER_STYLE_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_postscript_page_constants_chart|EV_POSTSCRIPT_PAGE_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_scroll_constants_chart|EV_SCROLL_CONSTANTS]]
|
||||
* [[ref:libraries/vision2/reference/ev_text_alignment_constants_chart|EV_TEXT_ALIGNMENT_CONSTANTS]]
|
||||
|
||||
|
||||
In a similar vein to constant classes, the following two classes are provided to provide support for default [[ref:libraries/vision2/reference/ev_color_chart|EV_COLOR]]s and [[ref:libraries/vision2/reference/ev_pixmap_chart|EV_PIXMAP]]s.
|
||||
* [[ref:libraries/vision2/reference/ev_stock_colors_chart|EV_STOCK_COLORS]]
|
||||
* [[ref:libraries/vision2/reference/ev_stock_pixmaps_chart|EV_STOCK_PIXMAPS]]
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
[[Property:title|Containers]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|aa71e29d-f0e0-9eb2-a289-675d24aac927]]
|
||||
A container is a EiffelVision 2 widget that may contain other widgets. All containers inherit from [[ref:libraries/vision2/reference/ev_container_chart|EV_CONTAINER]]. Some containers such as [[ref:libraries/vision2/reference/ev_cell_chart|EV_CELL]] may only hold one widget while containers such as [[ref:libraries/vision2/reference/ev_box_chart|EV_BOX]] may hold multiple widgets. Since all containers inherit from type [[ref:libraries/vision2/reference/ev_widget_chart|EV_WIDGET]], this means that a container may be placed inside another container. Windows inherit from [[ref:libraries/vision2/reference/ev_cell_chart|EV_CELL]] and are therefore also classified as containers.
|
||||
|
||||
{{note|Containers may only contain other widgets. Items may only be placed in certain primitives. For example, an [[ref:libraries/vision2/reference/ev_list_item_chart| EV_LIST_ITEM]] may only be contained in an [[ref:libraries/vision2/reference/ev_list_chart| EV_LIST]]. }}
|
||||
|
||||
|
||||
==Inheritance from EiffelBase==
|
||||
|
||||
Wherever possible, EiffelVision 2 containers reuse the container structures provided by [[EiffelBase]]. This provides three main advantages:
|
||||
|
||||
# Familiarity for operations such as access, insertions, and removals. Anybody who already uses [[EiffelBase]] should find it easy to use EiffelVision 2 containers.
|
||||
# The underlying structures used have been tried and tested for many years and their designs have proven to be robust and effective.
|
||||
# Containers provide powerful methods of traversing and searching their contents. In the original EiffelVision library, you needed to keep references to widgets since you could not query the contents of their containers.
|
||||
|
||||
For example, [[ref:libraries/vision2/reference/ev_container_chart|EV_CONTAINER]] inherits from <eiffel>BOX</eiffel> and <eiffel>COLLECTION</eiffel>. Descendents of [[ref:libraries/vision2/reference/ev_container_chart|EV_CONTAINER]] such as [[ref:libraries/vision2/reference/ev_box_chart|EV_TABLE]] may also inherit from other structures in [[EiffelBase]].
|
||||
|
||||
|
||||
==Using Containers==
|
||||
|
||||
The main role of a container is to position its children in a certain way. An [[ref:libraries/vision2/reference/ev_horizontal_box_chart| EV_HORIZONTAL_BOX]] for example positions its children side by side. To achieve vertical stacking you would use an [[ref:libraries/vision2/reference/ev_vertical_box_chart| EV_VERTICAL_BOX]] .
|
||||
A code example of adding widgets to a container is as follows:
|
||||
<code>
|
||||
add_to_container
|
||||
-- Add 3 buttons to a hbox and then show in window.
|
||||
local
|
||||
my_window: EV_TITLED_WINDOW
|
||||
my_hbox: EV_HORIZONTAL_BOX
|
||||
my_button: EV_BUTTON
|
||||
do
|
||||
create my_window
|
||||
create my_hbox
|
||||
create my_button.make_with_text ("Button1")
|
||||
my_hbox.extend (my_button)
|
||||
my_hbox.extend (create {EV_BUTTON}.make_with_text ("Button2"))
|
||||
my_hbox.extend (create {EV_BUTTON}.make_with_text ("Button3"))
|
||||
my_window.extend (my_hbox)
|
||||
my_window.show
|
||||
end
|
||||
</code>
|
||||
|
||||
The mapping of a EiffelVision 2 container interface is very close to that of containers in [[EiffelBase]], such as a linked list.
|
||||
* To add a widget to a container call <code>extend</code>.
|
||||
* To remove a widget from the container call <code>prune</code>.
|
||||
* To empty a container call <code>wipe_out</code>.
|
||||
* To traverse the container, you can use features such as <code>start</code>, <code>forth</code>, <code>item</code>, and <code>off</code>.
|
||||
|
||||
{{note|When a widget is added to a container, the container is the parent of the widget. }}
|
||||
|
||||
|
||||
==Size of a Widget Within a Container==
|
||||
|
||||
The size of a widget in a container is always at least its minimum size. By default, when a widget is added to a container it is expandable. This means that if the container gets bigger, the widget will expand to fit the extra space. This convenient functionality means that you don't have to worry about handling the size of the widget (such as when a user alters the size of a window) as this is all performed automatically. If, on the other hand, you decide you want the widget to remain at a certain size (its minimum size), [[ref:libraries/vision2/reference/ev_box_chart| EV_BOX]] (and therefore its descendants) contain the convenient call <code>disable_item_resize</code>.
|
||||
|
||||
|
||||
==Sizing of Containers==
|
||||
|
||||
Since [[ref:libraries/vision2/reference/ev_container_chart|EV_CONTAINER]] inherits from type [[ref:libraries/vision2/reference/ev_widget_chart|EV_WIDGET]], the following facilities are provided for setting the minimum size: <code>set_minimum_width</code>, <code>set_minimum_height</code> and <code>set_minimum_size</code>. It is important to remember that as a general rule, '''the current size of a container is always at least the minimum size of all its contents.'''
|
||||
|
||||
{{note|The exception to this is: [[ref:libraries/vision2/reference/ev_fixed_chart|EV_FIXED]], [[ref:libraries/vision2/reference/ev_viewport_chart|EV_VIEWPORT]], and [[ref:libraries/vision2/reference/ev_scrollable_area_chart|EV_SCROLLABLE_AREA]] which do actually allow their contents to be larger than their current size.}}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[[Property:title|EiffelVision Dialogs]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|85cfcfd3-a46e-4e2e-330a-61c2d1579b0f]]
|
||||
This cluster contains all the dialogs provided by EiffelVision 2.
|
||||
|
||||
==Standard Dialog Boxes==
|
||||
|
||||
A standard dialog box provides a way of interacting with the underlying platform (such as Windows or Linux) to perform basic tasks such as opening a file or printing a document. EiffelVision 2 provides six standard dialogs that allow the user to perform common tasks. They are:
|
||||
* [[ref:libraries/vision2/reference/ev_color_dialog_chart|EV_COLOR_DIALOG]] — allows the user to select an RGB color (useful for graphical apps such as a Paint Program).
|
||||
* [[ref:libraries/vision2/reference/ev_directory_dialog_chart|EV_DIRECTORY_DIALOG]] — allows the user to select a directory.
|
||||
* [[ref:libraries/vision2/reference/ev_file_open_dialog_chart|EV_FILE_OPEN_DIALOG]] — allows the user to select an existing file to be opened.
|
||||
* [[ref:libraries/vision2/reference/ev_file_save_dialog_chart|EV_FILE_SAVE_DIALOG]] — allows the user to select a filename to be used for creation of a file.
|
||||
* [[ref:libraries/vision2/reference/ev_font_dialog_chart|EV_FONT_DIALOG]] — allows the user to select a font (useful for a Word Processor for example).
|
||||
* [[ref:libraries/vision2/reference/ev_print_dialog_chart|EV_PRINT_DIALOG]] — allows the user to confirm or change printer settings for printing (may be used in conjunction with [[ref:libraries/vision2/reference/ev_print_projector_chart|EV_PRINT_PROJECTOR]]).
|
||||
|
||||
|
||||
==Creating Custom Dialog Boxes==
|
||||
|
||||
If you wish to provide a custom dialog in your application, [[ref:libraries/vision2/reference/ev_dialog_chart| EV_DIALOG]] has been provided to facilitate this.
|
||||
|
||||
|
||||
==Message Dialog Boxes==
|
||||
|
||||
A message dialog box gives your application a standard way of displaying information, or asking simple questions. This information can be displayed with the following message dialog boxes.
|
||||
* [[ref:libraries/vision2/reference/ev_message_dialog_chart|EV_MESSAGE_DIALOG]] — displays a simple message with an "OK" button.
|
||||
* [[ref:libraries/vision2/reference/ev_information_dialog_chart|EV_INFORMATION_DIALOG]] — displays information to the user (in Windows this dialog box contains an "information" icon).
|
||||
* [[ref:libraries/vision2/reference/ev_question_dialog_chart|EV_QUESTION_DIALOG]] — displays a question and allows user to respond with "Yes" or "No" button.
|
||||
* [[ref:libraries/vision2/reference/ev_warning_dialog_chart|EV_WARNING_DIALOG]] — displays a warning to the user.
|
||||
* [[ref:libraries/vision2/reference/ev_confirmation_dialog_chart|EV_CONFIRMATION_DIALOG]] — allows the user to confirm an action that has been requested.
|
||||
* [[ref:libraries/vision2/reference/ev_error_dialog_chart|EV_ERROR_DIALOG]] — displays an error message.
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
[[Property:title|Widgets]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|595bb73e-146a-ea19-221f-40f3415aad34]]
|
||||
==What Is a Widget?==
|
||||
|
||||
A Widget is the fundamental building block of your application's GUI. Components such as Windows, Buttons, Text fields, Check Boxes, List Boxes and layout Containers are examples of widgets. The widget set in EiffelVision 2 provides you with the flexibility to easily create powerful graphical applications. All widgets in EiffelVision 2 inherit from [[ref:libraries/vision2/reference/ev_widget_chart| EV_WIDGET]], thus the features provided in <eiffel>EV_WIDGET</eiffel> may be called on any widget.
|
||||
|
||||
|
||||
==Variations of Widgets==
|
||||
Within EiffelVision 2, widgets have been classified into three different groups:
|
||||
|
||||
* [[Primitives|Primitives]] — These are elements of the user interface that are mainly responsible for interaction with the user, such as an [[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]].
|
||||
|
||||
* [[Containers|Containers]] — These are used to contain other widgets and position them in a certain way, such as an [[ref:libraries/vision2/reference/ev_vertical_box_chart| EV_VERTICAL_BOX ]] that stacks its child widgets one by one vertically.
|
||||
|
||||
* [[EiffelVision Dialogs|Dialogs]] — These are pop up dialog boxes used for interacting with the user for tasks such as opening a file (EV_FILE_OPEN_DIALOG) or displaying a message (EV_MESSAGE_DIALOG). You may also construct your own dialog boxes by inheriting from EV_DIALOG.
|
||||
|
||||
|
||||
==How Do I Create a Widget?==
|
||||
|
||||
All widgets in EiffelVision 2 are based around the default_create mechanism in Eiffel. This means that all that needs to be done to create a widget is to declare a reference to a type (such as [[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]] ) and then call create on that reference. An example of this is as follows.
|
||||
<code>
|
||||
my_button: EV_BUTTON
|
||||
create my_button
|
||||
</code>
|
||||
|
||||
Along with the default creation, EiffelVision 2 also includes a few additional creation features for convenience. An example of this is <code>make_with_text</code> for all widgets that may have text associated with them (those that inherit from [[ref:libraries/vision2/reference/ev_textable_chart| EV_TEXTABLE]] ), this saves a call to set_text upon default creation of the textable widget. Thus:
|
||||
<code>
|
||||
create my_button.make_with_text ("Click Me")
|
||||
</code>
|
||||
|
||||
would replace
|
||||
<code>
|
||||
create my_button
|
||||
my_button.set_text ("Click Me")
|
||||
</code>
|
||||
|
||||
{{note|When a widget is created, no extra initialization has to be performed. '''The only exception is with windows, for which it is necessary to call <code>show</code> in order for the windows to be displayed on screen'''. This permits widgets to be added to a window while it is still invisible, and then when made visible with <code>show</code>, the window and all its visible widgets are displayed at once.}}
|
||||
|
||||
|
||||
==Sizing==
|
||||
|
||||
Since [[ref:libraries/vision2/reference/ev_primitive_chart|EV_PRIMITIVE]] inherits from type [[ref:libraries/vision2/reference/ev_widget_chart|EV_WIDGET]], the following facilities are provided for setting the minimum size: <code>set_minimum_width</code>, <code>set_minimum_height</code> and <code>set_minimum_size</code>.
|
||||
|
||||
The minimum size of a widget is the smallest possible size that it can be inside its parent container. If an [[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]] was created and set with a minimum_size of width/height (100, 100), if this button was inserted in to an [[ref:libraries/vision2/reference/ev_horizontal_box_chart| EV_HORIZONTAL_BOX]], then the box's size could never be below (100, 100) or it would violate the minimum size of the button. '''The size of a container must always be greater or equal to the minimum sizes of its children.'''
|
||||
|
||||
{{note|In EiffelVision 2, there is no way to set the current size of the primitive. The current size is dependent on the size of the parent or the minimum_size. }}
|
||||
|
||||
|
||||
==Now What Do I Do?==
|
||||
|
||||
Now that you can create a widget, you will need to actually make it usable to your intended user. This will usually involve these three steps. <br/>
|
||||
|
||||
* Setting [[Properties| properties]] for the widget such as color and minimum size.
|
||||
|
||||
* Making the widget respond to user [[Events| events]] via the use of agents and action sequences.
|
||||
|
||||
* Placing the widget inside a [[Containers| container]] widget (either a window or a child of a window) so it can be shown on the screen.
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[[Property:title|Primitives]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|09d70dd5-2e30-7615-88ac-4babe4eb7aa6]]
|
||||
A primitive is an EiffelVision 2 widget that may not contain other widgets. Primitives may be placed in [[Containers|containers]], but a primitive [[Widgets|widget ]] may not contain any child widgets. Some examples of primitives are [[ref:libraries/vision2/reference/ev_button_chart|EV_BUTTON]] and [[ref:libraries/vision2/reference/ev_label_chart|EV_LABEL]]. All EiffelVision 2 primitives inherit from [[ref:libraries/vision2/reference/ev_primitive_chart|EV_PRIMITIVE]].
|
||||
|
||||
|
||||
==Features of a Primitive==
|
||||
|
||||
All primitives inherit from [[ref:libraries/vision2/reference/ev_tooltipable_chart|EV_TOOLTIPABLE]] and therefore may have tooltips assigned to them. They all inherit many features from [[ref:libraries/vision2/reference/ev_widget_chart|EV_WIDGET]]. Each descendent of [[ref:libraries/vision2/reference/ev_primitive_chart|EV_PRIMITIVE]] will typically have many features specific to its type. For example, [[ref:libraries/vision2/reference/ev_separator_chart|EV_SEPARATOR]] has no extra features, but [[ref:libraries/vision2/reference/ev_label_chart|EV_LABEL]] has features for modifying the current font and text to be displayed.
|
||||
|
||||
|
||||
==Widgets as Item Holders==
|
||||
|
||||
Although no primitive can contain another widget, certain primitives may contain one or more [[Items|items]]. One example of this is an [[ref:libraries/vision2/reference/ev_list_chart| EV_LIST]] containing [[ref:libraries/vision2/reference/ev_list_item_chart|EV_LIST_ITEM]]s.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:link_title|EiffelVision 2]]
|
||||
[[Property:title|EiffelVision 2]]
|
||||
[[Property:weight|10]]
|
||||
[[Property:uuid|c72b1a5c-9cbf-f8c8-a4c2-619e392799b0]]
|
||||
==EiffelVision 2 Library==
|
||||
|
||||
EiffelVision 2 (also called just "EiffelVision", or even just "Vision") is the basic tool for building graphical and GUI (Graphical User Interface) applications in Eiffel.
|
||||
|
||||
EiffelVision is portable: you can use it to design the graphical part of your applications independently of the target platform; then on each platform, such as Windows or X (Linux, Unix etc.), it will use the native graphical mechanisms to produce the platform's native look-and-feel.
|
||||
|
||||
Type: Library
|
||||
|
||||
Platform: Any
|
||||
|
||||
|
||||
@@ -0,0 +1,944 @@
|
||||
[[Property:title|Revisions and Bug Fixes]]
|
||||
[[Property:weight|10]]
|
||||
[[Property:uuid|eb11a237-0c75-0427-452a-303d4f276b97]]
|
||||
This document contains details of modifications and bug fixes to the EiffelVision 2 library listed by the release version of EiffelStudio. All bug fixes and modifications are relative to the previously released version
|
||||
|
||||
==EiffelStudio 14.05==
|
||||
'''Improvements'''
|
||||
* Made it possible to query <e>{EV_TEXT_COMPONENT}.start_selection</e> and <e>{EV_TEXT_COMPONENT}.end_selection</e> even if there is no selection. In that case they return the same value which is the caret position.
|
||||
* Created a set of classes to make it easier to develop AutoTest tests for code based on Vision2.
|
||||
|
||||
'''Changes'''
|
||||
* Made <e>{EV_TEXT_COMPONENT}.selection_start</e> and <e>{EV_TEXT_COMPONENT}.selection_end</e> obsolete because '''selection_end''' was returning a character position and not a caret position which is counter-intuitive since '''set_selection''' is using caret positions. Introduced '''start_selection''' and '''end_selection''' instead that return the selection start and end in caret positions.
|
||||
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed a bug that would allow pick and drop on disabled items because code allowed to be dropped on.
|
||||
|
||||
*'''GTK''':
|
||||
** Fixed issue where if a menu entry is of the form '''my_entry''', then only '''myentry''' will appear ( bug#18716).
|
||||
** Fixed a bug in <e>{EV_TEXT}.selected_text</e> where if the text contained non-ASCII character, then it will just return the UTF-8 sequence of those Unicode characters instead of the Unicode characters.
|
||||
** Fixed <e>{EV_DRAWABLE}.draw_sub_pixel_buffer</e> and <e>{EV_PIXEL_BUFFER}.sub_pixel_buffer</e> when the rectangle provided is larger than the image it would cause a crash.
|
||||
** Fixed a precondition violation in the implementation of <e>{EV_PIXEL_BUFFER}.get_pixel</e>.
|
||||
|
||||
*'''Windows''':
|
||||
** Fixed contract violations when closing/destroying a dialog.
|
||||
** Fixed contract violation when wiping out a notebook.
|
||||
** Fixed various issues on Windows with <e>EV_TEXTABLE</e> components when the text contains Unicode characters that generate a surrogate pair in UTF-16, the Windows API always refers to UTF-16 code units while at the Eiffel level we still refer to character position.
|
||||
** Fixed a by one error when mapping a caret position to the actual caret position of the underlying Windows implementation which has %R%N and not just %N.
|
||||
|
||||
==EiffelStudio 13.11==
|
||||
'''Improvements'''
|
||||
* Added support for GTK3.
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed a drawing issue in EV_GRID causing some invalid drawing.
|
||||
** Fixed a crash with retrieving a RTF file containing a color or a font whose index is not starting at 1, or that it is referring to a non-defined index.
|
||||
** Fixed a bug introduced at rev#90517 with `new_line_string` that became TN instead of %N.
|
||||
** Fixed a bug retrieving font in a font table to allow spaces between the components of a font entry in the table.
|
||||
** Added code protection to find out about paragraphs as we would get an out of bound acess if the last character was a %N. This solved the case where copy/pasting some text from Word would save incorrectly, and thus the RTF being created was invalid and was losing some formatting info.
|
||||
|
||||
*'''Windows'''
|
||||
** Fixed bug#18612: unsetting column text on addition of a new column we set with an empty text when there is no previous column text set, this prevents a side effect of unsetting a text mask on the wel list view control which doesn't seem to like being reset back when a new column is replacing it when the text mask actually is set.
|
||||
** Fixed a crash when selecting text in a EV_RICH_TEXT widget.
|
||||
|
||||
==EiffelStudio 7.3==
|
||||
'''Improvements'''
|
||||
* Added {EV_PIXEL_BUFFER}.stretched which gives you a stretched version of an EV_PIXEL_BUFFER. The quality of the stretched image is much better than the previous implementation of EV_PIXMAP for Windows. On Unix it is the same quality as EV_PIXMAP.
|
||||
* Improved stretching of EV_PIXMAP on Windows by using the Color on Color stretching mode of the Win32 API StretchBlt.
|
||||
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed inconsistencies in maximize/restore window behavior between Windows and Gtk platforms.
|
||||
** Fixed {EV_GRID_COLUMN}.required_width_of_item_span to only take into account visible item.
|
||||
|
||||
*'''Windows'''
|
||||
** Fixed a resizing bug when you have a vertical/horizontal box with a minimum size set. If one of the items has a minimum size larger than its parent, then in some circumstances the child will be shrunk beyond its minimum size causing some visual glitches.
|
||||
|
||||
==EiffelStudio 7.1==
|
||||
|
||||
'''New'''
|
||||
* Added experimental GTK3 support with HTML5 backend.
|
||||
* Added SCOOP compatibility.
|
||||
|
||||
'''Improvements'''
|
||||
* Added a hint facility for the height of the drop down in a combo box. Currently the hint is only followed on Windows.
|
||||
* Improved keyboard navigation of EV_GRID's including tab handling of activatable grid items.
|
||||
* Improved keyboard activation/settings for certain type of grid items.
|
||||
* Improved latency of asynchronous agents calling through do_once_on_idle when adding from another thread.
|
||||
|
||||
'''Bug fixes'''
|
||||
|
||||
*'''Platform Independent'''
|
||||
** Fixed problems when keyboard navigating in EV_GRID's when hidden columns are present.
|
||||
|
||||
*'''Windows'''
|
||||
** Added support for high resolution wheel mice.
|
||||
** Fixed a potential crash when using an EV_FIXED if resizing causes some redraw operations.
|
||||
** Fixed an issue where the pick and drop lines would disappear after performing an Alt+Tab to switch between applications.
|
||||
** Made sure colors are not shared between a widget and the original color object used to set the color of the widget.
|
||||
|
||||
*'''GTK'''
|
||||
** Fixed a bug (PR#18082). The fix ensures that in cases in which a descendant of EV_TEXTABLE contains pixmaps but no text, the pixmaps are properly centered.
|
||||
** Fixed internationalization handling for keyboard input.
|
||||
|
||||
==EiffelStudio 7.0==
|
||||
'''Improvements'''
|
||||
* Added multi-monitor functionality to EV_SCREEN.
|
||||
* Optimized communication between worker thread and gui thread in {EV_APPLICATION}.do_once_on_idle.
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Improved multi-monitor handling for EV_GRID item activation popups.
|
||||
|
||||
*'''Windows'''
|
||||
** Fixed rendering of activate button in dialogs when theming is enabled.
|
||||
|
||||
*'''GTK'''
|
||||
** Fixed bug in `set_item_size` for EV_FIXED and EV_VIEWPORT where sometimes item would not shrink if set when displayed.
|
||||
|
||||
==EiffelStudio 6.8==
|
||||
'''Improvements'''
|
||||
* Allowed setting the text of a combo box that has been disabled.
|
||||
* Resize actions are now called after a container has completed its resizing.
|
||||
* On Windows, increased the splitter size to make it more visible and easier to grab.
|
||||
* The API now accepts READABLE_STRING_GENERAL as input for strings, which let you accept immutable strings without conversions.
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed incorrect drawing of connector line for root tree nodes in an EV_GRID.
|
||||
|
||||
*'''Windows'''
|
||||
** Improved resizing on Windows with deeply nested windows that would not properly resize.
|
||||
** Use the proper default font to follow the current active theme.
|
||||
** Fixed a bug where terminating a pick and drop and moving your mouse quickly could result in a drop to a different widget than the one where pick and drop was terminated via the right click.
|
||||
|
||||
==EiffelStudio 6.7==
|
||||
|
||||
'''Improvements'''
|
||||
* Optimized integration with EiffelGraph library for improved projection speed and efficiency
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed various catcalls at runtime.
|
||||
|
||||
*'''Unix''''
|
||||
** Fixed an initialization issue due to recent changes in the GTK API.
|
||||
|
||||
*'''Windows'''
|
||||
** Fixed an issue with EV_TREE, EV_LIST, EV_HEADER, EV_TOOL_BAR and EV_MULTI_COLUMN_LIST where setting a pebble on the control (not just the item) would allow pick and drop but the line drawn was restricted to the control.
|
||||
|
||||
==EiffelStudio 6.6==
|
||||
|
||||
'''Improvements'''
|
||||
* Optimized integration with EiffelGraph library for improved projection speed and efficiency
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed multi-threading dead-lock problem when extending idle actions whilst blocking the main thread with a mutex via an idle action.
|
||||
|
||||
==EiffelStudio 6.5==
|
||||
|
||||
'''Improvements'''
|
||||
* Improved the pick and drop mechanism on Windows platforms to not use the `wel_hook.dll`. The visible change is that when the cursor is outside the vision2 application its shape changes depending on what is beneath.
|
||||
|
||||
'''Bug fixes'''
|
||||
*'''Platform Independent'''
|
||||
** Fixed potential crash with tab navigation code when a key press was sent to a widget that is in the process of being unparented.
|
||||
|
||||
|
||||
==EiffelStudio 6.4==
|
||||
|
||||
As part of the void-safety conversion for EiffelStudio 6.4, EiffelVision 2 was converted to a void-safe library (currently in experimental mode only) and no changes were made to the existing library. To use the void-safe library, some areas may need to be rewritten, these changes are described [[Converting existing software to void-safety| here]]
|
||||
|
||||
|
||||
'''Void-safety Interface modifications'''
|
||||
|
||||
*'''EV_ANY'''
|
||||
** Added 'create_interface_objects' so that attached types may be created before the bridge pattern is set, these attached types are then initialized via 'initialize'
|
||||
|
||||
|
||||
==EiffelStudio 6.3==
|
||||
|
||||
'''Interface modifications'''
|
||||
|
||||
* '''EV_APPLICATION'''
|
||||
**Added 'add_idle_action_kamikaze' as a synonym for 'do_once_on_idle' as this matches better with 'add_idle_action'
|
||||
|
||||
'''Bug Fixes'''
|
||||
|
||||
*'''Platform Independent'''
|
||||
** '''EV_GRID'''
|
||||
***Optimized rendering of items during addition/removal of large number of rows/items.
|
||||
***Fixed item selection handling to correctly handle the Alt key
|
||||
***Fixed certain graphical glitches and a crash when inserting new subrows in to existing structures
|
||||
***Optimized 'remove_rows' to not redraw the grid 'during' each call, now scrollbars are updated on idle
|
||||
|
||||
*'''Windows'''
|
||||
** '''EV_ACCELERATOR'''
|
||||
***Reimplemented accelerator handling so that they work with dialog windows.
|
||||
|
||||
*'''Solaris/Linux'''
|
||||
** '''EV_PIXEL_BUFFER'''
|
||||
***Now correctly resetting item data after creation, before pixel buffer memory was random
|
||||
***Fixed 'draw_pixel_buffer' to correctly composite the data instead of blindly copying it over.
|
||||
**'''EV_DRAWABLE'''
|
||||
*** Optimized clipping to prevent overdraw when blitting pixmaps offscreen.
|
||||
|
||||
|
||||
|
||||
==EiffelStudio 6.2==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_WINDOW''' - Added hide actions.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_GRID'''
|
||||
*** Fixed crashes when rendering child tree nodes
|
||||
|
||||
|
||||
|
||||
==EiffelStudio 6.1==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_APPLICATION''' - Added 'is_display_remote' for determining whether the graphical display is on the same machine as the running system.
|
||||
* '''EV_POINTER_STYLE_CONSTANTS''' - Added hyperlink_cursor constant so that hyperlink cursors may be used in applications
|
||||
* '''EV_POINTER_STYLE''' - Now pointer style objects may be twinned correctly to match the capability of pixmaps and cursor objects.
|
||||
* '''EV_DRAWABLE''' - Added 'draw_sub_pixel_buffer' so that pixel buffer data may be rendered to a drawable.
|
||||
* '''EV_PIXEL_BUFFER''' - Added 'draw_pixel_buffer_with_x_y'.
|
||||
* '''EV_STOCK_PIXMAPS''' - Now pixel buffers are used for stock icons; this allows for alpha transparency information to be retained.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_GRID'''
|
||||
*** Fixed certain crashes when recomputing offsets
|
||||
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_STOCK_PIXMAPS'''
|
||||
*** Now alpha information is correctly extracted for stock icons
|
||||
|
||||
|
||||
* '''Linux/Solaris'''
|
||||
** '''EV_COMBO_BOX'''
|
||||
*** Fixed calling of change_actions when items are selected via the drop down
|
||||
|
||||
** '''EV_POINTER_STYLE'''
|
||||
*** Fixed issue when converting to a cursor object then reverting back would render a white square instead of the requested cursor
|
||||
|
||||
** '''EV_WINDOW'''
|
||||
*** Fixed issues when calling disable/enable user resize in certain states
|
||||
|
||||
|
||||
|
||||
==EiffelStudio 6.0==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_PICK_AND_DROPABLE''' - Added context menu capabilities with 'set_configurable_target_menu_mode', 'set_configurable_target_menu_handler' and 'show_configurable_target_menu' that can be used to override the existing Pick and Drop mechanism.
|
||||
* '''EV_ACTION_SEQUENCE''' - Now event_data is defined with named tuples for easier reading of the action sequence parameters.
|
||||
* '''EV_APPLICATION_ACTION_SEQUENCES'''
|
||||
** Added 'file_drop_actions' for OS based file drag and drop from exterior applications to a EiffelVision 2 application.
|
||||
** Made 'idle_actions' obsolete as it is not thread-safe
|
||||
** Now a full garbage collection occurs if the application has been idle for 30 seconds
|
||||
|
||||
* '''EV_APPLICATION'''
|
||||
** Added 'transport_in_progress' for querying if a pebble transport is currently taking place.
|
||||
** Added caps_lock_on for querying if the caps lock key is currently toggled
|
||||
** `process_events` will now call idle actions when no more events are left in the pending queue
|
||||
|
||||
* '''EV_FONT''' - Added 'line_height' to retrieve an appropriate text editor line height in pixels for a font.
|
||||
* '''EV_PIXEL_BUFFER''' - Added conversion to/from EV_PIXMAP and added 'save_to_named_file' for saving buffer to disk.
|
||||
* '''EV_POINTER_STYLE_CONSTANTS''' - Added header_sizewe cursor
|
||||
* '''EV_FIXED''' - Added extend_with_size_and_position and set_with_size_and_position for flicker free update of fixed children.
|
||||
* '''EV_GRID''' - Added `visible_row_count` for querying the number of currently visible rows.
|
||||
* '''EV_TEXT_FIELD''' - Added inheritance from EV_TEXT_ALIGNABLE
|
||||
* '''EV_POPUP_WINDOW''' - Added 'make_with_shadow' creation procedure to create a popup window with an alpha shadow (on platforms that support it).
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_GRID'''
|
||||
*** Fixed refresh issues and certain crashes when removing items from grid
|
||||
*** Fixed navigation and selection handling for trees
|
||||
|
||||
** '''EV_PICK_AND_DROPABLE''' - Fixed 'memory leak' when calling 'pebble_function'.
|
||||
|
||||
* '''Windows'''
|
||||
** Raised compatibility bar to Windows 2000 or greater. No more support for Windows 98 or NT 4.0.
|
||||
** '''EV_DIALOG'''
|
||||
*** Fixed resizing bug that led to a difference in behavior from regular EV_WINDOW descendents
|
||||
*** Corrected calling of cancel actions when closing via the Cross which previously was broken for modeless and modal dialogs
|
||||
|
||||
** '''EV_PIXMAP'''
|
||||
*** Now correctly copying all agents over when the pixmap implementation internally changes state, previously some agents were being lost after certain operations on a pixmap
|
||||
*** Now mask is correctly queried when saving pixmap
|
||||
|
||||
|
||||
* '''Linux/Solaris'''
|
||||
** '''EV_ACCELERATOR''' - Reimplemented accelerator implementation so that it works with all key combinations that were previously being unprocessed by gtk
|
||||
** Completely reimplemented and optimized event handling for faster response, scaled down use of agents for event connection for decreased memory consumption
|
||||
|
||||
|
||||
==EiffelStudio 5.7==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''STRING_GENERAL''' - All string operations now take STRING_GENERAL instead of STRING, this allows for mixing and matching of 8 and 32-bit string objects and allows for 32bit Unicode values, the return value is always STRING_32
|
||||
* '''EV_APPLICATION'''
|
||||
** Added action sequences for querying global user events such as pointer clicks and motion
|
||||
** EiffelVision 2 is now thread-aware with the addition of thread-safe 'add_idle_action' and 'do_once_on_idle' that allow threads to add agents to update the main GUI thread in a safe manner
|
||||
|
||||
* '''EV_POINTER_STYLE''' - Added new pointer style class for setting the style of the mouse pointer, EV_CURSOR will be made obsolete, in the future animated cursors and transparency will be available
|
||||
* '''EV_PIXEL_BUFFER''' - New class for loading/querying and setting RGBA values from disk
|
||||
* '''EV_FIXED''' - Now item positions may be set to negative values within the fixed widget
|
||||
* '''EV_BITMAP''' - New class for setting 1 bit masks on EV_PIXMAP via set_mask
|
||||
* '''EV_TEXT''' - Added 'scroll_to_end' to scroll down so that the last line is visible
|
||||
* '''EV_WIDGET'''
|
||||
** Added 'refresh_now' that allows for immediate redraw of a widget without having to wait for the event loop to repaint it. A useful example of this is when calling 'set_text' on EV_LABEL during heavy computation.
|
||||
** Added ability to ignore the default key action on widgets.
|
||||
|
||||
* '''EV_GRID'''
|
||||
** Changed semantic of `move_row` and `move_rows` so that destination position is now an insertion index before a row instead of placing as the row index itself. This allows for easier insertion of rows. Any code using these features will need to be rechecked as this is a breaking change for rows that are moved down the grid
|
||||
** Altered `move_rows` so that it will now unparent the top level nodes from the first row being moved whilst keeping any subtree structure
|
||||
** Added `move_rows_to_parent` that allows moving a block of parented rows from one parent to another
|
||||
** Added `insert_new_rows` and `insert_new_rows_parented` which permit you to add insert multiple rows at once. This is far quicker than adding rows individually.
|
||||
** Added `remove_rows` which permits you to remove multiple rows at once. This is far quicker than removing each row individually.
|
||||
** Fixed `enable_capture` and disable_capture' which previously captured an internally hidden component of the grid, so no events were ever received during capture.
|
||||
** Previously, `set_default_colors` did not work.
|
||||
** Fixed bug in `pointer_enter_actions` and `pointer_leave_actions` of EV_GRID_ITEM which were not always fired when the mouse pointer entered or left the grid.
|
||||
** Corrected `not_row_height_variable_and_vertical_scrolling_per_pixel` precondition of `enable_partial_dynamic_content`.
|
||||
** Fixed bug which caused an internal exception within the grid when `is_tree_enabled` and `is_content_partially_dynamic`.
|
||||
** Strengthened preconditions of `insert_new_row_parented` to prevent you inserting a new row at an index within a subtree structure of one of the existing subrows, as in that case, it is impossible for the parent to be the desired row.
|
||||
** Added capability to hide rows in the grid
|
||||
** Added ability for locking the position of rows and columns in the grid
|
||||
|
||||
* '''EV_GRID_ROW''' - Added `insert_subrows` for the quick addition of multiple subrows at once.
|
||||
* '''EV_WINDOW''' - Added `is_border_enabled`, `enable_border` and `disable_border`. This lets you turn on/off the border as required.
|
||||
* '''EV_HEADER_ITEM''' - Added `user_can_resize` which enables you to prevent a user from resizing the item. Also added `minimum_width` and `maximum_width` which permit you to restrict the resizing of the item within a particular range.
|
||||
* '''EV_MESSAGE_DIALOG''' - All message dialogs now use their associated message icon as the icon pixmap displayed in the title bar, instead of the standard EiffelVision 2 icon.
|
||||
* '''EV_DYNAMIC_TREE_ITEM''' - The `subtree_function` is now only executed when you expand the item. In the previous version, querying the contents of the item caused the subtree function to be executed, filling the children.
|
||||
* '''EV_COMBO_BOX''' - Added `is_list_shown`, `list_hidden_actions` and renamed `drop_down_actions` to `list_shown_actions`.
|
||||
* '''EV_APPLICATION''' - Added `pointer_motion_actions`, `pointer_button_press_actions`, `pointer_button_release_actions`, `pointer_double_press_actions`, `mouse_wheel_actions`, `key_press_actions`, `key_press_string_actions` and `key_release_actions`. Each of these action sequences pass the applicable widget as part of the event data.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_GRID''' - Fixed refresh issues and certain crashes when removing items from grid
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_WINDOW''' - The default state is now `user_can_resize`. Although this was previously specified within `is_in_default_state`, the window was not actually resizeable.
|
||||
** '''EV_DIALOG'''
|
||||
*** Calling `enable_user_resize` or `disable_user_resize` on a dialog that is shown relative to another window no longer looses the relative state of the dialog.
|
||||
*** Fixed failure of a "check" statement within EiffelVision when showing a dialog with a `default_cancel_button` relative or modal to another window.
|
||||
|
||||
** '''EV_FONT_DIALOG''' - Fixed issue where displayed font did not take into account font specified through call to `set_font`.
|
||||
** '''EV_RICH_TEXT''' - Fixed calling of `change_actions` which were never called in the previous version.
|
||||
** '''EV_PIXMAP''' - If a pixmap was parented directly within a container and Windows XP themes were enabled, the background theme of the parent container was not applied to the pixmap. This was especially noticeable when using EV_NOTEBOOK as a parent container.
|
||||
** '''EV_WIDGET''' - Fixed bug in theme handling on Windows XP. Previously, any widgets that were created before the first window was created did not draw correctly when displayed.
|
||||
** '''EV_COMBO_BOX''' - Fixed bug in `key_press_actions` which were called twice when you pressed the up or down arrow keys.
|
||||
** '''EV_TITLED_WINDOW'''
|
||||
*** `title` was returning `Void` if you had not explicitly set a `title`.
|
||||
*** Fixed raise to work when process is not in the foreground, the window will now flash in the window selector
|
||||
|
||||
** '''EV_MENU''' - A menu with an ampersand (i.e. menu.set_text ("Test && Verify")) could be truncated when displayed (i.e. the `y` could be missing).
|
||||
** '''EV_PIXMAP''' - Fixed a memory corruption while loading PNG images.
|
||||
** Fixed resizing issue which would happen if too many widgets are nested in each other, those nested widgets would not resize properly.
|
||||
|
||||
* '''Gtk'''
|
||||
** '''EV_DIALOG''' - Fixed modal dialogs so that they behave the same as on Windows so that show_modal_to_window is indeed only modal to the parent window
|
||||
** - Mouse events now only go to the widget that the mouse is currently interacting with
|
||||
** '''EV_FONT''' - Fixed bug where font names were being matched on substring, meaning that Sans would match with San Serif
|
||||
** '''EV_TEXT''' - Fixed and optimized calls relating to display lines versus actual lines
|
||||
** - Fixed potential instability due to signal marshal calls being made during object dispose
|
||||
** - Completely overhauled event handling implementation to use less resources and be much more optimal
|
||||
** '''EV_POPUP_WINDOW'''Completely rewrote popup window implementation to be not dependent on the window manager, this means that they will work in all scenarios with WM intervention
|
||||
** '''EV_ACCELERATOR''' - Fixed crashes caused by certain accelerator combinations
|
||||
** '''EV_TOOL_BAR_BUTTON''' - Toolbar buttons are now accepted as Pick and Drop targets
|
||||
|
||||
|
||||
==EiffelStudio 5.6==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_POPUP_WINDOW''' - A new window type which inherits EV_WINDOW with two differences: It does not display a border of any sorts and is not displayed in the task bar. This is especially useful for simulating tooltips and other such pop-ups.
|
||||
* '''EV_APPLICATION''' - Added 'uncaught_exception_actions' which is called whenever an action sequence called from the underlying toolkit fails to deal with any exceptions raised.
|
||||
* '''EV_CLIPBOARD''' - Added 'has_text' so that the clipboard can be queried without retrieving the entire contents.
|
||||
* '''EV_CHECKABLE_TREE''' - A new widget that inherits EV_TREE, providing similar functionality but for each item contained a check box is displayed.
|
||||
* '''EV_NOTEBOOK'''
|
||||
** Added `pointed_tab_index` which returns the index of the tab beneath the mouse pointer or 0 if none.
|
||||
** Added EV_NOTEBOOK_TAB which may be queried via the new query `item_tab`. The object represented by this new class provides the ability to set both the text and a pixmap for the tab item.
|
||||
** Now inherits EV_ITEM_PIXMAP_SCALER as the tabs support pixmaps through the use of EV_NOTEBOOK_TAB.
|
||||
|
||||
* '''EV_COMBO_BOX''' - Added `drop_down_actions`, fired as the list is dropped down which permits dynamic filling of the combo box as its contents are displayed.
|
||||
* '''EV_WIDGET''' - Removed postcondition `has_focus` from `set_focus` since in most cases it does not hold. Indeed between the time you set the focus and the time you check if you still have the focus something could have happen that would remove the focus.
|
||||
* '''EV_PIXMAP''' - Added `sub_pixmap`, this allows a pixmap to be created from a region of another
|
||||
* '''EV_RICH_TEXT''' - Corrected postcondition of `buffered_format` which restricted the end position to `text_length` instead of `text_length` + 1.
|
||||
* '''EV_FILE_OPEN_DIALOG''' - Added features for retrieving multiple file names. The following additional features are now available: 'enable_multiple_selection', `disable_multiple_selection`, `multiple_selection_enabled` and `file_names`.
|
||||
* '''EV_TEXT_COMPONENT''' - Removed `is_editable` precondition of `set_caret_position`.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_DIALOG_I''' - Fixed consistency of `default_push_button`, before we could get some assertions violations from the implementation classes.
|
||||
** '''EV_ANY''' - Added protection for multiple calls of `destroy` which previously caused crashes in some situations, now `destroy` calls a `safe_destroy` intermediary which checks if the implementation has not already been destroyed
|
||||
** '''EV_GAUGE''' - Fixed bug in `make_with_value_range` which did not adjust `value` to `lower`, thereby putting the gauge in an invalid state.
|
||||
|
||||
* '''Windows'''
|
||||
** Fixed resizing issue: when a widget is inserted in a hidden window and that the minimum size of the window does not change, the widget would not appear on the window when shown. One had to manually resize the window to make it appear. Now it will appear properly.
|
||||
** Fixed a crash which could occur when using the tab or arrows keys to navigate between the primitive of a window. It would happen when trying to set the focus on a widget which was previously parented but is not anymore.
|
||||
** Improved appearance of applications running on Windows XP with manifest files.
|
||||
** '''EV_RADIO_BUTTON''' - Enabled better navigation between radio buttons of a group using the arrow keys.
|
||||
** '''EV_SPIN_BUTTON'''
|
||||
*** When it gets the focus, we set the focus to the associated text field. Before one would loose the focus until one use the mouse to set it to the text field part.
|
||||
*** Fixed bug which restricted the maximum values permitted to approx. 16,000. Attempting to manipulate the spin button with values greater than this caused precondition violations internally.
|
||||
|
||||
** '''EV_SCREEN'''
|
||||
*** `widget_at_position` returns an instance of EV_COMBO_BOX when cursor is on top of the text part of the combo box, before it would return Void.
|
||||
*** `set_pointer_position` was not setting the position accurately and it may have actually been set to one of the adjacent positions.
|
||||
|
||||
** '''EV_COMBO_BOX'''
|
||||
*** `focus_out_actions` are only called once when loosing focus. Before they would be called twice and even called when the combo box was getting the focus.
|
||||
*** Fixed `has_focus` to return True when either the combo or the text field when it exists has the focus.
|
||||
*** Fixed call on Void target when calling `set_foreground_color` on a displayed combo box which is not editable.
|
||||
*** Fixed invariant violation with a non editable combo box.
|
||||
*** Fixed `caret_position` which was failing if you attempted to set a caret position to a value greater than approx 65,000.
|
||||
*** Fixed `set_focus` which failed if the combo box was non-editable.
|
||||
*** Fixed handling of escape and enter keys while list was dropped down. If the combo box was contained within a dialog, the default cancel and default push button actions were fired as a result of pressing these keys. These keys are no longer propagated to the dialog in this fashion.
|
||||
|
||||
** '''EV_MULTI_COLUMN_LIST''' - Calling `column_width` after calling `resize_column_to_content` did not return the correct result but instead the previously set column width.
|
||||
** '''EV_NOTEBOOK'''
|
||||
*** Fixed resizing issue of notebook when it is included in a hidden pane of another notebook, resulting in an assertion violation in the resizing code.
|
||||
*** Fixed class invariant which failed when calling `destroy`.
|
||||
|
||||
** '''EV_WINDOW'''
|
||||
*** Fixed `screen_x` and `screen_y` so that they return the same value as `x_position` and `y_position`.
|
||||
*** Fixed issue where `move_actions` were called with incorrect positions (before the given positions were the one from the child of the window, not the window itself).
|
||||
|
||||
** '''EV_DIALOG'''
|
||||
*** Calling `show`, moving the window and then subsequently calling `show_relative_to_window` or `show_modal_to_window` caused the dialog to move from its current position. Now the window no longer moves which mirrors the behavior in the opposite case where `show_relative_to_window` or `show_modal_to_window` is called before `show`.
|
||||
*** Fixed bug which caused processing of particular keys in widgets contained within the dialog to be processed by the dialog preventing the `key_press_actions` from being fired and causing miscellaneous keyboard navigational issues.
|
||||
*** Proper handling of `remove_default_push_button` and `set_default_push_button`. Before the internal state would be messed up, resulting in calling the `select_actions` of the the `default_push_button` even though the `default_push_button` did not have focus.
|
||||
*** Better navigation using keys
|
||||
*** Fixed bug where modal and modeless dialogs were not centered to parent
|
||||
|
||||
** '''EV_TREE_NODE''' - Fixed bug which caused a crash if you performed the following: pruned a node from it's parent, pruned an empty node from this just pruned node and then attempted to insert a node within the empty node.
|
||||
** '''EV_DIRECTORY_DIALOG''' - Fixed bug in which the dialog always reported that "ok" has been selected even if the "cancel" button had been selected. This occurred if the dialog had been shown more than once with "ok" already selected.
|
||||
** '''EV_PIXMAP'''
|
||||
*** Fixed color displayed around a pixmap while parented in a container. Previously, gray was always displayed but now we use the `background_color` of the `parent`.
|
||||
*** Fixed masking blitting in draw_sub_pixmap. Previously the mask wasn't being blitted correctly discoloring the source image
|
||||
*** Fixed mask handling with PNG loading. Previously if the source image pixels under the mask were not black then masking for icons and cursors didnt work correctly, now any color can be used underneath the mask and it will still be masked correctly
|
||||
|
||||
** '''EV_TOOL_BAR'''
|
||||
*** Fixed `is_show_requested` which was still returning `True` after a call to `hide`.
|
||||
*** Improved resizing of tool bar buttons. A tool bar button with a text and no associated pixmap used to display an empty area where the pixmap would be displayed if set. Now, in this case, the button is just large enough to display its text.
|
||||
|
||||
** '''EV_FONT''' - Fixed bug in `is_equal` which occasionally failed due to rounding errors between `height` and `height_in_points`. Now, `is_equal` compares `height_in_points` for the font which is more accurate and prevents this issue.
|
||||
** '''EV_APPLICATION''' - `cancel_actions` were not always called when they should have been. If you cancelled a pick and drop by right clicking on a target that does not accept the `pebble`, the `cancel_actions` were not fired.
|
||||
** '''EV_RICH_TEXT'''
|
||||
*** Fixed bug in `buffered_format` which corrupted the current text upon calling `flush_buffer` if the text contained any RTF reserved characters such as '/', '{' or '}'.
|
||||
*** Fixed `set_background_color` which was not changing the background color
|
||||
*** Fixed bug in `disable_word_wrapping` which had a side effect that limited the maximum number of characters to 64000.
|
||||
|
||||
** '''EV_TOOL_BAR_BUTTON''' - Fixed bug in handling of enabled/disabled state during a pick and drop transport. The pick and drop mechanism disables tool bar buttons automatically that are not valid targets. If you called `enable_sensitive` or `disable_sensitive` during a pick and drop, this state was not reflected at the end of the pick and drop and the buttons were always restored to their original state. Now the buttons are restored to their last set state.
|
||||
** '''EV_TITLED_WINDOW''' - Fixed issue with `raise` where in addition of bringing the window to the front it was changing the previously focused widget within that window. Now it preserves the previously focused widget.
|
||||
** '''EV_PRIMITIVE''' - Fixed bug which affected all primitives that hold items. Calling `destroy` on the primitive and then calling `destroy` on one of the items caused precondition violations internally. The bug was that the call to `destroy` on the primitive did not call `wipe_out` to remove all of the contents and the item was still attempting to access its `parent` which should have been `Void`.
|
||||
** '''EV_WIDGET'''
|
||||
*** Fixed two bugs with `key_press_string_actions`. The first was that the action sequence was fired when Escape or Backspace was pressed. As these are not displayable characters, the `key_press_string_actions` are no longer fired for these keys. The second is that pressing Enter was passing the the string "%R" which is the Windows specific newline character. We now pass "%N" when the Enter key is pressed.
|
||||
*** Fixed bug in `pointer_motion_actions`. In some uncommon situations, it was possible to receive the motion event multiple times with the same position.
|
||||
*** The `key_press_string_actions` are no longer fired by the "delete" key ( ASCII 127).
|
||||
|
||||
** '''EV_TEXT''' - Fixed bug where `caret_position` was returning an incorrect value if it the text had word wrapping enabled and one or more lines in the text were currently word wrapped.
|
||||
** '''EV_FONT_DIALOG''' - Fixed bug where `name` of `font` returned was incorrect.
|
||||
** '''EV_SPLIT_AREA''' - Split areas now have a completely flat appearance.
|
||||
|
||||
* '''Gtk'''
|
||||
** '''EV_CURSOR''' - Now the default X-Cursors are used where applicable instead of pixmapped representations of them, this allows for animated cursors if available on the X-server
|
||||
** '''EV_VIEWPORT''' - Fixed issue where offsets where not being updated right away so querying back to the viewport from an expose caused by the viewport for the values would be incorrect
|
||||
** '''EV_TEXTABLE''' - Now UTF8 strings from different language locales are displayed correctly and not cut-off
|
||||
** '''EV_CLIPBOARD''' - Now UTF8 strings from different language locales are handled correctly for copying and pasting
|
||||
** '''EV_DRAWING_AREA''' -
|
||||
*** Fixed `flush` to instantly call any pending expose events
|
||||
*** Fixed issue where drawing area was not being focused when clicked upon by default
|
||||
|
||||
** '''EV_FONT'''
|
||||
*** Fixed memory leaks in font lookup
|
||||
*** Now all resources get freed on disposal of font
|
||||
*** Now precalculating `ascent` and `descent` to improve drawing performance
|
||||
*** Added better default font handling, now if the default font gets passed in, it will be treated as such by the Gtk theme engine
|
||||
|
||||
** '''EV_TOOL_BAR_BUTTON''' - Improve appearance of text and pixmap when `disable_vertical_button_style` is called
|
||||
** '''EV_FONTABLE''' - Improved font handling with theme manager, all default fonts now relate to the Application font chosen from the Gtk theme manager
|
||||
** '''EV_DRAWABLE'''
|
||||
*** Corrected font placement with `draw_text` using fonts of the same height that have varying ascent values
|
||||
*** Corrected `draw_arc` to handle all radian angles for both start_angle and aperture values
|
||||
*** Fixed mask handling for `draw_sub_pixmap` to work with non-zero 'area' coordinates
|
||||
|
||||
** '''EV_MULTI_COLUMN_LIST''' - Fixed memory leak when setting string values
|
||||
** '''EV_TREE_NODE'''
|
||||
*** Fixed `remove_pixmap` to remove pixmap from tree model
|
||||
*** Fixed crash when removing nodes from parent nodes not present in a tree widget
|
||||
|
||||
** '''EV_RICH_TEXT'''
|
||||
*** Now `paste` uses the EiffelVision 2 clipboard directly and so all clipboard assertions are fulfilled
|
||||
*** Fixed `buffered_format` to not wipe out the text buffer of the widget and therefore stop other EV_TEXT features from functioning correctly
|
||||
*** Now `buffered_append` doesn't wipe out the screen contents of the rich text control
|
||||
|
||||
** '''EV_ACCELERATOR''' - Now the key accelerator is checked if valid before proceeding, in some circumstances when a key is not present in the key mapping table adding an accelerator would crash the system, now if the accelerator is not valid for the current key mapping then nothing is done
|
||||
** '''EV_WINDOW'''
|
||||
*** Now setting and querying focus works in all circumstances with all window types
|
||||
|
||||
** '''EV_PIXMAP''' - Improved pixmap 'stretch' for smaller images
|
||||
** '''EV_WIDGET'''
|
||||
*** Optimized motion event handling so that current motion events only get requested when the previous one has been processed
|
||||
*** Fixed theme managed handling in all widgets so that fonts when changed outside of the application by the theme manager get reflected in the EiffelVision 2 application
|
||||
|
||||
** '''EV_DIALOG'''
|
||||
*** Fixed bug where modal and modeless dialogs were not centered to parent
|
||||
|
||||
** '''EV_FRAME''' - Corrected issue where changing alignment of text was resetting the vertical alignment
|
||||
** '''EV_COMBO_BOX''' - Now the drop down box doesn't fire focus out actions when shown
|
||||
|
||||
|
||||
==EiffelStudio 5.5==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_TEXT'''
|
||||
** Weakened a number of preconditions that required a non empty final line, which was unnecessary. Removed the obsolete feature `put_new_line` and made `last_line_not_empty` obsolete as it is unnecessary and can be queried via `line`.
|
||||
** Added `line_number_from_position` which returns the line on which a particular caret position resides.
|
||||
|
||||
* '''EV_ACTIVE_LIST''' - New class added which replaces all occurrences of ACTIVE_LIST within the interface. This prevents the EiffelVision implementation from being "unhooked" by user modification through the interface. The class is completely backwards compatible, and does not require any modifications to your code. Classes such as EV_ACCELERATOR_LIST and EV_FONT incorporate this change.
|
||||
* '''EV_DOCKABLE_SOURCE''' - Added features `is_external_docking_relative`, `enable_external_docking_relative` and `disable_external_docking_relative`. This permits you to dock a source to an EV_DOCKABLE_DIALOG that is not displayed relative to the original top window.
|
||||
* '''EV_RICH_TEXT''' - New class, providing a text control with support for character formatting and colors on a character by character basis. The following supporting classes have been added for use with EV_RICH_TEXT: EV_CHARACTER_FORMAT, EV_CHARACTER_FORMAT_EFFECTS, EV_PARAGRAPH_FORMAT, EV_CHARACTER_FORMAT_RANGE_INFORMATION, EV_PARAGRAPH_FORMAT_RANGE_INFORMATION and EV_PARAGRAPH_CONSTANTS.
|
||||
* '''EV_ENVIRONMENT''' - Added `fonts` which returns a list of all fonts available on the system.
|
||||
* '''EV_APPLICATION''' - Added `captured_widget` which returns the EV_WIDGET currently captured in the system, or `Void` if none.
|
||||
* '''EV_SPLIT_AREA''' - Added `splitter_width` which returns the width of the splitter in pixels.
|
||||
* '''EV_ANY_HANDLER''' - This is the only class to which `default_create` from EV_ANY is supposed to be exported. However, particular descendents were exporting `default_create` to ANY instead. This has now been fixed.
|
||||
* '''EV_MESSAGE_DIALOG''' - `make_with_text_and_actions` has now been added to the list of creation procedures.
|
||||
* '''EV_SCREEN''' - Added `horizontal_resolution` and `vertical_resolution` which return the number of pixels per inch.
|
||||
* '''EV_FILE_DIALOG''' - Added support for multiple file extensions through the addition of `filters` which provides support for setting both a filter and an associated comment. The existing features `filter` and `set_filter` have been made obsolete.
|
||||
* '''EV_FONT'''
|
||||
** Modified return type of `string_size` from TUPLE [INTEGER, INTEGER] to TUPLE [INTEGER, INTEGER, INTEGER, INTEGER]. This does not break any existing code, but provides additional `left_offset` and `right_offset` queries (items 3, 4). Items 1, 2 still return the width and height of the string, but this is only the dimensions to be used when placing multiple strings next to each other. Some characters on more exotic fonts may still extend past this boundary, and the rectangle that fully encloses the string is given by adding the left and right offsets to the width.
|
||||
** Added `height_in_points` and `set_height_in_points` for setting the height of a font in points (1/72 of an inch). This may be used to ensure that your fonts occupy the same height on screens with varying resolutions.
|
||||
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_DRAWABLE''' - `draw_text` and `draw_text_top_left` now both support text containing new line characters.
|
||||
** '''EV_APPLICATION''' - `focused_widget` had a side effect which may modify the index of some containers.
|
||||
** '''EV_DYNAMIC_TREE_ITEM''' - fixed `count` which was not executing the subtree function as necessary when called.
|
||||
** '''EV_TREE''' - Fixed bug in `has_recursively` which failed if there were one or more dynamic tree items contained.
|
||||
** '''EV_MULTI_COLUMN_LIST''' - Fixed bug in `set_column_alignments` which crashed if you called it with an empty list after having previously called it with a non empty list.
|
||||
** '''EV_FIGURE_TEXT''' - Fixed bounding size issues which would cause the `width` and `height` to be returned incorrectly, causing them to be not correctly cleared when moved in a figure world.
|
||||
** '''EV_FIGURE_GROUP''' - Fixed both `append` and `make_from_array` which were not setting the `group` of each item inserted.
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_WINDOW'''
|
||||
*** `move_actions` was always passing positive values for the x and y coordinates of the window, even if they should have been negative.
|
||||
*** Showing two or more dialogs relative to a window and then hiding the focused relative dialog could cause the window to move being the next window in the Z order. This has now been fixed.
|
||||
|
||||
** '''EV_FONT'''
|
||||
*** Fixed bug when using `preferred_families` after creating a font via `make_with_values`. The family that was specified was previously ignored.
|
||||
*** Fixed bug in `copy` which in certain cases could lead to a copied font not exhibiting the typeface as the original, even though no assertions were violated.
|
||||
|
||||
** '''EV_SCROLL_BAR''' - Fixed handling of scroll bars with upper values greater than 32,000. Previously, dragging the bar of a scroll bar past this limit, corrupted the position of the bar and the `value`.
|
||||
** '''EV_TEXT'''
|
||||
*** Corrected `last_position_from_line_number` which was returning an incorrect position when there were multiple lines of text contained, and you queried the final line.
|
||||
*** Modified `insert_text` so that the control is no longer scrolled to the top as a result. The original position is now maintained wherever possible.
|
||||
*** Corrected handling of selection for caret positions greater than 64,000 characters. The following features were broken when using caret positions greater than 64,000: `caret_position`, `has_selection`, `selection_start` and `selection_end`
|
||||
|
||||
** '''EV_SPIN_BUTTON'''
|
||||
*** Corrected positioning in parent container. In many situations, the spin button mis-behaved and would be moved to the 0x0 pixel position in the parent.
|
||||
*** Fixed tooltips which were never displayed.
|
||||
|
||||
** '''EV_LIST_ITEM''' - Setting a pixmap to an item that was already displayed in a list and had a text would cause the end of the text to be cut off. This is now fixed.
|
||||
** '''EV_COMBO_BOX''' - Fixed tooltips which were never displayed.
|
||||
** '''EV_TOOL_BAR''' - Fixed a number of serious GDI leaks, the worst of which occurred when items that had a pixmap were removed from a tool bar.
|
||||
** '''EV_PROGRESS_BAR''' - Fixed bug which was limiting values in the range 0 to 65535.
|
||||
** '''EV_TEXT_FIELD''' - calling `set_font` now updates the `minimum_height` of the text field so that it is large enough to completely display the font.
|
||||
|
||||
* '''Gtk'''
|
||||
** '''GTK 2.4''' EiffelVision 2 has been completely upgraded from gtk 1.2 to version 2.4 and provides completely new implementations for EV_LIST, EV_COMBO_BOX, EV_FILE_DIALOG, EV_MULTI_COLUMN_LIST, EV_CLIPBOARD, EV_MENU, EV_TREE, EV_FONT, EV_PIXMAP using the latest gtk widget set
|
||||
** '''EV_WIDGET''' Fixed a screen positioning for all widgets
|
||||
** '''EV_GAUGE''' Fixed bounds setting
|
||||
** '''EV_DIALOG''' Now key presses work whilst in Pick and Drop
|
||||
** '''EV_WIDGET''' Now motion events pass x and y coordinates relative to the captured widget
|
||||
|
||||
|
||||
==EiffelStudio 5.4==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_ITEM_PIXMAP_SCALER''' - New class added which provides no new functionality, but is a clean abstraction of `pixmaps_width`, `pixmaps_height` and `set_pixmaps_size` which were all defined independently in EV_TREE, EV_LIST, EV_MULTI_COLUMN_LIST and EV_COMBO_BOX. Your code will not be affected by this change.
|
||||
* '''EV_TOOL_BAR''' - Added three new features `has_vertical_button_style`, `enable_vertical_button_style` and `disable_vertical_button_style`. The default style for buttons is vertical and was the only style previously available, in which the `pixmap` is displayed above `text`. When vertical style is disabled, the `pixmap` of a button will be displayed to the left of its `text`.
|
||||
* '''EV_TREE ''' - No longer inherits EV_TREE_NODE_CONTAINER which is now obsolete. Made `selected` obsolete, use selected_item /= Void instead.
|
||||
* '''EV_TREE_NODE''' - Now inherits EV_TREE_NODE_LIST instead of EV_TREE_NODE_CONTAINER. This provides more functionality at the level of the node, but does not change the features available in non deferred descendents, as they all previously inherited EV_TREE_NODE_LIST. Changed type of `parent` to EV_TREE_NODE_LIST from EV_TREE_NODE_CONTAINER. Removed three obsolete features - `align_text_left`, align_text_center' and `align_text_right`.
|
||||
* '''EV_TREE_ITEM''' - Strengthened `is_expandable` so that it checks `parent_tree` is not Void, this brings it into line with the preconditions of `expand`.
|
||||
* '''EV_DYNAMIC_TREE_ITEM''' - Strengthened `is_expandable` to check `parent_tree`, in line with preconditions of `expand`. Added "valid_operands" precondition to `set_subtree_function` which ensures that you only pass a function with valid operands.
|
||||
* '''EV_TREE_NODE_CONTAINER''' - Now obsolete, you should use EV_TREE_NODE_LIST instead.
|
||||
* '''EV_MULTI_COLUMN_LIST''' - Added missing postconditions to `align_text_left`, `align_text_right`, `align_text_center` and other miscellaneous features that were missing relevant postconditions.
|
||||
* '''EV_MENU''' - Tightened preconditions of `show` and `show_at` to ensure that the menu is not parented.
|
||||
* '''EV_TEXT''' Added `has_word_wrapping`, `enable_word_wrapping` and `disable_word_wrapping`. These features allow you to switch between horizontal word wrapping, in which lines too long to be displayed will be wrapped, and no word wrapping, in which horizontal scroll bars will be displayed, allowing you to view the complete contents of each line. Previously EV_TEXT would always wrap lines, and the default behavior is `has_word_wrapping` as it was before these changes.
|
||||
* '''EV_TEXT_COMPONENT''' - Added `has_selection` precondition to `selected_text` which requires that `has_selection` must be True for you to call `selected_text`.
|
||||
* '''EV_FILE_DIALOG''' - Added `valid_file_title` for validation of a file name excluding the path.
|
||||
* '''EV_STANDARD_DIALOG''' - Corrected postcondition of `make_with_text` which was checking that `text` was the same object as the STRING passed as an argument. This was incorrect, as `text` is cloned during the creation.
|
||||
* '''EV_WIDGET''' - Added `remove_real_target` which ensures that `real_target` is Void.
|
||||
* '''EV_WIDGET_ACTION_SEQUENCES''' - Added `mouse_wheel_actions`, fired each time that the mouse wheel is scrolled.
|
||||
* '''EV_NOTEBOOK''' - Now inherits EV_FONTABLE permitting a font to be applied to the item texts.
|
||||
* '''EV_ENVIRONMENT'''
|
||||
** Added `mouse_wheel_scroll_lines` which returns an INTEGER corresponding to the number of lines that should be scrolled in response to each mouse wheel scroll event received.
|
||||
** Added `has_printer` which returns `True` if at least one printer is installed.
|
||||
|
||||
* '''EV_PRINT_CONTEXT''' - Added `horizontal_resolution` and `vertical_resolution` which return the page size in pixels of the page type selected from an EV_PRINT_DIALOG. This permits you to adjust the figure world you are printing to an EV_PRINT_PROJECTOR based on the limits of the page, as determined by `horizontal_resolution` and `vertical_resolution` in pixels.
|
||||
* '''EV_APPLICATION''' - Added `process_events_until_stopped` and `stop_processing`, similar to `process_events`, except the processing is executed until `stop_processing` is called.
|
||||
* '''EV_PRINT_PROJECTOR''' - Added `has_printer` check to `make_with_context`, ensuring that if you are to print to a printer, at least one printer is available.
|
||||
* '''EV_PRINT_CONTEXT''' - `default_create` now initializes a set of standard values, permitting the printing to the default printer, using US letter size.
|
||||
* '''EV_RELATIVE_POINT''' - The features `set_x_abs`, `set_y_abs`, `set_angle_abs`, `set_scale_x_abs` and `set_scale_y_abs` now all have a precondition ensuring that you may only call them while `being_positioned` is True, which is only the case during execution of a custom positioning agent. Previously, if they were called at other times, the values set would be overridden.
|
||||
* '''EV_FIGURE''' - `accept_cursor` and `deny_cursor` are now available as queries.
|
||||
* '''EV_ABSTRACT_PICK_AND_DROPABLE''' - `set_accept_cursor` and `set_deny_cursor` no longer accept `Void` arguments.
|
||||
* '''EV_FIGURE_MATH ''' - 'line_angle' now correctly returns the angle in radians relative to world.
|
||||
* '''EV_ARROWED_FIGURE''' - 'start_angle' and 'end_angle' now work in all circumstances
|
||||
* '''EV_FIGURE_STAR''' - First line generated is now created from 'point_b'
|
||||
* '''EV_FIGURE_EQUILATERAL''' - First point generated is now based upon 'point_b'
|
||||
|
||||
'''Breaking changes'''
|
||||
* '''EV_TREE_NODE_CONTAINER''' - This class is no longer used in EiffelVision 2, and if you were relying on it, you should use EV_TREE_NODE_LIST instead. The type of `parent` for tree nodes has been changed from EV_TREE_NODE_CONTAINER to EV_TREE_NODE_LIST, so if you retrieve the `parent` and then attempt to iterate, you may have declared an instance of EV_TREE_NODE_CONTAINER. In this situation, you should simply change the definition to EV_TREE_NODE_LIST instead.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_DYNAMIC_TREE_ITEM''' - No longer crashes if your `subtree_function` returns Void. In this situation, it will now behave as if the `Result` was empty.
|
||||
** '''EV_BOX''' - Attempting to dock from an EV_DOCKABLE_SOURCE while the box was empty would not work. This has now been fixed.
|
||||
** '''EV_TEXT_COMPONENT''' - Calling `append_text`, `prepend_text` or `insert_text` while `is_editable` is False caused a precondition failure in the implementation which is now fixed.
|
||||
** '''EV_DOCKABLE_SOURCE'''
|
||||
*** It was previously not possible to dock to an empty window, as the target was ignored in error.
|
||||
*** Fixed bug which caused a crash if a dock was attempted to an empty box.
|
||||
|
||||
** '''EV_CHECKABLE_LIST''' - Corrected postcondition of `checked_items` which was checking `selected_items` in error, and therefore almost always failing.
|
||||
** '''EV_APPLICATION''' - Querying `focused_widget` if the window with the focus was empty caused a crash. This has now been fixed, and in this situation, the window itself is returned.
|
||||
** '''EV_FIGURE_TEXT''' - Fixed handling of `preferred_fonts` from the `font`, which was not taken into account. Previously, the default font was always used.
|
||||
** '''EV_DYNAMIC_LIST''' - Fixed `retrieve_item_by_data` and `retrieve_items_by_data` which were always performing object comparison, even when reference comparison was selected by passing `False` as the second argument.
|
||||
** '''EV_TREE_NODE_LIST''' - Fixed `retrieve_item_recursively_by_data` and `retrieve_items_recursively_by_data` which were always performing object comparison, even when reference comparison was selected by passing `False` as the second argument.
|
||||
** '''EV_CONTAINER''' - Fixed bug in `unmerge_radio_button_groups` which would crash if the container had no radio buttons.
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_TEXT_COMPONENT''' - fixed bug in `select_region` which would fail if `start_pos` was greater than `end_pos`.
|
||||
** '''EV_PIXMAP'''
|
||||
*** `expose_actions` previously had a feature contained related to the implementation, and calling `wipe_out` on `expose_actions` would stop the image from being redrawn. There are now no side effects related to `expose_actions`.
|
||||
*** Calling `copy` on a pixmap that was parented in an EV_CONTAINER, and therefore displayed on screen had no visual effect until the window was re-painted. The image is now updated immediately. Also, using `copy` on a pixmap in a similar situation that was originally set with a masked icon, and passing a pixmap created from a bitmap file would cause a crash.
|
||||
*** Fixed display error in handling of pixmaps created from a PNG with a transparent color, using `set_with_named_file`. The background would be garbled and partially black.
|
||||
|
||||
** '''EV_LIST'''
|
||||
*** Calling `disable_sensitive` when already non sensitive would loose the original selection, and calling `enable_sensitive` when already sensitive would alter the selected item. The features will no longer alter the selection if called twice.
|
||||
*** Fixed result of `background_color` which was returning gray instead of white before a color was assigned
|
||||
'''EV_CELL''' - If you removed the item, the minimum size was not updated to reflect this, thereby retaining the minimum size as constrained by the minimum size of the now removed item.
|
||||
** '''EV_TREE_ITEM'''/ '''EV_TREE''' - A call to `disable_select` on an EV_TREE_ITEM will now actually remove the selection from the tree. Previously, the style of the item was changed, but a call to `selected_item` on the tree would still return the item.
|
||||
** '''EV_FILE_DIALOG''' - Fixed precondition violation when you calling `set_file_name` which was rejecting directory separators.
|
||||
** '''EV_DIALOG''' - Fixed a bug when you had two dialogs displayed modally, with the second modal to the first. If you had a text field within the second dialog whose `return_actions` contained an agent which would destroy the second dialog, the `select_actions` of the `default_push_button` in the lower dialog would be subsequently fired.
|
||||
** '''EV_LABEL''' - If a label was disabled through the disabling of a container in which it was contained, it would sometimes not be grayed out. This has now been fixed.
|
||||
** '''EV_PICK_AND_DROPABLE'''
|
||||
*** `mode_is_target_menu` did not work for a pick and drop source whose `pebble` was generated by a `pebble_function`.
|
||||
*** Fixed bug where drag and drop was not working as it was attempting to perform docking instead. If both are enabled, docking has priority.
|
||||
|
||||
** '''EV_COMBO_BOX_IMP'''
|
||||
*** Fixed `set_foreground_color` and `set_background_color` which previously did nothing.
|
||||
*** Fixed bug in selection. If during execution of the `select_actions` of an item contained, you called `enable_select` on another item within the combo box, subsequently selecting the originally selected item would no longer fire its `select_actions`.
|
||||
*** `enable_edit` and `disable_edit` were both causing the pixmaps of any items contained to be no longer displayed.
|
||||
|
||||
** '''EV_PRINT_DIALOG''' - Querying `print_context` from a print dialog if a user selected "Cancel" would previously crash.
|
||||
** '''EV_TREE''' and '''EV_MULTI_COLUMN_LIST''' - Fixed result of `background_color` which was returning gray instead of white before a color was assigned
|
||||
** '''EV_SCREEN''' - `widget_at_pointer_position` now returns the combo box if the mouse pointer is held above the drop down list button of a combo box. Previously, `Void` was returned.
|
||||
|
||||
* '''Gtk'''
|
||||
** '''EV_TREE_NODE''' - Now expansion state remains the same when 'set_pixmap' is called.
|
||||
** '''EV_DIALOG''' - Fixed bug where 100 percent of CPU time was being used when dialog was shown modally.
|
||||
** '''EV_WINDOW''' - Now sizing invariants are fulfilled when widget is destroyed, preventing segmentation violation.
|
||||
** '''EV_COMBO_BOX'''
|
||||
*** Fixed bug where reselecting an item within the combo box list was in fact deselecting it.
|
||||
*** Now first item remains selected when items are added.
|
||||
|
||||
** '''EV_WINDOW''' - Fixed querying of positioning which never changes if previously set by user.
|
||||
** '''EV_APPLICATION''' - Priority of `idle_actions` has been changed so that gtk will recalculate widgets sizes before calling its idle handler, this means that all resizing is done before idle actions are called.
|
||||
** '''EV_WINDOW ''' - Now windows correctly shrink when requested size is smaller than current size
|
||||
** '''EV_PICK_AND_DROPABLE''' - Fixed bug where if both drag and drop and docking were enabled, both would be executed, now docking overrides drag and drop if both are enabled.
|
||||
** '''EV_TIMEOUT ''' - Now timeouts correctly unregister themselves on dispose preventing segmentation violation.
|
||||
** '''EV_PIXMAP ''' - Pixmap stretching now works as expected.
|
||||
** '''EV_WINDOW''' - Now all window specific events work as expected
|
||||
** '''EV_TITLED_WINDOW''' - Now is_displayed returns false when window is minimized.
|
||||
** '''EV_TREE_NODE''' - Insertion of children at specific rows now displays as expected.
|
||||
** '''EV_WINDOW''' - Now windows have a border and are resizable to match Win32 behavior
|
||||
** '''EV_SPLIT_AREA''' - Now 'split position' honors request when widget resize is pending
|
||||
** '''EV_DRAWING_AREA ''' - Fixed full size optimization so that all expose actions are handled correctly
|
||||
** '''EV_TEXT_COMPONENT - ''' Fixed issue where up and down arrow keys caused widget to lose focus unnecessarily
|
||||
** '''EV_FONT''' - Now preferred families are taken in to account when no style is set
|
||||
** '''EV_STANDARD_DIALOG '''- Now all file handling dialogs are resizable
|
||||
|
||||
|
||||
==EiffelStudio 5.3==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_TITLED_WINDOW_ACTION_SEQUENCES''' added which is inherited only by EV_TITLED_WINDOW and provides three new action sequences :- `minimize_actions`, `maximize_actions` and `restore_actions`.
|
||||
* '''EV_TITLED_WINDOW'''
|
||||
** You may now only call `maximize` and `minimize` if `is_show_requested`.
|
||||
** When minimized, `is_displayed` now returns False.
|
||||
|
||||
* '''EV_BUTTON''' now inherits EV_FONTABLE, allowing you to modify the font displayed.
|
||||
* '''EV_DYNAMIC_LIST_ITEM''' - Corrected `off` which was using the version inherited from EV_TREE_NODE when it should have been using the version from EV_TREE_NODE_LIST instead.
|
||||
* '''EV_RECTANGLE''' - Added precondition to `intersects` which stops a Void rectangle being passed as an argument.
|
||||
* '''EV_TOOL_BAR_SEPARATOR''' - Now export many inherited features to {ANY} instead of {NONE}, including `parent`.
|
||||
* '''EV_ENVIRONMENT''' - Added `supported_image_formats` which returns a LINEAR [STRING] containing all valid formats by their three letter extension.
|
||||
* '''EV_CHECKABLE_LIST''' - New class added which behaves as an EV_LIST, except that for each EV_LIST_ITEM contained, an associated check box is displayed.
|
||||
* '''EV_MESSAGE_DIALOG''' - No longer deferred, and has two creation procedures `default_create` and `make_with_text`.
|
||||
* '''EV_STANDARD_DIALOG''' - All descendents now have `make_with_text` as a creation procedure'.
|
||||
* '''EV_TABLE''' - Now inherits CHAIN instead of ARRAY. This is a breaking change, and may require some modification to your code. The inheritance from ARRAY was seriously flawed. For example, if you were to call `extend` on an EV_CONTAINER object that was currently referencing an EV_TABLE, then this would fail. Now that we inherit CHAIN, this problem, among others of a similar nature are fixed. Another advantage of inheriting CHAIN, is that the table may now be iterated which allows for greater flexibility. <br/>
|
||||
<br/>
|
||||
The following list details some of the breaking changes, and how to fix them:
|
||||
** '''item''' - If you were using `item`, you should change this to `item_at_position`. A call to `item` will now return the current item.
|
||||
** '''put''' - If you were using `put`, you must now replace this with `put_at_position`.
|
||||
** '''extend''' and '''replace''' - These are now both exported, as before, they were exported to {NONE}.
|
||||
** features inherited from '''ARRAY''' - These are no longer available but you may use the feature `to_array`, which returns the contents of the table represented as an ARRAY [EV_WIDGET]. This feature is marked as obsolete, as it is temporary, to simplify the transition to the new inheritance structure of EV_TABLE.
|
||||
** '''count''' - The previous version of `count` was the one from ARRAY, which returned the number of available (not empty) cells in the table. We now use the version of `count` inherited from EV_CONTAINER which returns the number of widgets currently contained. Previously, the feature `widget_count` was used to return the number of items, but this feature has now been made obsolete. Therefore, if you were previously using `count`, replace this with `rows` * `columns`, and if you were using `widget_count`, replace this with a call to `count`.
|
||||
** '''item_list''' - This is now obsolete. You may use `linear_representation` to retrieve the contents of the table, or simply traverse the table.
|
||||
|
||||
* '''EV_FIXED''' - No longer inherits DOUBLE_MATH.
|
||||
* '''EV_VIEWPORT''' - No longer inherits DOUBLE_MATH.
|
||||
* '''EV_TEXT''' - `line_count` now returns the number of lines actually displayed, and not just the newline characters, as an EV_TEXT will wrap the text when necessary. The postcondition of `linecount` has been updated to reflect this change.
|
||||
* '''EV_FILE_DIALOG''' Added "valid_file_name" precondition to `set_file_name` and a new feature `valid_file_name` which checks that a file name is valid on the current platform.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_WIDGET''' - `pointer_style` now correctly returns the Ibeam cursor for textable widgets.
|
||||
** '''EV_FIGURE_RECTANGLE'''
|
||||
*** Corrected `bounding_box` which was previously computed incorrectly when the rectangle was rotated.
|
||||
*** Fixed `width` and `height` which were always returning one less pixel than they should have.
|
||||
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_PIXMAP''' - Setting a tile with `set_tile` followed by a call to a fill routine would crash the implementation.
|
||||
** '''EV_COMBO_BOX''' - Implemented pick and drop.
|
||||
** '''EV_TEXT_FIELD''' - Implemented pick and drop.
|
||||
** '''EV_PASSWORD_FIELD''' - Implemented pick and drop.
|
||||
** '''EV_TEXT'''
|
||||
*** Implemented pick and drop.
|
||||
*** If not `is_editable` and a `background_color` had been set, it was only used on lines containing text. The `background_color` is now correctly displayed throughout the whole control when not `is_editable`.
|
||||
*** Fixed `select_region` which was selecting an incorrect region starting on any line except the first, when the `text` spanned multiple lines.
|
||||
*** Fixed `selection_start` and `selection_end` which were incorrect when the selection was not completely contained on the first line.
|
||||
*** Fixed `first_position_from_line_number` and `last_position_from_line_number` which were returning incorrect values when the text was wrapped.
|
||||
*** Fixed `caret_position` and `set_caret_position` which were incorrect when the text spanned multiple lines, and the caret was not on the first line.
|
||||
*** `line_count` now returns the number of lines actually displayed, and not simply the number of newline characters. To query the number of new line characters do :- text.occurrences ('%N')
|
||||
*** Fixed bug in `search` which was returning -1 instead of 0 when the text was not found.
|
||||
|
||||
** '''EV_DRAWABLE''' - Fixed bug when you performed the following: drew a filled shape, called `set_tile` and then drew another filled shape. The tile would not be used on the second fill.
|
||||
** '''EV_COLOR_DIALOG''' - Querying `color` after a user had canceled the dialog would previously crash a system, if `set_color` had never been called.
|
||||
** '''EV_COLOR''' - Fixed `set_rgb_with_24_bit` which would fail when called.
|
||||
** '''EV_BUTTON, EV_TOGGLE_BUTTON''' - The buttons now correctly display a text, pixmap and background color simultaneously. Previously, the background color was never displayed, and either the pixmap or text would be displayed, not both.
|
||||
** '''EV_PRINT_DIALOG''' - Fixed `set_from_page` and `set_to_page` which were previously not implemented.
|
||||
** '''EV_LIST'''
|
||||
*** Fixed a graphical glitch when using `wipe_out` when items were contained that required the horizontal scroll bar to be visible. The scroll bar was not hidden, even though there were no longer any items in the list.
|
||||
*** Changing the selection behavior between multiple and single selection would cause the scroll bars to become hidden, even if they were necessary. Changing this status will no longer hide the scroll bars if they are required.
|
||||
|
||||
** '''EV_TOOL_BAR'''
|
||||
*** Items that were disabled would sometimes become enabled when other properties of the item were set. For example, performing "my_tool_bar_button.disable_sensitive" followed by "my_tool_bar_button.set_text ("Disabled")" while the button was parented, would result in a sensitive tool bar button. This is now fixed.
|
||||
*** If you changed the `text` of a tool bar toggle button during the firing of the `select_actions` of the toggle button, the button would become unchecked as a result. This is now fixed, and changing the text will not stop the button from becoming selected.
|
||||
|
||||
** '''EV_MULTI_COLUMN_LIST''' - Changing the selection behavior between multiple and single selection would cause the scroll bars to become hidden, even if they were necessary. Changing this status will no longer hide the scroll bars if they are required.
|
||||
** '''EV_DYNAMIC_TREE_ITEM''' - Calling `set_tooltip` failed and has now been fixed.
|
||||
** '''EV_TIMEOUT''' - Calling `destroy` more than once on a timeout, caused the implementation to crash, and has now been fixed.
|
||||
** '''EV_TOOLTIPABLE''' - Tooltips on primitives were not supporting multiple lines and this has now been fixed. Use %N for a line break.
|
||||
|
||||
* '''Gtk'''
|
||||
** '''EV_SCROLLABLE_AREA''' - Items smaller than the area are now positioned correctly.
|
||||
** '''EV_VIEWPORT'''
|
||||
*** Widget now works correctly with negative offset values
|
||||
*** Item position is now handled correctly on item resize.
|
||||
|
||||
** '''EV_PIXMAP''' - All drawing routines now flush immediately to screen.
|
||||
** '''EV_DIALOG''' - Canceling via Enter key is now handled correctly.
|
||||
** '''EV_LIST''' - Fixed selection of selected item when changing from multiple selection to single selection.
|
||||
** '''EV_MULTI_COLUMN_LIST'''
|
||||
*** Row height now incorporates spacing pixel to match the implementation of Windows.
|
||||
*** Default row height is now slightly larger to be more aesthetically pleasing with smaller fonts sizes.
|
||||
|
||||
** '''EV_CONTAINER'''
|
||||
*** `set_background_pixmap` now works with repeated parenting.
|
||||
*** Radio group unmerging is now handled correctly.
|
||||
|
||||
** '''EV_TEXT_FIELD ''' - Now vertical alignment is identical to that on Windows, including that for text field descendants.
|
||||
** '''EV_RANGE ''' - Now motions events are passing consistent pointer values instead of sometimes skewed ones.
|
||||
** '''EV_DRAWING_AREA''' - Now `focus_in_actions` are called in all circumstances.
|
||||
** '''EV_TEXT'''
|
||||
*** `scroll_to_line` is now implemented.
|
||||
*** `line_count` and `current_line_number` now handle lines in text widget and not the text itself.
|
||||
|
||||
** '''EV_FIXED''' - Now item sizing is correctly handled in all circumstances.
|
||||
** '''EV_NOTEBOOK''' - Now tabs are more aesthetically pleasing.
|
||||
** '''EV_MENU_SEPARATOR ''' - Menu Separators are now more prominent.
|
||||
** '''EV_TOOLBAR_SEPARATOR - '''Toolbar Separators are now more prominent.
|
||||
|
||||
|
||||
|
||||
|
||||
==EiffelStudio 5.2==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_TEXTABLE''' - `align_text_left`, `align_text_right` and `align_text_center` have been extracted into a new class, EV_TEXT_ALIGNABLE which inherits EV_TEXTABLE. All previous descendents of EV_TEXTABLE now inherit EV_TEXT_ALIGNABLE, except EV_TREE_NODE, EV_MENU_ITEM, EV_LIST_ITEM and EV_TOOL_BAR_BUTTON
|
||||
* '''EV_TEXT_COMPONENT''' - Now inherits EV_TEXTABLE.
|
||||
* '''EV_TEXT_ALIGNMENT_CONSTANTS''' - New class added to support EV_TEXT_ALIGNABLE.
|
||||
* '''EV_MENU_ITEM_LIST''' - `parent` is now of type EV_ANY, instead of EV_MENU_ITEM_LIST as it did not hold for EV_MENU_BAR. The renaming of `parent` to `old_parent` in EV_MENU_BAR has now been removed.
|
||||
* '''EV_VIEWPORT''' - added `set_item_width`, `set_item_height` and `set_item_size`.
|
||||
* '''EV_TABLE'''
|
||||
** redefined `prunable` to `True` and implemented `prune`.
|
||||
** Added the following features - `set_item_span`, `set_item_position`, `set_item_span_and_position`, `area_clear_excluding_widget`, `item_row_span`, `item_column_span`, `item_row_position` and `item_column_position`.
|
||||
|
||||
* '''EV_WIDGET''' - Changed type of `focus_in_actions` and `focus_out_actions` from EV_FOCUS_ACTION_SEQUENCE to EV_NOTIFY_ACTION_SEQUENCE. `is_parent_recursive` is no longer available. It has been moved to EV_CONTAINER. This was necessary to fix a catcall encountered using EiffelVision 2 under .NET. The problem manifested with widgets that held items.
|
||||
* '''EV_FIGURE''' - `proximity_in_actions` and `proximity_out_actions` are now obsolete.
|
||||
* '''EV_FONTABLE''' - `set_font` now sets a copy of the font internally.
|
||||
* '''EV_TREE''' - `ensure_item_visible` and `has_recursively` now take an EV_TREE_NODE as arguments, instead of an EV_TREE_ITEM.
|
||||
* '''EV_TEXT''' - `put_new_line` is now obsolete. Use `set_text ("%N") instead."
|
||||
* '''EV_APPLICATION_ACTION_SEQUENCES''' - Added `cancel_actions`, fired when a pick and drop is canceled, and `pnd_motion_actions` fired while the pointer moves during a pick and drop.
|
||||
* '''EV_TREE_NODE_LIST'''
|
||||
** `find_item_recursively_by_data`, `has_recursively` and `recursive_do_all` are now implemented in this class, instead of both EV_TREE and EV_TREE_NODE which are descendents.
|
||||
** Added `retrive_items_recursively_by_data` and `retrieve_item_recursively_by_data` which allow you to specify a comparison criterion, and due to this addition, `find_item_recursively_by_data` has now been made obsolete.
|
||||
|
||||
* '''EV_DYNAMIC_LIST''' - Added `retrieve_item_by_data` and `retrieve_items_by_data`.
|
||||
* '''EV_ITEM_LIST''' - Made `item_by_data` obsolete, as you should now use `retrieve_item_by_data` added in EV_DYNAMIC_LIST.
|
||||
* '''EV_DIALOG''' - Added `is_relative` and defined `is_modal` in this class, instead of inheriting it from EV_WINDOW.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_FIGURE_POLYLINE''' - Fixed `start_angle` and `end_angle` so that they are computed relative to the first and last polyline segments. This also fixes the start and end arrows, so that when displayed, they now actually point in the direction of their respective line segments.
|
||||
** '''EV_TREE and EV_TREE_NODE''' - Fixed `find_item_recursively_by_data` which failed on the `index_not_changed` postcondition. Note that these features are now defined in EV_TREE_NODE_LIST.
|
||||
** '''EV_DYNAMIC_TREE_ITEM''' - Fixed invariant violation from EV_ITEM_LIST, when created with `default_create`.
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_RADIO_BUTTON''' - The default minimum height after `default_create` is now enough to display the widget correctly.
|
||||
** '''EV_CHECK_BUTTON''' - The default minimum height after `default_create` is now enough to display the widget correctly.
|
||||
** '''EV_NOTEBOOK''' - When removing a widget from a notebook, it is now visible. Previously, the widget would be hidden.
|
||||
** '''EV_LIST, EV_MULTI_COLUMN_LIST, EV_TREE''' - Fixed `set_foreground_color` and `set_background_color`. Previously, calling these features did nothing.
|
||||
** '''EV_BOX''' - If a widget was not`is_item_expanded', then adding a new widget to the box before that widget would sometimes cause a different widget to become `is_item_expanded`.
|
||||
** '''EV_TOOL_BAR_RADIO_BUTTON''' - The currently selected button in `peers` was unselected when the button was pressed, and not when it was really selected. This bug made it possible to make `selected_peer` Void, which caused an invariant to fail.
|
||||
** '''EV_LIST_ITEM''' - Calling `enable_select` when parented in an EV_LIST now also sets the item as focused in the parent. This corrects bugs in keyboard navigation when selecting an item programatically.
|
||||
** '''EV_FIXED''' - The minimum size is constrained by the positions and sizes of the children (They must be completely displayed), although when the positions of the children were reduced, the minimum allowable size was not recomputed. This meant that the widget would be enlarged when the positions of the children increased, but could never be reduced in size when the positions of the children were decreased.
|
||||
** '''EV_MENU and EV_MENU_ITEM''' - `set_pixmap` has been implemented as previously, it did nothing.
|
||||
** '''EV_TABLE''' - re-implemented resizing calculations to fix numerous problems when children had minimum sizes. The minimum size now also includes the border width when empty.
|
||||
** '''EV_NOTEBOOK''' - `selection_actions` were called when you selected an item through `select_item`, even if the item was already selected. `selection_actions` are now only fired when the selection changes.
|
||||
** '''EV_TREE_ITEM''' - calling `set_pixmap` twice successively with the same EV_PIXMAP caused a postcondition failure.
|
||||
** '''EV_TEXT''' - Fixed `put_new_line`, although it has been made obsolete, as you should just use `append_text ("%N") instead.
|
||||
** '''EV_SPLIT_AREA''' - Fixed crash reproducable by inserting an EV_PIXMAP directly into the split area.
|
||||
** '''EV_CONTAINER''' - Fixed `propagate_foreground_color` and `propagate_background_color` which failed when one of the children was a descendent of EV_CELL.
|
||||
** '''EV_APPLICATION_ACTION_SEQUENCES''' - `drop_actions` was being fired even when the pick and drop was canceled.
|
||||
** '''EV_PIXMAP''' - Previously, if you were to add an agent to an action sequence of the pixmap, before it was parented, the agent would be removed during the parenting.
|
||||
** '''EV_MENU'''
|
||||
*** Pruning an EV_MENU_SEPARATOR when one or more EV_RADIO_MENU_ITEM were still contained in the menu would cause occasional crashes.
|
||||
*** Previously, when adding an EV_MENU_SEPARATOR, followed by multiple EV_RADIO_MENU_ITEMS, all the items were being selected.
|
||||
*** Fixed bug in `destroy` which was causing postcondition failures.
|
||||
|
||||
** '''EV_TITLED_WINDOW''' - Fixed a GDI leak, manifesting when a window was destroyed.
|
||||
** '''EV_DIALOG'''
|
||||
*** Fixed `is_modal` which was previously always returned `False`.
|
||||
*** Fixed bug with `background_color` and `foreground_color` which was not taken into account if the dialog was shown relative or modally to another window.
|
||||
*** If a dialog with a default cancel button was displayed using `show`, then minimizing the dialog would cause the system to fail internally.
|
||||
*** Fix bug in `show_relative_to_window` which would cause any associated menus to be removed.
|
||||
*** Fixed bug in `show`, as if the dialog had already been shown modelessly to a window, then calling `show` did not show it independently, but still modelessly.
|
||||
*** Fixed bug with `show_actions` which would be wiped out if you called `show_modal_to_window` and then `hide`.
|
||||
*** `set_pixmap` will now actually display the pixmap, whereas before, no pixmap was displayed.
|
||||
|
||||
** '''EV_TEXT_COMPONENT''' - Fixed `text_length` which was returning incorrect value for all descendents.
|
||||
** '''EV_TEXT''' - Fixed `line_count` which was previously returning the correct result + 1.
|
||||
** '''EV_SCROLLABLE_AREA''' - Fixed crash which occurred when you attempted to use `set_x_offset` or `set_y_offset` before the area had been parented or displayed.
|
||||
** '''EV_FONTABLE''' - Fixed bug when `font` was queried, `preferred_families` was not returned correctly, and would always be empty.
|
||||
** '''EV_CONTAINER''' - `set_background_pixmap` was not correctly cloning the image of the pixmap, and the displayed image could then be modified after setting, by changing the image of the original pixmap.
|
||||
|
||||
* '''Gtk'''
|
||||
** Remaining EV_WIDGET memory leaks have been fixed.
|
||||
** '''EV_WIDGET'''- Focus in/out actions are now correctly called for widgets that do not occupy their entire space allocation such as EV_TEXT_FIELD.
|
||||
** '''EV_DRAWABLE_IMP''' - Polylines now display correctly on big-endian machines (Sparc, PowerPC).
|
||||
** '''EV_KEY'''
|
||||
*** `out` is now correct for all keys (previously Quote and Backquote were incorrect).
|
||||
*** The events for all keys are now fired when Shift is held down.
|
||||
|
||||
** '''EV_STOCK_PIXMAPS''' - Warning and error pixmaps have been updated.
|
||||
** '''EV_WINDOW''' - `remove_title now` works will all Window Managers.
|
||||
** '''EV_TITLED_WINDOW'''
|
||||
*** `propagate_foreground_color` is now fixed in use with pixmaps as children.
|
||||
*** `set_maximum_size` now works as expected
|
||||
*** `set_minimum_width` now has no effect on Window height.
|
||||
*** calls on `minimize` before `launch` now satisfies all assertions
|
||||
*** calling `destroy` twice now doesn't fail on precondition.
|
||||
*** `set_position` now satisfies post-condition in all situations.
|
||||
*** `resize_actions` are now passed the correct values.
|
||||
*** `move_actions` are now called correctly.
|
||||
|
||||
** '''EV_NOTEBOOK''' - now satisfies invariants when empty.
|
||||
** '''EV_DIALOG'''
|
||||
*** Destroy now satisfies all invariants.
|
||||
*** Reported memory leaks now fixed.
|
||||
|
||||
** '''EV_LABEL''' - Size is now taken from default gtk style size instead of hard coded 10
|
||||
** '''EV_FONT''' - Font caching is now vastly improved in terms of speed.
|
||||
** '''EV_DRAWABLE''' - Calls to `set_font` are now also vastly speeded up.
|
||||
** '''EV_TABLE'''
|
||||
*** Memory management is now correct on item removal.
|
||||
*** Now setting child's parent correctly
|
||||
|
||||
** '''EV_TREE_NODE'''
|
||||
*** Fixed all reported issues regarding item insertion and removal.
|
||||
|
||||
** '''EV_CONTAINER''' - Fixed remaining issues with radio grouping and merging.
|
||||
** '''EV_PICK_AND_DROPABLE''' - Now drop_actions may destroy `Current` without crash.
|
||||
** '''EV_TEXT_FIELD'''
|
||||
*** Now default `minimum_width` is reasonable (before 148, now same as Windows being 4 characters wide)
|
||||
*** Fixed `caret_position` when queried in change actions
|
||||
|
||||
|
||||
|
||||
==EiffelStudio 5.1==
|
||||
|
||||
'''Interface modifications'''
|
||||
* '''EV_TEXTABLE and EV_TEXT_COMPONENT''' - `text` no longer returns Void when empty.
|
||||
* '''EV_WINDOW''' - `title` no longer returns `Void` when empty.
|
||||
* '''EV_TOOLTIPABLE''' - `tooltip` no longer returns `Void` when empty. If empty, no tooltip is displayed.
|
||||
* '''EV_TITLED_WINDOW''' - `icon_name` no longer returns `Void` when empty.
|
||||
* '''EV_CLIPBOARD''' - `text` no longer returns `Void` when empty.
|
||||
* '''EV_MESSAGE_DIALOG''' - `text` no longer returns `Void` when empty.
|
||||
* '''EV_FILE_DIALOG''' - `file_name` no longer returns `Void` when the "Cancel" button was pressed, `Result` is empty instead.
|
||||
* '''EV_DIRECTORY_DIALOG''' - `directory` no longer returns `Void when the "Cancel" button was pressed, `Result` is empty instead.
|
||||
* '''EV_CONTAINER''' - has three new features `set_background_pixmap`, `background_pixmap` and `remove_background_pixmap`. `background_pixmap` will be tessellated to cover complete background area.
|
||||
* '''EV_TREE and EV_TREE_NODE''' - Added `recursively_do_all`.
|
||||
* '''EV_STANDARD_DIALOGS'''
|
||||
** `ok_actions` have been renamed in descendents where appropriate. e.g. in EV_PRINT_DIALOG, they are renamed to `print_actions` to match the texts of the associated buttons. Where renamed, `ok_actions` are still available but obsolete.
|
||||
** Selected button now also returns the correct text of the button (Previously it was always "Ok").
|
||||
|
||||
* '''EV_DIALOG_CONSTANTS''' - Added new constants required for the above change to EV_STANDARD_DIALOGS.
|
||||
* '''EV_DRAWABLE''' - `draw_straight_line` now has a precondition to ensure the points are not identical.
|
||||
* '''EV_SPLIT_AREA''' - separated `put` from `extend`. They were defined as synonyms, but have different behavior.
|
||||
* '''EV_DYNAMIC_TREE_ITEM''' - Added `remove_subtree_function`. Item now only shows as expandable if there is a subtree function.
|
||||
* '''EV_WINDOW''' - Added `maximum_dimension` which is the greatest value allowed for `width` and `height`. This is also the default value for `width` and `height`.
|
||||
* '''EV_OPTION_BUTTON''' - This class has been made obsolete. It will be removed at the next release.
|
||||
* '''EV_PICK_AND_DROPABLE_ACTION_SEQUENCES''' - Added `pick_ended_actions` which are called when a pick ends.
|
||||
* '''EV_WIDGET''' - `set_minimum_height`, `set_minimum_width` and `set_minimum_size` now all allow 0 as an argument. Previously, 1 was the minimum valid dimension.
|
||||
* '''EV_MULTI_COLUMN_LIST''' - `clear_selection` is now obsolete. Use `remove_selection` instead.
|
||||
|
||||
'''Bug fixes'''
|
||||
* '''Platform independent'''
|
||||
** '''EV_FIXED''' - Corrected `set_item_height`, which was failing.
|
||||
** '''EV_SELECTABLE''' - Corrected postcondition of `is_selected`.
|
||||
** '''EV_PND_ACTION_SEQUENCE''' -- `veto_pebble_function` is now only called when its argument conforms to the transported pebble.
|
||||
|
||||
* '''Windows'''
|
||||
** '''EV_RANGE''' - The `maximum_value` could not be set greater than 32,000. The full range of an INTEGER may now be set.
|
||||
** '''`focused_widget' from `EV_APPLICATION`''' - was incorrect if an EV_CONTAINER had just received the focus.
|
||||
** '''EV_PICK_AND_DROPABLE'''
|
||||
*** Ending a pick and drop on an EV_TOOL_BAR_BUTTON which has a non `void` pebble no longer starts a transport from the button.
|
||||
*** Reduced flicker on cursor when picking from an EV_TREE_ITEM or EV_LIST_ITEM.
|
||||
*** `pebble_function` would previously be called twice during a pick and drop.
|
||||
|
||||
** '''EV_FIXED''' - Items contained are now drawn correctly dependent on their z order.
|
||||
** '''EV_DRAWABLE'''
|
||||
*** `Remove_clip_area` did not remove the clip_area correctly, but set it to the current size. This meant that if you then enlarged the widget, clipping would be applied.
|
||||
*** Fixed problems with ordering of calls to certain features which would cause postcondition violations in the implementation.
|
||||
*** `draw_pie_slice`, `fill_pie_slice` and `draw_arc` now have divide by 0 protection in the implementation.
|
||||
|
||||
** '''EV_TEXT''' - `set_background_color` now correctly sets the color of the whole background. Previously only the area containing text was modified.
|
||||
** '''EV_CLIPBOARD''' - Our implementation would sometimes query `text` when not allowed by Windows, thus causing postcondition failures.
|
||||
** '''EV_BUTTON''' - The result of `text_alignment` after default_create was incorrect.
|
||||
|
||||
* '''Gtk'''
|
||||
** Gtk version of Studio released (including EiffelVision 2), so no fixes from 5.0
|
||||
|
||||
12
documentation/18.11/solutions/gui-building/index.wiki
Normal file
12
documentation/18.11/solutions/gui-building/index.wiki
Normal file
@@ -0,0 +1,12 @@
|
||||
[[Property:link_title|Graphics]]
|
||||
[[Property:title|Graphics]]
|
||||
[[Property:weight|-14]]
|
||||
[[Property:uuid|19E0CFF0-C2B2-4BA7-ADBA-1DDD0DE32212]]
|
||||
== Graphical user interface building solutions ==
|
||||
|
||||
Eiffel provides platform-independent graphical user interface (GUI) facilities, particularly:
|
||||
|
||||
*EiffelVision 2, a class library for building GUI applications.
|
||||
|
||||
*EiffelBuild, a GUI-builder, letting you devise your interfaces interactively and generating the corresponding calls to EiffelVision 2 mechanisms.
|
||||
|
||||
Reference in New Issue
Block a user