summaryrefslogtreecommitdiff
path: root/hammer/entityreportdlg.h
blob: d9d7df6051f0b0d056fd07c40c8195fad8a961cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef ENTITYREPORTDLG_H
#define ENTITYREPORTDLG_H
#ifdef _WIN32
#pragma once
#endif

#include <afxtempl.h>
#include "resource.h"
#include "MapDoc.h"


class CEntityReportDlg : public CDialog
{
public:

	static void ShowEntityReport(CMapDoc *pDoc, CWnd* pParent = NULL);

private:

	CEntityReportDlg(CMapDoc *pDoc, CWnd* pParent = NULL);   // standard constructor
	void GenerateReport();

	void SaveToIni();

	//{{AFX_DATA(CEntityReportDlg)
	enum { IDD = IDD_ENTITYREPORT };
	CButton	m_cExact;
	CComboBox	m_cFilterClass;
	CButton	m_cFilterByClass;
	CListBox	m_cEntities;
	CEdit	m_cFilterValue;
	CEdit	m_cFilterKey;
	CButton	m_cFilterByType;
	CButton	m_cFilterByKeyvalue;
	CButton	m_cFilterByHidden;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEntityReportDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnOK();
	//}}AFX_VIRTUAL

protected:

	CMapDoc *m_pDoc;
	void UpdateEntityList();

	BOOL m_bFilterByKeyvalue;
	BOOL m_bFilterByClass;
	BOOL m_bFilterByHidden;
	BOOL m_bExact;
	int m_iFilterByType;

	CString m_szFilterKey;
	CString m_szFilterValue;
	CString m_szFilterClass;

	BOOL m_bFilterTextChanged;
	DWORD m_dwFilterTime;

	// Generated message map functions
	//{{AFX_MSG(CEntityReportDlg)
	afx_msg void OnDelete();
	afx_msg void OnFilterbyhidden();
	afx_msg void OnFilterbykeyvalue();
	afx_msg void OnFilterbytype();
	afx_msg void OnChangeFilterkey();
	afx_msg void OnChangeFiltervalue();
	afx_msg void OnGoto();
	afx_msg void OnProperties();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnEditchangeFilterclass();
	afx_msg void OnFilterbyclass();
	afx_msg void OnSelchangeFilterclass();
	afx_msg void OnExactvalue();
	afx_msg void OnDestroy();
	afx_msg void OnClose();
	afx_msg void OnSelChangeEntityList();
	afx_msg void OnDblClkEntityList();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:

	CMapDoc *MarkSelectedEntities( void );

	friend BOOL AddEntityToList(CMapEntity *pEntity, CEntityReportDlg *pDlg);
};


#endif // ENTITYREPORTDLG_H