Author:halw

Date:2008-12-24T03:37:43.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@145 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2008-12-24 03:37:43 +00:00
parent 035991ccc0
commit f307f72eb9
53 changed files with 141 additions and 103 deletions

View File

@@ -5,7 +5,7 @@
'''Guide to Eiffel Information'''
There is a wealth of information on Eiffel available from many sources. Let this be your guide.
These pages are the official documentation pages for the products and technologies of Eiffel Software, Inc.
These pages are the official documentation pages for the products and technologies of Eiffel Software.
The documentation is organized into virtual books. Each book covers an important aspect of the world of Eiffel.

View File

@@ -1,8 +1,10 @@
[[Property:title|Eiffel CodeDom Provider Manager]]
[[Property:weight|-1]]
[[Property:uuid|089e658f-4bd8-df8f-5647-0c176c00359b]]
The Eiffel Codedom Provider Manager allows to graphically configure the Eiffel CodeDom Provider. There can be multiple configurations, each of them being associated with at least one application.
The Eiffel Codedom Provider Manager allows graphical configuration of the Eiffel CodeDom Provider. There can be multiple configurations, each of them being associated with at least one application.
{{note|The Eiffel for ASP.NET installation program will add a shortcut in the start menu to the Eiffel CodeDom Provider Manager. }}
The main dialog of the Eiffel CodeDom Provider Manager is divided into two vertical panes. The left pane contains a list of available configurations while the right pane contains the settings corresponding to the currently selected configuration. Initially the only available configuration is the '''default''' configuration which applies to all applications. The configurable settings are listed below.
==General Settings==
* '''Fail on error''': Checking this box will force the Eiffel Codedom Provider to fail when an error occurs. By default the provider rescues the failure and logs an error but it might be easier for debugging to have the Eiffel CodeDom Provider stop and raise an exception.
@@ -12,6 +14,7 @@ The main dialog of the Eiffel CodeDom Provider Manager is divided into two verti
==Compiler Settings==
* '''Default root class''': In the event where the CodeDom tree does not define an entry point, there still needs to be a root class for the Eiffel system to compile properly. If there is an entry point defined in the Codedom tree then this setting is ignored.
* '''Precompile ace file''': This setting, if set, gives the path to the ACE file of the precompile that the CodeDom compiler should use when compiling systems with this configuration. The CodeDom compiler will first check whether the precompile for that ACE file already exists in the precompile cache (See Precompile cache below). If it finds one then it will check whether the ACE file was modified since the precompile was created. If there isn't a corresponding precompile or if the ACE file was modified then the CodeDom compiler will create a new precompile in the precompile cache using the specified ace file. It will then compile the system using the precompile in the cache corresponding to the specified ACE file.
{{note|If for any reason the precompilation fails then the CodeDom compiler will still compile the system but without using any precompile. }}
* '''Metadata cache''': Both the Eiffel CodeDom Provider and the Eiffel compiler require reading from and writing to an Eiffel Metadata Cache. These caches contain information about mapping the .NET types and members names to valid Eiffel identifiers. Because read and write access are required, the application that uses the CodeDom Provider must have write access rights to the Eiffel Metadata Cache folder.
@@ -26,12 +29,15 @@ The main dialog of the Eiffel CodeDom Provider Manager is divided into two verti
This list associates .NET assemblies with the prefix that will be used for Eiffel class names corresponding to .NET types belonging to the assembly. For example the prefix for the assembly ''System.Xml.dll'' is ''XML_'', this means that the Eiffel class names of all the types in the assembly ''System.Xml.dll'' will all begin with ''XML_''. This is necessary because Eiffel doesn't have a notion of namespace. The default assembly prefixes cannot be modified but new assembly/prefix pairs can be added if necessary.
==Applications==
This last setting will only appear for configurations other than the default configuration. It lists the applications that will use the configuration when they load the Eiffel CodeDom Provider assembly. If an application is not listed in any configuration then it will use the default configuration.
{{note|For a change in an existing configuration to take effect, the process that uses the modified configuration must be restarted. }}
==New Configuration==
New configurations may be created by clicking the ''New'' button or the ''New'' entry in the ''File'' menu. The New Configuration dialog box asks for the name and the path of the configuration. It will create a file with the extension '''.ecd''' ('''E'''iffel '''C'''ode'''D'''om) with the specified name in the directory located at the specified path. Whenever one of the applications listed at the bottom of the New Configuration dialog loads the Eiffel CodeDom Provider, it will use this new configuration.
==Configuration Properties==
Double clicking on the configuration name in the configurations list, clicking the ''Properties'' button or choosing the ''Properties'' menu entry in the ''File'' menu will open the Configuration Properties dialog. This dialog gives the dates of creation and last modification of the configuration as well as the list of applications that use it if it's not the default configuration.
{{seealso|[[Configuration|Configuration]], [[Logging|Logging]] }}

View File

@@ -4,7 +4,6 @@
CodeDom stands for the '''Code Document Object Model'''. CodeDom allows for representing source code in an abstract data structure. Such a representation is called a '''CodeDom tree''' as the underlying data structure uses a tree paradigm. This abstract representation can then be generated into different programming languages. Each language vendor provides its implementation of the CodeDom interfaces, this implementation is called a '''CodeDom Provider'''. Programmers can then build tools that can work with many different languages without having to know about each one, instead they just delegate code generation to each CodeDom Provider.
The CodeDom interfaces also expose types and methods that allow for parsing source code and creating the corresponding CodeDom. The current implementation of the Eiffel CodeDom Provider does not support parsing. Code generation is a much more popular useage of the CodeDom and the current version focuses on this aspect of the technology.
{{seealso|[[Installation|Installation]] }}

View File

@@ -9,9 +9,10 @@ Another use of the CodeDom technology is via the WSDL utility. This utility is p
Wsdl /language:"EiffelSoftware.CodeDom.CodeDomProvider, EiffelSoftware.CodeDom, Version=2.0.1.1402, Culture=neutral, PublicKeyToken=def26f296efef469"<br/>
http://api.google.com/GoogleSearch.wsdl</code>
{{note|The vesion number used above might differ depending on the version of the Eiffel CodeDom Provider dll installed on your system. }}
{{note|The version number used above might differ depending on the version of the Eiffel CodeDom Provider dll installed on your system. }}
{{note|The example above uses the Google web service, the corresponding URL is correct at the time of writing but there is no guarentee it won't change (or be removed) in the future. }}
This will generate a file with the extension '''.es''' which contains multiple Eiffel class definitions. Compiling this file will require using the CodeDom compiler (programmatically via the CodeDom <code>ICodeCompiler</code> interface) or using the [[eSplitter|eSplitter]] tool to generate standard Eiffel source files ('''.e''' files) that can then be compiled by the standard Eiffel compiler.

View File

@@ -4,18 +4,27 @@
There are a few topics specific to the implementation of the Eiffel CodeDom Provider that are worth mentioning.
==Multiple Classes File==
The Eiffel compiler expects that there is only one class per source file (file with extension '''.e'''), however the CodeDom interface specification requires multiple classes to be generated in the same file (actually in the same ''stream''). The Eiffel CodeDom Provider code generator generates files with the extension '''.es''' which may contain multiple class definitions. Each class definition is separated with a special marker that the Eiffel CodeDom Provider compiler will parse to create multiple '''.e''' files - each containing a single class definition - prior to calling the command line Eiffel compiler.
{{note|Only the Eiffel CodeDom Provider compiler knows how to handle '''.es''' files. The standard Eiffel compilers can only parse '''.e''' files. }}
Eiffel for ASP.NET includes the [[eSplitter|eSplitter]] utility which can 'split' Eiffel multi-class files ('''.es''' files) into single class files ('''.e''' files).
==Inheritance Snippet==
Any type defined in a CodeDom tree to be consumed by the Eiffel CodeDom Provider may include one (and only one) snippet member that includes an inheritance clause declaration. This ''inheritance snippet'' must start with the keyword '''inherit''' and follows the Eiffel syntax for inheritance clauses. All the feature adaptations available in the Eiffel language may be used in such a snippet ('''rename''', '''export''', '''undefine''', '''redefine''', '''select''').
{{note|The CodeDom tree itself might define additional inheritance clauses in which case the Eiffel CodeDom Provider will merge the snippet and the implicit clauses in the generated source file. }}
==Indexing Snippet and Precompiled Libraries==
Another interesting snippet member is the ''indexing clause snippet'' which must start with the '''indexing''' keyword and follows the Eiffel syntax for indexing clauses. This snippet may include the indexing clause '''precompile_definition_file''' which can be used to specify the path to the precompiled library ACE file to be used by the Eiffel CodeDom Compiler. This is specially useful in ASP.NET pages where each page can specify which precompiled ACE file to use when compiling it. This path will be used instead of the path defined in the [[Configuration|configuration file]].
{{note|Only one class per compile unit should define a path to the precompiled library ACE file. If more than one class contain a '''precompile_definition_file''' indexing clause then there is no guarentee on which one the Eiffel CodeDom Compiler will use. }}
==Eiffel Configuration==
There are several Eiffel specific settings that can be set in the Eiffel CodeDom Provider which will affect the generated code as well as the CodeDom compiler behavior. These settings are covered in the [[Configuration|Configuration]] section.
{{seealso|[[eSplitter|eSplitter]], [[Configuration|Configuration]] }}

View File

@@ -2,15 +2,17 @@
[[Property:weight|1]]
[[Property:uuid|b6197932-4bcb-c79b-afe2-1a8f36dbbd7c]]
For certain tools (including ASP.NET) to detect the availability of a CodeDom Provider, the corresponding assembly name must be listed in the .NET machine wide configuration file typically located in:
<code>%SYSTEM_DRIVE%\Windows\Microsoft.NET\Framework\vx.x.xxxx\CONFIG\machine.config</code>
<code>
%SYSTEM_DRIVE%\Windows\Microsoft.NET\Framework\vx.x.xxxx\CONFIG\machine.config</code>
(where vx.x.xxxx corresponds to the .NET Framework version number). The available CodeDom Providers are listed under the ''<compilers>'' XML node. The Eiffel CodeDom Provider implements a.NET Installer class so that should you need to add the Eiffel CodeDom Provider to the machine configuration file, simply run the .NET SDK command line utility ''InstallUtil'' as follows:
<code>InstallUtil EiffelSoftware.Codedom.dll</code>
<code>
InstallUtil EiffelSoftware.Codedom.dll</code>
Conversely, should the Eiffel Codedom Provider not be required anymore, running the following command line will remove it from the ''machine.config'' file:
<code>InstallUtil /u EiffelSoftware.Codedom.dll</code>
<code>
InstallUtil /u EiffelSoftware.Codedom.dll</code>
{{note|The '''Eiffel for ASP.NET''' installation program will take care of registering and unregistering the Eiffel CodeDom Provider properly. }}
{{seealso|[[Supported Constructs|Supported constructs]] }}

View File

@@ -9,7 +9,6 @@ Writing ASP.NET pages in Eiffel also requires to be familiar with the Eiffel lan
The '''Samples''' folder of the Eiffel for ASP.NET delivery includes ASP.NET pages written in Eiffel. To run the samples you can either click on the corresponding link in the ''Start'' menu or open the page [http://localhost/EiffelSample http://localhost/EiffelSample] in your internet browser. Each sample comes with an extensively commented source code.
{{note|The samples will only be available if IIS was installed prior to installing Eiffel for ASP.NET. }}
{{seealso|[[Using Eiffel (to write ASP.NET pages)|Using Eiffel]] }}

View File

@@ -11,7 +11,6 @@ Without IIS, ASP.NET pages cannot be loaded and thus the samples will not be ins
==ASP.NET Installation==
Please consult the corresponding documentation (available online at [http://msdn.microsoft.com/asp.net/ http://msdn.microsoft.com/asp.net/] ) for configuring ASP.NET properly. In particular, be aware that by default ASP.NET is disabled on Windows 2003 Server.
{{seealso|[[CodeDom: Getting Started|Getting Started]] }}

View File

@@ -13,7 +13,8 @@ However if an instance of <eiffel>STRING</eiffel> is passed as an argument to an
==Compilation and Timeouts==
Eiffel compilations can take longer than the default timeouts set in ASP.NET. In particular ASP.NET will run batch compilations on the entire directory that is being accessed by IIS each time the time stamp of that directory changes. If the batch compilation takes longer than the ''batchTimeout'' property defined in the machine wide configuration file (''machine.config'') then ASP.NET will start another compilation just for the requested file. This can be quite resource intensive for the Web server and thus it might be beneficial to increase the default value of 15 seconds for ''batchTimeout''.
{{seealso|[[Names Mappings|Names Mapping]] }}

View File

@@ -31,15 +31,15 @@ When the display is finished, the application wait for you to pressed the return
This application shows how to use the thread <eiffel>THREAD_POOL</eiffel>.
An asynchronous thread is launched:
<code>
{THREAD_POOL}.queue_user_work_item (create {WAIT_CALLBACK}.make (Current, $async_operation, l_async_operation_done))
return := {THREAD_POOL}.queue_user_work_item (create {WAIT_CALLBACK}.make (Current, $async_operation, l_async_operation_done))
</code>
and is associated to the local variable <code>l_async_operation_done</code>. Both threads perform simultaneously some operations. The main thread wait for the asynchronous thread to complete his own operations
<code>
l_async_operation_done.wait_one
return := l_async_operation_done.wait_one
</code> to close the application.
This sample contains the following class:
This sample uses the following .NET types:
* <eiffel>THREAD_POOL</eiffel>
* <eiffel>WAIT_CALLBACK</eiffel>
* <eiffel>AUTO_RESET_EVENT</eiffel>

View File

@@ -38,7 +38,7 @@ This application shows how to use the thread <eiffel>TIMER</eiffel>. The timer i
</code>
and calls the feature <eiffel>check_status</eiffel> that displays the message <code>"Checking Status."</code> every two seconds.
This sample contains the following classes:
This sample uses the following .NET types:
* <eiffel>TIMER</eiffel>
* <eiffel>TIMER_CALLBACK</eiffel>

View File

@@ -31,9 +31,9 @@ The application uses two local external assemblies, math.dll and parserutils.dll
parserutils parses the command line entered, and checks if it is of the form operand1 operator operand2. math.dll calculates the actual result of the command line.
For the parserutils.dll, we have been obliged to introduce the prefix "parser_" to avoid conflicts between name classes.
For the parserutils.dll, we have been obliged to introduce the prefix "PARSER_" to class names in this assembly in order to avoid conflicts between class names from this and other sources.
This sample contains the following classes:
This sample uses the following classes:
* <span><eiffel>FORM</eiffel></span>
* <span><eiffel>BUTTON</eiffel></span>
* <span><eiffel>TEXT_FIELD</eiffel></span>

View File

@@ -23,11 +23,13 @@ To compile the example:
After launching the application, you will see a window displayed with a similar appearance to the one above. On the left side of the main window a date is displayed in a <span><eiffel>COMBO_BOX</eiffel></span>. Clicking on this <span><eiffel>COMBO_BOX</eiffel></span> and a <span><eiffel>CALENDAR</eiffel></span> control will appear showing the same date as in the <span><eiffel>COMBO_BOX</eiffel></span>. On the right side of the main window are the controls for selecting the format of the displayed date and the style of the <span><eiffel>CALENDAR</eiffel></span> control.
Clicking on the "Change font" button and a change font dialog box will appear. [[Image:change-font-dialog|change font dialog box]] .
Clicking on the "Change font" button and a change font dialog box will appear.
Clicking on the "Change color" button and a dialog_box will appear. [[Image:dotnet-samples--date-time-picker-change-color-dlg|dialog box]]
[[Image:change-font-dialog|change font dialog box]] .
It will permit you to customize the color appearance of the calendar though a color dialog box [[Image:dotnet-samples--date-time-picker-change-color-dlg|color dialog box]] .
Clicking on the "Change color" button and a dialog box will appear. This dialog box will permit you to customize the color appearance of the calendar.
[[Image:dotnet-samples--date-time-picker-change-color-dlg|color dialog box]] .
@@ -39,7 +41,7 @@ When one of the buttons "Change font" or "Change color" is pressed, an event is
When the entry in the <span><eiffel>COMBO_BOX</eiffel></span> format changes, an event is launched and modify the format of the displayed date.
This sample contains the following classes:
This sample uses the following classes:
* <span><eiffel>CALENDAR</eiffel></span>
* <span><eiffel>COMBO_BOX</eiffel></span>
* <span><eiffel>BUTTON</eiffel></span>

View File

@@ -29,7 +29,7 @@ After launching the application, you will see a window displayed with a similar
This sample show how to draw some text in a window, using different brushes, different fonts, different style and different colors.
This sample contains the following class:
This sample uses the following class:
* <eiffel>FORM</eiffel>
==Notes==

View File

@@ -35,7 +35,7 @@ You can choose the organization (cascade, title horizontal or title vertical) of
This application demonstrates how to create a multiple document interface. More information regarding the use of a MDI, is available [[MDI Details|here]] .
This sample contains the following class:
This sample uses the following class:
* <span><eiffel>FORM</eiffel></span>
==Notes==

View File

@@ -7,10 +7,12 @@ Multiple Document Interface (MDI) applications have a single, primary window (th
You can create an MDI application by following these steps:
# Create a '''Form''' ('''MainForm''') that represents the MDI parent window and set its '''IsMdiContainer''' property to '''True'''. The following code demonstrates how to set this property.
<code>set_is_mdi_container (True)</code>
<code>
set_is_mdi_container (True)</code>
# Create child forms and set the '''MdiParent''' property of each form to reference the parent form. The following code demonstrates setting the MDI parent for an instance of a child form. <br/>
<code>doc.set_mdi_parent (Current)</code>
<code>
doc.set_mdi_parent (Current)</code>
If you have different types of data to display, you can have multiple types of child forms. To display a child form, create an instance of the child form and call its '''Show''' method.
@@ -20,13 +22,17 @@ If you have different types of data to display, you can have multiple types of c
==Standard MDI Menus==
Typically, an MDI application has a '''Windows''' menu that allows the user to arrange the open child windows through tiling or cascading. The '''Windows''' menu also allows you to navigate to any of the open child windows. To create a '''Windows''' menu, add the menu items for tiling and cascading to a '''Windows''' menu in your parent form and set the '''MdiList''' property to '''True''' for the top-level '''Windows''' menu. The following code demonstrates how to create a '''Windows''' menu in an MDIapplication.
<code>mi_window: WINFORMS_MENU_ITEM</code>
<code>
mi_window := main_menu.get_menu_items.add (("&Window").to_cil)
dummy := mi_window.get_menu_items.add_string_event_handler (("&Cascade").to_cil, create {EVENT_HANDLER}.make (Current, $window_cascade_clicked))
dummy := mi_window.get_menu_items.add_string_event_handler (("Tile &Horizontal").to_cil, create {EVENT_HANDLER}.make (Current, $window_tile_h_clicked))
dummy := mi_window.get_menu_items.add_string_event_handler (("Tile &Vertical").to_cil, create {EVENT_HANDLER}.make (Current, $window_tile_v_clicked))
mi_window: WINFORMS_MENU_ITEM
...
mi_window := main_menu.get_menu_items.add ("&Window")
dummy := mi_window.get_menu_items.add_string_event_handler ("&Cascade", create {EVENT_HANDLER}.make (Current, $window_cascade_clicked))
dummy := mi_window.get_menu_items.add_string_event_handler ("Tile &Horizontal", create {EVENT_HANDLER}.make (Current, $window_tile_h_clicked))
dummy := mi_window.get_menu_items.add_string_event_handler ("Tile &Vertical", create {EVENT_HANDLER}.make (Current, $window_tile_v_clicked))
mi_window.set_mdi_list (True) -- Adds the MDI Window List to the bottom of the menu
...
</code>
@@ -38,12 +44,16 @@ mi_window.set_mdi_list (True) -- Adds the MDI Window List to the bottom of the m
If you want your parent form to be notified when a child window is activated by the user, you can register an event-handling method for the '''MdiChildActivate''' event. You can determine which child window is active by using the '''ActiveMdiChild''' property of the '''Form''' class. For example, the following code updates a '''StatusBar''' control on the parent form with the name of the child window.
<code>
...
add_mdi_child_activate (create {EVENT_HANDLER}.make (Current, $mdi_child_activated))
...
mdi_child_activated (sender: SYSTEM_OBJECT; e: EVENT_ARGS) is
mdi_child_activated (sender: SYSTEM_OBJECT; e: EVENT_ARGS)
do
status_bar.set_text (active_mdi_child.get_text)
end
...
</code>

View File

@@ -14,7 +14,9 @@
After launching the application, you will see a window displayed with a similar appearance to the one above. The main window contains a main menu with two entries (File and Format).
The main window also has a blue <span>LABEL</span> that contains a context menu, that is the clone of "Format" in the main menu. Right click on the <span>LABEL</span> and a context menu will appear [[Image:menu-contextuel|context menu]] .
The main window also has a blue <span>LABEL</span> that contains a context menu, that is the clone of "Format" in the main menu. Right click on the <span>LABEL</span> and a context menu will appear
[[Image:menu-contextuel|context menu]] .
@@ -22,7 +24,7 @@ The main window also has a blue <span>LABEL</span> that contains a context menu,
This application shows how to create a main menu and how to associate a context menu to a control (here to a <span>LABEL)</span>. More information regarding the use of menus, is available [[Menu Details|here]] .
This sample contains the following class:
This sample uses the following classes:
* <span>FORM</span>
* <span>CONTEXT_MENU</span>
* <span>MAIN_MENU</span>

View File

@@ -49,7 +49,7 @@ with the text contained in <eiffel>TEXT_BOX</eiffel>
msg.append ("'")
</code>
This sample contains the following classes:
This sample uses the following classes:
* <span><eiffel>FORM</eiffel></span>
* <span><eiffel>BUTTON</eiffel></span>
* <span><eiffel>TEXT_BOX</eiffel></span>

View File

@@ -27,7 +27,7 @@ The application shows how to configure a <span><eiffel>PROGRESS_BAR</eiffel></sp
The feature <span>on_load</span> is redefined and launch a thread (<eiffel>THREAD_START</eiffel>) that simulates the progression of a process.
This sample contains the following classes:
This sample uses the following classes:
* <span><eiffel>PROGRESS_BAR</eiffel></span>
* <span><eiffel>GROUP_BOX</eiffel></span>
* <span><eiffel>TRACK_BAR</eiffel></span>

View File

@@ -39,7 +39,7 @@ Clicking on the right button (>|) will bring you on the last customer of the lis
This sample contains the following class:
This sample uses the following class:
* <span><eiffel>FORM</eiffel></span>
==Notes==

View File

@@ -23,17 +23,17 @@ After launching the application, you will see a window displayed with a similar
==Under the Hood==
The application shows how to display a Windows Form under the windows environment. The application inherits the <span><eiffel>FORM</eiffel></span> class, and just set the title with <span><code>"Hello world"</code></span> with the inherited feature <span><eiffel>set_title</eiffel></span>.
The application shows how to display a Windows Form under the windows environment. The application inherits the <span><eiffel>FORM</eiffel></span> class, and just set the title with <span><code>"Hello world"</code></span> with the inherited feature <span><eiffel>set_text</eiffel></span>.
<code>
set_title (("Hello world").to_cil)
set_text ("Hello world")
</code>
The application is launched in a <eiffel>PROCESS</eiffel> with this command line:
<code>
feature {WINFORMS_APPLICATION}.run_form (Current).
{WINFORMS_APPLICATION}.run_form (Current).
</code>
This sample contains the following classes:
This sample uses the following classes:
* <span><eiffel>FORM</eiffel></span>
* <eiffel>WINFORMS_APPLICATION</eiffel>

View File

@@ -29,7 +29,7 @@ After launching the application, you will see a window displayed with a similar
The application shows how to use a <span><eiffel>TREE_VIEW</eiffel></span> and what are all its different configurations.
This sample contains the following classes:
This sample uses the following classes:
* <span><eiffel>TREE_VIEW</eiffel></span>
* <span><eiffel>GROUP_BOX</eiffel></span>
* <span><eiffel>CHECK_BOX</eiffel></span>

View File

@@ -3,7 +3,7 @@
[[Property:uuid|356b5211-f710-6509-3609-8d717ff425f7]]
Each WEL library component implements a set of routines for processing the most common messages that a component receives. For example, looking at [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] , you will see that there are many features which begin `on_'. Each of these features enable the user to know when a specific event has occurred, and to perform the appropriate processing as a result of this event. Most of the time, you will only be interested in a small subset of these, necessary to your program. For example, below is the code for on_paint:
<code>
on_paint (paint_dc: WEL_PAINT_DC; invalid_rect: WEL_RECT) is
on_paint (paint_dc: WEL_PAINT_DC; invalid_rect: WEL_RECT)
--Draw a centered text
do
end
@@ -11,12 +11,12 @@ Each WEL library component implements a set of routines for processing the most
An on_paint message corresponds to the Wm_paint message generated by Windows whenever it needs to re-paint a window, and if you look at the feature, you can see that the arguments are a [[ref:libraries/wel/reference/wel_paint_dc_chart|WEL_PAINT_DC]] and a[[ref:libraries/wel/reference/wel_rect_chart| WEL_RECT]] . which are relevant to this message. By redefining this feature (and others as required), your code will be able to respond appropriately to windows events.
{{note|. See [[Tutorial Step 2|step2]] in the [[WEL Tutorial|tutorial]] for a simple demonstration involving the re-definition of <eiffel>on_left_button_down</eiffel>. }}
{{note|See [[Tutorial Step 2|step2]] in the [[WEL Tutorial|tutorial]] for a simple demonstration involving the re-definition of <eiffel>on_left_button_down</eiffel>. }}
For different messages received by a control, the arguments will differ (sometimes there are none), but those arguments will always be relevant to the message. For example, on_menu_command from [[ref:libraries/wel/reference/wel_composite_window_chart|WEL_COMPOSITE_WINDOW]] has an <eiffel>INTEGER</eiffel> as an argument, the value of which is a unique menu identifier. <br/>
{{note|. Not all windows events have a corresponding `on_' message hook defined in WEL. If you wish to process a Windows message that does not correspond to one of the available features, you will need to redefine process_message. <br/>
{{note|Not all windows events have a corresponding "<code>on_</code>" message hook defined in WEL. If you wish to process a Windows message that does not correspond to one of the available features, you will need to redefine <code>process_message</code>.
}}

View File

@@ -1,7 +1,7 @@
[[Property:title|WEL_UP_DOWN_CONTROL]]
[[Property:weight|15]]
[[Property:uuid|71cbdf70-3bf0-a087-6859-30c1564c27a4]]
A [[ref:libraries/wel/reference/wel_up_down_control_chart|WEL_UP_DOWN_CONTROL]] consists of a pair of arrows which are used to increment or decrement a value. Using set_buddy_window, a window of type [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] can be linked to this control, and is commonly used to display the current value.
A [[ref:libraries/wel/reference/wel_up_down_control_chart|WEL_UP_DOWN_CONTROL]] consists of a pair of arrows which are used to increment or decrement a value. Using <code>set_buddy_window</code>, a window of type [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] can be linked to this control, and is commonly used to display the current value.
==Appearance==
[[Image:wel-up-down-control|wel_up_down_control]]

View File

@@ -18,7 +18,7 @@ To compile the example:
After launching the program you will see a window displayed containing three push buttons marked "Brushes", "Rectangles" and "3D". Clicking "Brushes" will open a new window demonstrating different brushes available. Clicking "Rectangles" will open a new window within which many different shaped and colored rectangles will be drawn. Clicking"3D" will open a new window demonstrating the use of multiple bitmaps for animation.
==Under the Hood==
Each of the three windows that are opened from the programs <code>MAIN_WINDOW</code> inherit [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] and contains code for generating their output. <code>BRUSHES_DEMO</code> redefines <code>idle_action</code> to force a re-draw on the applicable windows.
{{note|. If <code>enable_idle_action</code> is not called, then <code> idle_action</code> is never executed. }}
{{note|If <code>enable_idle_action</code> is not called, then <code>idle_action</code> is never executed. }}
This sample contains the following classes:
* <code>APPLICATION_IDS</code>

View File

@@ -2,7 +2,8 @@
[[Property:weight|0]]
[[Property:uuid|b952d232-1ef9-04a8-bac4-117185aa316d]]
This sample shows you how to set up your first [[ref:/libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] consisting of a single [[ref:/libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] . This is one of the simplest WEL applications you can write, and the output is shown below:
[[Image:step1|step1]] <br/>
[[Image:step1|step1]]
<br/>
==Compiling==

View File

@@ -2,6 +2,7 @@
[[Property:weight|1]]
[[Property:uuid|f4a73538-8a2f-ce6b-5190-6bd4d0e8c8d1]]
This sample shows you how to respond to an event occurring within your application. It also demonstrates the use of a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] control and a redefinition of closeable from [[ref:libraries/wel/reference/wel_composite_window_chart|WEL_COMPOSITE_WINDOW]] .
[[Image:step2|step2]] <br/>
<br/>
@@ -21,9 +22,9 @@ After launching the sample, you should see a [[ref:libraries/wel/reference/wel_f
==Under the Hood==
This system is a demonstration of how to connect an event to one of the common message hooks available within WEL. See [[WEL Common Concepts|Common message hooks]] for more information. In this example, on_left_button_down has been redefined from [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] containing notification of the event occurring.
This system is a demonstration of how to connect an event to one of the common message hooks available within WEL. See [[WEL Common Concepts|Common message hooks]] for more information. In this example, <code>on_left_button_down</code> has been redefined from [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] containing notification of the event occurring.
If you look at closeable from <code>MAIN_WINDOW</code>, you will see that it has been redefined to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] and the result from this message box is used to generate the return value of closeable. If this Result is True, the window will be closed.
If you look at <code>closeable</code> from <code>MAIN_WINDOW</code>, you will see that it has been redefined to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] and the result from this message box is used to generate the return value of <code>closeable</code>. If this <code>Result</code> is <code>True</code>, the window will be closed.
This sample contains the following classes:
* <code>TUTORIAL_STEP2</code>
* <code>MAIN_WINDOW</code>

View File

@@ -2,6 +2,7 @@
[[Property:weight|2]]
[[Property:uuid|7d79155a-fe75-e252-49d7-b03243ac96fd]]
This sample demonstrates the use of a [[ref:libraries/wel/reference/wel_client_dc_chart|WEL_CLIENT_DC]] to display output in the <code>MAIN_WINDOW</code>. The output is shown below:
[[Image:step3|step3]] <br/>
<br/>

View File

@@ -2,6 +2,7 @@
[[Property:weight|3]]
[[Property:uuid|a43c069c-d56e-47f0-f1b0-d58df627b5a4]]
This sample builds on the knowledge learned in the previous tutorials ( [[Tutorial Step 1|1]] , [[Tutorial Step 2|2]] and [[Tutorial Step 3|3]] ) and again demonstrates the use of a [[ref:libraries/wel/reference/wel_client_dc_chart|WEL_CLIENT_DC]] .
[[Image:step4|step4]] <br/>
<br/>

View File

@@ -2,6 +2,7 @@
[[Property:weight|4]]
[[Property:uuid|05145328-5d2a-4d48-68cc-746ddf66b68f]]
The sample builds on tutorial [[Tutorial Step 4|step 4]] and also demonstrates the use of a [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] . The output is shown below:
[[Image:step5|step5]] <br/>
<br/>

View File

@@ -2,6 +2,7 @@
[[Property:weight|5]]
[[Property:uuid|90d557e1-c4a6-e6ff-ff19-95a44c99f0ae]]
This sample builds on tutorial [[Tutorial Step 5|step 5]] by preventing the loss of the drawing when Windows re-draws the client area of the [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] . The output is shown below:
[[Image:step6|step6]] <br/>
<br/>

View File

@@ -2,6 +2,7 @@
[[Property:weight|6]]
[[Property:uuid|751a492d-6902-838e-7468-38b67e40f4e2]]
This sample builds on tutorial [[Tutorial Step 6|step 6]] , and also demonstrates the use of a [[ref:libraries/wel/reference/wel_menu_chart|WEL_MENU]] . The output is shown below:
[[Image:step7|step7]] <br/>
<br/>

View File

@@ -2,6 +2,7 @@
[[Property:weight|7]]
[[Property:uuid|38c3a22d-2c15-cb68-a685-99a25d191885]]
This sample builds on tutorial [[Tutorial Step 7|step 7]] , and also demonstrates the use of a [[ref:libraries/wel/reference/wel_open_file_dialog_chart|WEL_OPEN_FILE_DIALOG]] and a [[ref:libraries/wel/reference/wel_save_file_dialog_chart|WEL_SAVE_FILE_DIALOG]] . The output is shown below:
[[Image:step8|step8]] <br/>
<br/>