class interface VISION
-- VISION object is singleton, accessible via vision from GRAPHIC
-- This object is responsible of "graphic mode" initialisation and
-- graphic events management.
-- This class give access to the events' loop (see also start)
-- and to the display size.
feature(s) from VISION
display_width: INTEGER
display_height: INTEGER
loop_stack: LOOP_STACK
-- The loop_stack gives possibility to add some JOB, break
-- current events loop...
start
-- Start to run current events loop. This call returns only
-- when you break this loop.
new_loop
-- You need new loop if you want modal window.
-- When you create this new loop, existing windows will be
-- insensitive and jobs will be suspended. Then you create
-- your new window and all it's widgets and finally call start.
-- The state is "restored" when you break this loop.
-- NOTE: loops may be reused (restared) when you need to
-- reuse the same modal window.
default_draw_kit: DRAW_KIT
font_manager: FONT_MANAGER
last_character: INTEGER
-- retrun unicode character.
-- NOTE: only access this information if last event is key event.
require
current_event_type.in_range(2,3)
pointer_x: INTEGER
-- retrun pointer x coordinate relative to the window who
-- received the event.
-- NOTE: only access this information if last event is button
-- or wheel event.
require
current_event_type.in_range(40,59)
pointer_y: INTEGER
-- retrun pointer y coordinate relative to the window who
-- received the event.
-- NOTE: only access this information if last event is button
-- or wheel event.
require
current_event_type.in_range(40,59)
pointer_x_root: INTEGER
-- retrun pointer x coordinate relative to the screen.
-- NOTE: only access this information if last event is mouse
-- event (button/wheel/move).
require
current_event_type = 100 or else current_event_type.in_range(40,59)
pointer_y_root: INTEGER
-- retrun pointer y coordinate relative to the screen.
-- NOTE: only access this information if last event is mouse
-- event (button/wheel/move).
require
current_event_type = 100 or else current_event_type.in_range(40,59)
event_time: INTEGER
-- return the date the event occured. Origin is undefined,
-- unit is millisecond. Difference give delay.
-- NOTE: only access this information if last event is button
-- or wheel event.
require
current_event_type.in_range(40,59)
expose_area: RECT
-- return the rectangular area the expose event is relative to.
-- Coordinates are relative to the window who received the event.
-- NOTE: only access this information if last event is expose_event.
require
current_event_type = 12
border_width: INTEGER
--TODO: suppress ?
require
current_event_type = 101
is_left_down: BOOLEAN
-- Is mouse left button down ?
-- NOTE: only access this information if last event is pointer_enter
-- or pointer_leave.
require
current_event_type = 7 or else current_event_type = 8
is_middle_down: BOOLEAN
-- Is mouse middle button down ?
-- NOTE: only access this information if last event is pointer_enter
-- or pointer_leave.
require
current_event_type = 7 or else current_event_type = 8
is_right_down: BOOLEAN
-- Is mouse right button down ?
-- NOTE: only access this information if last event is pointer_enter
-- or pointer_leave.
require
current_event_type = 7 or else current_event_type = 8
current_event_type: INTEGER
-- Needed for some assertion. This is the number associated
-- with the last event.
when_focus_in (p: PROCEDURE[ANY,TUPLE])
when_focus_in_signal: SIGNAL_0
when_focus_out (p: PROCEDURE[ANY,TUPLE])
when_focus_out_signal: SIGNAL_0
preprocess_left_down (p: PROCEDURE[ANY,TUPLE])
feature(s) from VISION
event_catcher: EVENT_CATCHER
-- Direct access to the current event catcher.
new_event_catcher
-- New event catcher is needed each time new loop is needed.
-- This new job is waiting on the same graphic connection.
change_event_catcher (ec: EVENT_CATCHER)
end of VISION