class ToggleUiScriptGadget
def __init__(
self, name, label=None, icon=None)
Toggle with or without icon. Without Icon appears as a check box. With Icon, does NOT diplay Label.
This is a convieniance. Same as a Button set to toggle
def buttonType(
self)
Enumeration of this button type.
def cell(
self)
Returns where in a cell layout this gadget resides.
def cellHeight(
self)
Returns how many cells this gadget spans vertically
1 unless specified
def cellSize(
self)
Returns how many cells this gadget spans
1x1 unless specified
def cellWidth(
self)
Returns how many cells wide this gadget spans
1 unless specified
def clearScriptCallback(
self)
Clears callback script from uiScriptGadget Template
def hMargin(
self)
Returns the horizontal margins around the child gadget area in a container, in UI units.
def hStretch(
self)
Returns the gadget stretchiness value horizontally. 0 being none and 1 being normal.
def height(
self)
Returns the fixed height for the gadget, in UI units
Any vertical stretch is ignored, though the gadget can still stretch horizontally.
def icon(
self)
Return the icon name if in use.
def iconScale(
self)
Return the size of an icon button to an enum of standard sizes.
Note. only affects Buttons using icons
def isIconFlat(
self)
Return if an icon appears or not. Flat buttons have no shadow around icon button, so they appear "inline" with the background.
Note. only affects Buttons using icons
def isToggle(
self)
Return if this button is a toggle.
A toggle button switches between 0 and 1. 1 is selected
def justify(
self)
Returns the position the child box within the container, when the children in a container cannot grow to fill the entire area of the container.
def keyvalue(
self)
Returns keyvalue. value is changed whenever a key is pressed and contains the key value.
def label(
self)
Return label diplayed as a string.
Note. Has no effect when using an Icon
def labelWidth(
self)
Return the width of label displayed
def look(
self)
Returns the look of the gadget
def margin(
self)
Returns the margins around the child gadget area in a container, in UI units.
def maxHeight(
self)
Returns the maximum height of a gadget, in UI units.
def maxSize(
self)
Returns maximum size of a gadget, in UI units.
def maxWidth(
self)
Returns the maximum width of a gadget, in UI units.
def minHeight(
self)
Returns the minimum height of the gadget, in UI units. The gadget will never shrink to smaller than this size.
def minSize(
self)
Returns the minimum size of the gadget, in UI units. The gadget will never shrink to smaller than this size.
def minWidth(
self)
Returns the minimum width of the gadget, in UI units. The gadget will never shrink to smaller than this size.
def name(
self)
def namingScheme(
self)
Return the naming scheme used
Used only when more than 1 component
def numComponents(
self)
Return the number of values stored
def prefHeight(
self)
Returns the preferred height of the gadget, in UI units. The preferred height is the height the gadget would like to be laid out at, if space is available.
def prefSize(
self)
Returns the preferred size of the gadget, in UI units. The preferred size is the size the gadget would like to be laid out at, if space is available.
def prefWidth(
self)
Returns the preferred width of the gadget, in UI units. The preferred width is the width the gadget would like to be laid out at, if space is available.
def scriptCallback(
self)
Return script as a string that runs on gadget changes.
Note Currently only python callbacks are supported.
def sends(
self)
def setCell(
self, x, y)
Specify where in a cell layout this gadget resides.
def setCellHeight(
self, h)
Specify how many cells this gadget spans vertically
1 unless specified
def setCellSize(
self, w, h)
Specify how many cells this gadget spans
1x1 unless specified
def setCellWidth(
self, w)
Specify how many cells wide this gadget spans
1 unless specified
def setHMargin(
self, hm)
Sets the horizontal margins around the child gadget area in a container, in UI units.
def setHStretch(
self, h=1)
Makes the gadget stretchable horizontally. Specify floating point values for the amount of stretchiness: 0 being none and 1 being normal.
Useful for fields and sliders.
def setHeight(
self, h)
Specify a fixed height for the gadget, in UI units.
Any vertical stretch is ignored, though the gadget can still stretch horizontally.
def setIcon(
self, iconname)
Set the name icon file to use.
def setIconScale(
self, uiScriptIconButtonSize)
Set the size of an icon button to an enum of standard sizes.
Note. only affects Buttons using icons
def setIsIconFlat(
self, is_icon_flat=True)
Set if an icon button is flat or not. Flat buttons have no shadow around icon button, so they appear "inline" with the background.
Note. only affects Buttons using icons
def setIsToggle(
self, is_toggle_button=True)
Set if this button is a toggle or not.
A toggle button switches between 0 and 1. 1 is selected
def setJustify(
self, uiScriptJustifyHoriz, uiScriptJustifyVert)
Specify where to position the child box within the container, when the children in a container cannot grow to fill the entire area of the container.
def setKeyvalue(
self, val)
Normally set on windows, changed whenever a key is pressed and contains the key value.
def setLabel(
self, label)
Set string for label diplayed
def setLabelWidth(
self, label_width)
Set the width of label displayed
def setLook(
self, uiScriptLook)
Specifies the look of the gadget, though this is mostly used for container feels and windows
def setMargin(
self, m)
Sets the margins around the child gadget area in a container, in UI units.
def setMaxHeight(
self, h)
Set the maximum height of a gadget, in UI units.
Generally used in conjunction with STRETCH, to prevent a gadget from getting undesirably large. The max height must be larger than both the minimum and preferred height, if specified.
def setMaxSize(
self, w, h)
Set the maximum size of a gadget, in UI units.
Generally used in conjunction with STRETCH, to prevent a gadget from getting undesirably large. The max size must be larger than both the minimum and preferred size, if specified.
def setMaxWidth(
self, w)
Set the maximum width of a gadget, in UI units.
Generally used in conjunction with STRETCH, to prevent a gadget from getting undesirably large. The max width must be larger than both the minimum and preferred width, if specified.
def setMinHeight(
self, h)
Set the minimum height of the gadget, in UI units. The gadget will never shrink to smaller than this size.
def setMinSize(
self, w, h)
Set the minimum size of the gadget, in UI units. The gadget will never shrink to smaller than this size.
def setMinWidth(
self, w)
Set the minimum width of the gadget, in UI units. The gadget will never shrink to smaller than this size.
def setName(
self, name)
def setNamingScheme(
self, uiScriptNamingScheme)
Specify the naming scheme used
No effect when only 1 component
def setNumComponents(
self, num_components)
Specify the number of values stored
def setPrefHeight(
self, h)
Set the preferred height of the gadget, in UI units. The preferred height is the height the gadget would like to be laid out at, if space is available.
If a min and preferred height are specified, but no stretch is set, the height will still float between the min and preferred height. The preferred height must be between the min and max heights, if specified.
def setPrefSize(
self, w, h)
Set the preferred size of the gadget, in UI units. The preferred size is the size the gadget would like to be laid out at, if space is available.
If a min and preferred size are specified for the same dimension, but no stretch is set, the size will still float between the min and preferred size. The preferred size must be between the min and max sizes, if specified.
def setPrefWidth(
self, w)
Set the preferred width of the gadget, in UI units. The preferred width is the width the gadget would like to be laid out at, if space is available.
If a min and preferred width are specified, but no stretch is set, the width will still float between the min and preferred width. The preferred width must be between the min and max width, if specified.
def setScriptCallback(
self, callback_string)
Set the callback script to provided string. This script will run in response to gadget changes.
Note Currently only python callbacks are supported. hscript can be used via hou.hscript()
def setSends(
self, int_val)
def setSize(
self, w, h)
Specify a fixed size for the gadget, in UI units Pixels can also be used by suffixing the value with 'p' (ie, 20p).
One UI unit is about 90p. Fixed sized gadgets ignore any stretch attributes applied to them.
def setStretch(
self, h=1, v=1)
Makes the gadget stretchable in both directions. Specify floating point values for the amount of stretchiness: 0 being none and 1 being normal.
All stretchiness values are relative to one another within the same container. A gadget with stretchiness of 2 would stretch twice as much as one of stretchiness 1; the same would occur if they were assigned as 1 and 0.5.
def setVMargin(
self, vm)
Sets the vertical margins around the child gadget area in a container, in UI units.
def setVStretch(
self, v)
Makes the gadget stretchable vertically. Specify floating point values for the amount of stretchiness: 0 being none and 1 being normal.
def setValue(
self, val)
def setWidth(
self, w)
Specify a fixed width for the gadget, in UI units.
Any horizontal stretch is ignored, though the gadget can still stretch verically.
def size(
self)
Returns the fixed size for the gadget, in UI units Values suffixed with 'p' (ie, 20p) are specified in pixels.
One UI unit is about 90p. Fixed sized gadgets ignore any stretch attributes applied to them.
def stretch(
self)
Returns the gadget stretchiness values in both directions. 0 being none and 1 being normal.
def type(
self)
def vMargin(
self)
Returns the vertical margins around the child gadget area in a container, in UI units.
def vStretch(
self)
Returns the gadget stretchiness value vertically. 0 being none and 1 being normal.
def value(
self)
def width(
self)
Returns the fixed width for the gadget, in UI units
Any horizontal stretch is ignored, though the gadget can still stretch verically.
Documentation generated by
pdoc
0.2.3.
pdoc is in the public domain with the
UNLICENSE.