HDK
|
#include <DT_Plugin.h>
Public Types | |
enum | Type { T_TOGGLE, T_INTEGER, T_FLOAT, T_COLOR, T_STRING, T_MENU, T_PATH, T_BUTTON, T_GROUPED } |
enum | OptionType { OT_OPTION_ONLY, OT_OPTION_AND_TOOLBAR, OT_TOOLBAR_ONLY } |
Public Member Functions | |
virtual | ~DT_ParmDef () |
int | id () const |
Type | type () const |
const char * | typeName () const |
DT_ParmDef * | setName (const UT_StringHolder &name) |
Set a name for this parameter definition. More... | |
const UT_StringHolder & | name () const |
Returns the name of the parameter definition. More... | |
DT_ParmDef * | setIcon (const UT_StringHolder &icon) |
Show an icon, instead of a headet text / label. More... | |
const UT_StringHolder & | icon () const |
DT_ParmDef * | setTooltip (const UT_StringHolder &str) |
const UT_StringHolder & | tooltip () const |
DT_ParmDef * | setReadOnly () |
bool | readOnly () const |
DT_ParmDef * | setOptionType (OptionType opt_type) |
OptionType | optionType () const |
DT_ParmDef * | setToolbarName (const UT_StringHolder &toolbar_name) |
const UT_StringHolder & | toolbarName () const |
DT_ParmDef * | setCanBeIndeterminate () |
The parameter can be in an indeterminate state. Ignored for options. More... | |
bool | canBeIndeterminate () const |
virtual bool | allowsMultiValueSet () const |
virtual bool | operator== (const DT_ParmDef &other) const =0 |
Static Public Member Functions | |
static DT_ParmDef * | createFromTemplate (int id, const PRM_Template &tpl) |
static bool | getMenuItemsFromTemplate (const PRM_Template &tpl, PRM_Parm &parm, DT_MenuItemList &items) |
Protected Member Functions | |
DT_ParmDef (int id, const UT_StringHolder &name, Type parm_type) | |
Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
Protected Attributes | |
int | myId |
UT_StringHolder | myName |
UT_StringHolder | myIcon |
Type | myType |
UT_StringHolder | myTooltip |
OptionType | myOptionType |
UT_StringHolder | myToolbarName |
bool | myReadOnly |
bool | myCanBeIndeterminate |
The base class for a parameter definition. Parameter definitions are used to construct parameters for either tree values or plugin options.
Definition at line 176 of file DT_Plugin.h.
Enumerator | |
---|---|
OT_OPTION_ONLY | |
OT_OPTION_AND_TOOLBAR |
Only show plugin option in dialog (default) |
OT_TOOLBAR_ONLY |
Show option in both toolbar and dialog. |
Definition at line 206 of file DT_Plugin.h.
enum DT_ParmDef::Type |
Enumerator | |
---|---|
T_TOGGLE | |
T_INTEGER |
Toggle type. |
T_FLOAT |
Integer type. |
T_COLOR |
Floating point type. |
T_STRING |
Color type. |
T_MENU |
String type. |
T_PATH |
Menu type. |
T_BUTTON |
Path type. |
T_GROUPED |
Button type. Grouped parms type. |
Definition at line 193 of file DT_Plugin.h.
|
inlinevirtual |
Definition at line 191 of file DT_Plugin.h.
|
protected |
|
inlinevirtual |
Returns true if multiple selected rows can set this column value at the same time.
Reimplemented in DT_ParmDefButton, DT_ParmDefMenu, and DT_ParmDefToggle.
Definition at line 264 of file DT_Plugin.h.
|
inline |
Definition at line 259 of file DT_Plugin.h.
|
static |
Create a new DT_ParmDef object from a PRM_Template object. Note that not all types of operator parameters can be converted, or represented, by DT_ParmDef. In that case it returns NULL.
|
static |
Returns a list of menu items from a PRM_Template object. This can be used in case the menu is dynamically generated based on the parameter it is being evaluated for.
|
inline |
Definition at line 234 of file DT_Plugin.h.
|
inline |
Return the unique id used for this parameter definition. This id is passed to DT_Plugin::getParameterValue, DT_Plugin::setParameterValue, DT_Plugin::getOptionValue and DT_Plugin::setOptionValue.
Definition at line 216 of file DT_Plugin.h.
|
inline |
Returns the name of the parameter definition.
Definition at line 230 of file DT_Plugin.h.
|
pure virtual |
Implemented in DT_ParmDefGrouped, DT_ParmDefButton, DT_ParmDefPath, DT_ParmDefMenu, DT_ParmDefString, DT_ParmDefColor, DT_ParmDefFloat, DT_ParmDefInteger, and DT_ParmDefToggle.
|
inline |
Definition at line 248 of file DT_Plugin.h.
|
inline |
Definition at line 245 of file DT_Plugin.h.
DT_ParmDef* DT_ParmDef::setCanBeIndeterminate | ( | ) |
The parameter can be in an indeterminate state. Ignored for options.
DT_ParmDef* DT_ParmDef::setIcon | ( | const UT_StringHolder & | icon | ) |
Show an icon, instead of a headet text / label.
DT_ParmDef* DT_ParmDef::setName | ( | const UT_StringHolder & | name | ) |
Set a name for this parameter definition.
DT_ParmDef* DT_ParmDef::setOptionType | ( | OptionType | opt_type | ) |
DT_ParmDef* DT_ParmDef::setReadOnly | ( | ) |
This parameter is read-only and cannot be edited. The plugin does not have to handle it in DT_Plugin::setParameterValue or DT_Plugin::setOptionValue.
DT_ParmDef* DT_ParmDef::setToolbarName | ( | const UT_StringHolder & | toolbar_name | ) |
Set an alternative name to use on this parameter's label in the toolbar, if this parameter definition is used for both the option dialog and the toolbar. This should ideally be a more compact version of the more descriptive name used in the dialog.
DT_ParmDef* DT_ParmDef::setTooltip | ( | const UT_StringHolder & | str | ) |
Set the tooltip to show on the header column, for parameters, or on the label/input for options.
const UT_StringHolder& DT_ParmDef::toolbarName | ( | ) | const |
|
inline |
Definition at line 239 of file DT_Plugin.h.
|
inline |
Returns the type id of the parameter definition. See the derived definition classes for details on each type.
Definition at line 220 of file DT_Plugin.h.
const char* DT_ParmDef::typeName | ( | ) | const |
Returns a string version of the type. Used mostly for debugging purposes.
|
protected |
Definition at line 280 of file DT_Plugin.h.
|
protected |
Definition at line 274 of file DT_Plugin.h.
|
protected |
Definition at line 272 of file DT_Plugin.h.
|
protected |
Definition at line 273 of file DT_Plugin.h.
|
protected |
Definition at line 277 of file DT_Plugin.h.
|
protected |
Definition at line 279 of file DT_Plugin.h.
|
protected |
Definition at line 278 of file DT_Plugin.h.
|
protected |
Definition at line 276 of file DT_Plugin.h.
|
protected |
Definition at line 275 of file DT_Plugin.h.