|
Jamba C++ API
5.1.1
|
Defines the API for the editor which can be obtained by calling ITGUIParameter::edit().
More...
#include <IGUIParameter.h>
Inherits IGUIParameter::Editor.
Inherited by DefaultEditorImpl< T >.
Public Member Functions | |
| virtual tresult | commit (ParamType const &iValue) |
Shortcut method which calls setValue(ParamType const &) followed by commit(). More... | |
| virtual tresult | setValue (ParamType const &iValue)=0 |
| Unconditionally sets the value of the parameter to the value provided. More... | |
| virtual bool | updateValue (ParamType const &iValue)=0 |
First check if the value provided (iValue) is different from the current value and if that is the case then updates it to the new value. More... | |
Public Member Functions inherited from IGUIParameter::Editor | |
| virtual tresult | commit ()=0 |
| Commits all the changes applied to the parameter. More... | |
| virtual tresult | rollback ()=0 |
| Rollback all the changes that were made to this parameter (since this editor was created). More... | |
| virtual | ~Editor ()=default |
Technically the destructor must only call rollback(), but due to the fact that it is a virtual method, it needs to be implemented by each subclass... More... | |
Defines the API for the editor which can be obtained by calling ITGUIParameter::edit().
The editor is used in scenarios when you want to make multiple modifications to a parameter and then commit() or rollback() the set of changes. The typical use case is to create an editor on mouse down event in a view, modify the value on mouse move event and commit on mouse up event.
|
inlinevirtual |
Shortcut method which calls setValue(ParamType const &) followed by commit().
|
pure virtual |
Unconditionally sets the value of the parameter to the value provided.
| iValue | the value to set |
kResultOk if successful Implemented in DefaultEditorImpl< T >.
|
pure virtual |
First check if the value provided (iValue) is different from the current value and if that is the case then updates it to the new value.
T does not provide a way to compare the value, then this call will delegate to setValue(ParamType const &) and return true.| iValue | the value to update |
true if the value was updated Implemented in DefaultEditorImpl< T >.