Author:halw

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


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

View File

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

View File

@@ -5,13 +5,13 @@
==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/>
[[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/>
[[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/>
[[Image:wel-check-box-3-state-indeterminate|wel_check_box_3_state_indeterminate]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -5,10 +5,10 @@ A [[ref:libraries/wel/reference/wel_check_box_chart|WEL_CHECK_BOX]] control can
==Appearance==
A [[ref:libraries/wel/reference/wel_check_box_chart|WEL_CHECK_BOX]] <br/>
[[Image:wel-check-box-unchecked|wel_check_box_unchecked]] <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]]
[[Image:wel-check-box-checked|wel_check_box_checked]]
{{seealso|<br/>
[[WEL_CHECK_BOX_3_STATE|WEL_CHECK_BOX_3_STATE]] }}

View File

@@ -1,9 +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 set_buddy_window, a window of type [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] can be linked to this control, and is commonly used to display the current value.
A [[ref:libraries/wel/reference/wel_up_down_control_chart|WEL_UP_DOWN_CONTROL]] consists of a pair of arrows which are used to increment or decrement a value. Using <code>set_buddy_window</code>, a window of type [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] can be linked to this control, and is commonly used to display the current value.
==Appearance==
[[Image:wel-up-down-control|wel_up_down_control]]
[[Image:wel-up-down-control|wel_up_down_control]]

View File

@@ -4,7 +4,7 @@
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]]
[[Image:wel-group-box|wel_group_box]]

View File

@@ -4,16 +4,16 @@
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/>
[[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/>
[[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/>
[[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]]
[[Image:wel-list-view-style-lvs-small-icon|list_view_style_lvs_icon_small]]

View File

@@ -4,7 +4,7 @@
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]]
[[Image:wel-multiple-line-edit|wel_multiple_line_edit]]

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-multiple-selection-list-box|wel_multiple_selection_list_box]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -7,7 +7,7 @@ A [[ref:libraries/wel/reference/wel_progress_bar_chart|WEL_PROGRESS_BAR]] contr
==Appearance==
A [[ref:libraries/wel/reference/wel_progress_bar_chart|WEL_PROGRESS_BAR]] . <br/>
[[Image:wel-progress-bar-half|wel_progress_bar_half]]
[[Image:wel-progress-bar-half|wel_progress_bar_half]]

View File

@@ -3,7 +3,7 @@
[[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]]
[[Image:wel-push-button|wel_push_button]]

View File

@@ -5,10 +5,10 @@ A [[ref:libraries/wel/reference/wel_radio_button_chart|WEL_RADIO_BUTTON]] contr
==Appearance==
A [[ref:libraries/wel/reference/wel_radio_button_chart|WEL_RADIO_BUTTON]] <br/>
[[Image:wel-radio-button-unchecked|wel_radio_button_unchecked]] <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]]
[[Image:wel-radio-button-checked|wel_radio_button_checked]]

View File

@@ -5,10 +5,10 @@ A [[ref:libraries/wel/reference/wel_scroll_bar_chart|WEL_SCROLL_BAR]] control i
==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/>
[[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]]
[[Image:wel-scroll-bar-vertical|wel_scroll_bar_vertical]]

View File

@@ -3,7 +3,7 @@
[[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]]
[[Image:wel-single-line-edit|wel_single_line_edit]]

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-single-selection-list-box|wel_single_selection_list_box]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -3,7 +3,7 @@
[[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]]
[[Image:wel-tooltip|wel_tooltip]]

View File

@@ -5,10 +5,10 @@ A [[ref:libraries/wel/reference/wel_track_bar_chart|WEL_TRACK_BAR]] control has
==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/>
[[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]]
[[Image:wel-track-bar-vertical|wel_track_bar_vertical]]

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-choose-color-dialog|wel_choose_color_dialog]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-choose-folder-dialog|wel_choose_folder_dialog]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-choose-font-dialog|wel_choose_font_dialog]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-open-file-dialog|wel_open_file_dialoG]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-print-dialog|wel_print_dialog]] <br/>
<br/>
{{seealso|<br/>

View File

@@ -4,7 +4,7 @@
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/>
[[Image:wel-save-file-dialog|wel_save_file_dialoG]] <br/>
<br/>
{{seealso|<br/>

View File

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

View File

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

View File

@@ -2,7 +2,8 @@
[[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/>
[[Image:step2|step2]] <br/>
<br/>
==Compiling==
@@ -21,9 +22,9 @@ After launching the sample, you should see a [[ref:libraries/wel/reference/wel_f
==Under the Hood==
This system is a demonstration of how to connect an event to one of the common message hooks available within WEL. See [[WEL Common Concepts|Common message hooks]] for more information. In this example, on_left_button_down has been redefined from [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] containing notification of the event occurring.
This system is a demonstration of how to connect an event to one of the common message hooks available within WEL. See [[WEL Common Concepts|Common message hooks]] for more information. In this example, <code>on_left_button_down</code> has been redefined from [[ref:libraries/wel/reference/wel_window_chart|WEL_WINDOW]] to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] containing notification of the event occurring.
If you look at closeable from <code>MAIN_WINDOW</code>, you will see that it has been redefined to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] and the result from this message box is used to generate the return value of closeable. If this Result is True, the window will be closed.
If you look at <code>closeable</code> from <code>MAIN_WINDOW</code>, you will see that it has been redefined to display a [[ref:libraries/wel/reference/wel_msg_box_chart|WEL_MSG_BOX]] and the result from this message box is used to generate the return value of <code>closeable</code>. If this <code>Result</code> is <code>True</code>, the window will be closed.
This sample contains the following classes:
* <code>TUTORIAL_STEP2</code>
* <code>MAIN_WINDOW</code>

View File

@@ -2,7 +2,8 @@
[[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/>
[[Image:step3|step3]] <br/>
<br/>
==Compiling==

View File

@@ -2,7 +2,8 @@
[[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/>
[[Image:step4|step4]] <br/>
<br/>
==Compiling==

View File

@@ -2,7 +2,8 @@
[[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/>
[[Image:step5|step5]] <br/>
<br/>
==Compiling==

View File

@@ -2,7 +2,8 @@
[[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/>
[[Image:step6|step6]] <br/>
<br/>
==Compiling==

View File

@@ -2,7 +2,8 @@
[[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/>
[[Image:step7|step7]] <br/>
<br/>
==Compiling==

View File

@@ -2,7 +2,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/>
[[Image:step8|step8]] <br/>
<br/>
==Compiling==