Tutorial Step 5

The sample builds on tutorial step 4 and also demonstrates the use of a WEL_MODAL_DIALOG . The output is shown below:

step5

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 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 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 step 4 by adding a WEL_MODAL_DIALOG . The class LINE_THICKNESS_DIALOG inherits WEL_MODAL_DIALOG and uses a WEL_SINGLE_LINE_EDIT to input the desired line width. This sample contains the following classes:

  • TUTORIAL_STEP5
  • MAIN_WINDOW
  • LINE_THICKNESS_DIALOG
  • APPLICATION_IDS