#include <SoFCUnifiedSelection.h>
Classes | |
struct | SelContext |
class | Stack |
struct | StackComp |
Public Types | |
enum | SelectStyles { Full, Box, PassThrough } |
Public Member Functions | |
virtual void | callback (SoCallbackAction *action) |
virtual void | doAction (SoAction *action) |
virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
virtual void | getMatrix (SoGetMatrixAction *action) |
virtual void | getPrimitiveCount (SoGetPrimitiveCountAction *action) |
virtual void | GLRenderBelowPath (SoGLRenderAction *action) |
virtual void | GLRenderInPath (SoGLRenderAction *action) |
virtual void | handleEvent (SoHandleEventAction *action) |
bool | hasColorOverride () const |
virtual void | pick (SoPickAction *action) |
virtual void | rayPick (SoRayPickAction *action) |
void | removeColorOverride () |
void | resetContext () |
virtual void | search (SoSearchAction *action) |
void | setColorOverride (App::Color c) |
SoFCSelectionRoot (bool trackCacheMode=false) | |
Public Member Functions inherited from Gui::SoFCSeparator | |
SoFCSeparator (bool trackCacheMode=true) | |
Static Public Member Functions | |
static bool | checkColorOverride (SoState *state) |
static void | checkSelection (bool &sel, SbColor &selColor, bool &hl, SbColor &hlColor) |
static void | finish (void) |
template<class T > | |
static std::shared_ptr< T > | getActionContext (SoAction *action, SoNode *node, std::shared_ptr< T > def=std::shared_ptr< T >(), bool create=true) |
Get the selection context for an action. More... | |
static SoNode * | getCurrentRoot (bool front, SoNode *def) |
template<class T > | |
static std::shared_ptr< T > | getRenderContext (SoNode *node, std::shared_ptr< T > def, std::shared_ptr< T > &ctx2) |
Returns selection context for rendering. More... | |
template<class T > | |
static std::shared_ptr< T > | getRenderContext (SoNode *node, std::shared_ptr< T > def=std::shared_ptr< T >()) |
template<class T > | |
static std::shared_ptr< T > | getSecondaryActionContext (SoAction *action, SoNode *node) |
static void | initClass (void) |
static void | moveActionStack (SoAction *from, SoAction *to, bool erase) |
static bool | removeActionContext (SoAction *action, SoNode *node) |
static bool | renderBBox (SoGLRenderAction *action, SoNode *node, SbColor color) |
Static Public Member Functions inherited from Gui::SoFCSeparator | |
static void | finish (void) |
static CacheEnabled | getCacheMode () |
static void | initClass (void) |
static void | setCacheMode (CacheEnabled mode) |
Public Attributes | |
SoSFEnum | selectionStyle |
Protected Types | |
typedef std::vector< SbColor > | ColorStack |
typedef std::map< Stack, SoFCSelectionContextBasePtr, StackComp > | ContextMap |
typedef std::shared_ptr< SelContext > | SelContextPtr |
Protected Member Functions | |
bool | doActionPrivate (Stack &stack, SoAction *) |
void | renderPrivate (SoGLRenderAction *, bool inPath) |
virtual | ~SoFCSelectionRoot () |
Static Protected Member Functions | |
static std::pair< bool, SoFCSelectionContextBasePtr * > | findActionContext (SoAction *action, SoNode *node, bool create, bool erase) |
static SoFCSelectionContextBasePtr | getNodeContext (Stack &stack, SoNode *node, SoFCSelectionContextBasePtr def) |
static SoFCSelectionContextBasePtr | getNodeContext2 (Stack &stack, SoNode *node, SoFCSelectionContextBase::MergeFunc *merge) |
Protected Attributes | |
SbColor | colorOverride |
ContextMap | contextMap |
ContextMap | contextMap2 |
bool | overrideColor = false |
SoColorPacker | shapeColorPacker |
float | transOverride |
Static Protected Attributes | |
static std::unordered_map< SoAction *, Stack > | ActionStacks |
static ColorStack | HlColorStack |
static ColorStack | SelColorStack |
static Stack | SelStack |
static SoFCSelectionRoot * | ShapeColorNode |
Member Typedef Documentation
◆ ColorStack
|
protected |
◆ ContextMap
|
protected |
◆ SelContextPtr
|
protected |
Member Enumeration Documentation
◆ SelectStyles
Constructor & Destructor Documentation
◆ SoFCSelectionRoot()
SoFCSelectionRoot::SoFCSelectionRoot | ( | bool | trackCacheMode = false | ) |
References Box, Full, PassThrough, and selectionStyle.
◆ ~SoFCSelectionRoot()
|
protectedvirtual |
Member Function Documentation
◆ callback()
|
virtual |
◆ checkColorOverride()
|
static |
References colorOverride, ShapeColorNode, shapeColorPacker, and transOverride.
◆ checkSelection()
|
static |
References HlColorStack, and SelColorStack.
Referenced by draftguitools.gui_selectplane.Draft_SelectPlane::action(), Gui::SoFCSelectionContext::checkGlobal(), and Gui::SoFCPathAnnotation::GLRenderBelowPath().
◆ doAction()
|
virtual |
References doActionPrivate().
◆ doActionPrivate()
References Gui::SoSelectionElementAction::All, Gui::SoSelectionElementAction::Color, getActionContext(), getNodeContext2(), Gui::SoSelectionElementAction::Hide, Gui::SoFCSelectionRoot::SelContext::merge, removeActionContext(), resetContext(), and Gui::SoSelectionElementAction::Show.
Referenced by doAction(), getBoundingBox(), getMatrix(), pick(), and rayPick().
◆ findActionContext()
|
staticprotected |
References ActionStacks, and femsolver.elmer.equations.elasticity::create().
◆ finish()
|
static |
Referenced by drafttaskpanels.task_polararray.TaskPanelPolarArray::accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::accept(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::accept(), draftguitools.gui_split.Split::action(), draftguitools.gui_splines.BSpline::action(), draftguitools.gui_beziers.BezCurve::action(), draftguitools.gui_lines.Line::action(), draftguitools.gui_polygons.Polygon::action(), draftguitools.gui_subelements.SubelementHighlight::action(), draftguitools.gui_rotate.Rotate::action(), draftguitools.gui_fillets.Fillet::action(), draftguitools.gui_move.Move::action(), draftguitools.gui_texts.Text::action(), draftguitools.gui_mirror.Mirror::action(), draftguitools.gui_stretch.Stretch::action(), draftguitools.gui_scale.Scale::action(), draftguitools.gui_arcs.Arc::action(), draftguitools.gui_offset.Offset::action(), draftguitools.gui_ellipses.Ellipse::action(), draftguitools.gui_rectangles.Rectangle::action(), draftguitools.gui_shapestrings.ShapeString::action(), draftguitools.gui_labels.Label::action(), draftguitools.gui_selectplane.Draft_SelectPlane::action(), draftguitools.gui_trimex.Trimex::action(), draftguitools.gui_beziers.CubicBezCurve::action(), draftguitools.gui_dimensions.Dimension::action(), draftguitools.gui_wire2spline.WireToBSpline::Activated(), draftguitools.gui_subelements.SubelementHighlight::Activated(), draftguitools.gui_dimensions.Dimension::Activated(), draftguitools.gui_edit.Edit::Activated(), draftguitools.gui_selectplane.Draft_SelectPlane::checkSelection(), DraftGui.DraftToolBar::checkSpecialChars(), draftguitools.gui_points.Point::click(), draftguitools.gui_labels.Label::create(), draftguitools.gui_ellipses.Ellipse::createObject(), draftguitools.gui_rectangles.Rectangle::createObject(), draftguitools.gui_texts.Text::createObject(), draftguitools.gui_shapestrings.ShapeString::createObject(), draftguitools.gui_stretch.Stretch::doStretch(), draftguitools.gui_arcs.Arc::drawArc(), draftguitools.gui_polygons.Polygon::drawPolygon(), DraftGui.DraftToolBar::escape(), Gui::SoFCDB::finish(), draftguitools.gui_edit.Edit::keyPressed(), draftguitools.gui_dimensions.Dimension::numericInput(), draftguitools.gui_fillets.Fillet::numericRadius(), draftguitools.gui_offset.Offset::numericRadius(), draftguitools.gui_rotate.Rotate::numericRadius(), draftguitools.gui_trimex.Trimex::numericRadius(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAlign(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickAuto(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickCenter(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickFront(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickMove(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickPrevious(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickSide(), draftguitools.gui_selectplane.Draft_SelectPlane::onClickTop(), draftguitools.gui_subelements.SubelementHighlight::proceed(), draftguitools.gui_facebinders.Facebinder::proceed(), draftguitools.gui_downgrade.Downgrade::proceed(), draftguitools.gui_draft2sketch.Draft2Sketch::proceed(), draftguitools.gui_upgrade.Upgrade::proceed(), draftguitools.gui_shape2dview.Shape2DView::proceed(), draftguitools.gui_join.Join::proceed(), draftguitools.gui_array_simple.Array::proceed(), draftguitools.gui_clone.Clone::proceed(), draftguitools.gui_split.Split::proceed(), draftguitools.gui_trimex.Trimex::proceed(), draftguitools.gui_pointarray.PointArray::proceed(), draftguitools.gui_patharray.PathArray::proceed(), draftguitools.gui_edit.Edit::proceed(), draftguitools.gui_selectplane.Draft_SelectPlane::reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray::reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::reject(), and draftguitools.gui_edit.Edit::setTrackers().
◆ getActionContext()
|
static |
Get the selection context for an action.
- Parameters
-
action the action. SoSelectionElementAction has any option to query for secondary context.
- See also
- getRenderContext for detail about secondary context
- Parameters
-
node the querying node def default context if none is found, only used if querying non-secondary context create create a new context if none is found
- Returns
- If no SoFCSelectionRoot is found in the current path of action,
def
is returned. Otherwise a selection context returned. A new one will be created if none is found.
References femsolver.elmer.equations.elasticity::create().
Referenced by PartGui::SoBrepEdgeSet::doAction(), PartGui::SoBrepPointSet::doAction(), PartGui::SoBrepFaceSet::doAction(), Gui::SoFCSelection::doAction(), and doActionPrivate().
◆ getBoundingBox()
|
virtual |
References doActionPrivate().
◆ getCurrentRoot()
◆ getMatrix()
|
virtual |
References doActionPrivate().
◆ getNodeContext()
|
staticprotected |
References contextMap.
◆ getNodeContext2()
|
staticprotected |
Referenced by doActionPrivate().
◆ getPrimitiveCount()
|
virtual |
◆ getRenderContext() [1/2]
|
static |
Returns selection context for rendering.
- Parameters
-
node the querying node def default context if none is found ctx2 secondary context output
- Returns
- Returned the primary context for selection, and the context is always stored in the first encountered SoFCSelectionRoot in the path. It is keyed using the entire sequence of SoFCSelectionRoot along the path to
node
, replacing the first SoFCSelectionRoot with the given node. -
Secondary context returned in
ctx2
is for customized highlighting, and is not affected by mouse event. The highlight is applied manually using SoSelectionElementAction. It is stored in the last encountered SoFCSelectionRoot, and is keyed using the queryingnode
and (if there are more than one SoFCSelectionRoot along the path) the first SoFCSelectionRoot. The reason is so that any link to a node (new links means additional SoFCSelectionRoot added in front) with customized subelement highlight will also show the highlight. Secondary context can be chained, which why the secondary context type must provide an function called merge() for getRenderContext() to merge the context. See SoFCSelectionContext::merge() for an implementation of merging multiple context.
- Note
- For simplicity reason, currently secondary context is only freed when the storage SoFCSSelectionRoot node is freed.
◆ getRenderContext() [2/2]
|
static |
Referenced by PartGui::SoBrepFaceSet::GLRender().
◆ getSecondaryActionContext()
|
static |
◆ GLRenderBelowPath()
|
virtual |
Reimplemented from Gui::SoFCSeparator.
References renderPrivate().
Referenced by Gui::SoFCPathAnnotation::GLRender(), Gui::SoFCPathAnnotation::GLRenderInPath(), and GLRenderInPath().
◆ GLRenderInPath()
|
virtual |
References GLRenderBelowPath(), and renderPrivate().
Referenced by Gui::SoFCPathAnnotation::GLRender().
◆ handleEvent()
|
virtual |
◆ hasColorOverride()
bool Gui::SoFCSelectionRoot::hasColorOverride | ( | ) | const |
◆ initClass()
|
static |
Referenced by Gui::SoFCDB::init().
◆ moveActionStack()
References ActionStacks.
Referenced by Gui::SoFCPathAnnotation::getBoundingBox().
◆ pick()
|
virtual |
References doActionPrivate().
◆ rayPick()
|
virtual |
References doActionPrivate().
◆ removeActionContext()
◆ removeColorOverride()
void Gui::SoFCSelectionRoot::removeColorOverride | ( | ) |
◆ renderBBox()
|
static |
Referenced by Gui::SoFCPathAnnotation::GLRenderBelowPath().
◆ renderPrivate()
|
protected |
References Gui::ViewParams::instance(), Gui::SoFCSelectionRoot::Stack::nodeSet, and SelStack.
Referenced by GLRenderBelowPath(), and GLRenderInPath().
◆ resetContext()
void SoFCSelectionRoot::resetContext | ( | ) |
References contextMap.
Referenced by doActionPrivate().
◆ search()
|
virtual |
Referenced by importIFClegacy.IfcDocument::find().
◆ setColorOverride()
void Gui::SoFCSelectionRoot::setColorOverride | ( | App::Color | c | ) |
Member Data Documentation
◆ ActionStacks
|
staticprotected |
Referenced by findActionContext(), and moveActionStack().
◆ colorOverride
|
protected |
Referenced by checkColorOverride().
◆ contextMap
|
protected |
Referenced by getNodeContext(), and resetContext().
◆ contextMap2
|
protected |
◆ HlColorStack
|
staticprotected |
Referenced by checkSelection().
◆ overrideColor
|
protected |
◆ SelColorStack
|
staticprotected |
Referenced by checkSelection().
◆ selectionStyle
SoSFEnum Gui::SoFCSelectionRoot::selectionStyle |
Referenced by Gui::View3DInventorViewer::init(), and SoFCSelectionRoot().
◆ SelStack
|
staticprotected |
Referenced by getCurrentRoot(), and renderPrivate().
◆ ShapeColorNode
|
staticprotected |
Referenced by checkColorOverride().
◆ shapeColorPacker
|
protected |
Referenced by checkColorOverride().
◆ transOverride
|
protected |
Referenced by checkColorOverride().
The documentation for this class was generated from the following files:
- src/Gui/SoFCUnifiedSelection.h
- src/Gui/SoFCUnifiedSelection.cpp