grapa.frontend.widgets_graphmanager.GraphsTabManager
- class grapa.frontend.widgets_graphmanager.GraphsTabManager(*args, defdict=None, **kwargs)
Bases:
objectCombines a ttk.Notebook with a list of items, 1 item per tab Ensures that the content of Notebook and list of items are synchronized ._item and ._notebook should not be modified separately
- __init__(*args, defdict=None, **kwargs)
Create the GraphsTabHandler the same way you would create a ttk.Notebook defdict: default values to be provided to ._itemtype.DEFAULT_PROPDICT
Methods
__init__(*args[, defdict])Create the GraphsTabHandler the same way you would create a ttk.Notebook defdict: default values to be provided to ._itemtype.DEFAULT_PROPDICT
append_new(str_or_graph[, title, child, ...])Append new item into the internal notebook, by creating a GraphHandler item.
Returns current selected child (Frame)
Returns current selected filename
Returns current selected folder
get_graph([idx])Returns current selected Graph
Returns current selected propdict dict of properties
Returns current selected title
grid(*args, **kwargs)index()item([idx])pack(*args, **kwargs)pop([idx])Removes an element from both tab and item list.
register(func)Register callbacks for event <<NotebookTabChanged>>
select(idx)Select a given tab in the Notebook.
update_current([title, filename, folder, dpi])Update selected tab and corresponding information kwargs: etc.
- append_new(str_or_graph, title=None, child=None, filename=None, folder=None, **kwargs)
Append new item into the internal notebook, by creating a GraphHandler item.
- Parameters:
str_or_graph – can be a str or a Graph from which an item can be instanciated
title – (str) if title is None, its value will be guessed
child – if child is None, an empty Frame will be automatically created
filename – (str) in case cannot be retrieved from str_or_graph or a graph stemming from
folder – (str) same use-case as filename
- get_child()
Returns current selected child (Frame)
- get_filename()
Returns current selected filename
- get_folder()
Returns current selected folder
- get_graph(idx: int = None)
Returns current selected Graph
- get_properties()
Returns current selected propdict dict of properties
- get_title()
Returns current selected title
- pop(idx=None)
Removes an element from both tab and item list. If None, the selected tab is deleted.
- register(func)
Register callbacks for event <<NotebookTabChanged>>
- select(idx)
Select a given tab in the Notebook. idx between 0 and len-1
- update_current(title=None, filename=None, folder=None, dpi=None, **kwargs)
Update selected tab and corresponding information kwargs: etc.