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

Group a set of persistent objects for user presentation. More...

#include <ObjectGroupPhraseContent.h>

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

Public Member Functions

 smtkTypeMacro (smtk::view::ObjectGroupPhraseContent)
 
 smtkSharedPtrCreateMacro (smtk::view::PhraseContent)
 
Ptr setup (const std::string &title, const std::string &resourceFilter, const std::string &componentFilter)
 
const std::string & resourceFilter () const
 
const std::string & componentFilter () const
 
void children (DescriptivePhrases &container) const
 Add this phrase's children to the container.
 
bool hasChildren () const
 Return true if the phrase content has children.
 
bool displayable (ContentType attr) const override
 Should attr be present in the visual display of the phrase?
 
bool editable (ContentType) const override
 Is attr editable or fixed (for information/display only)?
 
std::string stringValue (ContentType) const override
 Return a string that reflects the given attr value.
 
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::ComponentPtr relatedComponent () const override
 Return the resource component related to this phrase (or nullptr if not well defined).
 
bool operator== (const PhraseContent &other) const override
 
- Public Member Functions inherited from smtk::view::PhraseContent
 smtkTypeMacroBase (PhraseContent)
 
virtual int flagValue (ContentType) const
 Return an integer bit-flag that reflects the given attr value.
 
virtual bool editStringValue (ContentType, const std::string &)
 Edit the attr value to become the given string (or returns false if no-change/invalid).
 
virtual bool editFlagValue (ContentType, int)
 Edit the attr value to become the given flag (or returns false if no-change/invalid).
 
virtual smtk::resource::ResourcerelatedRawResource () const
 
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 std::string &title, const std::string &resourceFilter, const std::string &componentFilter, DescriptivePhrasePtr parent=DescriptivePhrasePtr())
 

Protected Attributes

std::string m_resourceFilter
 
std::string m_componentFilter
 
std::string m_title
 
- 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

Group a set of persistent objects for user presentation.

This takes resource and component filter strings plus a title and populates its children with all objects that match the filters.

The phrase title is not mutable (although a decorator can be used to change this).

Member Function Documentation

◆ relatedObject()

smtk::resource::PersistentObjectPtr smtk::view::ObjectGroupPhraseContent::relatedObject ( ) const
inlineoverridevirtual

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: