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

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

#include <ResourcePhraseContent.h>

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

Public Member Functions

 smtkTypeMacro (ResourcePhraseContent)
 
 smtkSharedPtrCreateMacro (PhraseContent)
 
Ptr setup (const smtk::resource::ResourcePtr &resource, 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).
 
void setMutability (int whatsMutable)
 
bool operator== (const PhraseContent &other) const override
 
- Public Member Functions inherited from smtk::view::PhraseContent
 smtkTypeMacroBase (PhraseContent)
 
virtual smtk::resource::ResourcerelatedRawResource () const
 
virtual smtk::resource::ComponentPtr relatedComponent () const
 Return the resource component related to this phrase (or nullptr if not well defined).
 
virtual smtk::resource::ComponentrelatedRawComponent () const
 
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::ResourcePtr &resource, int mutability=0, DescriptivePhrasePtr parent=DescriptivePhrasePtr())
 

Protected Attributes

std::weak_ptr< smtk::resource::Resourcem_resource
 
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::ResourcePhraseContent::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: