DD::Image::Enumeration_KnobI Class Reference

Inherited by DD::Image::Radio_KnobI.

List of all members.

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 const char * getError () const

Detailed Description

Abstract base class for Enumeration Knob-specific methods.


Member Function Documentation

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 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().