Inherited by DD::Image::Radio_KnobI.
Public Member Functions | |
virtual void | menu (const std::vector< std::string > &e)=0 |
virtual const std::vector < std::string > & | menu () const =0 |
virtual int | getSelectedItemIndex () const =0 |
virtual std::string | getSelectedItemString () const =0 |
virtual std::string | getItemValueString (const int itemIndex) const =0 |
virtual const char * | getError () const |
Abstract base class for Enumeration Knob-specific methods.
virtual void DD::Image::Enumeration_KnobI::menu | ( | const std::vector< std::string > & | e | ) | [pure virtual] |
set the menu items on the knob to the given list. if you want this to persist you must use the SAVE_MENU flag on this knob.
Referenced by DD::Image::LUTInfo::updateColorspaceDefaultValue(), and DD::Image::InternalOCIOOp::updateOCIOKnobValues().
virtual const std::vector<std::string>& DD::Image::Enumeration_KnobI::menu | ( | ) | const [pure virtual] |
get the list of menu items on the knob
virtual int DD::Image::Enumeration_KnobI::getSelectedItemIndex | ( | ) | const [pure virtual] |
get the index of the currently selected item
Referenced by DD::Image::LUTInfo::updateColorspaceDefaultValue(), and DD::Image::InternalOCIOOp::updateOCIOKnobValues().
virtual std::string DD::Image::Enumeration_KnobI::getSelectedItemString | ( | ) | const [pure virtual] |
get the currently selected menu item
virtual std::string DD::Image::Enumeration_KnobI::getItemValueString | ( | const int | itemIndex | ) | const [pure virtual] |
The selected menu item can contain tab-separated content to signify a different display string to the internal menu item option. This will return the internal menu item option only.
virtual const char* DD::Image::Enumeration_KnobI::getError | ( | ) | const [inline, virtual] |
The following function can be used to check the error state on Enumeration knobs. If we have the EXACT_MATCH_ONLY flag set, any attempt to set an enumeration knob by name to an invalid value will result in the knob being in an Error state. This function can be used to get the error value (i.e. the value that was attempted to set. Returns NULL if no error.
Referenced by DD::Image::Write::_validate(), DD::Image::Read::_validate(), and DD::Image::LUTInfo::updateColorspaceDefaultValue().