1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/samples/mfc/standard/Common/DimensionDlg.h
aba 60bf98ae02 0024425: Improve usage ergonomics of new dimension presentations
- Added format for value string.
- Construction and validness.
- Revise modification of properties and update of presentations.
- Units moved to Drawer; code revisions.
- Length and angle initialization was changed. Type of geometry filed was added to AIS_Dimension.
- Method for test case bugs/vis/buc60915 was corrected. Description of the dimension classes was corrected.
- Fixed initialization of angle and length.
2013-12-12 19:36:55 +04:00

81 lines
2.4 KiB
C++

#pragma once
// DimensionDlg dialog
#include <stdafx.h>
#include "res\OCC_Resource.h"
#include <Standard_Macro.hxx>
#include <AIS_InteractiveContext.hxx>
#include <TCollection_AsciiString.hxx>
#include <Quantity_Color.hxx>
class CDimensionDlg : public CDialog
{
public:
/// Construction & termination
CDimensionDlg (CWnd* pParent = NULL); // standard constructor
CDimensionDlg (Handle(AIS_InteractiveContext) &theAISContext,
CWnd* pParent = NULL);
virtual ~CDimensionDlg();
// Methods for data operation
void SetContext (const Handle(AIS_InteractiveContext) theContext);
void SetTextModeControlsVisible (bool isVisible);
void UpdateUnitsListForLength();
void UpdateUnitsListForAngle();
void Empty();
void DeactivateAllStandardModes();
void UpdateStandardModeForAngle ();
void UpdateStandardModeForLength ();
void UpdateStandardMode ();
const Standard_Real GetFlyout () const;
const Standard_Boolean GetTextType() const;
const Standard_Real GetFontHeight() const;
const Standard_Boolean IsText3dShaded() const;
const Standard_Boolean IsUnitsDisplayed() const;
const TCollection_AsciiString GetUnits() const;
const Quantity_Color GetDimensionColor() const;
// Dialog Data
enum { IDD = IDD_Dimension };
// Initialization of dialog
protected:
virtual BOOL OnInitDialog();
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
//Attributes
private:
Handle (AIS_InteractiveContext) myAISContext;
int mySelectedDimType;
int myFontSize;
Quantity_Color myDimensionColor;
CTabCtrl *myLengthParams;
CTabCtrl *myAngleParams;
CTabCtrl *myRadiusParams;
CTabCtrl *myDiameterParams;
void CreateLengthParamsTab();
void CreateAngleParamsTab();
void CreateRadiusParamsTab();
void CreateDiameterParamsTab();
public:
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedDimLength();
afx_msg void OnBnClickedDimAngle();
afx_msg void OnBnClickedDimRadius();
afx_msg void OnTcnSelChangeLengthTab(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnTcnSelChangingLengthTab(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnDestroy();
afx_msg void OnTcnSelChangeAngleTab(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnTcnSelChangingAngleTab(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBnClickedDimDiameter();
afx_msg void OnBnClicked2dText();
afx_msg void OnBnClicked3dText();
afx_msg void OnBnClickedDimensionColor();
afx_msg void OnClose();
};