HOpObjectAnnotate.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 // HOpObjectAnnotate.h : interface of the HOpObjectAnnotate class
11 //
12 // Draws a polyline in the view plane based on pointer input
13 // Polyline points are stored in protected member variables and ready after
14 // OnLButtonDblClk method has been called.
15 // Derived Classes should call this::OnLButtonDblClk in their overloaded implementation.
16 // Polyline points are in window space.
17 
18 
19 #ifndef _HOPOBJECTANNOTATE_H
20 #define _HOPOBJECTANNOTATE_H
21 
22 #ifdef H_PACK_8
23 #pragma pack(push)
24 #pragma pack(8)
25 #endif
26 
27 #include "HTools.h"
28 #include "HBaseOperator.h"
29 
31 
44 class MVO_API HOpObjectAnnotate : public HBaseOperator
45 {
46 public:
53  HOpObjectAnnotate(HBaseView* view, int DoRepeat=0, int DoCapture=1);
54  virtual ~HOpObjectAnnotate();
55 
59  virtual const char * GetName();
60 
61 
67  virtual HBaseOperator * Clone();
68 
77  static void AnnotateObject(HBaseView *pView,const char *segment, char *AnnotationText, HPoint lineStart,
78  HPoint lineEnd, bool emit_message);
85  static void AnnotateObjectFromMessage(HBaseView *pView, const char *in_data, unsigned int data_length);
86 
94  virtual int OnLButtonDown(HEventInfo &hevent);
95 
101  virtual int OnNoButtonDownAndMove(HEventInfo &hevent);
102 
103 
110  virtual int OnKeyDown(HEventInfo &hevent);
111 
112 protected:
113 
115  void finalize_text();
116 
117 private:
118  char *m_pString;
119  HPoint m_ptLast;
120  char m_sSegment[MVO_BUFFER_SIZE];
121  bool m_bObject;
122  static int m_iPathKeysCount;
123  static HC_KEY *m_pSelectionPath;
124 };
125 
126 #ifdef H_PACK_8
127 #pragma pack(pop)
128 #endif
129 
130 #endif
131 
132 
133 
134 
135 
136 
137 
138 
139 
virtual const char * GetName()
virtual int OnNoButtonDownAndMove(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 HEventInfo class stores and manages event information.
Definition: HEventInfo.h:207
virtual int OnKeyDown(HEventInfo &hevent)
virtual int OnLButtonDown(HEventInfo &hevent)
The HOpObjectAnnotate class provides support for attaching text to an object.
Definition: HOpObjectAnnotate.h:44