1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0031779: Visualization, AIS_ViewController - controller should handle selection schemes

Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
This commit is contained in:
mkrylova
2021-01-22 10:44:42 +03:00
committed by bugmaster
parent 329e5df986
commit e3d4b87912
22 changed files with 101 additions and 66 deletions

View File

@@ -16,6 +16,7 @@
#include <Aspect_ScrollDelta.hxx>
#include <AIS_SelectionScheme.hxx>
#include <Graphic3d_Vec2.hxx>
#include <NCollection_Sequence.hxx>
#include <V3d_TypeOfOrientation.hxx>
@@ -65,12 +66,12 @@ public:
struct _selection
{
AIS_ViewSelectionTool Tool; //!< perform selection
bool IsXOR; //!< perform shift selection
AIS_SelectionScheme Scheme; //!< selection scheme
NCollection_Sequence<Graphic3d_Vec2i>
Points; //!< the points for selection
bool ToApplyTool; //!< apply rubber-band selection tool
_selection() : Tool (AIS_ViewSelectionTool_Picking), IsXOR (false), ToApplyTool (false) {}
_selection() : Tool (AIS_ViewSelectionTool_Picking), Scheme (AIS_SelectionScheme_UNKNOWN), ToApplyTool (false) {}
} Selection;
struct _panningParams