Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / standard / 03_Viewer2d / src / Properties / TypePropertyPage.h
1 #if !defined(AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_)
2 #define AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_
3
4 #if _MSC_VER >= 1000
5 #pragma once
6 #endif // _MSC_VER >= 1000
7 // TypePropertyPage.h : header file
8 //
9
10 #include "V2d_Viewer.hxx"
11 #include "TColQuantity_HArray1OfLength.hxx"
12
13 /////////////////////////////////////////////////////////////////////////////
14 // CTypePropertyPage dialog
15
16 class CTypePropertyPage : public CPropertyPage
17 {
18 private :
19     Handle(Aspect_TypeMap) myTypeMap;
20 private :
21     Handle(V2d_Viewer) myViewer;
22 public:
23     void SetViewer(Handle(V2d_Viewer) aViewer) {
24         myViewer = aViewer;
25         myTypeMap = aViewer->TypeMap();
26     };
27
28         DECLARE_DYNCREATE(CTypePropertyPage)
29
30 // Construction
31 public:
32         CTypePropertyPage();
33         ~CTypePropertyPage();
34
35 // Dialog Data
36         //{{AFX_DATA(CTypePropertyPage)
37         enum { IDD = IDD_DIALOG_Type };
38         CTabCtrl        m_TabCtrl;
39         CComboBox       m_NewEntryControl;
40
41         CString m_TypeMapSize;
42         CString m_CurrentEntryStyle;
43         CString m_CurrentEntryValue;
44         CEdit   m_NewEntryValueControl;
45         CString m_NewEntryValue;
46         //}}AFX_DATA
47
48
49 // Overrides
50         // ClassWizard generate virtual function overrides
51         //{{AFX_VIRTUAL(CTypePropertyPage)
52         public:
53         virtual BOOL OnApply();
54         protected:
55         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
56         //}}AFX_VIRTUAL
57
58 // Implementation
59 protected:
60         // Generated message map functions
61         //{{AFX_MSG(CTypePropertyPage)
62         virtual BOOL OnInitDialog();
63         afx_msg void OnFontMapBUTTONNewEntry();
64         afx_msg void OnFontMapBUTTONUpdateCurrent();
65         afx_msg void OnChangeTypeMapEDITNewEntryValue();
66         afx_msg void OnSelchangeTypeMapTAB(NMHDR* pNMHDR, LRESULT* pResult);
67         afx_msg void OnSelchangeTypeMapCOMBONewEntryStyle();
68         //}}AFX_MSG
69         DECLARE_MESSAGE_MAP()
70 private:
71   void UpdateDisplay(int CurrentSelectionIndex);
72
73   TCollection_AsciiString BuildValuesAscii(const TColQuantity_Array1OfLength& anArray);
74   Standard_Boolean ExtractValues(TCollection_AsciiString aMessage,Handle(TColQuantity_HArray1OfLength)& anArray);
75
76 };
77
78 //{{AFX_INSERT_LOCATION}}
79 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
80
81 #endif // !defined(AFX_TypePropertyPage_H__B6E7AAD3_DB72_11D1_8DE5_0800369C8A03__INCLUDED_)