0032709: Samples, MFC - remove samples Viewer2d, Viewer3d, Ocaf, Triangulation, Anima...
[occt.git] / samples / mfc / standard / 04_HLR / src / SelectionDialog.h
1 #if !defined(AFX_SelectionDialog_H__0307BDF3_AF53_11D1_8DAE_0800369C8A03__INCLUDED_)
2 #define AFX_SelectionDialog_H__0307BDF3_AF53_11D1_8DAE_0800369C8A03__INCLUDED_
3
4 #if _MSC_VER >= 1000
5 #pragma once
6 #endif // _MSC_VER >= 1000
7 // SelectionDialog.h : header file
8 //
9 #include "resource.h"
10 #include <ISession2D/ISession2D_Shape.h>
11 #include "SelectionDialog.h"
12
13 class CHLRDoc;
14 /////////////////////////////////////////////////////////////////////////////
15 // CSelectionDialog dialog
16
17 class CSelectionDialog : public CDialog
18 {
19   // Construction
20 public:
21   // standard constructor
22   CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent = NULL);
23
24   void SetTitle (const CString& aTitle);
25
26   void OnDisplay (bool isFit);
27
28   const Handle(ISession2D_Shape) DiplayableShape() { return myDisplayableShape; }
29
30   // Updates in dialog view and main 2d and 3d views shapes for which HLR presentations are going to be displayed in 2d view.
31   void UpdateViews();
32
33   // Dialog Data
34   //{{AFX_DATA(CSelectionDialog)
35   enum { IDD = IDD_SelectionDialog };
36   int m_Algo;
37   int m_DisplayMode;
38   int m_NbIsos;
39   BOOL m_DrawHiddenLine;
40   BOOL m_HlrModeIsOn;
41   //}}AFX_DATA
42
43   // Overrides
44   // ClassWizard generated virtual function overrides
45   //{{AFX_VIRTUAL(CSelectionDialog)
46 protected:
47   virtual void DoDataExchange(CDataExchange* pDX);
48   //}}AFX_VIRTUAL
49
50   // Implementation
51 protected:
52
53   // Generated message map functions
54   //{{AFX_MSG(CSelectionDialog)
55   virtual BOOL OnInitDialog();
56   afx_msg void OnGetSelectedShapes();
57   afx_msg void OnDisplayDefault();
58   afx_msg void OnVIsoParametrics();
59   afx_msg void OnVApparentContour();
60   afx_msg void OnVSewingEdges();
61   afx_msg void OnVsharpEdges();
62   afx_msg void OnVsmoothEdges();
63   afx_msg void OnHsharpEdges();
64   afx_msg void OnHsmoothEdges();
65   afx_msg void OnHSewingEdges();
66   afx_msg void OnHIsoParametrics();
67   afx_msg void OnHApparentContour();
68   afx_msg void OnChangeEDITNBIsos();
69   afx_msg void OnAlgo();
70   afx_msg void OnPolyAlgo();
71   afx_msg void OnUpdate2D();
72   afx_msg void OnTopView();
73   afx_msg void OnBottomView();
74   afx_msg void OnLeftView();
75   afx_msg void OnRightView();
76   afx_msg void OnFrontView();
77   afx_msg void OnBackView();
78   afx_msg void OnAxoView();
79   virtual void OnOK();
80   afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
81   afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
82   afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
83   afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
84   afx_msg void OnMouseMove(UINT nFlags, CPoint point);
85   afx_msg void OnDrawHiddenLine();
86   afx_msg void OnHlrMode();
87   afx_msg void OnPaint();
88   //}}AFX_MSG
89   DECLARE_MESSAGE_MAP()
90 private :
91   void UpdateProjector();
92   void ShowHideButton(Standard_Boolean EnableButton=Standard_True);
93   void Apply();
94   CHLRDoc* myDoc;
95
96   Handle(AIS_InteractiveContext) myInteractiveContext;
97   Handle(V3d_Viewer) myActiveViewer;
98   Handle(V3d_View)   myActiveView;
99   Handle(AIS_Trihedron)          myTrihedron;
100   Handle(ISession2D_Shape)       myDisplayableShape;
101
102   Standard_Integer myPosMaxX;
103   Standard_Integer myPosMinX;
104   Standard_Integer myBoxX;
105
106   Standard_Integer myPosMinY;
107   Standard_Integer myPosMaxY;
108   Standard_Integer myBoxY;
109
110   Standard_Integer   myXmax;
111   Standard_Integer   myYmax;
112
113 protected:
114   CBitmapButton TopView;
115   CBitmapButton BottomView;
116   CBitmapButton LeftView;
117   CBitmapButton RightView;
118   CBitmapButton FrontView;
119   CBitmapButton BackView;
120   CBitmapButton AxoView;
121   bool myIsDisplayed;
122 };
123
124 //{{AFX_INSERT_LOCATION}}
125 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
126
127 #endif // !defined(AFX_SelectionDialog_H__0307BDF3_AF53_11D1_8DAE_0800369C8A03__INCLUDED_)