ui¶
-
class
guerilla.
ui
¶ Bases:
object
A package of functions dedicated to managing UI
-
static
control
(parent, plug, desc)¶ Create a dedicated
Window
that can control aPlug
or a list of PlugsEx:LUA{local ctrl = ui.control (myparentwindow, Document:getpreferences ().ShutterOpen, types.float {slidermin=0,slidermax=0.4})}
-
static
disableupdates
()¶ Globally disables UI updates
-
static
droplist
(name, parent)¶ Create an
DropList
windowParameters: Returns: The new edit
Return type:
-
static
dyntext
(name, parent)¶ Create a static
Text
windowParameters: Returns: The new text
Return type:
-
static
editbox
(name, parent)¶ Create an
EditBox
windowParameters: Returns: The new edit box
Return type:
-
static
editnode
(node, focus, view)¶ Set the ui to edit a node
Parameters:
-
static
enableupdates
()¶ Globally enables UI updates
-
static
focusview
(viewtype)¶ Focus the first view of the given type, or create a new one in the active tab if none found
This function focuses the first view that matches the given type anywhere in the window layout.In the event such a window can’t be found, a new window of that type is created in the current active tab. Available view types are:
- Library
- Linking
- NodeList
- Passes
- RenderView
- Browser
- Viewport
param viewtype: The view type type viewtype: str
-
static
getactiveview
()¶ Return the current active view (the one with the orange frame)
Returns: The current active view or None Return type: Window
-
static
getactiveviewpath
()¶ Return the path to the node edited in the current active view
Returns: The path to the node edited Return type: Window
-
static
getthemepath
()¶ Get the current theme path
Returns: The path of the current theme Return type: types.string
-
static
linker
(name, parent, mode, invert)¶ Open a Linker with preselected mode
Parameters: - name (str or number or None) – The window name
- parent (
Window
) – The parent window - mode (types.string or table) – The preselected linker mode, see also <a href=’Packages_linker_linker.connect.html’>linker.connect</a> for more information on custom modes
- invert (types.bool) – Open the linker with swapped left and right classes
Returns: The created linker window
Return type:
-
static
linkerbox
(name, parent, mode, invert)¶ Open a Linker within a
TitleWindow
with preselected modeParameters: - name (str or number or None) – The window name
- parent (
Window
) – The parent window - mode (types.string or table) – The preselected linker mode, see also <a href=’Packages_linker_linker.connect.html’>linker.connect</a> for more information on custom modes
- invert (types.bool) – Open the linker with swapped left and right classes
Returns: The created linker window
Return type:
-
static
loadlayout
(file)¶ Load a window layout file, replace the current layout
Parameters: file (str) – The file path to load
-
static
loadtheme
(filename)¶ Load a theme file
Parameters: filename (str) – The file to load, or nil to load the current theme file
-
static
propertybox
(selection=None)¶ Open a property box window
Parameters: selection (table) – A list of objects to preselect Returns: The propertybox window Return type: Window
-
static
savelayout
(file)¶ Save the current window layout into a file
Parameters: file (str) – The file path to save
-
static
savetheme
(filename)¶ Save a theme file
Parameters: filename (str) – The file to save, or nil to save the current theme file
-
static
setactiveviewpath
(path)¶ Set the active view to edit a node
Parameters: path (str) – The path of the node to edit in the active view
Binds the provided handler to the window event
Parameters: - windowclass (class) – The window class to bind
- button (str) – The button to be handled, either “left”, “middle” or “right”
- mod (number or None) – The modifier combination to be associated to the handler, a combination of modifiers.Shift, modifiers.Control, modifiers.Alt
- event (str) – The kind of event to bind, either “down”, “up, “drag”, “dragend” or “click”
- handler (the) – callback function (window, x, y) to handle the event
-
static
text
(name, parent)¶ Create a static
Text
windowParameters: Returns: The new text
Return type:
Create a
TextButton
Parameters: Returns: The new text button
Return type:
-
static
titlewindow
(name, parent)¶ Create an
TitleWindow
. You must call the show method to make the window visible.Parameters: - name (str or number or None) – The name of the
TitleWindow
window - parent (
Window
) – The parent window to create in
Returns: The new title frame
Return type: - name (str or number or None) – The name of the
-
static