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

Describe a resource component for user presentation. More...

#include <ComponentPhraseContent.h>

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

Public Member Functions

 smtkTypeMacro (ComponentPhraseContent)
 
 smtkSharedPtrCreateMacro (PhraseContent)
 
Ptr setup (const smtk::resource::ComponentPtr &component, int mutability=0)
 
bool displayable (ContentType contentType) const override
 Should attr be present in the visual display of the phrase?
 
bool editable (ContentType contentType) const override
 Is attr editable or fixed (for information/display only)?
 
std::string stringValue (ContentType contentType) const override
 Return a string that reflects the given attr value.
 
int flagValue (ContentType contentType) const override
 Return an integer bit-flag that reflects the given attr value.
 
bool editStringValue (ContentType contentType, const std::string &val) override
 Edit the attr value to become the given string (or returns false if no-change/invalid).
 
bool editFlagValue (ContentType contentType, int val) override
 Edit the attr value to become the given flag (or returns false if no-change/invalid).
 
smtk::resource::PersistentObjectPtr relatedObject () const override
 Return the persistent object related to this phrase (or nullptr if not well defined). More...
 
smtk::resource::ResourcePtr relatedResource () const override
 Return the resource related to this phrase (or nullptr if not well defined).
 
smtk::resource::ResourcerelatedRawResource () const override
 
smtk::resource::ComponentPtr relatedComponent () const override
 Return the resource component related to this phrase (or nullptr if not well defined).
 
smtk::resource::ComponentrelatedRawComponent () const override
 
void setMutability (int whatsMutable)
 
bool operator== (const PhraseContent &other) const override
 
- Public Member Functions inherited from smtk::view::PhraseContent
 smtkTypeMacroBase (PhraseContent)
 
virtual smtk::operation::OperationPtr relatedOperation () const
 Return an operator related to this phrase (or nullptr if not well defined).
 
bool equalTo (const PhraseContent &other) const
 Test for use in derived-class equality operators.
 
DescriptivePhrasePtr location () const
 Return the location of this content in a DescriptivePhrase hierarchy. More...
 
bool setLocation (DescriptivePhrasePtr locn)
 Set the descriptive phrase that will present this content. More...
 

Static Public Member Functions

static DescriptivePhrasePtr createPhrase (const smtk::resource::ComponentPtr &component, int mutability=0, DescriptivePhrasePtr parent=DescriptivePhrasePtr())
 

Protected Attributes

std::weak_ptr< smtk::resource::Componentm_component
 
smtk::resource::Componentm_rawComponent = nullptr
 
smtk::resource::Resourcem_rawResource = nullptr
 
int m_mutability { 0 }
 
- Protected Attributes inherited from smtk::view::PhraseContent
WeakDescriptivePhrasePtr m_location
 

Additional Inherited Members

- Public Types inherited from smtk::view::PhraseContent
enum  ContentType {
  TITLE = 0x01, EDITABLE_TITLE = 0x02, SUBTITLE = 0x04, COLOR = 0x08,
  VISIBILITY = 0x10, ICON_LIGHTBG = 0x20, ICON_DARKBG = 0x40, EVERYTHING = 0xff
}
 Accepted types of content. More...
 

Detailed Description

Describe a resource component for user presentation.

Member Function Documentation

◆ relatedObject()

smtk::resource::PersistentObjectPtr smtk::view::ComponentPhraseContent::relatedObject ( ) const
overridevirtual

Return the persistent object related to this phrase (or nullptr if not well defined).

This method simply calls relatedComponent() and relatedResource() under the hood, but that may change in the future.

Reimplemented from smtk::view::PhraseContent.


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