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

An entry indicating how to present an operation to users. More...

#include <OperationDecorator.h>

Collaboration diagram for smtk::view::OperationDecorator::Entry:
[legend]

Public Member Functions

 Entry (smtk::operation::Operation::Index index)
 A constructor that takes an operation index. More...
 
 Entry (smtk::operation::Operation::Index index, const std::string &label, const std::string &toolTip, const std::set< smtk::string::Token > &groups={}, const std::string &buttonLabel=std::string())
 A constructor that accepts overrides for all parameters. More...
 
bool operator< (const Entry &other) const
 

Public Attributes

smtk::operation::Operation::Index m_index { 0 }
 The index of the underlying operation.
 
std::string m_label
 An alternate name for the operation (overriding its native label).
 
std::string m_buttonLabel
 Same as m_label but with linebreaks to squarify it for presentation.
 
std::string m_toolTip
 An alternate tool-tip string.
 
std::set< smtk::string::Tokenm_groups
 Groupings in which this operation should appear.
 
int m_precedence { -1 }
 An optional sort order.
 

Protected Member Functions

 Entry ()=default
 Used by at() to create a return value for range errors.
 

Friends

class OperationDecorator
 

Detailed Description

An entry indicating how to present an operation to users.

Constructor & Destructor Documentation

◆ Entry() [1/2]

smtk::view::OperationDecorator::Entry::Entry ( smtk::operation::Operation::Index  index)
inline

A constructor that takes an operation index.

This includes the operation but does not provide any overrides. The templated variant is preferred where the operation type is available at compile time.

◆ Entry() [2/2]

smtk::view::OperationDecorator::Entry::Entry ( smtk::operation::Operation::Index  index,
const std::string &  label,
const std::string &  toolTip,
const std::set< smtk::string::Token > &  groups = {},
const std::string &  buttonLabel = std::string() 
)
inline

A constructor that accepts overrides for all parameters.

Note that buttonLabel is last and defaults to an empty string. The templated variant is preferred where the operation type is available at compile time.


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