ui¶
-
class
guerilla.ui¶ Bases:
objectA package of functions dedicated to managing UI
-
static
border(name, parent)¶ Create a
BorderwindowParameters: - name (str or number or None) – The name of the window
- parent (
Window) – The parent window
Returns: The new border
Return type:
-
static
control(parent, plug, desc)¶ Create a dedicated
Windowthat can control aPlugor 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
DropListwindowParameters: Returns: The new edit
Return type:
-
static
dyntext(name, parent)¶ Create a static
TextwindowParameters: - name (str or number or None) – The name of the window
- parent (
Window) – The parent window
Returns: The new text
Return type:
-
static
editbox(name, parent)¶ Create an
EditBoxwindowParameters: 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
TitleWindowwith 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
quad(name, parent)¶ Create a
QuadwindowParameters: - name (str or number or None) – The name of the window
- parent (
Window) – The parent window
Returns: The new quad
Return type:
-
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
TextwindowParameters: - name (str or number or None) – The name of the window
- parent (
Window) – The parent window
Returns: The new text
Return type:
Create a
TextButtonParameters: 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
TitleWindowwindow - 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