HDK
|
#include <GU_SelectionSet.h>
Public Member Functions | |
GU_SelectionSet (GA_GroupMaskType sel_types) | |
GU_SelectionSet (GA_GroupMaskType sel_types, const GU_SelectionSet &selection_set) | |
Create a new selection set from a subset of an existing one. More... | |
bool | hasType (GA_GroupType sel_type) const |
GA_GroupMaskType | typeMask () const |
GU_SelectionHandle | selection (GA_GroupType sel_type) const |
GA_GroupType | activeSelectionType () const |
GU_SelectionHandle | activeSelection () const |
Returns the selection handle of the currently active selection type. More... | |
bool | setActiveSelectionType (GA_GroupType sel_type) |
bool | save (UT_JSONWriter &w) const |
Save the selection set to a json stream. More... | |
bool | load (UT_JSONParser &p) |
Additional Inherited Members | |
Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
A static set of unique selection types. Once created, the set remains immutable. The class also stores the current active selection type for the set. By default, the first group type by group type order will be set as the active selection.
Definition at line 31 of file GU_SelectionSet.h.
GU_SelectionSet::GU_SelectionSet | ( | GA_GroupMaskType | sel_types | ) |
Construct a new selection set. The mask should contain at least one valid group type for selection. If the mask is invalid and doesn't contain a valid selection group type, a point selection will be chosen by default.
GU_SelectionSet::GU_SelectionSet | ( | GA_GroupMaskType | sel_types, |
const GU_SelectionSet & | selection_set | ||
) |
Create a new selection set from a subset of an existing one.
GU_SelectionHandle GU_SelectionSet::activeSelection | ( | ) | const |
Returns the selection handle of the currently active selection type.
GA_GroupType GU_SelectionSet::activeSelectionType | ( | ) | const |
Returns the active selection type for this selection set. This is the selection type that the GUI should consider first for display and manipulation.
bool GU_SelectionSet::hasType | ( | GA_GroupType | sel_type | ) | const |
Returns true
if the set contains the requested selection type.
bool GU_SelectionSet::load | ( | UT_JSONParser & | p | ) |
Load the selection set from a json stream. Will recycle existing selection objects, if possible, or create new ones if needed.
bool GU_SelectionSet::save | ( | UT_JSONWriter & | w | ) | const |
Save the selection set to a json stream.
GU_SelectionHandle GU_SelectionSet::selection | ( | GA_GroupType | sel_type | ) | const |
Returns the selection handle of the given selection type. If the set does not contain the given selection type, an empty selection handle is returned.
bool GU_SelectionSet::setActiveSelectionType | ( | GA_GroupType | sel_type | ) |
Sets the active selection type for this selection set. If the wanted selection type is not available, this function returns false
, and the active selection type remains unchanged.
GA_GroupMaskType GU_SelectionSet::typeMask | ( | ) | const |
Returns the entire group mask of selection types. This is the same value that was passed into the constructor.