HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DT_ParmDefToggle Class Reference

#include <DT_Plugin.h>

+ Inheritance diagram for DT_ParmDefToggle:

Public Member Functions

DT_ParmDefTogglesetRadio ()
 
bool isRadio () const
 
DT_ParmDefTogglesetToggleIcon (const UT_StringHolder &icon)
 
const char * toggleIcon () const
 Return the value of the toggle icon. More...
 
void copyValue (bool src, DT_Value &dst) const
 Copy a value from a concrete type to an opaque DT_Value object. More...
 
void copyValue (const DT_Value &src, bool &dst) const
 Copy a value from DT_Value opaque type to a concrete type. More...
 
bool allowsMultiValueSet () const override
 Dont allow triggering multiple radio buttons with one click. More...
 
bool operator== (const DT_ParmDef &other) const override
 
- Public Member Functions inherited from DT_ParmDef
virtual ~DT_ParmDef ()
 
int id () const
 
Type type () const
 
const char * typeName () const
 
DT_ParmDefsetName (const UT_StringHolder &name)
 Set a name for this parameter definition. More...
 
const UT_StringHoldername () const
 Returns the name of the parameter definition. More...
 
DT_ParmDefsetIcon (const UT_StringHolder &icon)
 Show an icon, instead of a headet text / label. More...
 
const UT_StringHoldericon () const
 
DT_ParmDefsetTooltip (const UT_StringHolder &str)
 
const UT_StringHoldertooltip () const
 
DT_ParmDefsetReadOnly ()
 
bool readOnly () const
 
DT_ParmDefsetOptionType (OptionType opt_type)
 
OptionType optionType () const
 
DT_ParmDefsetToolbarName (const UT_StringHolder &toolbar_name)
 
const UT_StringHoldertoolbarName () const
 
DT_ParmDefsetCanBeIndeterminate ()
 The parameter can be in an indeterminate state. Ignored for options. More...
 
bool canBeIndeterminate () const
 

Static Public Member Functions

static DT_ParmDefTogglecreate (int id, const UT_StringHolder &name)
 Create a new DT_ParmDefToggle type with a given id and name. More...
 
static const DT_ParmDefToggleget (const DT_ParmDef &def)
 Automatically cast the base class definition to this type. More...
 
- Static Public Member Functions inherited from DT_ParmDef
static DT_ParmDefcreateFromTemplate (int id, const PRM_Template &tpl)
 
static bool getMenuItemsFromTemplate (const PRM_Template &tpl, PRM_Parm &parm, DT_MenuItemList &items)
 

Additional Inherited Members

- Public Types inherited from DT_ParmDef
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 }
 
- Protected Member Functions inherited from DT_ParmDef
 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_NonCopyableoperator= (const UT_NonCopyable &)=delete
 
- Protected Attributes inherited from DT_ParmDef
int myId
 
UT_StringHolder myName
 
UT_StringHolder myIcon
 
Type myType
 
UT_StringHolder myTooltip
 
OptionType myOptionType
 
UT_StringHolder myToolbarName
 
bool myReadOnly
 
bool myCanBeIndeterminate
 

Detailed Description

Defines a boolean parameter, represented by a toggle.

When used with DT_Plugin::setParameterValue, DT_Plugin::getParameterValue, DT_Plugin::setOptionValue, and DT_Plugin::getOptionValue, the value argument should be of type bool.

Definition at line 293 of file DT_Plugin.h.

Member Function Documentation

bool DT_ParmDefToggle::allowsMultiValueSet ( ) const
inlineoverridevirtual

Dont allow triggering multiple radio buttons with one click.

Reimplemented from DT_ParmDef.

Definition at line 329 of file DT_Plugin.h.

void DT_ParmDefToggle::copyValue ( bool  src,
DT_Value dst 
) const

Copy a value from a concrete type to an opaque DT_Value object.

void DT_ParmDefToggle::copyValue ( const DT_Value src,
bool &  dst 
) const

Copy a value from DT_Value opaque type to a concrete type.

static DT_ParmDefToggle* DT_ParmDefToggle::create ( int  id,
const UT_StringHolder name 
)
static

Create a new DT_ParmDefToggle type with a given id and name.

static const DT_ParmDefToggle& DT_ParmDefToggle::get ( const DT_ParmDef def)
inlinestatic

Automatically cast the base class definition to this type.

Definition at line 301 of file DT_Plugin.h.

bool DT_ParmDefToggle::isRadio ( ) const
bool DT_ParmDefToggle::operator== ( const DT_ParmDef other) const
overridevirtual

Implements DT_ParmDef.

DT_ParmDefToggle* DT_ParmDefToggle::setRadio ( )

This toggle acts like a radio button. In that case, multi-selection parameter change does not apply and the toggle is drawn like a radio button.

DT_ParmDefToggle* DT_ParmDefToggle::setToggleIcon ( const UT_StringHolder icon)

Sets the icon to use for the toggle button itself instead of the standard UI toggle. For indeterminate states, the icon will be drawn slightly grayed out.

Note
Ignored for radio buttons.
const char* DT_ParmDefToggle::toggleIcon ( ) const

Return the value of the toggle icon.


The documentation for this class was generated from the following file: