mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
150 lines
4.6 KiB
C++
Executable File
150 lines
4.6 KiB
C++
Executable File
// File generated by CPPExt (Transient)
|
|
//
|
|
// Copyright (C) 1991,1995 by
|
|
//
|
|
// MATRA DATAVISION, FRANCE
|
|
//
|
|
// This software is furnished in accordance with the terms and conditions
|
|
// of the contract and with the inclusion of the above copyright notice.
|
|
// This software or any other copy thereof may not be provided or otherwise
|
|
// be made available to any other person. No title to an ownership of the
|
|
// software is hereby transferred.
|
|
//
|
|
// At the termination of the contract, the software and all copies of this
|
|
// software must be deleted.
|
|
//
|
|
#ifndef _ISession2D_InteractiveContext_HeaderFile
|
|
#define _ISession2D_InteractiveContext_HeaderFile
|
|
|
|
#include <Standard_Macro.hxx>
|
|
#include <Standard_DefineHandle.hxx>
|
|
|
|
#include "SelectMgr_SelectableObject.hxx"
|
|
#include "AIS_InteractiveObject.hxx"
|
|
#include <Select2D_Projector.hxx>
|
|
#include <TColStd_MapOfTransient.hxx>
|
|
#include <StdSelect_ViewerSelector2d.hxx>
|
|
|
|
DEFINE_STANDARD_HANDLE(ISession2D_InteractiveContext,MMgt_TShared)
|
|
class ISession2D_InteractiveContext : public MMgt_TShared {
|
|
|
|
public:
|
|
|
|
// Methods PUBLIC
|
|
//
|
|
Standard_EXPORT ISession2D_InteractiveContext();
|
|
Standard_EXPORT ISession2D_InteractiveContext(const Handle(V2d_Viewer)& aViewer);
|
|
virtual void Initialize(const Handle(V2d_Viewer)& aViewer) ;
|
|
|
|
Standard_EXPORT virtual void Display (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True) ;
|
|
Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Integer aDisplayMode,
|
|
const Standard_Integer aSelectionMode,
|
|
const Standard_Boolean Redraw );
|
|
virtual void Erase (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True) ;
|
|
|
|
virtual void DisplayAll(const Standard_Boolean Redraw = Standard_True);
|
|
virtual void EraseAll (const Standard_Boolean Redraw = Standard_True);
|
|
|
|
|
|
virtual Standard_Boolean IsDisplayed(const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Integer aMode = -1) ;
|
|
|
|
virtual void Redisplay(const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True,
|
|
const Standard_Boolean allmodes =Standard_False);
|
|
|
|
|
|
virtual void Clear (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True);
|
|
|
|
|
|
virtual void Remove (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True);
|
|
|
|
virtual void Highlight (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True);
|
|
|
|
virtual void Unhighlight (const Handle(AIS_InteractiveObject)& anObject,
|
|
const Standard_Boolean Redraw = Standard_True);
|
|
|
|
|
|
virtual Standard_Boolean IsHilighted(const Handle(AIS_InteractiveObject)& anObject);
|
|
|
|
private :
|
|
Standard_Boolean NewProjector(const Handle(V2d_View)& aView,
|
|
Handle(Select2D_Projector)& NewProjector); // out parameter.
|
|
void ManageDetected(TColStd_MapOfTransient& NewMapOfDetectedOwner);
|
|
public:
|
|
virtual void Move(const Standard_Integer x1,
|
|
const Standard_Integer y1,
|
|
const Handle(V2d_View)& aView) ;
|
|
virtual void Move(const Standard_Integer x1,
|
|
const Standard_Integer y1,
|
|
const Standard_Integer x2,
|
|
const Standard_Integer y2,
|
|
const Handle(V2d_View)& aView) ;
|
|
|
|
virtual void Pick(const Standard_Boolean MultiSelection = Standard_False);
|
|
|
|
private :
|
|
Standard_Boolean IsAreasDisplayed;
|
|
public :
|
|
void DisplayAreas() ;
|
|
void ClearAreas() ;
|
|
|
|
|
|
DEFINE_STANDARD_RTTI(ISession2D_InteractiveContext)
|
|
|
|
protected:
|
|
|
|
// Methods PROTECTED
|
|
//
|
|
|
|
|
|
// Fields PROTECTED
|
|
//
|
|
|
|
|
|
private:
|
|
|
|
// Methods PRIVATE
|
|
//
|
|
|
|
|
|
// Fields PRIVATE
|
|
//
|
|
|
|
Handle(V2d_Viewer) myViewer;
|
|
Handle(PrsMgr_PresentationManager2d) myPrsmgr;
|
|
|
|
TColStd_MapOfTransient myObjects;
|
|
|
|
|
|
|
|
Standard_Integer myHilightColorIndex;
|
|
Handle(SelectMgr_SelectionManager) mySelectionManager;
|
|
Handle(StdSelect_ViewerSelector2d) mySelector;
|
|
|
|
TColStd_MapOfTransient myMapOfDetectedOwner;
|
|
TColStd_MapOfTransient myMapOfSelectedOwner;
|
|
|
|
|
|
|
|
static void GetDefModes(const Handle(AIS_InteractiveObject)& anObject,
|
|
Standard_Integer& DispMode,
|
|
Standard_Integer& HiMode,
|
|
Standard_Integer& SelMode) ;
|
|
|
|
|
|
};
|
|
|
|
|
|
// other inline functions and methods (like "C++: function call" methods)
|
|
//
|
|
|
|
|
|
#endif
|