revitron.ui.window¶
The window
submodule contains classes for generating UI windows.
Classes:
|
An abstract base window class. |
|
A simple window. |
|
A window where the content is split into multiple custom tabs. |
- class AbstractWindow(*args: Any, **kwargs: Any)[source]¶
Bases:
FlexForm
An abstract base window class.
Methods:
__init__
(title[, width, height])Init a new window object.
close
()Close the window
getContainer
(name)Get the container within the window by name.
- class SimpleWindow(*args: Any, **kwargs: Any)[source]¶
Bases:
AbstractWindow
A simple window.
Methods:
__init__
(title[, width, height, ...])Init a new simple window.
close
()Close the window
getContainer
(name)Get the container within the window by name.
Get the values of all form elements in the window and store them in the
values
dictionary.- __init__(title, width=520, height=620, cancelButtonText='Cancel', okButtonText='OK', **kwargs)[source]¶
Init a new simple window.
- Parameters
title (string) – The window title
width (int, optional) – The window width. Defaults to 520.
height (int, optional) – The window height. Defaults to 620.
cancelButtonText (str, optional) – The cancel button text. Defaults to ‘Cancel’.
okButtonText (str, optional) – The OK button text. Defaults to ‘OK’.
- close()¶
Close the window
- getContainer(name)¶
Get the container within the window by name.
- Parameters
name (name) – The container name
- Returns
The container in the window
- Return type
object
- class TabWindow(*args: Any, **kwargs: Any)[source]¶
Bases:
AbstractWindow
A window where the content is split into multiple custom tabs.
Methods:
__init__
(title, tabs[, width, height, ...])Init a new tabbed window.
close
()Close the window
getContainer
(name)Get the container within the window by name.
Get the values of all form elements in the window and store them in the
values
dictionary.- __init__(title, tabs, width=520, height=620, cancelButtonText='Cancel', okButtonText='OK', **kwargs)[source]¶
Init a new tabbed window.
- Parameters
title (string) – The window title
tabs (list) – The list of tab names
width (int, optional) – The window width. Defaults to 520.
height (int, optional) – The window height. Defaults to 620.
cancelButtonText (str, optional) – The cancel button text. Defaults to ‘Cancel’.
okButtonText (str, optional) – The OK button text. Defaults to ‘OK’.
- close()¶
Close the window
- getContainer(name)¶
Get the container within the window by name.
- Parameters
name (name) – The container name
- Returns
The container in the window
- Return type
object