indexing description: "[ Input sensitive object which handles mouse and keyboard events. This object can set a flag to indicate it does not want any keyboard or mouse events. ]" date: "$Date$" revision: "$Revision$" deferred class EM_INPUT_SENSITIVE inherit EM_KEYBOARD_SENSITIVE EM_MOUSE_SENSITIVE EM_JOYSTICK_SENSITIVE feature {NONE} -- Initialisation make_input_sensitive is -- Initialise default values. do make_keyboard_sensitive make_mouse_sensitive make_joystick_sensitive is_mouse_sensitive := True is_keyboard_sensitive := True is_joystick_sensitive := True end feature -- Status report is_mouse_sensitive: BOOLEAN -- Does `Current' handle mouse events? is_keyboard_sensitive: BOOLEAN -- Does `Current' handle keyboard events? is_joystick_sensitive: BOOLEAN -- Does `Current' handle joystick events? feature -- Status setting set_mouse_sensitive (sensitive: BOOLEAN) is -- Set mouse sensitivity status. do is_mouse_sensitive := sensitive ensure mouse_sensitivity_set: is_mouse_sensitive = sensitive end set_keyboard_sensitive (sensitive: BOOLEAN) is -- Set keyboard sensitivity status. do is_keyboard_sensitive := sensitive ensure keyboard_sensitivity_set: is_keyboard_sensitive = sensitive end set_joystick_sensitive (sensitive: BOOLEAN) is -- Set joystick sensitivity status. do is_joystick_sensitive := sensitive ensure joystick_sensitivity_set: is_joystick_sensitive = sensitive end feature {NONE} -- Implementation enable_input_events is -- Enable all input events. do mouse_button_down_event.restore_subscription mouse_button_up_event.restore_subscription mouse_clicked_event.restore_subscription mouse_moved_event.restore_subscription mouse_drag_start_event.restore_subscription mouse_drag_stop_event.restore_subscription mouse_dragged_event.restore_subscription mouse_wheel_up_event.restore_subscription mouse_wheel_down_event.restore_subscription mouse_entered_event.restore_subscription mouse_exited_event.restore_subscription key_down_event.restore_subscription key_up_event.restore_subscription focus_lost_event.restore_subscription focus_received_event.restore_subscription joystick_axis_event.restore_subscription joystick_ball_event.restore_subscription joystick_button_down_event.restore_subscription joystick_button_up_event.restore_subscription joystick_hat_event.restore_subscription end disable_input_events is -- Disable all input events. do mouse_button_down_event.suspend_subscription mouse_button_up_event.suspend_subscription mouse_clicked_event.suspend_subscription mouse_moved_event.suspend_subscription mouse_drag_start_event.suspend_subscription mouse_drag_stop_event.suspend_subscription mouse_dragged_event.suspend_subscription mouse_wheel_up_event.suspend_subscription mouse_wheel_down_event.suspend_subscription mouse_entered_event.suspend_subscription mouse_exited_event.suspend_subscription key_down_event.suspend_subscription key_up_event.suspend_subscription focus_lost_event.suspend_subscription focus_received_event.suspend_subscription joystick_axis_event.suspend_subscription joystick_ball_event.suspend_subscription joystick_button_down_event.suspend_subscription joystick_button_up_event.suspend_subscription joystick_hat_event.suspend_subscription end end