a6eb515f |
1 | #pragma once |
2 | |
3 | // DimensionDlg dialog |
4 | |
5 | #include <stdafx.h> |
6 | |
7 | #include "res\OCC_Resource.h" |
8 | #include <Standard_Macro.hxx> |
9 | #include <AIS_InteractiveContext.hxx> |
10 | #include <TCollection_AsciiString.hxx> |
11 | #include <Quantity_Color.hxx> |
12 | |
13 | class CDimensionDlg : public CDialog |
14 | { |
15 | public: |
16 | /// Construction & termination |
17 | CDimensionDlg (CWnd* pParent = NULL); // standard constructor |
18 | CDimensionDlg (Handle(AIS_InteractiveContext) &theAISContext, |
19 | CWnd* pParent = NULL); |
20 | virtual ~CDimensionDlg(); |
21 | |
22 | // Methods for data operation |
23 | void SetContext (const Handle(AIS_InteractiveContext) theContext); |
24 | void SetTextModeControlsVisible (bool isVisible); |
25 | void UpdateUnitsListForLength(); |
26 | void UpdateUnitsListForAngle(); |
27 | void Empty(); |
28 | void DeactivateAllStandardModes(); |
29 | void UpdateStandardModeForAngle (); |
30 | void UpdateStandardModeForLength (); |
31 | void UpdateStandardMode (); |
32 | const Standard_Real GetFlyout () const; |
33 | const Standard_Boolean GetTextType() const; |
34 | const Standard_Real GetFontHeight() const; |
35 | const Standard_Boolean IsText3dShaded() const; |
36 | const Standard_Boolean IsUnitsDisplayed() const; |
37 | const TCollection_AsciiString GetUnits() const; |
38 | const Quantity_Color GetDimensionColor() const; |
39 | |
47162471 |
40 | public: |
41 | |
42 | // Workaround: AIS_LocalContext::SelectedShape() doesn't take into account local location of selected TopoDS shape, |
43 | // and operates with selected interactive object transformation only. |
44 | static TopoDS_Shape SelectedShape(); |
45 | |
46 | public: |
a6eb515f |
47 | // Dialog Data |
48 | enum { IDD = IDD_Dimension }; |
49 | // Initialization of dialog |
50 | protected: |
51 | virtual BOOL OnInitDialog(); |
52 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
53 | |
54 | DECLARE_MESSAGE_MAP() |
55 | |
56 | //Attributes |
57 | private: |
58 | Handle (AIS_InteractiveContext) myAISContext; |
59 | int mySelectedDimType; |
60 | int myFontSize; |
61 | Quantity_Color myDimensionColor; |
62 | CTabCtrl *myLengthParams; |
63 | CTabCtrl *myAngleParams; |
64 | CTabCtrl *myRadiusParams; |
65 | CTabCtrl *myDiameterParams; |
66 | |
67 | void CreateLengthParamsTab(); |
68 | void CreateAngleParamsTab(); |
69 | void CreateRadiusParamsTab(); |
70 | void CreateDiameterParamsTab(); |
71 | |
72 | public: |
73 | afx_msg void OnBnClickedOk(); |
74 | afx_msg void OnBnClickedDimLength(); |
75 | afx_msg void OnBnClickedDimAngle(); |
76 | afx_msg void OnBnClickedDimRadius(); |
77 | afx_msg void OnTcnSelChangeLengthTab(NMHDR *pNMHDR, LRESULT *pResult); |
78 | afx_msg void OnTcnSelChangingLengthTab(NMHDR *pNMHDR, LRESULT *pResult); |
79 | afx_msg void OnDestroy(); |
80 | afx_msg void OnTcnSelChangeAngleTab(NMHDR *pNMHDR, LRESULT *pResult); |
81 | afx_msg void OnTcnSelChangingAngleTab(NMHDR *pNMHDR, LRESULT *pResult); |
82 | afx_msg void OnBnClickedDimDiameter(); |
83 | afx_msg void OnBnClicked2dText(); |
84 | afx_msg void OnBnClicked3dText(); |
85 | afx_msg void OnBnClickedDimensionColor(); |
60bf98ae |
86 | afx_msg void OnClose(); |
a6eb515f |
87 | }; |