doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PropTreeItemCheck.h
Go to the documentation of this file.
1 #pragma once
2 
3 // PropTreeItemCheck.h : header file
4 //
5 // Copyright (C) 1998-2001 Scott Ramsay
6 // sramsay@gonavi.com
7 // http://www.gonavi.com
8 //
9 // This material is provided "as is", with absolutely no warranty expressed
10 // or implied. Any use is at your own risk.
11 //
12 // Permission to use or copy this software for any purpose is hereby granted
13 // without fee, provided the above notices are retained on all copies.
14 // Permission to modify the code and to distribute modified code is granted,
15 // provided the above notices are retained, and a notice that the code was
16 // modified is included with the above copyright notice.
17 //
18 // If you use this code, drop me an email. I'd like to know if you find the code
19 // useful.
20 
21 #include "PropTreeItem.h"
22 
24 // CPropTreeItemCheck window
25 
26 class PROPTREE_API CPropTreeItemCheck : public CButton, public CPropTreeItem
27 {
28 // Construction
29 public:
31  virtual ~CPropTreeItemCheck();
32 
33 // Attributes
34 public:
35  // The attribute area needs drawing
36  virtual void DrawAttribute(CDC* pDC, const RECT& rc);
37 
38  // Retrieve the item's attribute value
39  virtual LPARAM GetItemValue();
40 
41  // Set the item's attribute value
42  virtual void SetItemValue(LPARAM lParam);
43 
44  // Called when attribute area has changed size
45  virtual void OnMove();
46 
47  // Called when the item needs to refresh its data
48  virtual void OnRefresh();
49 
50  // Called when the item needs to commit its changes
51  virtual void OnCommit();
52 
53  // Called to activate the item
54  virtual void OnActivate(int activateType, CPoint point);
55 
56  bool HitCheckBoxTest(const POINT& pt);
57 
58  bool CreateCheckBox();
59 
60  BOOL GetCheckState() { return checkState; };
61  void SetCheckState(BOOL state);
62 
63 
64 protected:
66  CRect checkRect;
67 
68 // Operations
69 public:
70 
71 // Overrides
72  // ClassWizard generated virtual function overrides
73  //{{AFX_VIRTUAL(CPropTreeItemCheck)
74  //}}AFX_VIRTUAL
75 
76 // Implementation
77 public:
78 
79  // Generated message map functions
80 protected:
81  //{{AFX_MSG(CPropTreeItemCheck)
82  //}}AFX_MSG
83 
84  DECLARE_MESSAGE_MAP()
85 
86 public:
87 
88  afx_msg void OnBnKillfocus();
89  afx_msg void OnBnClicked();
90 };
91 
93 
94 //{{AFX_INSERT_LOCATION}}
95 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
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()
virtual void SetItemValue(LPARAM lParam)
virtual void OnMove()
virtual void OnActivate(int activateType, CPoint point)