27 #ifndef GLVIEWER_CONTEXT_H
28 #define GLVIEWER_CONTEXT_H
39 #include <Quantity_NameOfColor.hxx>
40 #include <Quantity_Color.hxx>
43 #include <OpenGL/gl.h>
51 #pragma warning( disable:4251 )
77 int MoveTo(
int x,
int y,
bool byCircle =
false );
82 int Select(
bool Append =
false,
bool byCircle =
false );
88 int SelectByRect(
const QRect& theRect,
bool Append =
false );
91 void SetHighlightColor( Quantity_NameOfColor aCol );
93 void SetSelectionColor( Quantity_NameOfColor aCol );
119 int insertObject(
GLViewer_Object* theObject,
bool display =
false,
bool isActive =
true );
126 void updateScales( GLfloat theX, GLfloat theY );
135 {
return isActive ? myActiveObjects : myInactiveObjects; }
141 void clearHighlighted(
bool updateViewer );
143 void clearSelected(
bool updateViewer );
155 void eraseObject(
GLViewer_Object* theObject,
bool updateViewer =
true );
157 void deleteObject(
GLViewer_Object* theObject,
bool updateViewer =
true );
208 #pragma warning ( default:4251 )
#define GLVIEWER_API
Macro for exports.
Definition: GLViewer.h:37
QList< GLViewer_Object * > ObjList
Definition: GLViewer_Defs.h:62
Definition: GLViewer_Context.h:58
GLfloat myXhigh
X coordinate of mouse cursor.
Definition: GLViewer_Context.h:191
bool isUpdateAll() const
Returns update flag in highlighting technology.
Definition: GLViewer_Context.h:68
int mySelCurIndex
Selected object iterator.
Definition: GLViewer_Context.h:188
ObjList myActiveObjects
List of active object.
Definition: GLViewer_Context.h:180
GLfloat myYhigh
Y coordinate of mouse cursor.
Definition: GLViewer_Context.h:193
GLViewer_Object * getFirstObject()
Returns first active object.
Definition: GLViewer_Context.h:138
Quantity_NameOfColor myHighlightColor
Color for highlight.
Definition: GLViewer_Context.h:196
bool myUpdateAll
Flag of updating viewer after highlight.
Definition: GLViewer_Context.h:170
GLboolean mySFlag
If = false - select method is not any select.
Definition: GLViewer_Context.h:202
Quantity_NameOfColor mySelectionColor
Color for selection.
Definition: GLViewer_Context.h:198
ObjList mySelectedObjects
List of selected objects.
Definition: GLViewer_Context.h:186
GLboolean myHFlag
If = false - moveTo method is not any highlighting.
Definition: GLViewer_Context.h:200
GLViewer_Object * myLastPicked
Highlighted object.
Definition: GLViewer_Context.h:174
int myTolerance
Tolerance in window pixels for highlghting and selection methods.
Definition: GLViewer_Context.h:204
Quantity_NameOfColor SelectionColor()
Returns select color.
Definition: GLViewer_Context.h:97
const ObjList & getObjects(bool isActive=true)
Returns list of context objects.
Definition: GLViewer_Context.h:134
GLViewer_Viewer2d * myGLViewer2d
Definition: GLViewer_Context.h:172
void setTolerance(int tol)
A function installing tolerance in window pixels for highlghting and selection methods.
Definition: GLViewer_Context.h:128
bool currentObjectIsChanged()
Returns true if after last MoveTo method calling highlight object is changed.
Definition: GLViewer_Context.h:152
void setUpdateAll(bool on)
A function installing update flag in highlighting technology.
Definition: GLViewer_Context.h:66
ObjList myInactiveObjects
List of inactive object.
Definition: GLViewer_Context.h:183
bool myLastPickedChanged
= true if after last MoveTo method calling highlight object is changed
Definition: GLViewer_Context.h:176
GLViewer_Object * getCurrentObject()
Returns highlighted object.
Definition: GLViewer_Context.h:150
Quantity_NameOfColor HighlightColor()
Returns highlight color.
Definition: GLViewer_Context.h:95
Definition: GLViewer_Object.h:65
Definition: GLViewer_Viewer2d.h:76