HOpConstructRectangle.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 // HOpConstructRectangle.h : interface of the HOpConstruction class
11 // draws a 2D box in view port based on pointer first position and last position
12 // Derived classes access the Points for the rectangle in HBaseOperator members
13 // m_ptFirst and m_ptLast; Points are stored in window space.
14 
15 
16 #ifndef _HOPCONSTRUCTRECTANGLE_H
17 #define _HOPCONSTRUCTRECTANGLE_H
18 
19 #ifdef H_PACK_8
20 #pragma pack(push)
21 #pragma pack(8)
22 #endif
23 
24 #include "HTools.h"
25 #include "HBaseOperator.h"
26 
28 
39 class MVO_API HOpConstructRectangle : public HBaseOperator
40 {
41 public:
50  HOpConstructRectangle(HBaseView* view, int DoRepeat=0, int DoCapture=1, bool UseCenterMarker=true);
51  virtual ~HOpConstructRectangle();
52 
53 
57  virtual const char * GetName();
58 
64  virtual HBaseOperator * Clone();
65 
66 
67 
73  virtual int OnLButtonDown(HEventInfo &hevent);
74 
82  virtual int OnLButtonDownAndMove(HEventInfo &hevent);
83 
89  virtual int OnLButtonUp(HEventInfo &hevent);
95  virtual int OnRButtonUp(HEventInfo &hevent);
96 
97 protected:
98 
100  HPoint m_ptRectangle[2];
101  char m_pSavedVisibility[MVO_BUFFER_SIZE];
102  char m_pSavedColor[MVO_BUFFER_SIZE];
103 
104 private:
105  bool m_bUseCenterMarker;
106 };
107 
108 #ifdef H_PACK_8
109 #pragma pack(pop)
110 #endif
111 
112 #endif
113 
114 
115 
116 
virtual int OnLButtonDownAndMove(HEventInfo &hevent)
virtual const char * GetName()
virtual int OnLButtonUp(HEventInfo &hevent)
bool m_bRectangleExists
Definition: HOpConstructRectangle.h:99
virtual int OnRButtonUp(HEventInfo &hevent)
virtual HBaseOperator * Clone()
The HBaseOperator class serves as a base for classes which handle user input and operate on the scene...
Definition: HBaseOperator.h:60
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:121
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
The HOpConstructRectangle class draws a rectangle.
Definition: HOpConstructRectangle.h:39
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
virtual int OnLButtonDown(HEventInfo &hevent)