forked from perilouswithadollarsign/cstrike15_src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrouplist.h
61 lines (42 loc) · 1.34 KB
/
grouplist.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
//========= Copyright © 1996-2009, Valve Corporation, All rights reserved. ====
//
//=============================================================================
#ifndef GROUPLIST_H
#define GROUPLIST_H
#ifdef _WIN32
#pragma once
#endif
#include "treelist.h"
#define GROUPLIST_MSG_TOGGLE_STATE "TreeList_ToggleState"
#define GROUPLIST_MSG_LEFT_DRAG_DROP "TreeList_LeftDragDrop"
#define GROUPLIST_MSG_RIGHT_DRAG_DROP "TreeList_RightDragDrop"
#define GROUPLIST_MSG_SEL_CHANGE "TreeList_SelChange"
class CVisGroup;
class CGroupList : public CTreeList
{
public:
CGroupList();
virtual ~CGroupList();
void AddVisGroup(CVisGroup *pVisGroup);
void UpdateVisGroup(CVisGroup *pVisGroup);
inline int GetVisGroupCount();
inline CVisGroup *GetVisGroup(int nIndex);
inline CVisGroup *GetSelectedVisGroup();
void OnRenameItem(void *pVisGroup, const char *pszText);
};
//-----------------------------------------------------------------------------
// Helper functions for avoiding casts in client code.
//-----------------------------------------------------------------------------
int CGroupList::GetVisGroupCount()
{
return GetItemCount();
}
CVisGroup *CGroupList::GetVisGroup(int nIndex)
{
return (CVisGroup *)GetItem(nIndex);
}
CVisGroup *CGroupList::GetSelectedVisGroup()
{
return (CVisGroup *)CTreeList::GetSelectedItem();
}
#endif // GROUPLIST_H