mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-02-28 11:50:57 +01:00
added 18.07
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2049 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL]]
|
||||
[[Property:weight|-13]]
|
||||
[[Property:uuid|a8f57de5-a0eb-262e-a825-95a706392640]]
|
||||
==WEL (Windows Eiffel Library)==
|
||||
|
||||
Type: Library <br/>
|
||||
Platform: Windows <br/>
|
||||
|
||||
WEL is an encapsulation of the Win32 Application Programming Interface (API), and provides users with a powerful means of creating Win32 Applications.
|
||||
|
||||
==Getting started with WEL==
|
||||
|
||||
If you are new to WEL, then the best place to begin is the [[WEL Tutorial|tutorial]], which consists of a series of samples demonstrating the development of a simple WEL system.
|
||||
Also take a look at [[WEL Common Concepts|WEL common concepts]] for details of some common concepts used in WEL programming.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|WEL Class Reference]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|a7745f7c-48e0-342b-8eeb-c0aad7553e29]]
|
||||
==View the [[ref:libraries/wel/reference/index|WEL Class Reference]]==
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
[[Property:title|Common message hooks]]
|
||||
[[Property:weight|4]]
|
||||
[[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)
|
||||
--Draw a centered text
|
||||
do
|
||||
end
|
||||
</code>
|
||||
|
||||
|
||||
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>. }}
|
||||
|
||||
|
||||
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 "<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>.
|
||||
}}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[[Property:title|WEL Common Concepts]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|f2486cae-0ce5-7360-d40f-aea5f2766ebd]]
|
||||
WEL concepts you should understand.
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[[Property:title|Inheriting WEL_APPLICATION]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|e6b092c9-dfb1-7bf1-67fc-647d047b6a01]]
|
||||
For most WEL applications that you write, you will need to inherit [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] .
|
||||
|
||||
{{note|. See [[Tutorial Step 1|step1]] in the [[WEL Tutorial|tutorial]] for a simple demonstration of how to do this }}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[[Property:title|Redefining `init_application']]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|95d9b971-7470-9191-3023-b99c22354e8f]]
|
||||
[[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] contains a feature <eiffel>init_application</eiffel> which does nothing by default, but is called before the application is started. This can be redefined to execute tasks that must be performed before the application is running. A common redefinition is to allow the loading of common dll's, see [[List View|list_view]] sample for a demonstration of this technique.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[[Property:title|Redefining main_window]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|f7bfd5d0-86ef-5387-ba79-5461a516bcf6]]
|
||||
When you inherit [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] , you will need to implement the deferred feature main_window as a once function. This will be the main window of your application, and can be any descendent of [[ref:libraries/wel/reference/wel_composite_window_chart|WEL_COMPOSITE_WINDOW]] .
|
||||
|
||||
{{note|. See [[Tutorial Step 2|step2]] in the [[WEL Tutorial|tutorial]] for a simple demonstration of how to do this. }}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
[[Property:title|controls cluster]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|622aa1e2-75a6-4b2e-ac1a-44f1e7be6a3b]]
|
||||
==Overview==
|
||||
|
||||
A Control is a window which provides a means of interacting with the application. For example, the [[ref:libraries/wel/reference/wel_edit_chart|WEL_EDIT]] control provides a user with the means of entering and modifying text. There are many common controls available within this cluster, each with a specific use.
|
||||
|
||||
{{note|Each control inherits from [[ref:libraries/wel/reference/wel_control_chart|WEL_CONTROL]] which is a descendent of [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] This provides the control with a large number of general features (including full window functionality). Each control also provides its own feature set which give access to specific properties of that control. }}
|
||||
|
||||
==Creating controls==
|
||||
|
||||
Each type of control generally has its own creation procedure that is specific to the type of control. For example, [[ref:libraries/wel/reference/wel_scroll_bar_chart|WEL_SCROLL_BAR]] has two creation procedures; make_vertical and make_horizontal. Depending on which of these two creation procedures used, you will get a scroll bar aligned vertically or horizontally.
|
||||
|
||||
==Control types==
|
||||
|
||||
The following effective controls are available within this cluster:
|
||||
* [[ref:libraries/wel/reference/wel_bitmap_button_chart|WEL_BITMAP_BUTTON]]
|
||||
* [[WEL_CHECKBOX|WEL_CHECK_BOX]]
|
||||
* [[WEL_CHECK_BOX_3_STATE|WEL_CHECK_BOX_3_STATE]]
|
||||
* [[ref:libraries/wel/reference/wel_drop_down_combo_box_chart|WEL_DROP_DOWN_COMBO_BOX]]
|
||||
* [[ref:libraries/wel/reference/wel_drop_down_combo_box_ex_chart|WEL_DROP_DOWN_COMBO_BOX_EX]]
|
||||
* [[ref:libraries/wel/reference/wel_drop_down_list_combo_box_chart|WEL_DROP_DOWN_LIST_COMBO_BOX]]
|
||||
* [[ref:libraries/wel/reference/wel_drop_down_list_combo_box_ex_chart|WEL_DROP_DOWN_LIST_COMBO_BOX_EX]]
|
||||
* [[ref:libraries/wel/reference/wel_flat_tool_bar_chart|WEL_FLAT_TOOL_BAR]]
|
||||
* [[WEL_GROUP_BOX|WEL_GROUP_BOX]]
|
||||
* [[ref:libraries/wel/reference/wel_header_control_chart|WEL_HEADER_CONTROL]]
|
||||
* [[ref:libraries/wel/reference/wel_imagelist_tool_bar_chart|WEL_IMAGE_LIST_TOOL_BAR]]
|
||||
* [[WEL_LIST_VIEW|WEL_LIST_VIEW]]
|
||||
* [[WEL_MULTIPLE_LINE_EDIT|WEL_MULTIPLE_LINE_EDIT]]
|
||||
* [[WEL_MULTIPLE_SELECTION_LIST_BOX|WEL_MULTIPLE_SELECTION_LIST_BOX]]
|
||||
* [[ref:libraries/wel/reference/wel_owner_draw_button_chart|WEL_OWNER_DRAW_BUTTON]]
|
||||
* [[WEL_PROGRESS_BAR|WEL_PROGRESS_BAR]]
|
||||
* [[WEL_PUSH_BUTTON|WEL_PUSH_BUTTON]]
|
||||
* [[WEL_RADIO_BUTTON|WEL_RADIO_BUTTON]]
|
||||
* [[ref:libraries/wel/reference/wel_rebar_chart|WEL_REBAR]]
|
||||
* [[ref:libraries/wel/reference/wel_rich_edit_chart|WEL_RICH_EDIT]]
|
||||
* [[WEL_SCROLL_BAR|WEL_SCROLL_BAR]]
|
||||
* [[ref:libraries/wel/reference/wel_selectable_button_chart|WEL_SELECTABLE_BUTTON]]
|
||||
* [[ref:libraries/wel/reference/wel_simple_combo_box_chart|WEL_SIMPLE_COMBO_BOX]]
|
||||
* [[WEL_SINGLE_LINE_EDIT|WEL_SINGLE_LINE_EDIT]]
|
||||
* [[WEL_SINGLE_SELECTION_LIST_BOX|WEL_SINGLE_SELECTION_LIST_BOX]]
|
||||
* [[ref:libraries/wel/reference/wel_static_chart|WEL_STATIC]]
|
||||
* [[ref:libraries/wel/reference/wel_static_bitmap_chart|WEL_STATIC_BITMAP]]
|
||||
* [[ref:libraries/wel/reference/wel_status_window_chart|WEL_STATUS_WINDOW]]
|
||||
* [[ref:libraries/wel/reference/wel_tab_control_chart|WEL_TAB_CONTROL]]
|
||||
* [[ref:libraries/wel/reference/wel_tool_bar_chart|WEL_TOOL_BAR]]
|
||||
* [[WEL_TOOLTIP|WEL_TOOLTIP]]
|
||||
* [[WEL_TRACK_BAR|WEL_TRACK_BAR]]
|
||||
* [[ref:libraries/wel/reference/wel_tree_view_chart|WEL_TREE_VIEW]]
|
||||
* [[WEL_UP_DOWN_CONTROL|WEL_UP_DOWN_CONTROL]]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
[[Property:title|WEL_CHECK_BOX_3_STATE]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|61726774-89f4-2a6f-8383-bda19e6db217]]
|
||||
[[ref:libraries/wel/reference/wel_check_box_3_state_chart| A WEL_CHECK_BOX_3_STATE]] control can take three states, checked, indeterminate or unchecked.
|
||||
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_check_box_3_state_chart|WEL_CHECK_BOX_3_STATE]] <br/>
|
||||
[[Image:wel-check-box-3-state-unchecked|wel_check_box_3_state_unchecked]] <br/>
|
||||
<br/>
|
||||
A checked [[ref:libraries/wel/reference/wel_check_box_3_state_chart|WEL_CHECK_BOX_3_STATE]] <br/>
|
||||
[[Image:wel-check-box-3-state-checked|wel_check_box_3_state_checked]] <br/>
|
||||
<br/>
|
||||
A indeterminate [[ref:libraries/wel/reference/wel_check_box_3_state_chart|WEL_CHECK_BOX_3_STATE]] <br/>
|
||||
[[Image:wel-check-box-3-state-indeterminate|wel_check_box_3_state_indeterminate]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_CHECKBOX|WEL_CHECK_BOX]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[[Property:title|WEL_CHECKBOX]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|daed1ee2-dac2-b606-7c3c-2fdbd88f6a92]]
|
||||
A [[ref:libraries/wel/reference/wel_check_box_chart|WEL_CHECK_BOX]] control can take two states, checked or unchecked.
|
||||
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_check_box_chart|WEL_CHECK_BOX]] <br/>
|
||||
[[Image:wel-check-box-unchecked|wel_check_box_unchecked]] <br/>
|
||||
<br/>
|
||||
A checked [[ref:libraries/wel/reference/wel_check_box_chart|WEL_CHECK_BOX]] <br/>
|
||||
[[Image:wel-check-box-checked|wel_check_box_checked]]
|
||||
{{seealso|<br/>
|
||||
[[WEL_CHECK_BOX_3_STATE|WEL_CHECK_BOX_3_STATE]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[[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 <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]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[[Property:title|WEL_GROUP_BOX]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|9ef874da-4d1f-b3f4-9645-9b50b1718daf]]
|
||||
A [[ref:libraries/wel/reference/wel_group_box_chart|WEL_GROUP_BOX]] is used to enclose other controls, and certain controls such as a [[WEL_RADIO_BUTTON|WEL_RADIO_BUTTON]] have special behavior when parented in a [[ref:libraries/wel/reference/wel_group_box_chart|WEL_GROUP_BOX]] .
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-group-box|wel_group_box]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
[[Property:title|WEL_LIST_VIEW]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|730f6b22-f858-816f-090e-c32ec1bebfd9]]
|
||||
A [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] control is an encapsulation of the Windows List View control and provides several ways of displaying a collection of items. Each item can consist of a text and an icon. Certain styles allow additional information to be displayed in columns to the right of the icon and label.
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] with the Lvs_report style. <br/>
|
||||
[[Image:wel-list-view-style-lvs-report|list_view_style_lvs_report]] <br/>
|
||||
<br/>
|
||||
A [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] with the Lvs_list style. <br/>
|
||||
[[Image:wel-list-view-style-lvs-list|list_view_style_lvs_list]] <br/>
|
||||
<br/>
|
||||
A [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] with the Lvs_icon style. <br/>
|
||||
[[Image:wel-list-view-style-lvs-icon|list_view_style_lvs_icon]] <br/>
|
||||
<br/>
|
||||
A [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] with the Lvs_smallicon style. <br/>
|
||||
[[Image:wel-list-view-style-lvs-small-icon|list_view_style_lvs_icon_small]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[[Property:title|WEL_MULTIPLE_LINE_EDIT]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|752a587f-4c17-f8bf-0f16-c0cf9f69bdc6]]
|
||||
A [[ref:libraries/wel/reference/wel_multiple_line_edit_chart|WEL_MULTIPLE_LINE_EDIT]] is used to display multiple lines of text. Using set_read_only, the text can be made non-editable.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-multiple-line-edit|wel_multiple_line_edit]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_MULTIPLE_SELECTION_LIST_BOX]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|9f1f5944-969a-2d44-9cea-5c4c3d316917]]
|
||||
A [[ref:libraries/wel/reference/wel_multiple_selection_list_box_chart|WEL_MULTIPLE_SELECTION_LIST_BOX ]] is a control used to display a list of <eiffel>STRING</eiffel>. Multiple items may be selected at once.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-multiple-selection-list-box|wel_multiple_selection_list_box]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_SINGLE_SELECTION_LIST_BOX|WEL_SINGLE_SELECTION_LIST_BOX]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_OWNER_DRAW_BUTTON]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|c17da029-c9dc-e664-86ce-53b1e3e4e2cc]]
|
||||
A [[ref:libraries/wel/reference/wel_owner_draw_button_chart|WEL_OWNER_DRAW_BUTTON]] is a control that the user can click to provide notification to the application, and behaves in a similar fashion to [[ref:libraries/wel/reference/wel_push_button_chart|WEL_PUSH_BUTTON]] except that <eiffel>on_paint</eiffel> must be implemented to give the button the desired appearance.
|
||||
|
||||
==Appearance==
|
||||
|
||||
There is no sample appearance for this control.
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_PUSH_BUTTON|WEL_PUSH_BUTTON]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[[Property:title|WEL_PROGRESS_BAR]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|6c8b5b4c-2d55-9635-1c29-361c28f09b14]]
|
||||
A [[ref:libraries/wel/reference/wel_progress_bar_chart|WEL_PROGRESS_BAR]] control is an encapsulation of the Win32 progress bar. It can be used to display the progress of a lengthy operation.
|
||||
|
||||
{{note|By specifying the style Pbs_vertical, the progress bar will be displayed vertically. }}
|
||||
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_progress_bar_chart|WEL_PROGRESS_BAR]] . <br/>
|
||||
[[Image:wel-progress-bar-half|wel_progress_bar_half]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[[Property:title|WEL_PUSH_BUTTON]]
|
||||
[[Property:weight|8]]
|
||||
[[Property:uuid|186eb349-b7c9-9944-285e-34dd9968c4e0]]
|
||||
A [[ref:libraries/wel/reference/wel_push_button_chart|WEL_PUSH_BUTTON]] is a control that the user can click to provide notification to the application.
|
||||
==Appearance==
|
||||
[[Image:wel-push-button|wel_push_button]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[[Property:title|WEL_RADIO_BUTTON]]
|
||||
[[Property:weight|9]]
|
||||
[[Property:uuid|ce7c3bfb-7950-95fb-0f92-7e33abdefa3b]]
|
||||
A [[ref:libraries/wel/reference/wel_radio_button_chart|WEL_RADIO_BUTTON]] control can take two states, checked or unchecked. By placing more than one of these in a [[ref:libraries/wel/reference/wel_group_box_chart|WEL_GROUP_BOX]] , they will become grouped, and only one may be checked at once.
|
||||
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_radio_button_chart|WEL_RADIO_BUTTON]] <br/>
|
||||
[[Image:wel-radio-button-unchecked|wel_radio_button_unchecked]] <br/>
|
||||
<br/>
|
||||
A checked [[ref:libraries/wel/reference/wel_radio_button_chart|WEL_RADIO_BUTTON]] <br/>
|
||||
[[Image:wel-radio-button-checked|wel_radio_button_checked]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[[Property:title|WEL_SCROLL_BAR]]
|
||||
[[Property:weight|10]]
|
||||
[[Property:uuid|74da6cc8-0398-0b51-885b-d73b7ec104e0]]
|
||||
A [[ref:libraries/wel/reference/wel_scroll_bar_chart|WEL_SCROLL_BAR]] control is an encapsulation of the Windows scroll bar control and is often used to specify which portion of a large control that cannot be viewed completely, is currently visible.
|
||||
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_scroll_bar_chart|WEL_SCROLL_BAR]] created with <eiffel>make_horizontal</eiffel>. <br/>
|
||||
[[Image:wel-scroll-bar-horizontal|wel_scroll_bar_horizontal]] <br/>
|
||||
<br/>
|
||||
A [[ref:libraries/wel/reference/wel_scroll_bar_chart|WEL_SCROLL_BAR]] created with <eiffel>make_vertical</eiffel>. <br/>
|
||||
[[Image:wel-scroll-bar-vertical|wel_scroll_bar_vertical]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[[Property:title|WEL_SINGLE_LINE_EDIT]]
|
||||
[[Property:weight|11]]
|
||||
[[Property:uuid|69694ef8-a422-7f46-d97b-d42a16bfe838]]
|
||||
A [[ref:libraries/wel/reference/wel_single_line_edit_chart|WEL_SINGLE_LINE_EDIT]] is a control used to input a single line of text.
|
||||
==Appearance==
|
||||
[[Image:wel-single-line-edit|wel_single_line_edit]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_SINGLE_SELECTION_LIST_BOX]]
|
||||
[[Property:weight|12]]
|
||||
[[Property:uuid|4123c28b-da84-8d4b-5d51-844716569c44]]
|
||||
A [[ref:libraries/wel/reference/wel_single_selection_list_box_chart|WEL_SINGLE_SELECTION_LIST_BOX]] is a control used to display a list of <eiffel>STRING</eiffel>. Only one item may be selected at once.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-single-selection-list-box|wel_single_selection_list_box]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_MULTIPLE_SELECTION_LIST_BOX|WEL_MULTIPLE_SELECTION_LIST_BOX]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[[Property:title|WEL_TOOLTIP]]
|
||||
[[Property:weight|13]]
|
||||
[[Property:uuid|2eb53721-d1a8-cec0-5c6a-692e9dc58755]]
|
||||
A [[ref:libraries/wel/reference/wel_tooltip_chart|WEL_TOOLTIP]] is an encapsulation of the Win32 tooltip control, and controls pop-up windows which display text. Each tooltip may control multiple pop-up windows, which are added to the tooltip using <eiffel>add_tool</eiffel>.
|
||||
==Appearance==
|
||||
[[Image:wel-tooltip|wel_tooltip]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[[Property:title|WEL_TRACK_BAR]]
|
||||
[[Property:weight|14]]
|
||||
[[Property:uuid|ceb2589f-4caf-686c-b19f-6f2769b0edcb]]
|
||||
A [[ref:libraries/wel/reference/wel_track_bar_chart|WEL_TRACK_BAR]] control has a sliding pointer and optional tick marks.
|
||||
|
||||
==Appearance==
|
||||
A [[ref:libraries/wel/reference/wel_track_bar_chart|WEL_TRACK_BAR]] created with <eiffel>make_horizontal</eiffel>. <br/>
|
||||
[[Image:wel-track-bar-horizontal|wel_track_bar_horizontal]] <br/>
|
||||
<br/>
|
||||
A [[ref:libraries/wel/reference/wel_track_bar_chart|WEL_TRACK_BAR]] created with <eiffel>make_vertical</eiffel>. <br/>
|
||||
[[Image:wel-track-bar-vertical|wel_track_bar_vertical]]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
[[Property:title|WEL Interface Content]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|e779c244-ec00-6a80-41e6-3ff79eb1efdb]]
|
||||
WEL is an encapsulation of the Win32 Application Programming Interface (API), and provides users with a powerful means of creating Win32 Applications.
|
||||
|
||||
==Components==
|
||||
|
||||
The WEL library includes the following clusters:
|
||||
* [[windows cluster|<eiffel>windows</eiffel>]] cluster containing classes representing available windows types
|
||||
* [[controls cluster|<eiffel>controls</eiffel>]] cluster containing classes representing available controls
|
||||
* [[stddlgs cluster|<eiffel>stddlgs</eiffel>]] cluster containing classes representing standard Win32 dialogs
|
||||
* <eiffel>consts</eiffel> cluster which contains constants used by WEL
|
||||
* <eiffel>gdi</eiffel> cluster which contains classes allowing access to WIN32 Graphics Device Interfaces
|
||||
* <eiffel>gdistock</eiffel> cluster which contains standard Graphic Device Interfaces used by WEL
|
||||
* <eiffel>messages</eiffel> cluster which contains classes encapsulating windows messages
|
||||
* <eiffel>shared</eiffel> cluster which contains classes encapsulating system wide shared
|
||||
* <eiffel>structs</eiffel> cluster which contains classes for data structures required by Win32
|
||||
* <eiffel>support</eiffel> cluster which contains many supporting classes
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[[Property:title|stddlgs cluster]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|0af8dcbf-ed31-51d7-885c-c677090f0633]]
|
||||
This cluster contains different standard dialogs provided by WEL.
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_CHOOSE_COLOR_DIALOG]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|d827c9d8-068b-bade-f6a5-6aeb6be145e3]]
|
||||
The [[ref:libraries/wel/reference/wel_choose_color_dialog_chart|WEL_CHOOSE_COLOR_DIALOG]] is an encapsulation of the Win32 choose color dialog, and provides a means of selecting standard colors or creating custom colors.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-choose-color-dialog|wel_choose_color_dialog]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[stddlgs cluster|Standard dialogs]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_CHOOSE_FOLDER_DIALOG]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|cd4eaeb8-2322-e95f-0528-75ec0849d0fe]]
|
||||
The [[ref:libraries/wel/reference/wel_choose_folder_dialog_chart|WEL_CHOOSE_FOLDER_DIALOG]] allows the directory structure to be viewed and a folder selected.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-choose-folder-dialog|wel_choose_folder_dialog]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[stddlgs cluster|Standard dialogs]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_CHOOSE_FONT_DIALOG]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|046ecb0d-819b-fbc5-d736-629d0497b8b5]]
|
||||
The [[ref:libraries/wel/reference/wel_choose_font_dialog_chart|WEL_CHOOSE_FONT_DIALOG]] is an encapsulation of the Win32 choose font dialog, and provides a means of selecting a font available on the system.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-choose-font-dialog|wel_choose_font_dialog]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[stddlgs cluster|Standard dialogs]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[[Property:title|WEL_OPEN_FILE_DIALOG]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|b97583e1-ecfd-d2c0-2718-cc7bb90c9ec7]]
|
||||
The [[ref:libraries/wel/reference/wel_open_file_dialog_chart|WEL_OPEN_FILE_DIALOG]] is an encapsulation of the Win32 open file dialog, and provides a means of specifying a file to be opened.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-open-file-dialog|wel_open_file_dialoG]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[stddlgs cluster|Standard dialogs]] <br/>
|
||||
[[WEL_SAVE_FILE_DIALOG|WEL_SAVE_FILE_DIALOG]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[[Property:title|WEL_PRINT_DIALOG]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|c6c2866e-c14a-601c-8898-845c4b8d92a3]]
|
||||
The [[ref:libraries/wel/reference/wel_print_dialog_chart|WEL_PRINT_DIALOG]] is an encapsulation of the Win32 print dialog and provides a means of specifying print preferences.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-print-dialog|wel_print_dialog]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[stddlgs cluster|Standard dialogs]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[[Property:title|WEL_SAVE_FILE_DIALOG]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|db6de1e7-1edb-3968-6ee5-60bf5d6f75cb]]
|
||||
The [[ref:libraries/wel/reference/wel_save_file_dialog_chart|WEL_SAVE_FILE_DIALOG]] is an encapsulation of the Win32 save file dialog, and provides a means of specifying a file name and location for saving.
|
||||
|
||||
==Appearance==
|
||||
[[Image:wel-save-file-dialog|wel_save_file_dialoG]] <br/>
|
||||
<br/>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[stddlgs cluster|Standard dialogs]] <br/>
|
||||
[[WEL_OPEN_FILE_DIALOG|WEL_OPEN_FILE_DIALOG]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
[[Property:title|windows cluster]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|dc1af280-2e91-713c-751f-e88ce87197cf]]
|
||||
This cluster contains the different types of windows available to a [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] .
|
||||
|
||||
The following effective window types are available:
|
||||
* [[ref:libraries/wel/reference/wel_popup_window_chart|WEL_POPUP_WINDOW]]
|
||||
* [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]]
|
||||
* [[ref:libraries/wel/reference/wel_modeless_dialog_chart|WEL_MODELESS_DIALOG]]
|
||||
* [[ref:libraries/wel/reference/wel_mdi_frame_window_chart|WEL_MDI_FRAME_WINDOW]]
|
||||
* [[ref:libraries/wel/reference/wel_mdi_client_window_chart|WEL_MDI_CLIENT_WINDOW]]
|
||||
* [[ref:libraries/wel/reference/wel_mdi_child_window_chart|WEL_MDI_CHILD_WINDOW]]
|
||||
* [[ref:libraries/wel/reference/wel_main_dialog_chart|WEL_MAIN_DIALOG]]
|
||||
* [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]]
|
||||
* [[ref:libraries/wel/reference/wel_control_window_chart|WEL_CONTROL_WINDOW]]
|
||||
|
||||
{{note|A WEL application must contain at least one window. See the [[WEL Tutorial]] for details of how to set up your first window within a [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] . }}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Bmpview]]
|
||||
[[Property:weight|-15]]
|
||||
[[Property:uuid|c3df2d26-d913-e298-c7bc-929451617903]]
|
||||
[[Image:bmpview|bmpview]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\bmpview\''.
|
||||
* Choose ''bmpview.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 program, a window will be displayed as illustrated above, although no child windows will be present. Selecting "Open" from the "File" menu will allow you to browse for a .BMP file to view. Multiple files may be opened and each opens in a new child window. The options on the "Window" menu provide features for positioning the child windows. Selecting "Close" will close the currently selected child window, while selecting "Exit" or closing the window manually will exit the program.
|
||||
==Under the Hood==
|
||||
<code>MAIN_WINDOW</code> inherits [[ref:libraries/wel/reference/wel_mdi_frame_window_chart|WEL_MDI_FRAME_WINDOW]] and redefines <code>on_menu_command</code> to handle the menu selections. <code>CHILD_WINDOW</code> inherits [[ref:libraries/wel/reference/wel_mdi_child_window_chart|WEL_MDI_CHILD_WINDOW]] and implements make to load a named bitmap, while <code>on_paint</code> has been redefined to re-draw the bitmap. A [[ref:libraries/wel/reference/wel_open_file_dialog_chart|WEL_OPEN_FILE_DIALOG]] is used to select files for viewing.
|
||||
This sample contains the following classes:
|
||||
* <code>BMP_VIEW</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>CHILD_WINDOW</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_OPEN_FILE_DIALOG|WEL_OPEN_FILE_DIALOG]] <br/>
|
||||
[[MDI (Multiple Document Interface)|Mdi sample]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
[[Property:title|Brushes]]
|
||||
[[Property:weight|-14]]
|
||||
[[Property:uuid|6bca9e95-d5fe-3b88-bea0-284eb60d2dcf]]
|
||||
[[Image:brushes|brushes]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\brushes\''.
|
||||
* Choose ''brushes.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 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. }}
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>BRUSH_DEMO</code>
|
||||
* <code>BRUSHES_DEMO</code>
|
||||
* <code>DEMO_3D</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>PROJECTION</code>
|
||||
* <code>RECTANGLE_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Commands]]
|
||||
[[Property:weight|-12]]
|
||||
[[Property:uuid|e1942cb8-02df-352e-061c-2c87c280ead8]]
|
||||
[[Image:commands|commands]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\commands\''.
|
||||
* Choose ''commands.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 program, you will see a window displayed with a similar appearance to the one illustrated above. Please follow the instructions displayed in the window.
|
||||
==Under the Hood==
|
||||
<code>MAIN_DIALOG</code> inherits [[ref:libraries/wel/reference/wel_main_dialog_chart|WEL_MAIN_DIALOG]] which provides the feature put_command, used to associate a [[ref:libraries/wel/reference/wel_command_chart|WEL_COMMAND]] to a Windows message received by the window. A [[ref:libraries/wel/reference/wel_command_chart|WEL_COMMAND]] contains a deferred feature, execute which is executed when the command is fired. <code>SHOW_COMMAND_INFORMATION</code>, <code>SHOW_MOUSE_BUTTON_INFORMATION</code> and <code>SHOW_MOVE_INFORMATION</code> all inherit [[ref:libraries/wel/reference/wel_command_chart|WEL_COMMAND]] .
|
||||
{{note|execute has an argument of type <code>ANY</code> which is used to pass any additional information required. }}
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>COMMANDS_DEMO</code>
|
||||
* <code>MAIN_DIALOG</code>
|
||||
* <code>SHOW_COMMAND_INFORMATION</code>
|
||||
* <code>SHOW_MOUSE_BUTTON_INFORMATION</code>
|
||||
* <code>SHOW_MOVE_INFORMATION</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
[[Property:title|Common Controls]]
|
||||
[[Property:weight|-13]]
|
||||
[[Property:uuid|d50d633a-2ba5-995e-637c-6694cee8bf55]]
|
||||
[[Image:comctrls|comctrls]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\comctrls\''.
|
||||
* Choose ''comctrls.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file. If you select another directory than the default one, please copy icons (*.ico) and resource files (*.rc) from the default directory (the one containing the ecf file) to the new one.
|
||||
* Click '''OK'''.
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the program, a window will be displayed as illustrated above. Selecting "Progress bar demonstration" from the "File" menu will update the progress bar to a full state. Leaving the mouse stationary above the track bar, progress bar or toolbar buttons will cause a tooltip control to be displayed.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
There is one [[ref:libraries/wel/reference/wel_tooltip_chart|WEL_TOOLTIP]] used for all the controls, but each control adds a new [[ref:libraries/wel/reference/wel_tool_info_chart|WEL_TOOL_INFO]] to provide different output for each control. The feature <code>on_notify</code> has been redefined to handle the Ttn_needtext notification which is posted by a control, and received by the controls parent, when a control needs to display a tooltip. The feature <code>on_menu_select</code> has been redefined to output the text of the selected menu item in the [[ref:libraries/wel/reference/wel_status_window_chart|WEL_STATUS_WINDOW]] located at the bottom of <code>MAIN_WINDOW</code>.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>COMCTRLS_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
[[Property:title|Controls Sample]]
|
||||
[[Property:weight|-11]]
|
||||
[[Property:uuid|7f9a091f-61af-9ea2-18c3-469573ba14f3]]
|
||||
[[Image:controls|controls]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\controls\''.
|
||||
* Choose ''controls.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 program, an empty window will be displayed. There are numerous menus in the window, each relating to a different type of [[Controls cluster|control]]. Each menu has "Create" and "Delete" along with a other options specific to each control. By selecting these menu options, controls will be created and modified as demonstrated in the above illustration.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
Each menu is an instance of [[ref:libraries/wel/reference/wel_menu_chart|WEL_MENU]] and on_menu_command has been redefined in <code>MAIN_WINDOW</code> to perform the appropriate actions.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>CONTROLS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_LIST_VIEW|WEL_LIST_VIEW]] <br/>
|
||||
[[ref:libraries/wel/reference/wel_combo_box_chart|WEL_COMBO_BOX]] <br/>
|
||||
[[WEL_PUSH_BUTTON|WEL_PUSH_BUTTON]] <br/>
|
||||
[[ref:libraries/wel/reference/wel_edit_chart|WEL_EDIT]] <br/>
|
||||
[[WEL_RADIO_BUTTON|WEL_RADIO_BUTTON]] <br/>
|
||||
[[WEL_PUSH_BUTTON|WEL_CHECK_BUTTON]] <br/>
|
||||
[[WEL_MULTIPLE_LINE_EDIT|WEL_MULTIPLE_LINE_EDIT]] <br/>
|
||||
[[WEL_SCROLL_BAR|WEL_SCROLL_BAR]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Ctlcolor]]
|
||||
[[Property:weight|-10]]
|
||||
[[Property:uuid|0f9f5155-1c21-dd20-4810-32c105eeb02a]]
|
||||
[[Image:ctlcolor|ctlcolor]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\ctlcolor\''.
|
||||
* Choose ''ctlcolor.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 program, you will see a window displayed as above. Clicking on the "Foreground color" button will display a color dialog which allows you to select a new foreground color for the controls. Clicking on the "Background color" button will display a color dialog which allows you to select a new background color for the controls.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
A [[ref:libraries/wel/reference/wel_color_control_chart|WEL_COLOR_CONTROL]] is used to retrieve the color selection of the user through the feature rgb_result which returns an object of type [[ref:libraries/wel/reference/wel_color_ref_chart|WEL_COLOR_REF]] .
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>CTLCOLOR_DEMO</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>MY_BUTTON</code>
|
||||
* <code>PRECOMP_MAIN_WINDOW</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Cursors]]
|
||||
[[Property:weight|-9]]
|
||||
[[Property:uuid|2f1abcdd-182f-3fdf-27b9-861d1c2e2167]]
|
||||
[[Image:cursors|cursors]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\cursors\''.
|
||||
* Choose ''cursors.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
* After the example compiles, select menu path "<code lang="text">Project -> Freeze...</code>" to freeze the project. This is necessary to include the compiled resource (.rc) file.
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the program, a window will be displayed as illustrated above. Selecting one of the cursor types from the "Cursors" menu will cause the selected cursor to be displayed when the mouse pointer is over the client area of the window.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
The feature <code>on_menu_command</code> has been redefined in <code>MAIN_WINDOW</code> to create the appropriate cursor when a menu selection is made, while <code>on_set_cursor</code> has been redefined to update the style of the displayed cursor.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>CURSORS_DEMO</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
[[Property:title|Disk Space]]
|
||||
[[Property:weight|-8]]
|
||||
[[Property:uuid|09c90710-45c8-f674-376c-30ed0da738cd]]
|
||||
[[Image:diskspace|diskspace]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\diskspace\''.
|
||||
* Choose ''diskspace.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 text output showing the size and amount of free space available on each of your local drives.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
<code>DISCSPACE_DEMO</code> contains a once feature, diskspace which returns an instance of [[ref:libraries/wel/reference/wel_disk_space_chart|WEL_DISK_SPACE]] , used to query the local drives.
|
||||
|
||||
This sample contains only one class:
|
||||
* <code>DISKSPACE_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
[[Property:title|Fontenum]]
|
||||
[[Property:weight|-7]]
|
||||
[[Property:uuid|7dbb5e5c-3e00-e4f6-9fc6-29ba4f2476d9]]
|
||||
[[Image:fontenum|fontenum]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\fontenum\''.
|
||||
* Choose ''fontenum.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file. If you select another directory than the default one, please copy icons (*.ico) and resource files (*.rc) from the default directory (the one containing the ecf file) to the new one.
|
||||
* Click '''OK'''.
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the program, a window will be displayed as illustrated above. Selecting one of the available fonts (Listed on the left hand side) will cause a sample text to be displayed in the currently entered font size. Clicking the button marked "Close" will cause the program to end.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
<code>MAIN_DIALOG</code> inherits from [[ref:libraries/wel/reference/wel_main_dialog_chart|WEL_MAIN_DIALOG]] and also WEL_FONT_FAMILY_ENUMERATOR. <code>MAIN_DIALOG</code> implements action which was deferred from WEL_FONT_ENUMERATOR and executed every an enumeration finds a new font. This new implementation is used to display the available fonts in the [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]]
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>FONTENUM_DEMO</code>
|
||||
* <code>MAIN_DIALOG</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[[Property:title|Fun]]
|
||||
[[Property:weight|-6]]
|
||||
[[Property:uuid|ad05362e-76a3-db98-a58d-d49f9f2b5f2a]]
|
||||
[[Image:fun|fun]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\fun\''.
|
||||
* Choose ''fun.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 program, a window will be displayed as illustrated above. Clicking the push button marked "Maze" will open a new window and draw a maze within this window. Clicking the push button marked "Artist" will open a new window, and display output dependent on the movement of the mouse pointer within the client area of that window. Clicking the push button marked "Fun" will open a new window which contains a fake error message and a close push button which moves when you try to move the mouse pointer over it.
|
||||
==Under the Hood==
|
||||
Both <code>FUN_DIALOG</code> and <code>ARTIST</code> redefine <code>on_mouse_move</code> to track the actions of the mouse pointer and respond accordingly.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>ARTIST</code>
|
||||
* <code>FUN_DEMO</code>
|
||||
* <code>FUN_DIALOG</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>MAZE</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Header Control]]
|
||||
[[Property:weight|-5]]
|
||||
[[Property:uuid|9b2bee5f-8676-4f9f-c6e0-e00b44b3bef4]]
|
||||
[[Image:header-ctrl|header_ctrl]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\header_ctrl\''.
|
||||
* Choose ''header_ctrl.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file. If you select another directory than the default one, please copy icons (*.ico) and resource files (*.rc) from the default directory (the one containing the ecf file) to the new one.
|
||||
* Click '''OK'''.
|
||||
|
||||
==Running==
|
||||
|
||||
After launching the program, a window will be displayed as shown above. By manipulating the header control, you will see notification of the events that occur displayed in the [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] situated below.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
<code>HEADER_CONTROL</code> inherits [[ref:libraries/wel/reference/wel_header_control_chart|WEL_HEADER_CONTROL]] and redefines many of the `on_` notification features to display the output.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>HEADER_CONTROL</code>
|
||||
* <code>HEADER_CONTROL_DEMO</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
[[Property:title|Hello World!]]
|
||||
[[Property:weight|-4]]
|
||||
[[Property:uuid|37b82651-78e9-dd6a-97bf-0fe3c444157d]]
|
||||
[[Image:hello|hello]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\hello\''.
|
||||
* Choose ''hello.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
==Running==
|
||||
|
||||
After you launch the sample, You should see a window displayed as illustrated above. You will have full control over the window, and the program will quit when you close the window.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
MAIN_WINDOW inherits WEL_FRAME_WINDOW. In this example, we have redefined on_paint as shown below:
|
||||
<code>
|
||||
on_paint (paint_dc: WEL_PAINT_DC; invalid_rect: WEL_RECT)
|
||||
--Draw a centered text
|
||||
do
|
||||
paint_dc.draw_centered_text("Hello, World!", client_rect)
|
||||
end
|
||||
</code>
|
||||
|
||||
{{note|If you look at MAIN_WINDOW, you will see that it contains many features. However, nearly all of these are features are inherited from WEL_FRAME_WINDOW. }}
|
||||
|
||||
This sample contains the following classes:
|
||||
* HELLO_DEMO
|
||||
* MAIN_WINDOW
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Tutorial Step 3|Tutorial Step3]] <br/>
|
||||
[[Common message hooks|Common message hooks]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[[Property:title|WEL Samples]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|f6df9869-52b7-0d10-dd0c-52796f631998]]
|
||||
There are a large number of samples provided with the WEL library, each designed to demonstrate different functionality. The samples available are listed below.
|
||||
|
||||
{{note|If you are new to WEL programming, the recommended place to start is the set of samples called the [[WEL Tutorial]]. }}
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
[[Property:title|List View]]
|
||||
[[Property:weight|-3]]
|
||||
[[Property:uuid|709475e9-e01c-6ce7-942f-7dc6bf6f3bec]]
|
||||
[[Image:list-view|list_view]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\list_view\''.
|
||||
* Choose ''list_view.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 program, a window will be displayed containing a pair of [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] . Clicking the button marked "style" will modify the style of the lower list view. If you click the mouse within this lower list view, you will see notification of events appearing in the upper list view.
|
||||
==Under the Hood==
|
||||
|
||||
<code>LISTVIEW_DEMO</code> redefines <code>init_application</code> in order to load the [[ref:libraries/wel/reference/wel_common_controls_dll_chart|WEL_COMMON_CONTROLS_DLL]] and the [[ref:libraries/wel/reference/wel_rich_edit_dll_chart|WEL_RICH_EDIT_DLL]] .
|
||||
|
||||
<code>LISTVIEW</code> redefines many of the `on_` features inherited from [[ref:libraries/wel/reference/wel_list_view_chart|WEL_LIST_VIEW]] in order to generate output for the user.
|
||||
|
||||
The style of the <code>LISTVIEW_DEMO</code> is changed by calling <code>set_style</code> with the required new style.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>LISTVIEW</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>LISTVIEW_DEMO</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
WEL_LIST_VIEW }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
[[Property:title|Magnify]]
|
||||
[[Property:weight|-2]]
|
||||
[[Property:uuid|2c50fccc-2481-6f2d-d223-b4b246398636]]
|
||||
[[Image:magnify|MAGNIFY]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\magnify\''.
|
||||
* Choose ''magnify.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 "Quick reference..." from the "Help" menu will display the full instructions for using this application.
|
||||
==Under the Hood==
|
||||
|
||||
In order to be able to control the output of the sample, <code>MAIN_WINDOW</code> redefines many features from [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] . The feature <code>draw_zoom_rectangle</code> is used to display the output and <code>on_menu_command</code> handles the notifications sent to the window when a <code>menu_selection</code> has been made.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>MAGNIFY_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[[Property:title|MDI (Multiple Document Interface)]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|e5f4b1d5-31a1-51a3-46ea-3cf70a4b40d7]]
|
||||
[[Image:mdi--mdi|mdi]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\mdi\''.
|
||||
* Choose ''mdi.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 program, a window will be displayed as illustrated above. Selecting "New" from the "File" menu will create a new child window, while selecting "Close" will close the currently selected child window. The options available on the "Window" menu allow positioning of the child windows. Selecting "Exit" from the "File" menu or closing the window manually will exit the program.
|
||||
==Under the Hood==
|
||||
<code>MAIN_WINDOW</code> inherits [[ref:libraries/wel/reference/wel_mdi_frame_window_chart|WEL_MDI_FRAME_WINDOW]] to provide the multiple document interface behavior while each child window is of type [[ref:libraries/wel/reference/wel_mdi_child_window_chart|WEL_MDI_CHILD_WINDOW]] . When "Close" is selected from the "File" menu, the feature <code>active_window</code> from [[ref:libraries/wel/reference/wel_mdi_frame_window_chart|WEL_MDI_FRAME_WINDOW]] is used to select the window that must be closed.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>MDI_DEMO</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Bmpview|Bmpview]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
[[Property:title|Minimal]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|270db90c-dc2a-b6c4-8c2d-62a6657d01de]]
|
||||
[[Image:minimal|minimal]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\minimal\''.
|
||||
* Choose ''minimal.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 program, a window will be displayed as illustrated above. There is no other functionality, but clicking on the close icon (Cross in top right hand corner), will close the window.
|
||||
==Under the Hood==
|
||||
<code>MINIMAL_DEMO</code> inherits [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] and redefines <code>main_window</code> in order to display a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] .
|
||||
This sample contains only one class:
|
||||
* <code>MINIMAL_DEMO</code>
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Tutorial Step 1|tutorial step 1]] <br/>
|
||||
[[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
[[Property:title|Pizza]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|5375fdad-ab5e-7f6e-ef44-a4f34d137231]]
|
||||
=Pizza Sample=
|
||||
[[Image:pizza|pizza]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\pizza\''.
|
||||
* Choose ''pizza.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 program, a window will be displayed titled "WEL Pizza" If you select "Order" from the "Pizza" menu, a new window will appear (Illustrated above), which allows you to enter details of a new pizza order. When the order is completed, clicking the "ok" button will display the details of the order that was entered. Selecting "Exit from the "Pizza" menu or closing the original window will exit the program.
|
||||
|
||||
==Under the Hood==
|
||||
<code>MAIN_WINDOW</code> inherits [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] while <code>DIALOG</code> inherits [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] . <code>DIALOG</code> demonstrates the use of a selection of common controls to build a custom user interface.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>DIALOG</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>PIZZA_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Printer]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|ee50d48e-4f39-adbc-1f69-1f9d9ef6e101]]
|
||||
[[Image:printer|printer]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\printer\''.
|
||||
* Choose ''printer.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 program, a window will be displayed as illustrated above. Selecting "Print" from the "File" menu will open a print dialog which will allow you to specify a printer and additional print information before printing the contents of the window.
|
||||
|
||||
==Under the Hood==
|
||||
<code>MAIN_WINDOW</code> inherits [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] and the feature <code>on_paint</code> has been redefined to display the output in the client area. A [[WEL_PRINT_DIALOG|WEL_PRINT_DIALOG]] is used to retrieve the print options before the printing occurs through the interface provided by a [[ref:libraries/wel/reference/wel_printer_dc_chart|WEL_PRINTER_DC]] .
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>PRINTER_DEMO</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_PRINT_DIALOG|WEL_PRINT_DIALOG]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
[[Property:title|Rich Edit]]
|
||||
[[Property:weight|4]]
|
||||
[[Property:uuid|d0a35ffd-a253-406f-ba15-c78400e8acd5]]
|
||||
[[Image:richedit|richedit]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\richedit\''.
|
||||
* Choose ''richedit.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 program, a window will be displayed as shown above. The program is a simple text editor which allows you to load and save files; select fonts and colors; and print files. The operations are accessible through the menu bar and/or the tool bar.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
Both the menu items and the tool bar buttons are handled by on_menu_command which has been redefined in MAIN_WINDOW.
|
||||
|
||||
Four of the [[stddlgs cluster|standard dialogs]] provided by WEL are used to receive input from the user.
|
||||
This sample contains the following classes:
|
||||
* APPLICATION_IDS
|
||||
* MAIN_WINDOW
|
||||
* RICHEDIT_DEMO
|
||||
|
||||
{{seealso|<br/>
|
||||
[[ref:libraries/wel/reference/wel_rich_edit_chart|WEL_RICH_EDIT]] <br/>
|
||||
[[WEL_PRINT_DIALOG|WEL_PRINT_DIALOG]] <br/>
|
||||
[[WEL_SAVE_FILE_DIALOG|WEL_SAVE_FILE_DIALOG]] <br/>
|
||||
[[WEL_OPEN_FILE_DIALOG|WEL_OPEN_FILE_DIALOG]] <br/>
|
||||
[[WEL_CHOOSE_COLOR_DIALOG|WEL_CHOOSE_COLOR_DIALOG]] <br/>
|
||||
[[WEL_CHOOSE_FONT_DIALOG|WEL_CHOOSE_FONT_DIALOG]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[[Property:title|Split Area]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|b53ef206-7cda-5f27-649c-e43b47688061]]
|
||||
[[Image:splitarea|splitarea]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\splitarea\''.
|
||||
* Choose ''split_area.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 program, a window will be displayed containing a pair of [[ref:libraries/wel/reference/wel_rich_edit_chart|WEL_RICH_EDIT]] in a split area. Clicking the mouse on the split area (between the two rich edits) and dragging the mouse, will adjust the split area and its content accordingly.
|
||||
==Under the Hood==
|
||||
|
||||
There is no split area class provided with WEL, but <code>WEL_SPLIT_AREA</code> was created for this sample to illustrate how new controls can be built when required. Redefining some of the `on_` features inherited from [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] in <code>WEL_SPLIT_AREA</code> shows how the control over the contents of the split area is achieved.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION</code>
|
||||
* <code>SPLIT_AREA_DEMO</code>
|
||||
* <code>WEL_SPLIT_AREA</code>
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[ref:libraries/wel/reference/wel_rich_edit_chart|WEL_RICH_EDIT]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
[[Property:title|Standard Dialogs Sample]]
|
||||
[[Property:weight|6]]
|
||||
[[Property:uuid|0d706af1-8c76-64b3-5907-0d9effb2bb8f]]
|
||||
[[Image:stddlgs|stddlgs]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\stddlgs\''.
|
||||
* Choose ''stddlgs.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 program, a window will displayed with a menu allowing you to select some of the standard dialogs provided by WEL.
|
||||
==Under the Hood==
|
||||
<code>on_menu_command</code> has been redefined in <code>MAIN_WINDOW</code> to display a different standard dialog when each of the menu items is selected.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>STDDLG_DEMO</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL_OPEN_FILE_DIALOG|WEL_OPEN_FILE_DIALOG]] <br/>
|
||||
[[WEL_CHOOSE_FONT_DIALOG|WEL_CHOOSE_FONT_DIALOG]] <br/>
|
||||
[[WEL_CHOOSE_COLOR_DIALOG|WEL_CHOOSE_COLOR_DIALOG]] <br/>
|
||||
[[WEL_PRINT_DIALOG|WEL_PRINT_DIALOG]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
[[Property:title|Timer]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|ec5895ca-5d09-292f-f5dc-4787d3495bae]]
|
||||
[[Image:timer|timer]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\timer\''.
|
||||
* Choose ''timer.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 program, a window will be displayed as illustrated above. Clicking on any of the push buttons marked "Start Timer" will start a timer running, and the hatched area immediately above the push button will change its appearance to reflect the interval of the timer.
|
||||
==Under the Hood==
|
||||
A [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] supports multiple timers, set by set_timer which takes a unique id for each timer. The <code>on_timer</code> feature is called every time a timer interval is reached with an argument corresponding to the <code>id</code> of the timer. Within <code>MAIN_WINDOW</code>, <code>on_timer</code> has been redefined to update the appearance of the hatched areas.
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>TIMER</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
[[Property:title|Tree View Sample]]
|
||||
[[Property:weight|8]]
|
||||
[[Property:uuid|31c64f11-3aa4-cfff-b9f3-09027acfc143]]
|
||||
[[Image:tree-view--tree-view|tree_view]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tree_view\''.
|
||||
* Choose ''tree_view.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 program, a window will be displayed as illustrated above. Selecting or expanding one of the tree items will cause notification to be displayed in the list at the top of the window. Various other notifications are also displayed, such as pressing a key in the tree.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
<code>TREEVIEW</code> inherits [[ref:libraries/wel/reference/wel_tree_view_chart|WEL_TREE_VIEW]] and redefines make to initialize items within the tree. A [[ref:libraries/wel/reference/wel_tree_view_insert_struct_chart|WEL_TREE_VIEW_INSERT_STRUCT]] is used to insert each [[ref:libraries/wel/reference/wel_tree_view_item_chart|WEL_TREE_VIEW_ITEM]] while a [[ref:libraries/wel/reference/wel_image_list_chart|WEL_IMAGE_LIST]] is used to reference images within the tree.
|
||||
This sample contains the following classes:
|
||||
* <code>TREEVIEW</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>TREEVIEW_DEMO</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[ref:libraries/wel/reference/wel_tree_view_chart|WEL_TREE_VIEW]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
[[Property:title|Unicode Sample]]
|
||||
[[Property:weight|9]]
|
||||
[[Property:uuid|9905de6c-3f13-1c31-2f8c-efddd71abc6d]]
|
||||
[[Image:unicode|unicode]] <br/>
|
||||
<br/>
|
||||
|
||||
==Requirements==
|
||||
|
||||
This sample demonstrates Unicode compatibility. It therefore assumes a fully Unicode compatible operating system and recommends the system has more than one input locale installed. The system used to generate the above screenshot shows the sample running on Windows 2000 with the Korean IME installed. Since Windows 95/98/Me does not provide full built-in support for Unicode please refer to "Compiling WEL for Unicode on Windows 95/98/Me" before attempting to run this example.
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\unicode\''.
|
||||
* Choose ''unicode.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 program, a window will be displayed as illustrated above. Selecting the input locale combo box will allow you to switch to a new input locale. To add new input locales to your system do the following:
|
||||
* Click on '''Start''' -> '''Settings''' -> '''Control Panel''' -> '''Regional Options'''
|
||||
* Select the ''' Input Locale''' tab and click '''Add'''.
|
||||
* Select the input locale then click '''OK'''
|
||||
* To test the new input locale restart the Unicode sample.
|
||||
Selecting an input locale allows entry of the chosen input locale characters into the rich-edit control to right. Clicking the "Apply to Controls" button will update the controls in the pane below to display the same text as the rich-edit control. If the selected input locale is associated with an Input Method Editor (IME), the details for this will be displayed in the "Input Method Editor" group box and IME specific options will be made available from the "IME Options" menu.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
There is one <code>MAIN_WINDOW</code> class used for all the controls. The feature <code>init_locale_list</code> is used to determine the systems available input locales and populate the corresponding "Input Locales" combo box. The features 'change_font' and 'change_control' are used to change the applications font (in case the currently selected font does not correctly display Unicode characters), and to set the <code>text</code> property of all controls to the same as that in the rich-edit box.
|
||||
This sample contains the following classes:
|
||||
* <code>UNICODE_DEMO</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>DISPLAY_TEXT</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
[[Property:title|Wel Sample: Menus]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|9cd62273-3624-fc6c-44d5-c42150d9b684]]
|
||||
[[Image:menus|menus]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\menus\''.
|
||||
* Choose ''menus.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 program, you will see a window displayed with a similar appearance to the one displayed above. If you right click in the client area of the window, a menu will pop up at the cursor position. The same menu is also accessible from the "File" menu. Selecting any of the menu options will display a notification of which option was selected.
|
||||
==Under the Hood==
|
||||
A [[ref:libraries/wel/reference/wel_menu_chart|WEL_MENU]] is used for the menu's in this sample. The feature show_track is used to display the menu at the cursor position and a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] is used to display the notification when a menu selection has occurred.
|
||||
This sample contains the following classes:
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>MENUS_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
[[Property:title|Windows Sample]]
|
||||
[[Property:weight|10]]
|
||||
[[Property:uuid|3ace1338-c85b-c7d8-faaf-52e9fb4e157e]]
|
||||
[[Image:windows|windows]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\windows\''.
|
||||
* Choose ''windows.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 program, a window will appear with a custom <code>ON_OFF_CONTROL</code> control displayed. Clicking on this control will cause its state to change. If you select one of the options from the "Windows" menu, that type of window will be displayed.
|
||||
==Under the Hood==
|
||||
|
||||
The <code>ON_OFF_CONTROL</code> inherits [[ref:libraries/wel/reference/wel_control_window_chart|WEL_CONTROL_WINDOW]] and demonstrates how to build your controls. The classes <code>MODAL</code> and <code>MODELESS</code> inherit [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] and [[ref:libraries/wel/reference/wel_modeless_dialog_chart|WEL_MODELESS_DIALOG]] respectively.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>MODAL</code>
|
||||
* <code>MODELESS</code>
|
||||
* <code>ON_OFF_CONTROL</code>
|
||||
* <code>WINDOWS_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
[[Property:title|Xcell]]
|
||||
[[Property:weight|11]]
|
||||
[[Property:uuid|b48ed2d1-d91f-e288-5705-7a6bfa612c29]]
|
||||
[[Image:xcell|xcell]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\xcell\''.
|
||||
* Choose ''xcell.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 program, a window will be displayed. Selecting "New" from the "Game" menu or pressing F2, will cause a new game to start and the window should take a similar appearance to the above illustration. Selecting "How to play..." from the "Help" menu will display the instructions for playing the game.
|
||||
==Under the Hood==
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>APP_CONSTANTS</code>
|
||||
* <code>CARD</code>
|
||||
* <code>COLUMN</code>
|
||||
* <code>GAME</code>
|
||||
* <code>GAME_CONSTANTS</code>
|
||||
* <code>GAME_MANAGER</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>SELECT_GAME_NUMBER_DIALOG</code>
|
||||
* <code>SELECT_NUMBER_OF_CARDS_DIALOG</code>
|
||||
* <code>XCELL_DEMO</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
[[Property:title|XY Co-ordinates]]
|
||||
[[Property:weight|12]]
|
||||
[[Property:uuid|f0b46125-2954-1504-0f47-c023462957f3]]
|
||||
[[Image:xy|xy]] <br/>
|
||||
<br/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
To compile the example:
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\xy\''.
|
||||
* Choose ''xy.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 sample, you should see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. If you click the left mouse button in the client area of the window, the coordinates of the click (Relative to the top left of the client area), will be displayed. Clicking the [[ref:libraries/wel/reference/wel_push_button_chart|WEL_PUSH_BUTTON]] marked "Clear" will clear the client area of the window.
|
||||
==Under the Hood==
|
||||
|
||||
A [[ref:libraries/wel/reference/wel_client_dc_chart|WEL_CLIENT_DC]] is used to display output in the client area of the window during the execution of <code>on_left_button_down</code> which has been redefined in <code>MAIN_WINDOW</code>.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>XY_DEMO</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Tutorial Step 3|tutorial_step3]] <br/>
|
||||
[[WEL_PUSH_BUTTON|WEL_PUSH_BUTTON]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[[Property:title|WEL Tutorial]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|68faa545-c658-ad5e-ca6f-ab693a7aabf8]]
|
||||
WEL is shipped with a tutorial among its sample programs. This tutorial shows you how to develop a simple WEL application and contains eight different samples listed below:
|
||||
* [[Tutorial Step 1|Step1]] - A Basic WEL Application.
|
||||
* [[Tutorial Step 2|Step2]] - Responding to an event.
|
||||
* [[Tutorial Step 3|Step3]] - Displaying output on a WEL_CLIENT_DC.
|
||||
* [[Tutorial Step 4|Step4]] - A very basic drawing program.
|
||||
* [[Tutorial Step 5|Step5]] - Using a WEL_MODAL_DIALOG.
|
||||
* [[Tutorial Step 6|Step6]] - Re-drawing a window by redefining on_paint.
|
||||
* [[Tutorial Step 7|Step7]] - Adding menus.
|
||||
* [[Tutorial Step 8|Step8]] - Using a WEL_OPEN_FILE_DIALOG and a WEL_SAVE_FILE_DIALOG.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
[[Property:title|Tutorial Step 1]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step1\''.
|
||||
* Choose ''tutorial_step1.ecf''
|
||||
* Choose the location where the project will be compiled, by default the same directory containing the configuration file.
|
||||
* Click '''OK'''.
|
||||
|
||||
|
||||
==Running==
|
||||
|
||||
After you launch the sample, You should see the window displayed in the screen as illustrated above. You will have full control over the window, and the program will quit when you close the window.
|
||||
|
||||
{{note|The size and shape of the window may be different on your machine. }}
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
Although this system does nothing except create and display a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] , it shows how to set up your first [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] .
|
||||
|
||||
This sample only contains one class, TUTORIAL_STEP1 which inherits [[ref:libraries/wel/reference/wel_application_chart|WEL_APPLICATION]] and redefines <code>main_window</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Inheriting WEL_APPLICATION|Inheriting WEL application]] <br/>
|
||||
[[Redefining main_window|Redefining main_window]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
[[Property:title|Tutorial Step 2]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step2\''.
|
||||
* Choose ''tutorial_step2.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 sample, you should see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. If you click the left mouse button in the client area of the window, a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] will appear, notifying you of your click.
|
||||
|
||||
==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, <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 <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>
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[WEL Common Concepts|Common message hooks]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
[[Property:title|Tutorial Step 3]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step3\''.
|
||||
* Choose ''tutorial_step3.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 sample, you should see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed . If you click the left mouse button in the client area of the window, the coordinates of the click (Relative to the top left of the client area), will be displayed. Clicking the right mouse button in the client area will clear the window.
|
||||
==Under the Hood==
|
||||
|
||||
This system is a demonstration of how to gain access to the client area of a window using a [[ref:libraries/wel/reference/wel_client_dc_chart|WEL_CLIENT_DC]] . The creation procedure of the DC takes a WEL_WINDOW as an argument, and in this sample, we pass the <code>MAIN_WINDOW</code>. Using this DC, it is a simple step to output the position of the mouse which is provided as arguments to <code>on_left_button_down</code>.
|
||||
|
||||
<code>on_right_button_down</code> has also been redefined to call invalidate which clears the client area of the window.
|
||||
This sample contains the following classes:
|
||||
* <code>TUTORIAL_STEP3</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
|
||||
|
||||
{{seealso|<br/>
|
||||
[[Common message hooks|Common message hooks]] <br/>
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
[[Property:title|Tutorial Step 4]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step4\''.
|
||||
* Choose ''tutorial_step4.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 sample, you will see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. By holding down the left mouse button, and moving the mouse (Within the client area of the window), you will be able to draw on the client area of the window. Pressing the right mouse button within the window will clear the client area of the window.
|
||||
==Under the Hood==
|
||||
|
||||
This system is an improvement over tutorial [[Tutorial Step 3|step3]] and only uses WEL techniques demonstrated in previous tutorials to allow you to draw on the client DC of the window.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>TUTORIAL_STEP4</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
[[Property:title|Tutorial Step 5]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step5\''.
|
||||
* Choose ''tutorial_step5.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 sample, you will see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. By holding down the left mouse button, and moving the mouse (Within the client area of the window), you will be able to draw on the client are of the window. If you press the right mouse button, a [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] will pop up which allows you to enter the thickness of the line that is drawn.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
This system builds on tutorial [[Tutorial Step 4|step 4]] by adding a [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] . The class <code>LINE_THICKNESS_DIALOG</code> inherits [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] and uses a WEL_SINGLE_LINE_EDIT to input the desired line width.
|
||||
This sample contains the following classes:
|
||||
* <code>TUTORIAL_STEP5</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>LINE_THICKNESS_DIALOG</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
[[Property:title|Tutorial Step 6]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step6\''.
|
||||
* Choose ''tutorial_step6.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 sample, you will see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. By holding down the left mouse button, and moving the mouse (Within the client area of the window), you will be able to draw on the client are of the window. If you press the right mouse button, a [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] will pop up which allows you to enter the thickness of the line that is drawn. If you re-size the window, then the drawing will be re-drawn.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
This system uses a redefined on_paint to re-draw the contents of the window. A <code>LINKED_LIST</code> of <code>LINES</code> is used to store all the lines that have been drawn and during <code>on_paint</code>, this list is traversed in order to re-draw each line.
|
||||
This sample contains the following classes:
|
||||
* <code>TUTORIAL_STEP6</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>LINE_THICKNESS_DIALOG_CHART</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>POINT</code>
|
||||
* <code>LINE</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
[[Property:title|Tutorial Step 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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step7\''.
|
||||
* Choose ''tutorial_step7.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 sample, you will see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. By holding down the left mouse button, and moving the mouse (Within the client area of the window), you will be able to draw on the client are of the window. Selecting "Line_thickness" from the "Line" menu, will bring up a [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] which allows you to change the thickness of the line that is drawn. If you select "Exit" from the "File" menu, you will be prompted if you wish to exit the application. Selecting "New" from the "File" menu will clear the window. The other menu options on the "File" menu do nothing in this example.
|
||||
|
||||
==Under the Hood==
|
||||
|
||||
During the creation of <code>MAIN_WINDOW</code>, the menu is assigned to the window and <code>on_menu_command</code> is redefined to allow processing of the menu selections.
|
||||
|
||||
This sample contains the following classes:
|
||||
* <code>TUTORIAL_STEP7</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>LINE_THICKNESS_DIALOG_CHART</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>POINT</code>
|
||||
* <code>LINE</code>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[[Property:title|Tutorial Step 8]]
|
||||
[[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/>
|
||||
|
||||
==Compiling==
|
||||
|
||||
* Launch EiffelStudio.
|
||||
* Click '''Add project'''
|
||||
* Browse to ''$ISE_EIFFEL\examples\wel\tutorial\step8\''.
|
||||
* Choose ''tutorial_step8.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 sample, you will see a [[ref:libraries/wel/reference/wel_frame_window_chart|WEL_FRAME_WINDOW]] displayed. By holding down the left mouse button, and moving the mouse (Within the client area of the window), you will be able to draw on the client are of the window. Selecting "Line_thickness" from the "Line" menu, will display a [[ref:libraries/wel/reference/wel_modal_dialog_chart|WEL_MODAL_DIALOG]] which allows you to change the thickness of the line that is drawn. If you select "Exit" from the "File" menu, you will be prompted if you wish to exit the application. Selecting "New" from the "File" menu will clear the window. Selecting "Save" from the "File" menu will display a [[ref:libraries/wel/reference/wel_save_file_dialog_chart|WEL_SAVE_FILE_DIALOG]] which allows you to specify the filename and location of the picture you have drawn. Selecting "Open" from the "File" menu will display a [[ref:libraries/wel/reference/wel_open_file_dialog_chart|WEL_OPEN_FILE_DIALOG]] which allows you to specify a previously saved drawing to open.
|
||||
|
||||
==Under the Hood==
|
||||
The [[ref:libraries/wel/reference/wel_open_file_dialog_chart|WEL_OPEN_FILE_DIALOG]] and the [[ref:libraries/wel/reference/wel_save_file_dialog_chart|WEL_SAVE_FILE_DIALOG]] are both activated from the redefinition of <code>on_menu_command</code>. A new class, <code>LINES</code> is now used to store the lines drawn by the user and this inherits [[ref:libraries/base/reference/storable_chart|STORABLE]] which allows it to be easily stored and retrieved.
|
||||
This sample contains the following classes:
|
||||
* <code>TUTORIAL_STEP6</code>
|
||||
* <code>MAIN_WINDOW</code>
|
||||
* <code>LINE_THICKNESS_DIALOG_CHART</code>
|
||||
* <code>APPLICATION_IDS</code>
|
||||
* <code>POINT</code>
|
||||
* <code>LINES</code>
|
||||
* <code>LINE</code>
|
||||
|
||||
{{seealso|<br/>
|
||||
[[ref:libraries/wel/reference/wel_save_file_dialog_chart|Save file dialog]] <br/>
|
||||
[[ref:libraries/wel/reference/wel_open_file_dialog_chart|Open file dialog]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user