ufe  4.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
Ufe::ContextItem Struct Reference

Structure to describe contextual operations. More...

#include <contextOps.h>

Public Types

enum  HasChildren { kNoChildren = false, kHasChildren = true }
 
enum  Checkable { kNotCheckable = false, kCheckable = true }
 
enum  Checked { kNotChecked = false, kChecked = true }
 
enum  Exclusive { kNotExclusive = false, kExclusive = true }
 
enum  Enabled { kDisabled = false, kEnabled = true }
 
enum  SeparatorTag { kSeparator }
 

Public Member Functions

 ContextItem ()=default
 
 ContextItem (const std::string &argItem, const std::string &argLabel, bool argHasChildren=false, bool argCheckable=false, bool argChecked=false, bool argExclusive=false, bool argEnabled=true)
 
 ContextItem (const std::string &argItem, const std::string &argLabel, const std::string &argImage, bool argHasChildren=false, bool argCheckable=false, bool argChecked=false, bool argExclusive=false, bool argEnabled=true)
 Convenience constructor for creating an item with image icon. More...
 
 ContextItem (SeparatorTag, const std::string &argLabel="")
 Convenience constructor for creating a separator item, with optional label. More...
 

Public Attributes

std::string item {}
 The runtime's string that describes the operation or option. More...
 
std::string label {}
 The user-visible string, possibly localized. More...
 
std::string image {}
 The filename of the icon associated with the item. More...
 
bool hasChildren {false}
 
bool checkable {false}
 Can the item be in a checked state? More...
 
bool checked {false}
 Is the item checked? More...
 
bool exclusive {false}
 
bool enabled {true}
 Is the item enabled? A disabled item will be grayed out. More...
 
bool separator {false}
 Is this item a separator? More...
 

Detailed Description

Structure to describe contextual operations.

Provides simple aggregation to describe the presentation and characteristics a contextual operation.

Definition at line 29 of file contextOps.h.

Member Enumeration Documentation

◆ Checkable

Enumerator
kNotCheckable 
kCheckable 

Definition at line 32 of file contextOps.h.

◆ Checked

Enumerator
kNotChecked 
kChecked 

Definition at line 33 of file contextOps.h.

◆ Enabled

Enumerator
kDisabled 
kEnabled 

Definition at line 35 of file contextOps.h.

◆ Exclusive

Enumerator
kNotExclusive 
kExclusive 

Definition at line 34 of file contextOps.h.

◆ HasChildren

Enumerator
kNoChildren 
kHasChildren 

Definition at line 31 of file contextOps.h.

◆ SeparatorTag

Enumerator
kSeparator 

Definition at line 37 of file contextOps.h.

Constructor & Destructor Documentation

◆ ContextItem() [1/4]

Ufe::ContextItem::ContextItem ( )
default

◆ ContextItem() [2/4]

Ufe::ContextItem::ContextItem ( const std::string &  argItem,
const std::string &  argLabel,
bool  argHasChildren = false,
bool  argCheckable = false,
bool  argChecked = false,
bool  argExclusive = false,
bool  argEnabled = true 
)

◆ ContextItem() [3/4]

Ufe::ContextItem::ContextItem ( const std::string &  argItem,
const std::string &  argLabel,
const std::string &  argImage,
bool  argHasChildren = false,
bool  argCheckable = false,
bool  argChecked = false,
bool  argExclusive = false,
bool  argEnabled = true 
)

Convenience constructor for creating an item with image icon.

◆ ContextItem() [4/4]

Ufe::ContextItem::ContextItem ( SeparatorTag  ,
const std::string &  argLabel = "" 
)

Convenience constructor for creating a separator item, with optional label.

Member Data Documentation

◆ checkable

bool Ufe::ContextItem::checkable {false}

Can the item be in a checked state?

Definition at line 77 of file contextOps.h.

◆ checked

bool Ufe::ContextItem::checked {false}

Is the item checked?

Definition at line 80 of file contextOps.h.

◆ enabled

bool Ufe::ContextItem::enabled {true}

Is the item enabled? A disabled item will be grayed out.

Definition at line 87 of file contextOps.h.

◆ exclusive

bool Ufe::ContextItem::exclusive {false}

Is the item part of a set of checkable items where a single item can be checked (mutually exclusive items)?

Definition at line 84 of file contextOps.h.

◆ hasChildren

bool Ufe::ContextItem::hasChildren {false}

Does the item have children, i.e. an operation with options, or an option with sub-options?

Definition at line 74 of file contextOps.h.

◆ image

std::string Ufe::ContextItem::image {}

The filename of the icon associated with the item.

Definition at line 70 of file contextOps.h.

◆ item

std::string Ufe::ContextItem::item {}

The runtime's string that describes the operation or option.

Definition at line 64 of file contextOps.h.

◆ label

std::string Ufe::ContextItem::label {}

The user-visible string, possibly localized.

Definition at line 67 of file contextOps.h.

◆ separator

bool Ufe::ContextItem::separator {false}

Is this item a separator?

Definition at line 90 of file contextOps.h.


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