home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / PASM.LZH / DISPLAY.H < prev    next >
C/C++ Source or Header  |  1996-05-25  |  2KB  |  78 lines

  1. #if !defined(__display_h)              // 番兵。まだインクルードされていない場合にのみ,このファイルを使用
  2. #define __display_h
  3.  
  4. /*  Project partsasm
  5.     Project Team DoGA
  6.     Copyright (c) 1995. All Rights Reserved.
  7.  
  8.     サブシステム:    partsasm.apx Application
  9.     ファイル:        display.h
  10.     作成者:          Taka2
  11.  
  12.  
  13.     概要
  14.     ====
  15.     TWinDisplay (TWindow) 用のクラス定義
  16. */
  17.  
  18. #include <owl\owlpch.h>
  19. #pragma hdrstop
  20.  
  21. #include <owl\window.h>
  22.  
  23. #include "pasmApp.rh"            // すべてのリソースの定義
  24. #include "matrix.h"
  25.  
  26. const int MaxMarkers = 20;
  27. class DesignData;
  28. enum SelectType;
  29.  
  30. //{{TWindow = TWinDisplay}}
  31. class TWinDisplay : public TWindow {
  32.     DesignData *designdata;
  33.     SelectType type;
  34.     Matrix convmatrix;
  35.  
  36.     TPoint markerpoint[MaxMarkers];
  37.     SelectType markertype[MaxMarkers];
  38.     int markers;
  39. public:
  40.     TWinDisplay(TWindow* parent, DesignData *d, SelectType sel, int x, int y, int w, int h);
  41.     virtual ~TWinDisplay();
  42.  
  43.     int GetPositionDistance(Parts *p, TPoint& point);
  44.     void ShowCube(Matrix& m, int flag, SelectType t);
  45.     void ShowCamera(Matrix& m, int flag);
  46.     void ShowGrid(TDC& dc);
  47.     void Redraw(void);
  48.     void ShowObject(TDC& dc, Parts *p);
  49. private:
  50.     void Set4Marker(SelectType type, TPoint& pc, TPoint& p1, TPoint& p2);
  51.     void Set5Marker(SelectType t1, SelectType t2, SelectType t3, TPoint& pc, TPoint& p1, TPoint& p2, TPoint& p3);
  52.     void Set9Marker(SelectType t, TPoint& pc, TPoint& p1, TPoint& p2, TPoint& p3);
  53.     void DrawMarker(TDC& dc);
  54.     void OpSelect(UINT modKeys, TPoint& point, Vector& v);
  55.     void OpSelectMove(UINT modKeys, TPoint& point, Vector& v);
  56.     void OpDrag(UINT modKeys, TPoint& point, Vector& v);
  57.     void DisplayCursorObject(UINT /*modKeys*/, TPoint& point);
  58.     void OpSelectObject(UINT modKeys, TPoint& point);
  59.     void Zoom(UINT modKeys, TPoint& point);
  60. //{{TWinDisplayVIRTUAL_BEGIN}}
  61. public:
  62.     virtual void Paint (TDC& dc, BOOL erase, TRect& rect);
  63. //{{TWinDisplayVIRTUAL_END}}
  64.  
  65. //{{TWinDisplayRSP_TBL_BEGIN}}
  66. protected:
  67.     void EvLButtonDown (UINT modKeys, TPoint& point);
  68.     void EvMouseMove (UINT modKeys, TPoint& point);
  69.     void EvRButtonDown (UINT modKeys, TPoint& point);
  70.     void EvLButtonUp (UINT modKeys, TPoint& point);
  71. //{{TWinDisplayRSP_TBL_END}}
  72. DECLARE_RESPONSE_TABLE(TWinDisplay);
  73. };    //{{TWinDisplay}}
  74.  
  75.  
  76. #endif                                      // __display_h の番兵
  77.  
  78.