Added EiffelRibbon Library and EiffelRibbon Applications sections.

Author:halw
Date:2011-06-02T21:21:05.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@916 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2011-06-02 21:21:05 +00:00
parent c1c70b031b
commit a8b840a6c3

View File

@@ -81,7 +81,21 @@ Initial distribution:
* When using <code>EV_RICH_TEXT</code> within a ribbon, the <code>EV_RICH_TEXT</code> may not be refreshed right after the ribbon has been displayed. * When using <code>EV_RICH_TEXT</code> within a ribbon, the <code>EV_RICH_TEXT</code> may not be refreshed right after the ribbon has been displayed.
=The EiffelRibbon Library=
The EiffelRibbon library contains the classes necessary to add ribbons to EiffelVision 2 applications. As stated above, you won't really need to use the library directly. Rather, you use the EiffelRibbon tool to build an application that uses the library classes.
Still you may find it interesting to browse the classes in the library. You'll see that as in the EiffelVision 2 library, many of the classes are there to provide support for the various elements that can be used in an application. Most of the class names for EiffelRibbon-specific elements begin with the prefix "<code>EV_RIBBON</code>". Some examples are: <code>EV_RIBBON_BUTTON</code>, <code>EV_RIBBON_DROP_DOWN_GALLERY</code>, and <code>EV_RIBBON_COMBO_BOX_ITEM</code>. Again, similar to EiffelVision 2, the class <code>EV_RIBBON_COMBO_BOX_ITEM</code> models an item for a <code>EV_RIBBON_COMBO_BOX</code>.
So, here again, if you are familiar with EiffelVision 2, then EiffelRibbon should not seem very foreign to you.
=EiffelRibbon Applications=
When you build an application with the EiffelRibbon tool, it generates classes for you. These classes are often clients or heirs to classes in the EiffelRibbon library. The classes generated for the objects on your ribbon should look familiar to you as well. For example, as with EiffelBuild, for each ribbon object, say a button, there will be a class ending with the suffix "<code>_IMP</code>" which will get regenerated each time you request the EiffelRibbon tool to generate classes. Also generated is an heir to that class with a name that does not include the suffix. This class you are free to edit, as it will not be regenerated. It is in these editable classes that you provide the action sequences for your ribbon objects' behaviors.
The class shown in the Edit pane of Figure 3 is part of a generated class <code>BUTTON_CHANGE_SMALL_IMAGE</code>, representing a ribbon button, from one of the EiffelRibbon examples. <code>BUTTON_CHANGE_SMALL_IMAGE</code> is a heir to <code>BUTTON_CHANGE_SMALL_IMAGE_IMP</code>. You can see that in the redefined version of <code>create_interface_objects</code> code has been added to add an agent to the <code>select_actions</code> for the ribbon button. In this case, it's an inline agent that will toggle the associated image back and forth between two different images.