doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PropertyList.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 #if !defined(AFX_PROPERTYLIST_H__74205380_1B56_11D4_BC48_00105AA2186F__INCLUDED_)
29 #define AFX_PROPERTYLIST_H__74205380_1B56_11D4_BC48_00105AA2186F__INCLUDED_
30 
31 #if _MSC_VER > 1000
32 #pragma once
33 #endif // _MSC_VER > 1000
34 // PropertyList.h : header file
35 //
36 
37 #define PIT_COMBO 0 //PIT = property item type
38 #define PIT_EDIT 1
39 #define PIT_COLOR 2
40 #define PIT_FONT 3
41 #define PIT_FILE 4
42 #define PIT_SCRIPT 5
43 #define PIT_MODEL 6
44 #define PIT_SOUND 7
45 #define PIT_GUI 8
46 #define PIT_MATERIAL 9
47 #define PIT_VAR 10
48 
49 #define IDC_PROPCMBBOX 712
50 #define IDC_PROPEDITBOX 713
51 #define IDC_PROPBTNCTRL 714
52 
53 
55 //CPropertyList Items
57 {
58 // Attributes
59 public:
60  CString m_propName;
61  CString m_curValue;
63  CString m_cmbItems;
64  int data;
65 
66 public:
67  CPropertyItem(CString propName, CString curValue,
68  int nItemType, CString cmbItems)
69  {
70  m_propName = propName;
71  m_curValue = curValue;
72  m_nItemType = nItemType;
73  m_cmbItems = cmbItems;
74  data = -1;
75  }
76  void SetData(int d) {
77  data = d;
78  }
79 };
80 
82 // CPropertyList window
83 
84 class CPropertyList : public CListBox
85 {
86 // Construction
87 public:
88  CPropertyList();
89 
90 // Attributes
91 public:
92 
93 // Operations
94 public:
95  int AddItem(CString txt);
96  int AddPropItem(CPropertyItem* pItem);
97  void ResetContent();
98  CEdit *GetEditBox() {
99  return &m_editBox;
100  }
101  void SetUpdateInspectors(bool b) {
103  }
104  void SetDivider( int div ) {
105  m_nDivider = div;
106  }
107  afx_msg void OnKillfocusEditBox();
108  afx_msg void OnChangeEditBox();
109 
110 // Overrides
111  // ClassWizard generated virtual function overrides
112  //{{AFX_VIRTUAL(CPropertyList)
113  public:
114  virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
115  virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
116  afx_msg void OnSelchange();
117  protected:
118  virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
119  virtual void PreSubclassWindow();
120  //}}AFX_VIRTUAL
121 
122 // Implementation
123 public:
124  virtual ~CPropertyList();
125 
126  // Generated message map functions
127 protected:
128  //{{AFX_MSG(CPropertyList)
129  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
130  afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
131  afx_msg void OnKillFocus(CWnd* pNewWnd);
132  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
133  afx_msg void OnMouseMove(UINT nFlags, CPoint point);
134  afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
135 
136  //}}AFX_MSG
137  afx_msg void OnKillfocusCmbBox();
138  afx_msg void OnSelchangeCmbBox();
139  afx_msg void OnButton();
140 
141  DECLARE_MESSAGE_MAP()
142 
143  void InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo);
144  void DisplayButton(CRect region);
145 
146  CComboBox m_cmbBox;
147  CEdit m_editBox;
148  CButton m_btnCtrl;
150 
159  HCURSOR m_hCursorArrow;
160  HCURSOR m_hCursorSize;
163 };
164 
166 
167 //{{AFX_INSERT_LOCATION}}
168 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
169 
170 #endif // !defined(AFX_PROPERTYLIST_H__74205380_1B56_11D4_BC48_00105AA2186F__INCLUDED_)
int AddItem(CString txt)
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
HCURSOR m_hCursorSize
Definition: PropertyList.h:160
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
void SetDivider(int div)
Definition: PropertyList.h:104
afx_msg void OnKillFocus(CWnd *pNewWnd)
CString m_cmbItems
Definition: PropertyList.h:63
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
afx_msg void OnSelchange()
bool updateInspectors
Definition: PropertyList.h:162
virtual ~CPropertyList()
afx_msg void OnKillfocusEditBox()
#define BOOL
Definition: mprintf.c:71
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:2853
afx_msg void OnChangeEditBox()
HCURSOR m_hCursorArrow
Definition: PropertyList.h:159
CFont m_SSerif8Font
Definition: PropertyList.h:149
void DisplayButton(CRect region)
CEdit * GetEditBox()
Definition: PropertyList.h:98
CString m_propName
Definition: PropertyList.h:60
int AddPropItem(CPropertyItem *pItem)
CPropertyItem(CString propName, CString curValue, int nItemType, CString cmbItems)
Definition: PropertyList.h:67
afx_msg void OnKillfocusCmbBox()
afx_msg void OnButton()
GLubyte GLubyte b
Definition: glext.h:4662
afx_msg void OnLButtonDown(UINT nFlags, CPoint point)
void SetUpdateInspectors(bool b)
Definition: PropertyList.h:101
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
CPropertyItem * measureItem
Definition: PropertyList.h:161
afx_msg void OnSelchangeCmbBox()
CComboBox m_cmbBox
Definition: PropertyList.h:146
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
CString m_curValue
Definition: PropertyList.h:61
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
void SetData(int d)
Definition: PropertyList.h:76
virtual void PreSubclassWindow()
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
CButton m_btnCtrl
Definition: PropertyList.h:148
void InvertLine(CDC *pDC, CPoint ptFrom, CPoint ptTo)