Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HUtilitySubwindow2.h
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: f964860501dfc3dd2b67f06f61fe9c7f71512729 $
13 //
18 #ifndef _H_HUtilitySubwindow2_H
19 #define _H_HUtilitySubwindow2_H
20 
21 #ifdef H_PACK_8
22 #pragma pack(push)
23 #pragma pack(8)
24 #endif
25 
26 #include "HTools.h"
27 #include "HEventListener.h"
28 #include "HBaseOperator.h"
29 #include "HEventManager.h"
30 
31 
32 #define SUBWINDOW_NOTYPE 0
33 
34 
35 #define SW_ACTION_NOACTION 0
36 #define SW_ACTION_MOVE 1
37 #define SW_ACTION_SIZING 2
38 #define SW_ACTION_DRAGGING 5
39 #define SW_ACTION_SCROLLING 6
40 
41 #define SW_BORDER 1
42 #define SW_SIZE_FIELD 2
43 #define SW_MOVE_FIELD 4
44 #define SW_DRAG_FIELD 8
45 #define SW_DELETE_FIELD 16
46 #define SW_SCROLL_FIELD 32
47 #define SW_BACKGROUND_BOX 64
48 
49 
50 class HBaseView;
51 
52 
54 class MVO_API HSubwindow2 : public HObject, public HBaseOperator, public HUpdateListener, public HFitWorldListener, public HObjectManipulationListener
60 {
61 
62 public:
63 
71  HSubwindow2 (HBaseView* view, int DoRepeat=0, int DoCapture=1);
75  HSubwindow2 ();
76  virtual ~HSubwindow2();
77 
78 
89  virtual void Insert(float left, float right, float bottom, float top, char *title = 0, float minwidth = 0, float minheight = 0,int type = SUBWINDOW_NOTYPE,long appearance =
91 
96  virtual void Reset();
97 
98 
102  virtual bool IsActive();
103 
108  virtual void GetFromKey(HC_KEY key);
109 
114  virtual bool IsSubwindow(HC_KEY key);
115 
123  virtual bool FindSubwindow(HBaseView *view, HPoint pos, bool &pointerselected);
124 
130  virtual HC_KEY FindSubwindowFromSegment(HC_KEY key);
131 
137  virtual void GetPosition(float &x,float &y);
138 
144  virtual void SetPosition(float x,float y);
145 
146 
150  virtual HC_KEY GetWindowKey();
151 
157  virtual void GetSize(float &x,float &y);
158 
164  virtual void SetSize(float deltax, float deltay);
165 
166 
167 
173  virtual void ConvertFromSubwindowToView(HPoint &in_point, HPoint &out_point);
174 
180  virtual void ConvertFromViewToSubwindow(HPoint const & in_point, HPoint & out_point);
181 
182 
189  virtual void ChangeType(int type, long appearance = SW_BORDER | SW_SIZE_FIELD | SW_MOVE_FIELD | SW_DRAG_FIELD | SW_DELETE_FIELD | SW_BACKGROUND_BOX);
190 
191 
192 
200  virtual void SetSize(float left, float right, float bottom, float top);
201 
211  virtual void ComputeCoordinates(HBaseView *view, const char *in_system, HPoint &from, const char *out_system, HPoint &to);
212 
213 
214 
215 
220  virtual int GetType() { return m_Type; }
221 
226  virtual HC_KEY GetKey() { return m_OuterKey; }
227 
231  virtual const char * GetName();
235  static const char * GetStaticName();
236 
243  virtual int OnLButtonDown (HEventInfo &hevent);
250  virtual int OnLButtonUp (HEventInfo &hevent);
251 
258  virtual int PreFitWorldEvent(HBaseView *view);
259 
266  virtual int PostFitWorldEvent(HBaseView *view);
267 
268 
277  virtual int OnLButtonDownAndMove(HEventInfo &hevent);
278 
286  virtual int SetupHandlesEvent(HBaseView *view, HC_KEY key, bool complex);
287 
295  virtual int ObjectMovedEvent(HBaseView *view, HC_KEY key, HPoint *p);
303  virtual int ObjectScaledEvent(HBaseView *view, HC_KEY key, HPoint &scale);
304 
305  virtual void DrawScrollBox();
306 
307 
308 protected:
309 
313  void GetParameters();
319  bool IsInSizeArea(HPoint &point);
320  bool IsInScrollArea(HPoint &point);
321 
327  bool IsInMagnifyArea(HPoint &point);
332  void CopyViewLight(HBaseView *view);
337  void BuildMagnifyController(float pos);
338 
339 
345  void ChangeMagnification(HBaseView *view, HPoint & p);
350  void Magnify(HBaseView *view);
351 
357  bool IsInCloseArea(HPoint &point);
363  bool IsInDragArea(HPoint &point);
364 
368  void BuildBorder();
374  bool IsInMoveArea(HPoint &point);
380  void ChangeMagnification(HBaseView *view, float magnification);
381 
382 
383  virtual void UpdateContent();
384 
389  float m_Left;
390  float m_Right;
391  float m_Bottom;
392  float m_Top;
394  int m_Type;
397  int m_Action;
399  char m_title[256];
400  int m_ScrollHeight;
401  int m_ScrollPos;
402  float m_MinWidth;
403  float m_MinHeight;
404 };
405 
406 
407 
408 
409 class MVO_API HTexturePickerWindow : public HSubwindow2
410 {
411 
412 public:
413  HTexturePickerWindow(HBaseView* view, int DoRepeat=0, int DoCapture=1);
415 
416  virtual void UpdateContent();
417  virtual int OnLButtonDown (HEventInfo &hevent);
418  virtual int OnLButtonUp (HEventInfo &hevent);
419  virtual int OnLButtonDownAndMove (HEventInfo &hevent);
420 
421 
422 };
423 
424 #ifdef H_PACK_8
425 #pragma pack(pop)
426 #endif
427 
428 #endif
429 
430 
431 
432 
433 
434 
435 
436 
437 
HPoint m_Pointer
Definition: HUtilitySubwindow2.h:396
virtual int OnLButtonDownAndMove(HEventInfo &hevent)
virtual const char * GetName()
The HObject is the base class for generic MVO objects.
Definition: HEventManager.h:121
virtual int OnLButtonUp(HEventInfo &hevent)
long m_Appearance
Definition: HUtilitySubwindow2.h:395
virtual int OnLButtonUp(HEventInfo &hevent)
#define HC_KEY
virtual int OnLButtonDownAndMove(HEventInfo &hevent)
#define SW_BACKGROUND_BOX
Subwindow has a shadow.
Definition: HUtilitySubwindow.h:51
virtual int GetType()
Definition: HUtilitySubwindow2.h:220
float m_Top
Definition: HUtilitySubwindow2.h:392
float m_Left
Definition: HUtilitySubwindow2.h:389
#define SW_BORDER
Subwindow has borders.
Definition: HUtilitySubwindow.h:45
#define SW_SIZE_FIELD
Subwindow has a resize area.
Definition: HUtilitySubwindow.h:46
virtual HC_KEY GetKey()
Definition: HUtilitySubwindow2.h:226
#define SW_MOVE_FIELD
Subwindow can be moved.
Definition: HUtilitySubwindow.h:47
float m_Bottom
Definition: HUtilitySubwindow2.h:391
float m_Right
Definition: HUtilitySubwindow2.h:390
The HBaseOperator class serves as a base for classes which handle user input and operate on the scene...
Definition: HBaseOperator.h:65
#define SUBWINDOW_NOTYPE
The basic window type.
Definition: HUtilitySubwindow.h:32
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
HC_KEY m_WindowKey
Definition: HUtilitySubwindow2.h:386
The HEventInfo class stores and manages event information.
Definition: HEventInfo.h:214
The HSubwindow2 class encapsulates interactive floating subwindows.
Definition: HUtilitySubwindow2.h:59
#define SW_DELETE_FIELD
Subwindow has a close button.
Definition: HUtilitySubwindow.h:49
virtual int OnLButtonDown(HEventInfo &hevent)
HC_KEY m_OuterKey
Definition: HUtilitySubwindow2.h:385
virtual int OnLButtonDown(HEventInfo &hevent)
HPoint m_ptLast
Definition: HUtilitySubwindow2.h:398
#define SW_DRAG_FIELD
Subwindow allows the scene to be moved inside the window.
Definition: HUtilitySubwindow.h:48
Definition: HUtilitySubwindow2.h:409
int m_Action
Definition: HUtilitySubwindow2.h:397
int m_Type
Definition: HUtilitySubwindow2.h:394