SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | List of all members
smtk::view::BadgeAction Class Reference

A base class for actions taken on badges. More...

#include <Badge.h>

Inheritance diagram for smtk::view::BadgeAction:
[legend]

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

Detailed Description

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.

Member Typedef Documentation

◆ PhraseVisitor

When visiting multiple phrases to which a badge action should apply, this function is supplied by the badge.

Returning true indicates early termination.

Member Function Documentation

◆ visitRelatedPhrases()

virtual void smtk::view::BadgeAction::visitRelatedPhrases ( PhraseVisitor  visitor) const
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.


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