MAIN WINDOW. The entry point of the wizard is the class CONTRACT_WIZARD which inherits from EV_APPLICATION. The root class first checks if the environment variable $CONTRACT, pointing to the contract wizard delivery directory, is set. Afterwards it initializes the wizard and launches the application. CW_MAIN_WINDOW inherits from EV_TITLED_WINDOW and represents window of the wizard. The main window maintains a list of all dialogs appearing in the wizard and replaces the actual dialog displayed in the window when the user presses on the “Next >>” button. Each dialog inherits from CW_DIALOG. This class has an attribute box of type EV_BOX that a specialized class redefines either to EV_VERTICAL_BOX or EV_HORIZONTAL_BOX depending on the main layout of the actual task. Moreover the class has the deferred features: • initialize_box (initialize box and class attributes) • is_complete (are all components of the class filled out as needed?) • build_interface (build interface for task and extend widgets to box). I will discuss the specializations of CW_TASK beneath. Figure 6 shows the architecture of the main GUI. Figure 6: Main GUI classes of Contract Wizard CW_MAIN_WINDOW also handles navigation between dialogs. For that it has a button_bar with “Help”, “<< Back”, “Next >>”, and “Cancel” buttons at the bottom of the window. The main window handles the button actions because a dialog itself knows nothing about its preceding and following dialog. I have chosen this design so that it is easier to have several possible subsequent dialogs to one dialog. Table 1 shows the most important features of class CW_MAIN_WINDOW in their contract form. dialog_list: LINKED_LIST [CW_DIALOG] -- List with all needed dialog implementations. -- Is first dialog shown? first_dialog_definition: Result = (main_vbox.item = dialog_▇▇▇▇.▇▇▇▇▇.▇▇▇) -- Is last dialog shown? last_dialog_definition: Result = (main_vbox.item = dialog_▇▇▇▇.▇▇▇▇.▇▇▇) go_i_th_dialog (i: INTEGER) -- Show `i’ th dialog. i_within_bounds: i > 0 and then i <= dialog_list.count i_th_dialog_active: dialog_list.item = dialog_list.i_th (i) i_th_frame_shown: dialog_▇▇▇▇.▇▇▇▇.▇▇▇ = main_vbox.item -- Set button state according to shown dialog. back_button_sensitive: is_first_dialog implies not
Appears in 3 contracts
Sources: Master Thesis, Master Thesis, Master Thesis