|
IntroductionIn this documentation we will explain you how to use EiffelVision in you Projects:
The EiffelVision library provides a solution to one of the central needs of software developers: a high-level approach to graphical development. In particular, EiffelVision is one of the few products that support both "GUI" programming (managing windows, panels, buttons and other user interface objects) and graphical manipulations (geometric figures - circles, polygons and the like, including complex figures of an arbitrary level of nesting). EiffelVision is a key element of our technology; all of our current products (e.g. EiffelBench, EiffelBuild, EiffelCase, ArchiText) use it, and most of our customers' applications also rely on it. We are putting considerable effort into building the next generation of EiffelVision so that it will continue to support the needs of our customers. Portability is a key concern in EiffelVision. Even though the product evolved in part from a Motif library, it also supports Windows programming. Even though we hear frequent siren calls - including on comp.lang.eiffel - of the form "Forget about portability, all we need is a good [fill in some API here, usually Windows] encapsulation", we think it is our duty to Eiffel users, and one of the major attractions of a such a library, to provide a platform-independent solution, even if not all users are concerned about portability yet. In fact, the relationship between portability and adaptation to specific platforms is not necessarily "either-or". This realization explains the current direction of evolution for EiffelVision. Taking a critical look at EiffelVision, one may make two comments that at first sight appear contradictory:
Both of these criticisms are to a certain extent justified; but one can answer them without contradiction. It is possible to make EiffelVision:
This is the basis of the new EiffelVision architecture.
Technical InformationTask 1 is the natural evolution of EiffelVision. Cleaned up from some Motif specificities, made more general and more powerful, EiffelVision will be even more simple and intuitive to use, allowing a beginner to put together a graphical application very quickly. The result, of course, will be fully portable. Task 2 has led to the design of a new library: WEL (the Windows Eiffel Library). WEL is an encapsulation of the Windows graphical API, meant for those developers who are focusing on Windows and want to have access to the entire set of mechanisms of that platform. Similarly, the Motif-specific part is now encapsulated in a new library: MEL (the Motif Eiffel Library). EiffelVision, WEL, MEL and similar libraries are not separate developments: the platform-specific parts of New EiffelVision are entirely programmed on top of WEL in the Windows implementation and MEL in the Unix and VMS implementations. So WEL and MEL are not separate developments: they are the platform-specific parts of EiffelVision. The following picture represents the new architecture:
For a user, the rationale for using either library level is clear:
It is also possible to mix both level, for example to take advantage of platform-specific GUI facilities on some platforms while keeping most of the software portable. This approach provides a comprehensive solution to user needs. Perhaps the most interesting aspect of WEL is that it does more than just cover the needs of some Eiffel developers for a direct interface to Windows graphical mechanisms. The other audience includes anyone interested in writing graphical applications under Windows simply, safely and effectively - whether or not such a person is already an Eiffel user. To such people, WEL provides a much nicer interface than the other techniques that we know of. This is due to the benefits of the Eiffel approach -- abstraction, inheritance, command classes, reusable components from EiffelBase etc.
Getting StartedTo use EiffelVision, you need to install WEL, MEL or GTK. But these library should be installed once you have installed Eiffel Bench. Remarks : The following classes have been made obsolete from How to configure your Ace fileIn order to use EiffelVision in an Eiffel Project, you have to include in your
project, the right clusters and the right external files. Thus, you need to
configure your Ace file. However, we strongly recommend you to use the precompiled version of EiffelVision, as the compilation of this library is pretty long. If you wish or you need to compile EiffelVision you can include all the following clusters. : -- EiffelVision -- Toolkit If you want to use MEL library you can include in your Ace file : all mel: "$EIFFEL5/library/mel/"; If you want to use WEL library, you can include in your Ace file : all wel: "$EIFFEL5/library/wel/"; Then, you need to include some internals to use EiffelVision:
external include_path:
external To see some Working Example of Ace file, you can check our Examples.
Some working examplesWe developed a few examples using EiffelVision that you can try to see how to use this library. They are located in "$EIFFEL5/examples/vision" You can especially check the example : test_all_widgets, located in "$EIFFEL5/examples/vision/test_all_widgets"
|