navigate.view.main_window_content.display_notebook.CameraNotebook
- class navigate.view.main_window_content.display_notebook.CameraNotebook(frame: Frame, *args: Iterable, **kwargs: Dict[str, Any])
Bases:
DockableNotebookThis class is the notebook that holds the camera view and waveform settings tabs.
- __init__(frame: Frame, *args: Iterable, **kwargs: Dict[str, Any]) → None
Init function for the CameraNotebook class.
- Parameters:
frame (ttk.Frame) – The frame that will hold the notebook.
*args (Iterable) – Variable length argument list.
**kwargs (Dict[str, Any]) – Arbitrary keyword arguments.
Methods
__init__(frame, *args, **kwargs)Init function for the CameraNotebook class.
dismiss(tab_widget)Dismiss the popout window.
find(event)Find the widget that was clicked on.
Get absolute position of mouse.
popout()Popout the currently selected tab.
set_tablist(tab_list)Setter for tab list
Attributes
- dismiss(tab_widget)
Dismiss the popout window.
This is called when the popout window is closed. It destroys the popout window and re‐inserts the tab into the notebook.
- Parameters:
tab_widget (ttk.Frame) – The tab widget to be dismissed.
- find(event: Event) → None
Find the widget that was clicked on.
Will check if the proper widget element in the event is what we expect.
In this case its checking that the label in the tab has been selected. It then gets the proper position and calls the popup.
- Parameters:
event (tk.Event) – Tkinter event object
- get_absolute_position() → tuple
Get absolute position of mouse.
This helps the popup menu appear where the mouse is right-clicked.
- Returns:
x, y – Coordinates to be used (x, y)
- Return type:
integers
- popout() → None
Popout the currently selected tab.
Gets the currently selected tab, the tabs name and checks if the tab name is in the tab list. If the tab is in the list, it’s removed from the list, hidden, and then passed to a new Top Level window.
- set_tablist(tab_list: list) → None
Setter for tab list
- Parameters:
tab_list (list) – The list of tab variables
- menu
Tkinter menu
- Type:
tk.Menu
- root
Tkinter root
- Type:
tk.Tk
- selected_tab_id
Selected tab id where user right-clicked.
- Type:
int
- tab_list
List of tab variables
- Type:
list
- waveform_tab
The waveform settings tab.
- Type: