Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HBaseOperator.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: ec4e2aa7f33151875bd1d3e2fdc320bd37ee309e $
13 //
14 
18 #ifndef _HBASEOPERATOR_H
19 #define _HBASEOPERATOR_H
20 
21 
22 #ifdef H_PACK_8
23 #pragma pack(push)
24 #pragma pack(8)
25 #endif
26 
27 #include "HTools.h"
28 #include "HBaseModel.h"
29 #include "HUtility.h"
30 #include "HEventListener.h"
31 
32 
34 #define EPSILON 0.00001F
35 
36 class HDB;
37 class HBaseModel;
38 class HBaseView;
39 class HEventInfo;
40 class HMouseListener;
41 
46 {
51 };
52 
54 
65 class MVO_API HBaseOperator : public HMouseListener
66 {
67 protected:
72  bool m_bOpStarted;
73  int m_doRepeat;
75 
78 
80 
82 
85  bool IsSpecialKey( HC_KEY key );
86 
89 
90 public:
91  int Repeat() { return(m_doRepeat); }
92  int Capture() { return(m_doCapture); }
93 
94 
100  virtual HBaseOperator * Clone();
101 
102  void SetFirstPoint( HPoint const& new_point ) { m_ptFirst = new_point; }
103  HPoint const GetFirstPoint( void ) { return m_ptFirst; }
104 
105  void SetNewPoint( HPoint const& new_point ) { m_ptNew = new_point; }
106  HPoint const GetNewPoint( void ) { return m_ptNew; }
107 
108  HBaseView * GetView( void ) { return m_pView; }
109  void SetView(HBaseView* new_view) { m_pView = new_view; }
110 
111  virtual bool OperatorStarted() { return m_bOpStarted; }
112  void SetOperatorStarted( bool val ) { m_bOpStarted = val; }
113 
114  void SetMapTouchesToMouseEvents(bool val) { m_bMapTouchesToMouseEvents = val; }
115 
122  HBaseOperator(HBaseView* view, int DoRepeat=0, int DoCapture=1);
123  virtual ~HBaseOperator();
124 
125 
139  virtual int OnMouseMove(HEventInfo &hevent);
140 
141 
144  virtual const char * GetName();
145 
146  // event methods; these will be overloaded by derived classes
147 
155  virtual int OnLButtonDown(HEventInfo &hevent);
156 
164  virtual int OnLButtonUp(HEventInfo &hevent);
165 
173  virtual int OnLButtonDblClk(HEventInfo &hevent);
174 
175 
183  virtual int OnLButtonDownAndMove(HEventInfo &hevent);
184 
185 
193  virtual int OnMButtonDown(HEventInfo &hevent);
194 
202  virtual int OnMButtonUp(HEventInfo &hevent);
203 
211  virtual int OnMButtonDblClk(HEventInfo &hevent);
212 
220  virtual int OnMButtonDownAndMove(HEventInfo &hevent);
221 
222 
230  virtual int OnRButtonDown(HEventInfo &hevent);
231 
239  virtual int OnRButtonUp(HEventInfo &hevent);
240 
248  virtual int OnRButtonDblClk(HEventInfo &hevent);
249 
257  virtual int OnRButtonDownAndMove(HEventInfo &hevent);
258 
266  virtual int OnLRButtonDownAndMove(HEventInfo &hevent);
267 
275  virtual int OnNoButtonDownAndMove(HEventInfo &hevent);
276 
284  virtual int OnTimer(HEventInfo &hevent);
285 
293  virtual int OnKeyDown(HEventInfo &hevent);
294 
302  virtual int OnKeyUp(HEventInfo &hevent);
303 
311  virtual int OnMouseWheel(HEventInfo &hevent);
312 
313 
321  virtual int OnTouchesDown(HEventInfo &hevent);
322 
330  virtual int OnTouchesMove(HEventInfo &hevent);
331 
339  virtual int OnTouchesUp(HEventInfo &hevent);
340 
341 
342 
343 
344 };
345 
347 
348 #ifdef H_PACK_8
349 #pragma pack(pop)
350 #endif
351 
352 #endif
HPoint m_ptFirst
Initial selection point.
Definition: HBaseOperator.h:76
Event handler is ready for processing.
Definition: HBaseOperator.h:50
HPoint const GetNewPoint(void)
Returns the current selection point.
Definition: HBaseOperator.h:106
HPoint const GetFirstPoint(void)
Returns the initial selection point.
Definition: HBaseOperator.h:103
HBaseView * m_pView
The HOOPS view corresponding to this operator.
Definition: HBaseOperator.h:79
virtual bool OperatorStarted()
Operator has been started if true, and has not been started if false.
Definition: HBaseOperator.h:111
void SetView(HBaseView *new_view)
Sets the view that this operator is associated with.
Definition: HBaseOperator.h:109
bool m_bOpStarted
Indicates whether the operator has already 'started'.
Definition: HBaseOperator.h:72
HCutGeometryVisibility m_TempCutGeometryVisibility
stores original cut geometry visibility
Definition: HBaseOperator.h:88
int m_doRepeat
Integer indicating if the operator is repeatable . This parameter has been deprecated.
Definition: HBaseOperator.h:73
HPoint m_ptNew
Current selection point.
Definition: HBaseOperator.h:77
HShadowMode m_TempShadowMode
stores original shadow mode
Definition: HBaseOperator.h:87
HCutGeometryVisibility
Definition: HGlobals.h:107
void SetFirstPoint(HPoint const &new_point)
Sets the initial selection point.
Definition: HBaseOperator.h:102
int Repeat()
Returns whether the operation is repeatable. This method has been deprecated.
Definition: HBaseOperator.h:91
void SetMapTouchesToMouseEvents(bool val)
Touch Events are mapped to mouse events if true, and are not if false.
Definition: HBaseOperator.h:114
The HDB class serves as a wrapper/utility class to manage an instance of the HOOPS/3dGS scene-graph...
Definition: HDB.h:38
void SetOperatorStarted(bool val)
Operator has been started if true, and has not been started if false.
Definition: HBaseOperator.h:112
The event has been handled.
Definition: HBaseOperator.h:47
The HBaseModel class is used to store and manage model information.
Definition: HBaseModel.h:52
The HBaseOperator class serves as a base for classes which handle user input and operate on the scene...
Definition: HBaseOperator.h:65
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:126
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:337
int Capture()
Returns whether we are currently in mouse capture mode. See this class' constructor for a more detail...
Definition: HBaseOperator.h:92
void SetNewPoint(HPoint const &new_point)
Sets the current selection point.
Definition: HBaseOperator.h:105
int m_doCapture
Integer indicating whether to capture mouse on button down and release on button up. This parameter has been deprecated.
Definition: HBaseOperator.h:74
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:214
HShadowMode
Definition: HGlobals.h:97
HOperatorReturn
Definition: HBaseOperator.h:45
HBaseView * GetView(void)
Returns a pointer to the view that this operator is associated with.
Definition: HBaseOperator.h:108
Processing was aborted.
Definition: HBaseOperator.h:49
bool m_bMapTouchesToMouseEvents
Indicates if touch events are mapped to mouse events.
Definition: HBaseOperator.h:81
The event has not been handled.
Definition: HBaseOperator.h:48