0026886: Visualization, TKV3d - eliminate global variables
[occt.git] / samples / mfc / standard / Common / DimensionDlg.h
CommitLineData
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
13class CDimensionDlg : public CDialog
14{
15public:
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 40public:
a6eb515f 41 // Dialog Data
42 enum { IDD = IDD_Dimension };
43 // Initialization of dialog
44protected:
45 virtual BOOL OnInitDialog();
46 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
47
48 DECLARE_MESSAGE_MAP()
49
50 //Attributes
51private:
52 Handle (AIS_InteractiveContext) myAISContext;
53 int mySelectedDimType;
54 int myFontSize;
55 Quantity_Color myDimensionColor;
56 CTabCtrl *myLengthParams;
57 CTabCtrl *myAngleParams;
58 CTabCtrl *myRadiusParams;
59 CTabCtrl *myDiameterParams;
60
61 void CreateLengthParamsTab();
62 void CreateAngleParamsTab();
63 void CreateRadiusParamsTab();
64 void CreateDiameterParamsTab();
65
66public:
67 afx_msg void OnBnClickedOk();
68 afx_msg void OnBnClickedDimLength();
69 afx_msg void OnBnClickedDimAngle();
70 afx_msg void OnBnClickedDimRadius();
71 afx_msg void OnTcnSelChangeLengthTab(NMHDR *pNMHDR, LRESULT *pResult);
72 afx_msg void OnTcnSelChangingLengthTab(NMHDR *pNMHDR, LRESULT *pResult);
73 afx_msg void OnDestroy();
74 afx_msg void OnTcnSelChangeAngleTab(NMHDR *pNMHDR, LRESULT *pResult);
75 afx_msg void OnTcnSelChangingAngleTab(NMHDR *pNMHDR, LRESULT *pResult);
76 afx_msg void OnBnClickedDimDiameter();
77 afx_msg void OnBnClicked2dText();
78 afx_msg void OnBnClicked3dText();
79 afx_msg void OnBnClickedDimensionColor();
60bf98ae 80 afx_msg void OnClose();
a6eb515f 81};