note description: "About dialog box" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date$" revision: "$Revision$" class ABOUT_DIALOG inherit EV_DIALOG redefine initialize end SHARED_NAMES undefine default_create, copy end create default_create feature {NONE} -- Initialization initialize -- Populate the dialog box. local main_horizontal_box: EV_HORIZONTAL_BOX left_vertical_box: EV_VERTICAL_BOX right_vertical_box: EV_VERTICAL_BOX horizontal_separator: EV_HORIZONTAL_SEPARATOR buttons_box: EV_HORIZONTAL_BOX ev_cell: EV_CELL do Precursor create pixmap pixmap.set_with_named_file (Operating_environment.current_directory_name_representation + Operating_environment.directory_separator.out + "logo.png") create message_label message_label.align_text_left create team_label team_label.align_text_left create horizontal_separator create ok_button.make_with_text (names.button_ok_item) ok_button.set_minimum_size (75, 24) ok_button.select_actions.extend (agent destroy) create buttons_box buttons_box.extend (create {EV_CELL}) -- Fill in empty space on left buttons_box.extend (ok_button) buttons_box.disable_item_expand (ok_button) create left_vertical_box left_vertical_box.set_border_width (7) left_vertical_box.extend (pixmap) left_vertical_box.disable_item_expand (pixmap) left_vertical_box.extend (create {EV_CELL}) create right_vertical_box right_vertical_box.set_padding (7) right_vertical_box.extend (message_label) right_vertical_box.extend (horizontal_separator) right_vertical_box.disable_item_expand (horizontal_separator) right_vertical_box.extend (team_label) right_vertical_box.extend (buttons_box) right_vertical_box.disable_item_expand (buttons_box) create main_horizontal_box main_horizontal_box.set_border_width (7) create ev_cell ev_cell.set_minimum_width (21) main_horizontal_box.extend (ev_cell) main_horizontal_box.disable_item_expand (ev_cell) main_horizontal_box.extend (left_vertical_box) main_horizontal_box.disable_item_expand (left_vertical_box) create ev_cell ev_cell.set_minimum_width (28) main_horizontal_box.extend (ev_cell) main_horizontal_box.disable_item_expand (ev_cell) main_horizontal_box.extend (right_vertical_box) extend (main_horizontal_box) set_default_push_button (ok_button) set_default_cancel_button (ok_button) set_title (names.default_title) set_message (names.message) set_team (names.team) set_size (400, 150) end feature -- Access message: STRING -- Message displayed in the dialog box. do Result := message_label.text end feature -- Element change set_message (a_message: READABLE_STRING_GENERAL) do message_label.set_text (a_message) end set_team (a_team : READABLE_STRING_GENERAL) -- do team_label.set_text (a_team) end feature {NONE} -- Implementation message_label: EV_LABEL -- Label situated on the top of the dialog, -- contains the message. team_label : EV_LABEL pixmap: EV_PIXMAP -- Pixmap display on the left of the dialog. ok_button: EV_BUTTON; -- "OK" button. note library: "Internationalization library" copyright: "Copyright (c) 1984-2006, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 356 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class ABOUT_DIALOG