SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
11 #ifndef smtk_view_Badge_h
12 #define smtk_view_Badge_h
14 #include "smtk/view/Configuration.h"
85 virtual ~
Badge() =
default;
110 virtual std::string icon(
const DescriptivePhrase* phrase,
const std::array<float, 4>& background)
129 bool m_isDefault{
false };
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
virtual std::string tooltip(const DescriptivePhrase *) const
Return a tool-tip string for the badge that is relevant to this phrase.
Definition: Badge.h:100
virtual bool appliesToPhrase(const DescriptivePhrase *) const
Returns true if the badge should appear next to the given phrase:
Definition: Badge.h:88
A base class for descriptive-phrase badges.
Definition: Badge.h:78
virtual void visitRelatedPhrases(PhraseVisitor visitor) const
Some actions may apply to multiple phrases (e.g., those selected when a key is pressed).
Definition: Badge.h:46
std::function< bool(DescriptivePhrase *)> PhraseVisitor
When visiting multiple phrases to which a badge action should apply, this function is supplied by the...
Definition: Badge.h:40
#define smtkEnableSharedPtr(...)
An abbreviation for enabling shared pointers.
Definition: SharedFromThis.h:214
virtual bool action(const DescriptivePhrase *, const BadgeAction &)
Take an action when the badge is clicked.
Definition: Badge.h:117
bool isDefault() const
Return whether this badge be invoked by non-specific user gestures.
Definition: Badge.h:122
A base class for phrases describing an SMTK model.
Definition: DescriptivePhrase.h:76
void setIsDefault(bool isDefault)
Set this badge as a default.
Definition: Badge.h:125
A base class for actions taken on badges.
Definition: Badge.h:34
The basic badge action: the user clicked on a badge.
Definition: Badge.h:56
Macros for dealing with shared-pointer classes.
#define smtkTypeMacroBase(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:131