OSDN Git Service

Rewrite code to handle titles and names of applications in CProfile
[xkeymacs/xkeymacs.git] / xkeymacs / properties.h
1 #if !defined(AFX_PROPERTIES_H__13ABBD97_6862_4CDA_86ED_4863B4845A1B__INCLUDED_)\r
2 #define AFX_PROPERTIES_H__13ABBD97_6862_4CDA_86ED_4863B4845A1B__INCLUDED_\r
3 \r
4 #include "PropertiesBasic.h"    // Added by ClassView\r
5 #include "PropertiesAdvanced.h" // Added by ClassView\r
6 #include "PropertiesList.h"     // Added by ClassView\r
7 #if _MSC_VER > 1000\r
8 #pragma once\r
9 #endif // _MSC_VER > 1000\r
10 \r
11 enum TAB_NAME { BASIC_TAB = 1, ADVANCED_TAB = 2, LIST_TAB = 4, ACTIVE_TAB = 8 };\r
12 \r
13 // Properties.h : header file\r
14 //\r
15 \r
16 /////////////////////////////////////////////////////////////////////////////\r
17 // CProperties dialog\r
18 \r
19 class CProperties : public CDialog\r
20 {\r
21 // Construction\r
22 public:\r
23         CProperties(CWnd* pParent = NULL);   // standard constructor\r
24 \r
25 // Dialog Data\r
26         //{{AFX_DATA(CProperties)\r
27         enum { IDD = IDD_PROPERTIES };\r
28         CEdit   m_cWindowText;\r
29         CEdit   m_cKillRingMax;\r
30         CButton m_cUseDialogSetting;\r
31         CButton m_cSelectAll;\r
32         CButton m_cClearAll;\r
33         CButton m_cLoadDefault;\r
34         CComboBox       m_cAppList;\r
35         int             m_nSettingStyle;\r
36         int             m_nKillRingMax;\r
37         //}}AFX_DATA\r
38 \r
39 \r
40 // Overrides\r
41         // ClassWizard generated virtual function overrides\r
42         //{{AFX_VIRTUAL(CProperties)\r
43         protected:\r
44         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
45         //}}AFX_VIRTUAL\r
46 \r
47 // Implementation\r
48 public:\r
49         BOOL IsEnableControl();\r
50         CString GetCurrentApplication();\r
51         int GetApplicationID();\r
52         void EnableControl(TAB_NAME tab = BASIC_TAB);\r
53         void AddItem(const CString& appTitle, const CString& appName);\r
54 protected:\r
55         // Generated message map functions\r
56         //{{AFX_MSG(CProperties)\r
57         virtual BOOL OnInitDialog();\r
58         afx_msg void OnDropdownApplication();\r
59         afx_msg void OnSelchangeApplication();\r
60         virtual void OnOK();\r
61         virtual void OnCancel();\r
62         afx_msg void OnApply();\r
63         afx_msg void OnLoadDefault();\r
64         afx_msg void OnSelectAll();\r
65         afx_msg void OnClearAll();\r
66         afx_msg void OnSettingDefault();\r
67         afx_msg void OnSettingDisable();\r
68         afx_msg void OnSettingSpecific();\r
69         //}}AFX_MSG\r
70         DECLARE_MESSAGE_MAP()\r
71 private:\r
72         int m_nAppID;\r
73         CPropertiesList m_list;\r
74         CPropertiesAdvanced m_advanced;\r
75         CPropertiesBasic m_basic;\r
76         CPropertySheet m_sheet;\r
77         CString m_appTitle;\r
78         CString m_appName;\r
79         void EnableLoadDefaultButton(BOOL bEnable);\r
80         void EnableUseDefaultButton(BOOL bEnable);\r
81         void EnableUseDialogSettingButton(BOOL bEnable);\r
82         void GetDialogData();\r
83         void InitAppList();\r
84         void SetDialogData();\r
85         void GetAppTitleAndName(const int nSel, CString& appTitle, CString& appName);\r
86 };\r
87 \r
88 //{{AFX_INSERT_LOCATION}}\r
89 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
90 \r
91 #endif // !defined(AFX_PROPERTIES_H__13ABBD97_6862_4CDA_86ED_4863B4845A1B__INCLUDED_)\r