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

A badge that illustrates the type and color of a persistent object. More...

#include <ObjectIconBadge.h>

Inheritance diagram for smtk::view::ObjectIconBadge:
[legend]
Collaboration diagram for smtk::view::ObjectIconBadge:
[legend]

Public Member Functions

 smtkTypeMacro (smtk::view::ObjectIconBadge)
 
 ObjectIconBadge (BadgeSet &, const Configuration::Component &)
 
bool appliesToPhrase (const DescriptivePhrase *phrase) const override
 This badge only applies to phrases with a persistent object that has an icon.
 
std::string tooltip (const DescriptivePhrase *phrase) const override
 The tool-tip string is the object's type.
 
std::string icon (const DescriptivePhrase *phrase, const std::array< float, 4 > &background) const override
 Returns an SVG string for rendering the badge icon. More...
 
- Public Member Functions inherited from smtk::view::Badge
 smtkTypeMacroBase (Badge)
 
 Badge (const Badge &)=delete
 
Badgeoperator= (const Badge &)=delete
 
virtual bool action (const DescriptivePhrase *, const BadgeAction &)
 Take an action when the badge is clicked. More...
 
bool isDefault () const
 Return whether this badge be invoked by non-specific user gestures. More...
 
void setIsDefault (bool isDefault)
 Set this badge as a default.
 

Protected Attributes

const BadgeSetm_parent { nullptr }
 
- Protected Attributes inherited from smtk::view::Badge
bool m_isDefault { false }
 Should this badge be invoked by non-specific user gestures when it is applicable?
 

Detailed Description

A badge that illustrates the type and color of a persistent object.

Member Function Documentation

◆ icon()

std::string smtk::view::ObjectIconBadge::icon ( const DescriptivePhrase phrase,
const std::array< float, 4 > &  background 
) const
overridevirtual

Returns an SVG string for rendering the badge icon.

This uses a ObjectIcons to generate the badge.

Implements smtk::view::Badge.


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