indexing description: "Objects that ..." author: "" date: "$Date$" revision: "$Revision$" class EF_PANEL_DEFINITIONS inherit EM_PANEL redefine show end create make feature -- Status setting show is do Precursor textarea_definitions.set_text(panel_view.user_commands_string) end feature {NONE} -- Initialization make(a_view: EF_3D_DISPLAY) is -- Initialize `Current'. require a_view_not_void: a_view /= Void do panel_view := a_view make_from_dimension(400,400) set_background(create {EM_BITMAP_BACKGROUND}.make_from_file("panel_definitions.png")) set_foreground_color(create {EM_COLOR}.make_with_rgb(200,200,0)) create button_ok.make_from_text("ok") button_ok.set_dimension(60,15) button_ok.set_position(267,380) button_ok.mouse_clicked_event.subscribe(agent ok_clicked) add_widget(button_ok) create button_cancel.make_from_text("cancel") button_cancel.set_dimension(60,15) button_cancel.set_position(330,380) button_cancel.mouse_clicked_event.subscribe(agent cancel_clicked) add_widget(button_cancel) create textarea_definitions.make_empty textarea_definitions.set_position(7,7) textarea_definitions.set_dimension(386,366) add_widget(textarea_definitions) ensure panel_view_set: panel_view /= Void end feature {NONE} -- Implementation ok_clicked(an_event: EM_MOUSEBUTTON_EVENT) is do panel_view.set_user_commands_string (create {STRING}.make_from_string(textarea_definitions.text)) hide end cancel_clicked(an_event: EM_MOUSEBUTTON_EVENT) is do textarea_definitions.set_text (panel_view.user_commands_string) hide end panel_view: EF_3D_DISPLAY button_ok: EM_BUTTON button_cancel: EM_BUTTON textarea_definitions: EM_TEXTAREA end