forked from perilouswithadollarsign/cstrike15_src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjectpage.h
99 lines (71 loc) · 2.69 KB
/
objectpage.h
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 © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef OBJECTPAGE_H
#define OBJECTPAGE_H
#ifdef _WIN32
#pragma once
#endif
#include "MapClass.h"
enum SaveData_Reason_t;
class CObjectPage : public CPropertyPage
{
DECLARE_DYNCREATE(CObjectPage)
public:
CObjectPage(void)
{
m_bMultiEdit = false;
m_bFirstTimeActive = true;
m_bHasUpdatedData = false;
}
CObjectPage(UINT nResourceID) : CPropertyPage(nResourceID)
{
m_bMultiEdit = false;
m_bFirstTimeActive = false;
}
~CObjectPage() {}
virtual void MarkDataDirty() {}
enum
{
LoadFirstData,
LoadData,
LoadFinished,
};
inline void SetObjectList(const CMapObjectList *pObjectList);
// Called by the sheet to update the selected objects. pData points to the object being added to the selection.
virtual void UpdateData( int Mode, PVOID pData, bool bCanEdit );
// Called by the sheet to store this page's data into the objects being edited.
virtual bool SaveData( SaveData_Reason_t reason ) { return(true); }
// Called by the sheet to let the dialog remember its state before a refresh of the data.
virtual void RememberState(void) {}
virtual void SetMultiEdit(bool b) { m_bMultiEdit = b; }
virtual void OnShowPropertySheet(BOOL bShow, UINT nStatus) {}
bool IsMultiEdit() { return m_bMultiEdit; }
CRuntimeClass * GetEditObjectRuntimeClass(void) { return m_pEditObjectRuntimeClass; }
PVOID GetEditObject();
BOOL OnSetActive(void);
BOOL OnApply(void) { return(TRUE); }
bool m_bFirstTimeActive; // Used to detect the first time this page becomes active.
bool m_bHasUpdatedData; // Used to prevent SaveData() called on pages that haven't had loaded the data yet.
// Set while we are changing the page layout.
static BOOL s_bRESTRUCTURING;
protected:
const CMapObjectList *m_pObjectList; // The list of objects that we are editing.
bool m_bMultiEdit; // Set to true if we are editing more than one object.
bool m_bCanEdit; // Set to true if this page allows for editing
CRuntimeClass *m_pEditObjectRuntimeClass; // The type of object that this page can edit.
static char *VALUE_DIFFERENT_STRING;
};
//-----------------------------------------------------------------------------
// Purpose: Sets the list of objects that this dialog should reflect.
// Input : pObjectList - List of objects (typically the selection list).
//-----------------------------------------------------------------------------
void CObjectPage::SetObjectList(const CMapObjectList *pObjectList)
{
Assert(pObjectList != NULL);
m_pObjectList = pObjectList;
}
#endif // OBJECTPAGE_H