1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: PropertyList.h,v $
6 Date: $Date: 2004/01/02 22:24:19 $
7 Version: $Revision: 1.13 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef CPROPERTYLIST_H
18 #define CPROPERTYLIST_H
22 #include "../cmStandardIncludes.h"
23 class CMakeSetupDialog
;
25 /////////////////////////////////////////////////////////////////////////////
41 CPropertyItem(CString propName
, CString curValue
,
43 int nItemType
, CString cmbItems
)
46 m_HelpString
= helpString
;
48 m_propName
= propName
;
49 m_curValue
= curValue
;
50 m_nItemType
= nItemType
;
51 m_cmbItems
= cmbItems
;
56 /////////////////////////////////////////////////////////////////////////////
57 // CPropertyList window
59 class CPropertyList
: public CListBox
77 CMakeSetupDialog
*m_CMakeSetupDialog
;
81 bool GetShowAdvanced() {return m_ShowAdvanced
;}
82 bool IsDirty() { return m_Dirty
; }
83 void ClearDirty() { m_Dirty
= false; }
85 int AddItem(CString txt
);
86 void AddProperty(const char* name
,
88 const char* helpString
,
90 const char* comboItems
,
93 void RemoveProperty(const char* name
);
97 std::set
<CPropertyItem
*> GetItems()
99 return m_PropertyItems
;
102 CPropertyItem
* GetItem(int index
);
104 // ClassWizard generated virtual function overrides
105 //{{AFX_VIRTUAL(CPropertyList)
107 virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct
);
108 virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct
);
110 virtual BOOL
PreCreateWindow(CREATESTRUCT
& cs
);
111 virtual void PreSubclassWindow();
116 virtual ~CPropertyList();
118 // Generated message map functions
120 //{{AFX_MSG(CPropertyList)
121 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct
);
122 afx_msg
void OnSelchange();
123 afx_msg
void OnLButtonUp(UINT nFlags
, CPoint point
);
124 afx_msg
void OnKillFocus(CWnd
* pNewWnd
);
125 afx_msg
void OnLButtonDown(UINT nFlags
, CPoint point
);
126 afx_msg
void OnMouseMove(UINT nFlags
, CPoint point
);
127 afx_msg
void OnRButtonUp( UINT nFlags
, CPoint point
);
129 afx_msg
void OnKillfocusCmbBox();
130 afx_msg
void OnSelchangeCmbBox();
131 afx_msg
void OnKillfocusEditBox();
132 afx_msg
void OnChangeEditBox();
133 afx_msg
void OnButton();
134 afx_msg
void OnIgnore();
135 afx_msg
void OnDelete();
136 afx_msg
void OnHelp();
137 afx_msg
void OnCheckBox();
138 afx_msg
void OnVScroll( UINT nSBCode
, UINT nPos
, CScrollBar
* pScrollBar
);
141 DECLARE_MESSAGE_MAP()
143 void InvertLine(CDC
* pDC
,CPoint ptFrom
,CPoint ptTo
);
144 void DisplayButton(CRect region
);
146 // order = 1 add to top
147 // order = 2 add to bottom
148 int AddPropItem(CPropertyItem
* pItem
, int order
);
149 void InvalidateList();
154 CButton m_CheckBoxControl
;
168 HCURSOR m_hCursorArrow
;
169 HCURSOR m_hCursorSize
;
171 std::set
<CPropertyItem
*> m_PropertyItems
;
174 /////////////////////////////////////////////////////////////////////////////
176 //{{AFX_INSERT_LOCATION}}
177 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
179 #endif // !defined(AFX_PROPERTYLIST_H__74205380_1B56_11D4_BC48_00105AA2186F__INCLUDED_)