Package Gnumed :: Package timelinelib :: Package view :: Module drawingarea :: Class DrawingArea
[frames] | no frames]

Class DrawingArea

source code

object --+
         |
        DrawingArea

Instance Methods
 
__init__(self, view, status_bar_adapter, config, drawing_algorithm, divider_line_slider, fn_handle_db_error)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
change_input_handler_to_zoom_by_drag(self, start_time) source code
 
change_input_handler_to_create_period_event_by_drag(self, initial_time) source code
 
change_input_handler_to_resize_by_drag(self, event, direction) source code
 
change_input_handler_to_move_by_drag(self, event, start_drag_time) source code
 
change_input_handler_to_scroll_by_drag(self, start_time) source code
 
change_input_handler_to_no_op(self) source code
 
get_drawer(self) source code
 
get_timeline(self) source code
 
get_view_properties(self) source code
 
set_timeline(self, timeline)
Inform what timeline to draw.
source code
 
use_fast_draw(self, value) source code
 
show_hide_legend(self, show) source code
 
get_time_period(self)
Return currently displayed time period.
source code
 
navigate_timeline(self, navigation_fn)
Perform a navigation operation followed by a redraw.
source code
 
redraw_timeline(self) source code
 
window_resized(self) source code
 
left_mouse_down(self, x, y, ctrl_down, shift_down, alt_down=False) source code
 
right_mouse_down(self, x, y, alt_down=False)
Event handler used when the right mouse button has been pressed.
source code
 
left_mouse_dclick(self, x, y, ctrl_down, alt_down=False)
Event handler used when the left mouse button has been double clicked.
source code
 
get_time(self, x) source code
 
event_with_rect_at(self, x, y, alt_down=False) source code
 
event_at(self, x, y, alt_down=False) source code
 
is_selected(self, event) source code
 
event_is_period(self, event) source code
 
snap(self, time) source code
 
get_selected_events(self) source code
 
middle_mouse_clicked(self, x) source code
 
left_mouse_up(self) source code
 
mouse_enter(self, x, left_is_down)
Mouse event handler, when the mouse is entering the window.
source code
 
mouse_moved(self, x, y, alt_down=False) source code
 
mouse_wheel_moved(self, rotation, ctrl_down, shift_down, x) source code
 
key_down(self, keycode, alt_down) source code
 
key_up(self, keycode) source code
 
balloon_show_timer_fired(self) source code
 
balloon_hide_timer_fired(self) source code
 
dragscroll_timer_fired(self) source code
 
balloon_visibility_changed(self, visible) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, view, status_bar_adapter, config, drawing_algorithm, divider_line_slider, fn_handle_db_error)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

navigate_timeline(self, navigation_fn)

source code 

Perform a navigation operation followed by a redraw.

The navigation_fn should take one argument which is the time period that should be manipulated in order to carry out the navigation operation.

Should the navigation operation fail (max zoom level reached, etc) a message will be displayed in the statusbar.

Note: The time period should never be modified directly. This method should always be used instead.

right_mouse_down(self, x, y, alt_down=False)

source code 

Event handler used when the right mouse button has been pressed.

If the mouse hits an event and the timeline is not readonly, the context menu for that event is displayed.

left_mouse_dclick(self, x, y, ctrl_down, alt_down=False)

source code 

Event handler used when the left mouse button has been double clicked.

If the timeline is readonly, no action is taken. If the mouse hits an event, a dialog opens for editing this event. Otherwise a dialog for creating a new event is opened.

mouse_enter(self, x, left_is_down)

source code 

Mouse event handler, when the mouse is entering the window.

If there is an ongoing selection-marking (dragscroll timer running) and the left mouse button is not down when we enter the window, we want to simulate a 'mouse left up'-event, so that the dialog for creating an event will be opened or sizing, moving stops.