SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A base class for actions taken on badges. More...
#include <Badge.h>
Public Types | |
using | PhraseVisitor = std::function< bool(DescriptivePhrase *)> |
When visiting multiple phrases to which a badge action should apply, this function is supplied by the badge. More... | |
Public Member Functions | |
virtual void | visitRelatedPhrases (PhraseVisitor visitor) const |
Some actions may apply to multiple phrases (e.g., those selected when a key is pressed). More... | |
A base class for actions taken on badges.
This class contains no information; its subclasses do. When passed to Badge::action(), the badge should attempt to cast this class to the subclasses it can handle. If no subclass can be handled, the badge does not support the given action.
using smtk::view::BadgeAction::PhraseVisitor = std::function<bool(DescriptivePhrase*)> |
When visiting multiple phrases to which a badge action should apply, this function is supplied by the badge.
Returning true indicates early termination.
|
inlinevirtual |
Some actions may apply to multiple phrases (e.g., those selected when a key is pressed).
In those cases, subclasses of BadgeAction may provide a method to visit all phrases to which the action applies.
Reimplemented in smtk::extension::qtBadgeActionToggle.