class StringUiScriptGadget
def __init__(
self, name, label=None, menu_items=(), string_type=uiScriptStringType.string)
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 hasMenu(
self)
Return field string field-menu combo or not. Menu will populate or append the field.
This is a convieniance and same as setting the enum
Note. Passwords are still retrievable as plain text Note. password, alphaNum, and string_menu are enums and mutually exclusive.
see also... stringReplaceType()
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 isAlphaNum(
self)
Return if the string field is alpha-numeric or not.
Alpha-numeric fileds only accept letters and numbers. All other entered chars transform to underscores (_).
Note. This applies to user-entered data ONLY
def isLimitedToChars(
self)
Return if field is limited to specific chars
def isPassword(
self)
Return if field displays chars as password.
All other entered chars transform to underscores (_).
Note. Passwords are still retrievable as plain text
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
def labelWidth(
self)
Return the width of label displayed
def limitToChars(
self)
Return a list of chars this field is limited.
Note. This applies to user-entered data ONLY
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.
Return string tuple of menu items
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 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 setHasMenu(
self, true_or_false=True)
Set if is a string field-menu combo or not. Menu will populate or append the field.
This is a convieniance and same as setting the enum
Note. Passwords are still retrievable as plain text Note. password, alphaNum, and string_menu are enums and mutually exclusive.
see also... setStringReplaceType()
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 setIsAplhaNum(
self, true_or_false=True)
Set field to only accept letters and numbers. All other entered chars transform to underscores (_).
This is a convieniance and same as setting the enum
Note. This applies to user-entered data ONLY. Note. password, alphaNum, and string_menu are enums and mutually exclusive.
def setIsPassword(
self, true_or_false=True)
Set Field to be used for passwords. Password will obscure the string entered.
This is a convieniance and same as setting the enum
Note. Passwords are still retrievable as plain text Note. password, alphaNum, and string_menu are enums and mutually exclusive.
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 setLimitToChars(
self, limit_to_chars)
Set list of valid characters that can be entered. All other entered chars transform to underscores (_).
Ranges may be used ("A-z", "0-9").
Note. This takes PRIORITY over string type enum
Note. This applies to user-entered data ONLY Note. To use '-', backslash it as... "-"
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 setMenuItems(
self, menu_items)
Set string tuple for menu items
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 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 setStringReplaceType(
self, uiScriptStringReplaceType)
Enumeration of the replacent method.
Note only valid for string-menus.
def setStringType(
self, uiScriptStringType)
set a string type enumeration. Set field stylefor passwords, alpa numeric, or to use a menu.
Note. limiting chars takes PRIORITY over this.
see also... setIstAplhaNum() setIsPassword() setLimitToChars() setHasMenu()
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 stringReplaceType(
self)
Enumeration of the replacent method.
Note only valid for string-menus.
def stringType(
self)
Returns enumeration for the string type
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.