#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 | |
virtual void | GLRenderBelowPath (SoGLRenderAction *action) |
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 = 0.0f |
Static Protected Attributes | |
static std::unordered_map< SoAction *, Stack > | ActionStacks |
static ColorStack | HlColorStack |
static ColorStack | SelColorStack |
static Stack | SelStack |
static SoFCSelectionRoot * | ShapeColorNode |
|
protected |
|
protected |
|
protected |
SoFCSelectionRoot::SoFCSelectionRoot | ( | bool | trackCacheMode = false | ) |
References Box, Full, PassThrough, and selectionStyle.
|
protectedvirtual |
|
virtual |
Referenced by qtunittest.GUITestResult::addError(), Mod.Test.unittestgui.GUITestResult::addError(), qtunittest.GUITestResult::addFailure(), Mod.Test.unittestgui.GUITestResult::addFailure(), ArchStructure.StructSelectionObserver::addSelection(), PathScripts.PathCamoticsGui.CamoticsSimulation::execute(), qtunittest.GUITestResult::startTest(), Mod.Test.unittestgui.GUITestResult::startTest(), qtunittest.GUITestResult::stopTest(), and Mod.Test.unittestgui.GUITestResult::stopTest().
|
static |
References colorOverride, ShapeColorNode, shapeColorPacker, and transOverride.
|
static |
References HlColorStack, and SelColorStack.
Referenced by draftguitools.gui_selectplane.Draft_SelectPlane::action(), Gui::SoFCSelectionContext::checkGlobal(), and Gui::SoFCPathAnnotation::GLRenderBelowPath().
|
virtual |
References 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().
|
staticprotected |
References ActionStacks, and femsolver.elmer.equations.elasticity::create().
|
static |
Referenced by drafttaskpanels.task_circulararray.TaskPanelCircularArray::accept(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::accept(), drafttaskpanels.task_polararray.TaskPanelPolarArray::accept(), draftguitools.gui_arcs.Arc::action(), draftguitools.gui_beziers.BezCurve::action(), draftguitools.gui_beziers.CubicBezCurve::action(), draftguitools.gui_dimensions.Dimension::action(), draftguitools.gui_ellipses.Ellipse::action(), draftguitools.gui_fillets.Fillet::action(), draftguitools.gui_labels.Label::action(), draftguitools.gui_lines.Line::action(), draftguitools.gui_mirror.Mirror::action(), draftguitools.gui_move.Move::action(), draftguitools.gui_offset.Offset::action(), draftguitools.gui_polygons.Polygon::action(), draftguitools.gui_rectangles.Rectangle::action(), draftguitools.gui_rotate.Rotate::action(), draftguitools.gui_scale.Scale::action(), draftguitools.gui_selectplane.Draft_SelectPlane::action(), draftguitools.gui_shapestrings.ShapeString::action(), draftguitools.gui_splines.BSpline::action(), draftguitools.gui_split.Split::action(), draftguitools.gui_stretch.Stretch::action(), draftguitools.gui_texts.Text::action(), draftguitools.gui_trimex.Trimex::action(), draftguitools.gui_subelements.SubelementHighlight::action(), draftguitools.gui_clone.Clone::Activated(), draftguitools.gui_dimensions.Dimension::Activated(), draftguitools.gui_downgrade.Downgrade::Activated(), draftguitools.gui_draft2sketch.Draft2Sketch::Activated(), draftguitools.gui_edit.Edit::Activated(), draftguitools.gui_facebinders.Facebinder::Activated(), draftguitools.gui_join.Join::Activated(), draftguitools.gui_shape2dview.Shape2DView::Activated(), draftguitools.gui_subelements.SubelementHighlight::Activated(), draftguitools.gui_upgrade.Upgrade::Activated(), draftguitools.gui_wire2spline.WireToBSpline::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_shapestrings.ShapeString::createObject(), draftguitools.gui_texts.Text::createObject(), draftviewproviders.view_text.ViewProviderText::createObject(), draftguitools.gui_stretch.Stretch::doStretch(), draftguitools.gui_arcs.Arc::drawArc(), draftguitools.gui_polygons.Polygon::drawPolygon(), DraftGui.DraftToolBar::escape(), Gui::SoFCDB::finish(), draftguitools.gui_move.Move::get_object_selection(), draftguitools.gui_rotate.Rotate::get_object_selection(), draftguitools.gui_scale.Scale::get_object_selection(), draftguitools.gui_arcs.Arc_3Points::getPoint(), draftguitools.gui_edit.Edit::keyPressed(), draftguitools.gui_dimensions.Dimension::numericInput(), draftguitools.gui_trimex.Trimex::numericRadius(), draftguitools.gui_fillets.Fillet::numericRadius(), draftguitools.gui_offset.Offset::numericRadius(), draftguitools.gui_rotate.Rotate::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_array_simple.Array::proceed(), draftguitools.gui_clone.Clone::proceed(), draftguitools.gui_downgrade.Downgrade::proceed(), draftguitools.gui_draft2sketch.Draft2Sketch::proceed(), draftguitools.gui_edit.Edit::proceed(), draftguitools.gui_facebinders.Facebinder::proceed(), draftguitools.gui_join.Join::proceed(), draftguitools.gui_patharray.PathArray::proceed(), draftguitools.gui_pathtwistedarray.PathTwistedArray::proceed(), draftguitools.gui_pointarray.PointArray::proceed(), draftguitools.gui_shape2dview.Shape2DView::proceed(), draftguitools.gui_subelements.SubelementHighlight::proceed(), draftguitools.gui_trimex.Trimex::proceed(), draftguitools.gui_upgrade.Upgrade::proceed(), draftguitools.gui_split.Split::proceed(), draftguitools.gui_selectplane.Draft_SelectPlane::reject(), drafttaskpanels.task_circulararray.TaskPanelCircularArray::reject(), drafttaskpanels.task_orthoarray.TaskPanelOrthoArray::reject(), drafttaskpanels.task_polararray.TaskPanelPolarArray::reject(), and draftguitools.gui_edit.Edit::setTrackers().
|
static |
Get the selection context for an action.
action | the action. SoSelectionElementAction has any option to query for secondary context. |
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 |
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 Gui::SoFCSelection::doAction(), PartGui::SoBrepEdgeSet::doAction(), PartGui::SoBrepFaceSet::doAction(), PartGui::SoBrepPointSet::doAction(), and doActionPrivate().
|
virtual |
References doActionPrivate().
|
virtual |
References doActionPrivate().
|
staticprotected |
References contextMap.
|
staticprotected |
Referenced by doActionPrivate().
|
virtual |
|
static |
Returns selection context for rendering.
node | the querying node |
def | default context if none is found |
ctx2 | secondary context output |
node
, replacing the first SoFCSelectionRoot with the given node.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 querying node
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.
|
static |
Referenced by PartGui::SoBrepFaceSet::GLRender().
|
static |
|
virtual |
Reimplemented from Gui::SoFCSeparator.
References renderPrivate().
Referenced by Gui::SoFCPathAnnotation::GLRender(), Gui::SoFCPathAnnotation::GLRenderInPath(), and GLRenderInPath().
|
virtual |
References GLRenderBelowPath(), and renderPrivate().
Referenced by Gui::SoFCPathAnnotation::GLRender().
|
virtual |
bool Gui::SoFCSelectionRoot::hasColorOverride | ( | ) | const |
|
static |
Referenced by Gui::SoFCDB::init().
References ActionStacks.
Referenced by Gui::SoFCPathAnnotation::getBoundingBox().
|
virtual |
References doActionPrivate().
|
virtual |
References doActionPrivate().
void Gui::SoFCSelectionRoot::removeColorOverride | ( | ) |
|
static |
Referenced by Gui::SoFCPathAnnotation::GLRenderBelowPath().
|
protected |
References Gui::ViewParams::instance(), Gui::SoFCSelectionRoot::Stack::nodeSet, and SelStack.
Referenced by GLRenderBelowPath(), and GLRenderInPath().
void SoFCSelectionRoot::resetContext | ( | ) |
References contextMap.
Referenced by doActionPrivate().
|
virtual |
Referenced by importIFClegacy.IfcDocument::find().
void Gui::SoFCSelectionRoot::setColorOverride | ( | App::Color | c | ) |
|
staticprotected |
Referenced by findActionContext(), and moveActionStack().
|
protected |
Referenced by checkColorOverride().
|
protected |
Referenced by getNodeContext(), and resetContext().
|
protected |
|
staticprotected |
Referenced by checkSelection().
|
protected |
|
staticprotected |
Referenced by checkSelection().
SoSFEnum Gui::SoFCSelectionRoot::selectionStyle |
Referenced by Gui::View3DInventorViewer::init(), and SoFCSelectionRoot().
|
staticprotected |
Referenced by getCurrentRoot(), and renderPrivate().
|
staticprotected |
Referenced by checkColorOverride().
|
protected |
Referenced by checkColorOverride().
|
protected |
Referenced by checkColorOverride().