Gui::SelectionObserver Class Referenceabstract

The SelectionObserver class simplifies the step to write classes that listen to what happens to the selection. More...

#include <Selection.h>

Public Member Functions

void attachSelection ()
 Attaches to the selection. More...
 
bool blockSelection (bool block)
 
void detachSelection ()
 Detaches from the selection. More...
 
bool isSelectionAttached () const
 
bool isSelectionBlocked () const
 
 SelectionObserver (bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement)
 Constructor. More...
 
 SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement)
 Constructor. More...
 
virtual ~SelectionObserver ()
 

Detailed Description

The SelectionObserver class simplifies the step to write classes that listen to what happens to the selection.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ SelectionObserver() [1/2]

SelectionObserver::SelectionObserver ( bool  attach = true,
ResolveMode  resolve = ResolveMode::OldStyleElement 
)

Constructor.

Parameters
attachwhether to attach this observer on construction
resolvesub-object resolving mode. 0 no resolve, 1 resolve sub-object with old style element name 2 resolve sub-object with new style element name

References attachSelection().

◆ SelectionObserver() [2/2]

SelectionObserver::SelectionObserver ( const Gui::ViewProviderDocumentObject vp,
bool  attach = true,
ResolveMode  resolve = ResolveMode::OldStyleElement 
)

Constructor.

Parameters
vpfiltering view object.
attachwhether to attach this observer on construction
resolvesub-object resolving mode. 0 no resolve, 1 resolve sub-object with old style element name 2 resolve sub-object with new style element name

Constructs an selection observer that receives only selection event of objects within the same document as the input view object.

References attachSelection(), App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().

◆ ~SelectionObserver()

SelectionObserver::~SelectionObserver ( )
virtual

References detachSelection().

Member Function Documentation

◆ attachSelection()

◆ blockSelection()

◆ detachSelection()

◆ isSelectionAttached()

◆ isSelectionBlocked()

bool SelectionObserver::isSelectionBlocked ( ) const

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