indexing description: "The main Scene of the elfractal Application" author: "Lars Krapf" date: "$Date$" revision: "$Revision$" class EF_SCENE inherit EM_COMPONENT_SCENE create make feature -- Initialization make is do -- Create and initialize Scene make_component_scene initialize_scene -- Create 3D Display create panel_view.make_from_dimension(600,600) panel_view.set_position(200,0) add_component(panel_view) -- Create History Panel create panel_history.make panel_history.set_position(200,0) history_displayed := False -- Create Menu Panel create panel_simple_menu.make(panel_view, panel_history) panel_simple_menu.set_position(0,30) -- Create Display Menu Panel create panel_switch.make_from_dimension(200,30) panel_switch.set_position(0,0) panel_switch.set_background_color(create {EM_COLOR}.make_with_rgb(215,215,255)) add_component(panel_switch) -- Add Display Buttons create button_history.make_from_text("history") button_history.set_position(3,3) button_history.set_dimension(100,24) button_history.mouse_clicked_event.subscribe(agent show_history) panel_switch.add_widget(button_history) -- Show Simple Menu add_component(panel_simple_menu) panel_view.set_simple_mode(True) end feature -- Implementation show_history(an_event: EM_MOUSEBUTTON_EVENT) is -- Show or hide the History Panel -- and change the button text accordingly do if history_displayed then remove_component(panel_history) add_component(panel_view) button_history.set_text ("History") history_displayed := False else remove_component(panel_view) add_component(panel_history) button_history.set_text ("3D View") history_displayed := True end ensure history_displayed_changed: history_displayed = not (old history_displayed) end -- Panel for Simple Interface panel_simple_menu: EF_SIMPLE_PANEL -- Panel for History panel_history: EF_HISTORY -- The History/3D-Display Switch panel_switch: EM_PANEL button_history: EM_BUTTON -- Is the history displayed? history_displayed: BOOLEAN -- The main 3D Display panel_view: EF_3D_DISPLAY end