dhewm3/neo/tools/common/PropTree/PropTreeItemCheck.h

96 lines
2.3 KiB
C
Raw Normal View History

2011-11-22 21:28:15 +00:00
#pragma once
// PropTreeItemCheck.h : header file
//
// Copyright (C) 1998-2001 Scott Ramsay
// sramsay@gonavi.com
// http://www.gonavi.com
//
// This material is provided "as is", with absolutely no warranty expressed
// or implied. Any use is at your own risk.
//
// Permission to use or copy this software for any purpose is hereby granted
2011-11-22 21:28:15 +00:00
// without fee, provided the above notices are retained on all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided the above notices are retained, and a notice that the code was
// modified is included with the above copyright notice.
//
2011-11-22 21:28:15 +00:00
// If you use this code, drop me an email. I'd like to know if you find the code
// useful.
#include "PropTreeItem.h"
/////////////////////////////////////////////////////////////////////////////
// CPropTreeItemCheck window
class PROPTREE_API CPropTreeItemCheck : public CButton, public CPropTreeItem
{
// Construction
public:
CPropTreeItemCheck();
virtual ~CPropTreeItemCheck();
// Attributes
public:
// The attribute area needs drawing
virtual void DrawAttribute(CDC* pDC, const RECT& rc);
// Retrieve the item's attribute value
virtual LPARAM GetItemValue();
// Set the item's attribute value
virtual void SetItemValue(LPARAM lParam);
// Called when attribute area has changed size
virtual void OnMove();
// Called when the item needs to refresh its data
virtual void OnRefresh();
// Called when the item needs to commit its changes
virtual void OnCommit();
// Called to activate the item
virtual void OnActivate(int activateType, CPoint point);
bool HitCheckBoxTest(const POINT& pt);
bool CreateCheckBox();
BOOL GetCheckState() { return checkState; };
void SetCheckState(BOOL state);
protected:
BOOL checkState;
CRect checkRect;
2011-11-22 21:28:15 +00:00
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPropTreeItemCheck)
//}}AFX_VIRTUAL
// Implementation
public:
// Generated message map functions
protected:
//{{AFX_MSG(CPropTreeItemCheck)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
2011-11-22 21:28:15 +00:00
public:
2011-11-22 21:28:15 +00:00
afx_msg void OnBnKillfocus();
afx_msg void OnBnClicked();
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.