Gui::SelectionFilterGatePython Class Reference

A Python wrapper around SelectionFilterPy to implement the SelectionGate interface. More...

#include <SelectionFilter.h>

Public Member Functions

bool allow (App::Document *, App::DocumentObject *, const char *)
 
 SelectionFilterGatePython (SelectionFilterPy *obj)
 Constructor. More...
 
virtual ~SelectionFilterGatePython ()
 
- Public Member Functions inherited from Gui::SelectionGate
virtual bool allow (App::Document *, App::DocumentObject *, const char *)=0
 
virtual ~SelectionGate ()
 

Additional Inherited Members

- Public Attributes inherited from Gui::SelectionGate
std::string notAllowedReason
 notAllowedReason is a string that sets the message to be displayed in statusbar for cluing the user on why is the selection not allowed. More...
 

Detailed Description

A Python wrapper around SelectionFilterPy to implement the SelectionGate interface.

class SelectionGate(object):
def allow(self, doc, obj, sub):
if not obj.isDerivedFrom("Part::Feature"):
return False
if not str(sub).startswith("Edge"):
return False
return True
Gui.Selection.addSelectionGate(gate)
Author
Werner Mayer

Constructor & Destructor Documentation

◆ SelectionFilterGatePython()

SelectionFilterGatePython::SelectionFilterGatePython ( SelectionFilterPy obj)

Constructor.

◆ ~SelectionFilterGatePython()

SelectionFilterGatePython::~SelectionFilterGatePython ( )
virtual

Member Function Documentation

◆ allow()

bool SelectionFilterGatePython::allow ( App::Document ,
App::DocumentObject obj,
const char *  sub 
)
virtual

Implements Gui::SelectionGate.


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