indexing description: "[ Eiffel Vision drawing area. Implementation of the interface for Windows. ]" date: "$Date$" revision: "$Revision$" class EM_EV_WIDGET_IMP inherit EM_EV_WIDGET_I undefine default_create redefine interface select interface end -- SDL_GETENV_FUNCTIONS SDL_STDINC_FUNCTIONS EV_PRIMITIVE_IMP rename top_level_window_imp as primitive_top_level_window_imp undefine copy, destroy, enable_sensitive, disable_sensitive, initialize_sizeable, ev_set_minimum_width, ev_set_minimum_height, ev_set_minimum_size, ev_apply_new_size, initialize, set_parent, update_for_pick_and_drop, default_process_message, redraw_current_push_button, is_control_in_window, set_top_level_window_imp, on_getdlgcode, on_size, minimum_width, minimum_height, next_tabstop_widget redefine interface, on_left_button_down, on_middle_button_down, on_right_button_down, on_key_down end EV_WEL_CONTAINER_IMP rename interface as wel_cont_interface undefine initialize redefine make, on_left_button_down, on_middle_button_down, on_right_button_down, on_key_down select top_level_window_imp end create make feature {NONE} -- Initialization make (an_interface: like interface) is -- Creates an EiffelMedia widget. do base_make (an_interface) create remove_item_actions remove_item_actions.extend (agent remove_action (?)) end initialize is -- Initialize `Current'. -- Set up action sequence connections -- and `Precursor' initialization. do wel_make (Default_parent, "EiffelMedia Widget") Precursor {EV_WEL_CONTAINER_IMP} end feature -- SDL initialization and handling remove_action (i: EV_WIDGET) is -- TODO -- At the moment the SDL Scene will simply run and run do end em_prepare is -- set SDL_WINDOWID to the corresponding ID of the client window -- where SDL should be drawn. -- set SDL_VIDEODRIVER to a supportet driver for drawing in -- client window. local i: POINTER tmp: INTEGER do i := implementation_window.item -- sdl_putenv is a non standard SDL function provided by a little -- hack into the SDL library. See the EiffelMedia documentation -- for further details tmp := sdl_putenv ("SDL_WINDOWID=" + i.out) tmp := sdl_putenv ("SDL_VIDEODRIVER=windib") end on_left_button_down (keys, x_pos, y_pos: INTEGER) is -- Executed when the left button is pressed. -- Redefined as the button press does not set the -- focus automatically. do set_focus end on_middle_button_down (keys, x_pos, y_pos: INTEGER) is -- Executed when the left button is pressed. -- Redefined as the button press does not set the -- focus automatically. do set_focus end on_right_button_down (keys, x_pos, y_pos: INTEGER) is -- Executed when the left button is pressed. -- Redefined as the button press does not set the -- focus automatically. do set_focus end on_key_down (virtual_key, key_data: INTEGER) is -- Executed when a key is pressed. do process_standard_key_press (virtual_key) end -- next_dlgtabitem (hdlg, hctl: POINTER; previous: BOOLEAN): POINTER is -- Encapsulation of the SDK GetNextDlgTabItem, -- because we cannot do a deferred feature become an -- external feature. -- do -- end -- next_dlggroupitem (hdlg, hctl: POINTER; previous: BOOLEAN): POINTER is -- Encapsulation of the SDK GetNextDlgGroupItem, -- because we cannot do a deferred feature become an -- external feature. -- do -- end feature {NONE} -- Implementation interface: EM_EV_WIDGET -- Responsible for interaction with the underlying native graphics -- toolkit. end