libs.gui package¶
Subpackages¶
- libs.gui.bars package
- libs.gui.buttons package
- libs.gui.frames package
- Subpackages
- Submodules
- libs.gui.frames.AboutFrame module
- libs.gui.frames.ComponentsFrame module
- libs.gui.frames.MagnetsFrame module
- libs.gui.frames.MainFrame module
- libs.gui.frames.ObjectFrame module
- libs.gui.frames.ProgressFrame module
- libs.gui.frames.SensorsFrame module
- libs.gui.frames.SettingsFrame module
- libs.gui.frames.SimParamsFrame module
- libs.gui.frames.TabFrame module
- Module contents
- libs.gui.plot package
Submodules¶
libs.gui.FileDialogs module¶
- class libs.gui.FileDialogs.FileDialogs¶
Bases:
object- static export_ini(data_stack: List[DataHandler], gui_handler: GUIHandler) None¶
- static export_py(data_stack: List[DataHandler], gui_handler: GUIHandler) None¶
- static open(data_stack: List[DataHandler], config_handler: ConfigHandler, gui_handler: GUIHandler, filename: str = '', init_flag: int = 0) None¶
- static save(data_stack: List[DataHandler], gui_handler: GUIHandler) None¶
- static save_as(data_stack: List[DataHandler], gui_handler: GUIHandler) None¶
libs.gui.GUIElements module¶
- class libs.gui.GUIElements.GUIElements¶
Bases:
objectdescription of class
- static auto_frame_size(root: Tk, inner_frame: Frame, config: Dict[str, Dict[str, any]], screen_width: int, screen_height: int)¶
Function determines the size of the window by comparing ideal size of the root frame and the size of the screen
- static button_frame(master: Labelframe, config: Dict[str, Dict[str, any]]) Frame¶
- static check_box(master: Labelframe | Frame, config: Dict[str, Dict[str, any]], col: int, row: int, label: str) BooleanVar¶
- static extract(entries: Dict[str, Entry | List[Entry] | IntVar | BooleanVar]) Dict[str, any]¶
- static info_label(master: Labelframe, config: Dict[str, Dict[str, any]], col: int, row: int, info: str) Label¶
- static init_style(master: Tk, config: Dict[str, Dict[str, any]]) None¶
- static input_line(master: Labelframe, config: Dict[str, Dict[str, any]], col: int, row: int, label: str, unit: str = '', col_shift: int = 0, justify: str = 'right') Entry¶
- static insert(entries: Dict[str, Entry | List[Entry]], sim_object: any) None¶
- static label_frame(master: Tk | Frame | Labelframe | Toplevel, config: Dict[str, Dict[str, any]], col: int, row: int, column_span: int, row_span: int, label: str) Labelframe¶
- static screen_size() Tuple[int, int]¶
- static scrollable_frame(master: Labelframe, config: Dict[str, Dict[str, any]]) Frame¶
- static settings_line(master: Labelframe, config: Dict[str, Dict[str, any]], row: int, label: str, value: str) Entry¶
- static vector2_input(master: Labelframe, config: Dict[str, Dict[str, any]], col: int, row: int, width: int, label: str, unit: str = '') list¶
- static vector3_input(master: Labelframe, config: Dict[str, Dict[str, any]], col: int, column_span: int, row: int, head_label: str, entry_labels: list) list¶
- static vector6_input(master: Labelframe, config: Dict[str, Dict[str, any]], col: int, column_span: int, row: int, head_label: str) list¶
- static vector8_input(master: Labelframe, config: Dict[str, Dict[str, any]], col: int, column_span: int, row: int, head_label: str, entry_labels: list) list¶
libs.gui.GUIHandler module¶
- class libs.gui.GUIHandler.GUIHandler(root_frame: Tk, bindings_enable: Callable, bindings_disable: Callable)¶
Bases:
objectdescription of class
- add_tab(data_handler: DataHandler, data_stack: List[DataHandler], config_handler: ConfigHandler, project_id: str = '') int¶
- close_all_tabs(data_stack: List[DataHandler])¶
- close_tab(data_stack: List[DataHandler], idx: int | None = None)¶
- disable_gui_operation() None¶
- enable_gui_operation() None¶
- exit()¶
- selected_tab() int¶
- sim_frame()¶
- status_bar()¶
libs.gui.ScrolledFrame module¶
Implementation of the scrollable frame widget. Original by Benjamin Johson. Slightly modified to allow changes of the canvas background color.
- class libs.gui.ScrolledFrame.ScrolledFrame(master=None, **kw)¶
Bases:
FrameScrollable Frame widget.
Use display_widget() to set the interior widget. For example, to display a Label with the text “Hello, world!”, you can say:
sf = ScrolledFrame(self) sf.pack() sf.display_widget(Label, text=”Hello, world!”)
The constructor accepts the usual Tkinter keyword arguments, plus a handful of its own:
- scrollbars (str; default: “both”)
Which scrollbars to provide. Must be one of “vertical”, “horizontal,” “both”, or “neither”.
- use_ttk (bool; default: False)
Whether to use ttk widgets if available. The default is to use standard Tk widgets. This setting has no effect if ttk is not available on your system.
- bind_arrow_keys(widget)¶
Bind the specified widget’s arrow key events to the canvas.
- bind_scroll_wheel(widget)¶
Bind the specified widget’s mouse scroll event to the canvas.
- property canvas¶
- cget(key)¶
Return the resource value for a KEY given as string.
- config(cnf=None, **kw)¶
Configure resources of a widget.
- configure(cnf=None, **kw)¶
Configure resources of a widget.
- display_widget(widget_class, fit_width=False, **kw)¶
Create and display a new widget.
If fit_width == True, the interior widget will be stretched as needed to fit the width of the frame.
Keyword arguments are passed to the widget_class constructor.
Returns the new widget.
- erase()¶
Erase the displayed widget.
- scroll_to_top()¶
Scroll to the top-left corner of the canvas.