module timelinelib.wxgui.frames.mainframe.menucontroller

class timelinelib.wxgui.frames.mainframe.menucontroller.MenuController[source]

Bases: object

The MenuController is “owned” by the MainFrame class.

It is used for functions that enables/disables menu items which is done with the function update_menus_enabled_state().

__init__(menu_bar)[source]

Initialize self. See help(type(self)) for accurate signature.

update_menus_enabled_state(timeline_view_visible, nbr_of_selected_events)[source]

This function is called whenever a new timeline is opened or when the state of the current timeline is changed.

It enables or disables menus depending on the state of the timeline.

on_timeline_change(timeline)[source]

Called when a new timeline is opened.

It stores the timeline to later be able to figure out it’s state.

add_menu_requiring_writable_timeline(menu)[source]

Add a menu to the list of menus that requires a writeable timeline.

add_menu_requiring_timeline(menu)[source]

Add a menu to the list of menus that requires a timeline.

add_menu_requiring_visible_timeline_view(menu)[source]

Add a menu to the list of menus that requires a visible timeline.