doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PropTreeItemColor.h
Go to the documentation of this file.
1 #if !defined(AFX_PROPTREEITEMCOLOR_H__50C09AC0_1F02_4150_AA6A_5151345D87A2__INCLUDED_)
2 #define AFX_PROPTREEITEMCOLOR_H__50C09AC0_1F02_4150_AA6A_5151345D87A2__INCLUDED_
3 
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // PropTreeItemColor.h : header file
8 //
9 // Copyright (C) 1998-2001 Scott Ramsay
10 // sramsay@gonavi.com
11 // http://www.gonavi.com
12 //
13 // This material is provided "as is", with absolutely no warranty expressed
14 // or implied. Any use is at your own risk.
15 //
16 // Permission to use or copy this software for any purpose is hereby granted
17 // without fee, provided the above notices are retained on all copies.
18 // Permission to modify the code and to distribute modified code is granted,
19 // provided the above notices are retained, and a notice that the code was
20 // modified is included with the above copyright notice.
21 //
22 // If you use this code, drop me an email. I'd like to know if you find the code
23 // useful.
24 
25 #include "PropTreeItem.h"
26 
28 // CPropTreeItemColor window
29 
30 class PROPTREE_API CPropTreeItemColor : public CWnd, public CPropTreeItem
31 {
32 // Construction
33 public:
35  virtual ~CPropTreeItemColor();
36 
37 // Attributes
38 public:
39  // The attribute area needs drawing
40  virtual void DrawAttribute(CDC* pDC, const RECT& rc);
41 
42  // Retrieve the item's attribute value
43  virtual LPARAM GetItemValue();
44 
45  // Set the item's attribute value
46  virtual void SetItemValue(LPARAM lParam);
47 
48  // Called when attribute area has changed size
49  virtual void OnMove();
50 
51  // Called when the item needs to refresh its data
52  virtual void OnRefresh();
53 
54  // Called when the item needs to commit its changes
55  virtual void OnCommit();
56 
57  // Called to activate the item
58  virtual void OnActivate(int activateType, CPoint point);
59 
60  static void SetDefaultColorsList(COLORREF* pColors);
61 
62 protected:
63  COLORREF m_cColor;
64  COLORREF m_cPrevColor;
65  CRect m_rcButton;
69 
70  static COLORREF* s_pColors;
71 
72 // Overrides
73  // ClassWizard generated virtual function overrides
74  //{{AFX_VIRTUAL(CPropTreeItemColor)
75  //}}AFX_VIRTUAL
76 
77 // Implementation
78 public:
79 
80  // Generated message map functions
81 protected:
82  //{{AFX_MSG(CPropTreeItemColor)
83  afx_msg void OnKillFocus(CWnd* pNewWnd);
84  afx_msg void OnPaint();
85  afx_msg void OnClose();
86  afx_msg void OnMouseMove(UINT nFlags, CPoint point);
87  afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
88  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
89  //}}AFX_MSG
90  DECLARE_MESSAGE_MAP()
91 };
92 
94 
95 //{{AFX_INSERT_LOCATION}}
96 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
97 
98 #endif // !defined(AFX_PROPTREEITEMCOLOR_H__50C09AC0_1F02_4150_AA6A_5151345D87A2__INCLUDED_)
static COLORREF * s_pColors
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
virtual void DrawAttribute(CDC *pDC, const RECT &rc)
#define PROPTREE_API
Definition: PropTree.h:53
virtual void OnRefresh()
virtual void OnCommit()
#define BOOL
Definition: mprintf.c:71
virtual LPARAM GetItemValue()
long LONG
virtual void SetItemValue(LPARAM lParam)
virtual void OnMove()
virtual void OnActivate(int activateType, CPoint point)