module timelinelib.canvas.timelinecanvascontroller

timelinelib.canvas.timelinecanvascontroller.CHOICE_WHOLE_PERIOD = 'Whole Timeline'
timelinelib.canvas.timelinecanvascontroller.CHOICE_VISIBLE_PERIOD = 'Visible Period'
timelinelib.canvas.timelinecanvascontroller.CHOICES = ('Whole Timeline', 'Visible Period')
class timelinelib.canvas.timelinecanvascontroller.TimelineCanvasController[source]

Bases: object

__init__(view, config, drawer=None)[source]

The purpose of the drawer argument is make testing easier. A test can mock a drawer and use the mock by sending it in the drawer argument. Normally the drawer is collected with the get_drawer() method.

property scene
get_appearance()[source]
set_appearance(appearance)[source]
set_event_box_drawer(event_box_drawer)[source]
set_background_drawer(drawer)[source]
get_timeline()[source]
get_view_properties()[source]
set_timeline(timeline)[source]

Inform what timeline to draw.

use_fast_draw(value)[source]
navigate(navigation_fn)[source]
get_time_period()[source]

Return currently displayed time period.

redraw_timeline()[source]
window_resized()[source]
get_time(x)[source]
event_with_rect_at(x, y)[source]
event_at(x, y, alt_down=False)[source]
set_selected(event, is_selected)[source]
clear_selected()[source]
select_all_events()[source]
is_selected(event)[source]
set_hovered_event(event)[source]
get_hovered_event()[source]
set_selection_rect(cursor)[source]
remove_selection_rect()[source]
get_hscroll_amount()[source]
set_hscroll_amount(amount)[source]
set_period_selection(period)[source]
select_events_in_rect(rect)[source]
event_has_sticky_balloon(event)[source]
set_event_sticky_balloon(event, is_sticky)[source]
add_highlight(event, clear)[source]
tick_highlights()[source]
has_higlights()[source]
get_period_choices()[source]
filter_events(events, search_period)[source]
event_is_period(event)[source]
snap(time)[source]
get_selected_events()[source]
get_events_in_rect(rect)[source]
get_hidden_event_count()[source]
increment_font_size()[source]
decrement_font_size()[source]
get_closest_overlapping_event(event, up)[source]
balloon_at(cursor)[source]