0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / Viewer2dTest / Viewer2dTest_EventManager.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18
19#include <Viewer2dTest_EventManager.ixx>
20#include <AIS2D_InteractiveContext.hxx>
21
22Viewer2dTest_EventManager::Viewer2dTest_EventManager (const Handle(AIS2D_InteractiveContext)& Ctx)
23 : myCtx(Ctx)
24{
25}
26
27const Handle(AIS2D_InteractiveContext)& Viewer2dTest_EventManager::Context() const
28{
29 return myCtx;
30}
31
32void Viewer2dTest_EventManager::MoveTo(const Standard_Integer XPix,
33 const Standard_Integer YPix,
34 const Handle(V2d_View)& aView)
35{
36 if (!myCtx.IsNull())
37 myCtx->MoveTo(XPix,YPix,aView);
38}
39
40void Viewer2dTest_EventManager::Select(const Standard_Integer /*XPMin*/,
41 const Standard_Integer /*YPMin*/,
42 const Standard_Integer /*XPMax*/,
43 const Standard_Integer /*YPMax*/,
44 const Handle(V2d_View)& /*aView*/)
45{
46 cout << "Selection by rectangle is not yet implemented" << endl;
47// if (!myCtx.IsNull())
48// myCtx->Select(XPMin,YPMin,XPMax,YPMax,aView);
49}
50
51void Viewer2dTest_EventManager::ShiftSelect(const Standard_Integer XPMin,
52 const Standard_Integer YPMin,
53 const Standard_Integer XPMax,
54 const Standard_Integer YPMax,
55 const Handle(V2d_View)& aView)
56{
57 if (!myCtx.IsNull())
58 myCtx->ShiftSelect(XPMin,YPMin,XPMax,YPMax,aView,Standard_True);
59}
60
61void Viewer2dTest_EventManager::Select()
62{
63 if (!myCtx.IsNull())
64 myCtx->Select();
65}
66
67void Viewer2dTest_EventManager::ShiftSelect()
68{
69 if (!myCtx.IsNull())
70 myCtx->ShiftSelect(Standard_True);
71}