revitron.ui.window

The window submodule contains classes for generating UI windows.

Classes:

AbstractWindow(*args, **kwargs)

An abstract base window class.

SimpleWindow(*args, **kwargs)

A simple window.

TabWindow(*args, **kwargs)

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.

__init__(title, width=520, height=620, **kwargs)[source]

Init a new window object.

Parameters
  • title (string) – The window title

  • width (int, optional) – The window width. Defaults to 520.

  • height (int, optional) – The window height. Defaults to 620.

close()[source]

Close the window

getContainer(name)[source]

Get the container within the window by name.

Parameters

name (name) – The container name

Returns

The container in the window

Return type

object

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.

getValues()

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

getValues()[source]

Get the values of all form elements in the window and store them in the values dictionary.

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.

getValues()

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

getValues()[source]

Get the values of all form elements in the window and store them in the values dictionary.