Author:halw

Date:2008-10-25T08:00:01.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@97 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2008-10-25 08:00:01 +00:00
parent 2e37ddeca3
commit 19bcd2b1ec
26 changed files with 454 additions and 354 deletions

View File

@@ -1,11 +1,11 @@
[[Property:title|Events]]
[[Property:weight|4]]
[[Property:uuid|fc32d1b5-72d6-2955-18fd-bce988ed8323]]
This cluster contains classes for event handling within Vision2.
This cluster contains classes for event handling within EiffelVision 2.
==What is an event?==
An event is considered to be an external action that occurs during a program's execution. Correctly dealing with events is an important part of developing a Vision2 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. Vision2 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]] .
An event is considered to be an external action that occurs during a program's execution. Correctly dealing with events is an important part of developing a 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]] .
==How do I connect to an event?==
@@ -13,10 +13,10 @@ Every widget and item has an action sequence associated with it that relates to
An example of adding an agent to an action_sequence is as follows.
<code>
button.select_actions.extend (agent print ("Button Clicked!%N"))
button.select_actions.extend (agent print ("Button Clicked!%N"))
</code>
All Vision2 action sequences inherit [[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 sequences actual generic parameter.
All EiffelVision 2 action sequences inherit [[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 sequences actual generic parameter.
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 has no guarantees on the arguments passed to your procedure.

View File

@@ -1,7 +1,7 @@
[[Property:title|Figures]]
[[Property:weight|7]]
[[Property:uuid|c12fee6e-5e99-ae59-8ac5-f57abb4c1878]]
The EiffelVision figure cluster can be considered a high-level way of drawing on an [[ref:libraries/vision2/reference/ev_drawable_chart|EV_DRAWABLE]] descendant. Here are some advantages:
The EiffelVision 2 figure cluster can be considered a high-level way of drawing on an [[ref:libraries/vision2/reference/ev_drawable_chart|EV_DRAWABLE]] descendant. Here are some advantages:
* The model is separated from the representation by using projectors that take a world of figures and project it to any device, not just a drawing area.
* Instead of drawing with static API's like draw_line, real figure objects are used that can move, change color or morph.
* For projection devices that allow this, events may be caught and fired through the appropriate figure object.
@@ -81,6 +81,7 @@ As top-level group of a world of figures you must use [[ref:libraries/vision2/re
| 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 fill_color. Open figures inherit [[ref:libraries/vision2/reference/ev_atomic_figure_chart|EV_ATOMIC_FIGURE]] directly just as [[ref:libraries/vision2/reference/ev_closed_figure_chart|EV_CLOSED_FIGURE]] .
===Points===

View File

@@ -1,7 +1,7 @@
[[Property:title|Items]]
[[Property:weight|3]]
[[Property:uuid|3143511c-28bd-cc5c-c710-700796778982]]
All Vision2 items inherit [[ref:libraries/vision2/reference/ev_item_chart|EV_ITEM]] .
All EiffelVision 2 items inherit [[ref:libraries/vision2/reference/ev_item_chart|EV_ITEM]] .
==What is an item?==
@@ -25,8 +25,6 @@ Below is a structure showing the Vision2 components and the items that they acce
**** [[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]]

View File

@@ -1,38 +1,38 @@
[[Property:title|Properties]]
[[Property:weight|5]]
[[Property:uuid|0d46c1eb-bce4-2d67-0272-da4aa5950c65]]
This cluster contains all the common properties available for Vision2 [[Widgets|widgets]] and [[Items|items]] . Every Vision2 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.
This 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 a Vision2 component inherits [[ref:libraries/vision2/reference/ev_sensitive_chart|EV_SENSITIVE]] , it can be made to ignore events. <br/>
** If an EiffelVision 2 component inherits [[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 Vision2 component inherits [[ref:libraries/vision2/reference/ev_colorizable_chart|EV_COLORIZABLE]] it has facilities for modifying its foreground and background colors. <br/>
** If a EiffelVision 2 component inherits [[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 the <eiffel>foreground_color</eiffel> and <eiffel>set_background_color</eiffel> to set the <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 Vision2 component inherits [[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.
** If a EiffelVision 2 component inherits [[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 Vision2 component inherits [[ref:libraries/vision2/reference/ev_positioned_chart|EV_POSITIONED]] it is possible to query its current position, size and minimum size. <br/>
** If a EiffelVision 2 component inherits [[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 size.
* [[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]]
** If a Vision2 component inherits [[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]] it is able question its parent. Use parent to query the current parent.
** If a EiffelVision 2 component inherits [[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]] it is able question its parent. Use parent to query the current parent.
{{note|[[ref:libraries/vision2/reference/ev_containable_chart|EV_CONTAINABLE]] has no features for setting the parent. In Vision2, a child has no features for setting its parent, while a parent such as ev_container contains routines for adding children (one example is <eiffel>extend</eiffel>). }}
{{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 as ev_container contains routines for adding children (one example is <eiffel>extend</eiffel>). }}
The following properties are also used within Vision2:
The following properties are also 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]]