note description: "[ Objects that represent an EV_TITLED_WINDOW. The original version of this class was generated by EiffelBuild. This class is the implementation of an EV_TITLED_WINDOW generated by EiffelBuild. You should not modify this code by hand, as it will be re-generated every time modifications are made to the project. ]" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date$" revision: "$Revision$" deferred class TOOL_BAR_CONTROL_PANEL_IMP inherit EV_VERTICAL_BOX redefine initialize, is_in_default_state end CONSTANTS undefine is_equal, default_create, copy end feature {NONE}-- Initialization initialize -- Initialize `Current'. do Precursor {EV_VERTICAL_BOX} initialize_constants -- Build widget structure. extend (l_ev_horizontal_box_1) l_ev_horizontal_box_1.extend (l_ev_frame_1) l_ev_frame_1.extend (toolbar_list) l_ev_horizontal_box_1.extend (l_ev_vertical_box_1) l_ev_vertical_box_1.extend (l_ev_frame_2) l_ev_frame_2.extend (l_ev_vertical_box_2) l_ev_vertical_box_2.extend (create_toolbar_button) l_ev_vertical_box_2.extend (l_ev_horizontal_box_2) l_ev_horizontal_box_2.extend (l_ev_vertical_box_3) l_ev_vertical_box_3.extend (add_button_button) l_ev_vertical_box_3.extend (add_toggle_button) l_ev_vertical_box_3.extend (add_radio_button) l_ev_vertical_box_3.extend (add_menu_button_button) l_ev_horizontal_box_2.extend (l_ev_vertical_box_4) l_ev_vertical_box_4.extend (add_build_in_widget_button) l_ev_vertical_box_4.extend (add_resizable_button) l_ev_vertical_box_4.extend (add_separator_button) l_ev_vertical_box_1.extend (l_ev_frame_3) l_ev_frame_3.extend (l_ev_vertical_box_5) l_ev_vertical_box_5.extend (l_ev_horizontal_box_3) l_ev_horizontal_box_3.extend (show_button) l_ev_horizontal_box_3.extend (hide_button) l_ev_horizontal_box_3.extend (close_button) l_ev_vertical_box_5.extend (l_ev_horizontal_box_4) l_ev_horizontal_box_4.extend (set_title_button) l_ev_horizontal_box_4.extend (l_ev_cell_1) l_ev_horizontal_box_4.extend (title_field) l_ev_vertical_box_5.extend (l_ev_horizontal_box_5) l_ev_horizontal_box_5.extend (set_top_button) l_ev_horizontal_box_5.extend (l_ev_cell_2) l_ev_horizontal_box_5.extend (up_radio_button) l_ev_horizontal_box_5.extend (down_radio_button) l_ev_horizontal_box_5.extend (left_radio_button) l_ev_horizontal_box_5.extend (right_radio_button) l_ev_frame_1.set_text ("Existing Tool Bars") l_ev_vertical_box_1.disable_item_expand (l_ev_frame_2) l_ev_vertical_box_1.disable_item_expand (l_ev_frame_3) l_ev_frame_2.set_text ("Creation") l_ev_vertical_box_2.disable_item_expand (create_toolbar_button) l_ev_vertical_box_2.disable_item_expand (l_ev_horizontal_box_2) create_toolbar_button.set_text ("Create Tool Bar") l_ev_horizontal_box_2.disable_item_expand (l_ev_vertical_box_3) l_ev_horizontal_box_2.disable_item_expand (l_ev_vertical_box_4) l_ev_vertical_box_3.disable_item_expand (add_button_button) l_ev_vertical_box_3.disable_item_expand (add_toggle_button) l_ev_vertical_box_3.disable_item_expand (add_radio_button) add_button_button.set_text ("Add Button") add_toggle_button.set_text ("Add Toggle Button") add_radio_button.set_text ("Add Radio Button") add_menu_button_button.set_text ("Add Menu Button") l_ev_vertical_box_4.disable_item_expand (add_build_in_widget_button) l_ev_vertical_box_4.disable_item_expand (add_resizable_button) l_ev_vertical_box_4.disable_item_expand (add_separator_button) add_build_in_widget_button.set_text ("Add Build-in Widget") add_resizable_button.set_text ("Add Build-in Resizable") add_separator_button.set_text ("Add Separator") l_ev_frame_3.set_text ("Control") l_ev_vertical_box_5.disable_item_expand (l_ev_horizontal_box_3) l_ev_horizontal_box_3.disable_item_expand (show_button) l_ev_horizontal_box_3.disable_item_expand (hide_button) l_ev_horizontal_box_3.disable_item_expand (close_button) show_button.set_text ("Show") hide_button.set_text ("Hide") close_button.set_text ("Close") l_ev_horizontal_box_4.disable_item_expand (set_title_button) l_ev_horizontal_box_4.disable_item_expand (l_ev_cell_1) set_title_button.set_text ("Set Title") l_ev_cell_1.set_minimum_width (5) l_ev_horizontal_box_5.disable_item_expand (set_top_button) l_ev_horizontal_box_5.disable_item_expand (l_ev_cell_2) l_ev_horizontal_box_5.disable_item_expand (up_radio_button) l_ev_horizontal_box_5.disable_item_expand (down_radio_button) l_ev_horizontal_box_5.disable_item_expand (left_radio_button) l_ev_horizontal_box_5.disable_item_expand (right_radio_button) set_top_button.set_text ("Set Top") l_ev_cell_2.set_minimum_width (5) up_radio_button.set_text ("Up") down_radio_button.set_text ("Down") left_radio_button.set_text ("Left") right_radio_button.set_text ("Right") set_all_attributes_using_constants -- Connect events. toolbar_list.select_actions.extend (agent on_toolbar_selected) create_toolbar_button.select_actions.extend (agent on_create_toolbar_item_selected) add_button_button.select_actions.extend (agent on_add_button_button_selected) add_toggle_button.select_actions.extend (agent on_add_toggle_button_selected) add_radio_button.select_actions.extend (agent on_add_radio_button_selected) add_menu_button_button.select_actions.extend (agent on_add_menu_button_button_selected) add_build_in_widget_button.select_actions.extend (agent on_add_build_in_widget_button_selected) add_resizable_button.select_actions.extend (agent on_add_resizable_button_selected) add_separator_button.select_actions.extend (agent on_add_separator_button_selected) show_button.select_actions.extend (agent on_show_button_selected) hide_button.select_actions.extend (agent on_hide_button_selected) close_button.select_actions.extend (agent on_close_button_selected) set_title_button.select_actions.extend (agent on_set_title_button_selected) set_top_button.select_actions.extend (agent on_set_top_button_selected) -- Call `user_initialization'. user_initialization end feature -- Access toolbar_list: EV_LIST create_toolbar_button, add_button_button, add_toggle_button, add_radio_button, add_menu_button_button, add_build_in_widget_button, add_resizable_button, add_separator_button, show_button, hide_button, close_button, set_title_button, set_top_button: EV_BUTTON up_radio_button, down_radio_button, left_radio_button, right_radio_button: EV_RADIO_BUTTON title_field: EV_TEXT_FIELD feature {NONE} -- Implementation l_ev_cell_1, l_ev_cell_2: EV_CELL l_ev_horizontal_box_1, l_ev_horizontal_box_2, l_ev_horizontal_box_3, l_ev_horizontal_box_4, l_ev_horizontal_box_5: EV_HORIZONTAL_BOX l_ev_vertical_box_1, l_ev_vertical_box_2, l_ev_vertical_box_3, l_ev_vertical_box_4, l_ev_vertical_box_5: EV_VERTICAL_BOX l_ev_frame_1, l_ev_frame_2, l_ev_frame_3: EV_FRAME feature {NONE} -- Implementation is_in_default_state: BOOLEAN -- Is `Current' in its default state? do -- Re-implement if you wish to enable checking -- for `Current'. Result := True end user_initialization -- Feature for custom initialization, called at end of `initialize'. deferred end on_toolbar_selected -- Called by `select_actions' of `toolbar_list'. deferred end on_create_toolbar_item_selected -- Called by `select_actions' of `create_toolbar_button'. deferred end on_add_button_button_selected -- Called by `select_actions' of `add_button_button'. deferred end on_add_toggle_button_selected -- Called by `select_actions' of `add_toggle_button'. deferred end on_add_radio_button_selected -- Called by `select_actions' of `add_radio_button'. deferred end on_add_menu_button_button_selected -- Called by `select_actions' of `add_menu_button_button'. deferred end on_add_build_in_widget_button_selected -- Called by `select_actions' of `add_build_in_widget_button'. deferred end on_add_resizable_button_selected -- Called by `select_actions' of `add_resizable_button'. deferred end on_add_separator_button_selected -- Called by `select_actions' of `add_separator_button'. deferred end on_show_button_selected -- Called by `select_actions' of `show_button'. deferred end on_hide_button_selected -- Called by `select_actions' of `hide_button'. deferred end on_close_button_selected -- Called by `select_actions' of `close_button'. deferred end on_set_title_button_selected -- Called by `select_actions' of `set_title_button'. deferred end on_set_top_button_selected -- Called by `select_actions' of `set_top_button'. deferred end feature {NONE} -- Constant setting set_attributes_using_string_constants -- Set all attributes relying on string constants to the current -- value of the associated constant. do from string_constant_set_procedures.start until string_constant_set_procedures.off loop string_constant_set_procedures.item (string_constant_retrieval_functions.i_th (string_constant_set_procedures.index).item) string_constant_set_procedures.forth end end set_attributes_using_integer_constants -- Set all attributes relying on integer constants to the current -- value of the associated constant. local i: INTEGER arg1, arg2: INTEGER int: INTEGER_INTERVAL do from integer_constant_set_procedures.start until integer_constant_set_procedures.off loop integer_constant_retrieval_functions.i_th (integer_constant_set_procedures.index).call (Void) i := integer_constant_retrieval_functions.i_th (integer_constant_set_procedures.index).last_result integer_constant_set_procedures.item.call ([i]) integer_constant_set_procedures.forth end from integer_interval_constant_retrieval_functions.start integer_interval_constant_set_procedures.start until integer_interval_constant_retrieval_functions.off loop integer_interval_constant_retrieval_functions.item.call (Void) arg1 := integer_interval_constant_retrieval_functions.item.last_result integer_interval_constant_retrieval_functions.forth integer_interval_constant_retrieval_functions.item.call (Void) arg2 := integer_interval_constant_retrieval_functions.item.last_result create int.make (arg1, arg2) integer_interval_constant_set_procedures.item.call ([int]) integer_interval_constant_retrieval_functions.forth integer_interval_constant_set_procedures.forth end end set_attributes_using_pixmap_constants -- Set all attributes relying on pixmap constants to the current -- value of the associated constant. do from pixmap_constant_set_procedures.start until pixmap_constant_set_procedures.off loop pixmap_constant_set_procedures.item (pixmap_constant_retrieval_functions.i_th (pixmap_constant_set_procedures.index).item) pixmap_constant_set_procedures.forth end end set_attributes_using_font_constants -- Set all attributes relying on font constants to the current -- value of the associated constant. do from font_constant_set_procedures.start until font_constant_set_procedures.off loop font_constant_set_procedures.item (font_constant_retrieval_functions.i_th (font_constant_set_procedures.index).item) font_constant_set_procedures.forth end end set_attributes_using_color_constants -- Set all attributes relying on color constants to the current -- value of the associated constant. do from color_constant_set_procedures.start until color_constant_set_procedures.off loop color_constant_set_procedures.item (color_constant_retrieval_functions.i_th (color_constant_set_procedures.index).item) color_constant_set_procedures.forth end end set_all_attributes_using_constants -- Set all attributes relying on constants to the current -- calue of the associated constant. do set_attributes_using_string_constants set_attributes_using_integer_constants set_attributes_using_pixmap_constants set_attributes_using_font_constants set_attributes_using_color_constants end string_constant_set_procedures: ARRAYED_LIST [PROCEDURE [STRING_GENERAL]] string_constant_retrieval_functions: ARRAYED_LIST [FUNCTION [STRING_GENERAL]] integer_constant_set_procedures: ARRAYED_LIST [PROCEDURE [INTEGER]] integer_constant_retrieval_functions: ARRAYED_LIST [FUNCTION [INTEGER]] pixmap_constant_set_procedures: ARRAYED_LIST [PROCEDURE [EV_PIXMAP]] pixmap_constant_retrieval_functions: ARRAYED_LIST [FUNCTION [EV_PIXMAP]] integer_interval_constant_retrieval_functions: ARRAYED_LIST [FUNCTION [INTEGER]] integer_interval_constant_set_procedures: ARRAYED_LIST [PROCEDURE [INTEGER_INTERVAL]] font_constant_set_procedures: ARRAYED_LIST [PROCEDURE [EV_FONT]] font_constant_retrieval_functions: ARRAYED_LIST [FUNCTION [EV_FONT]] color_constant_set_procedures: ARRAYED_LIST [PROCEDURE [EV_COLOR]] color_constant_retrieval_functions: ARRAYED_LIST [FUNCTION [EV_COLOR]] integer_from_integer (an_integer: INTEGER): INTEGER -- Return `an_integer', used for creation of -- an agent that returns a fixed integer value. do Result := an_integer end note copyright: "Copyright (c) 1984-2016, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end