1 #if !defined( OCCVIEWER_AISSELECTOR_H )
2 #define OCCVIEWER_AISSELECTOR_H
7 #include <Quantity_NameOfColor.hxx>
8 #include <AIS_InteractiveContext.hxx>
10 class OCCVIEWER_EXPORT OCCViewer_AISSelector : public QObject
16 OCCViewer_AISSelector( QObject* parent, const Handle (AIS_InteractiveContext)& );
18 ~OCCViewer_AISSelector();
20 // enables/disables selection
21 void enableSelection( bool );
22 // enables/disables multiple selection
23 void enableMultipleSelection( bool );
25 // detects the interactive objects at position (x,y).
26 bool moveTo ( int, int, const Handle (V3d_View)& );
27 // selects the objects covered by the rectangle.
28 bool select ( int, int, int, int, const Handle (V3d_View)& );
29 // adds new selected objects covered by the rectangle to the objects
30 // previously selected.
31 bool shiftSelect ( int, int, int, int, const Handle (V3d_View)& );
32 // selects the detected interactive objects.
34 // adds new selected objects to the objects previously selected.
37 // sets the interactive context for this selector
38 void setAISContext ( const Handle (AIS_InteractiveContext)& );
39 // sets the color to hilight the detected objects
40 void setHilightColor ( Quantity_NameOfColor color );
41 // sets the color to display the selected objects
42 void setSelectColor ( Quantity_NameOfColor color );
45 // checks the status of pick and emits 'selSelectionDone' or 'selSelectionCancel'.
46 bool checkSelection ( AIS_StatusOfPick status, bool hadSelection, bool addTo );
49 // 'selection done' signal
50 void selSelectionDone( bool bAdded );
51 // 'selection cancelled' signal
52 void selSelectionCancel( bool bAdded );
55 Handle (AIS_InteractiveContext) myAISContext; // graphic context
56 Quantity_NameOfColor myHilightColor; // color for hilight object
57 Quantity_NameOfColor mySelectColor; // color for selected object
59 int myNumSelected; // nymber of selected objects
60 bool myEnableSelection; // enable selection flag
61 bool myEnableMultipleSelection; // enable multiple selection flag
64 #endif // OCCVIEWER_AISSELECTOR_H