Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.3 KiB

  1. //========= Copyright � 1996-2009, Valve Corporation, All rights reserved. ====
  2. //
  3. //=============================================================================
  4. #ifndef GROUPLIST_H
  5. #define GROUPLIST_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. #include "treelist.h"
  10. #define GROUPLIST_MSG_TOGGLE_STATE "TreeList_ToggleState"
  11. #define GROUPLIST_MSG_LEFT_DRAG_DROP "TreeList_LeftDragDrop"
  12. #define GROUPLIST_MSG_RIGHT_DRAG_DROP "TreeList_RightDragDrop"
  13. #define GROUPLIST_MSG_SEL_CHANGE "TreeList_SelChange"
  14. class CVisGroup;
  15. class CGroupList : public CTreeList
  16. {
  17. public:
  18. CGroupList();
  19. virtual ~CGroupList();
  20. void AddVisGroup(CVisGroup *pVisGroup);
  21. void UpdateVisGroup(CVisGroup *pVisGroup);
  22. inline int GetVisGroupCount();
  23. inline CVisGroup *GetVisGroup(int nIndex);
  24. inline CVisGroup *GetSelectedVisGroup();
  25. void OnRenameItem(void *pVisGroup, const char *pszText);
  26. };
  27. //-----------------------------------------------------------------------------
  28. // Helper functions for avoiding casts in client code.
  29. //-----------------------------------------------------------------------------
  30. int CGroupList::GetVisGroupCount()
  31. {
  32. return GetItemCount();
  33. }
  34. CVisGroup *CGroupList::GetVisGroup(int nIndex)
  35. {
  36. return (CVisGroup *)GetItem(nIndex);
  37. }
  38. CVisGroup *CGroupList::GetSelectedVisGroup()
  39. {
  40. return (CVisGroup *)CTreeList::GetSelectedItem();
  41. }
  42. #endif // GROUPLIST_H