Team Fortress 2 Source Code as on 22/4/2020
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.

67 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WORKSPACEBROWSER_H
  7. #define WORKSPACEBROWSER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "mxtk/mxTreeView.h"
  12. #include "commctrl.h"
  13. class CWorkspace;
  14. class CProject;
  15. class CScene;
  16. class CVCDFile;
  17. class CSoundEntry;
  18. class CBrowserTree;
  19. class ITreeItem;
  20. class CWorkspaceManager;
  21. class CWorkspaceBrowser : public mxWindow
  22. {
  23. typedef mxWindow BaseClass;
  24. public:
  25. CWorkspaceBrowser( mxWindow *parent, CWorkspaceManager *manager, int id );
  26. CWorkspace *GetWorkspace();
  27. void SetWorkspace( CWorkspace *w );
  28. void AddProject( CProject *project );
  29. virtual int handleEvent( mxEvent *event );
  30. ITreeItem *GetSelectedItem();
  31. void PopulateTree();
  32. static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
  33. void JumpTo( ITreeItem *item );
  34. private:
  35. CWorkspaceManager *GetManager();
  36. void OnTreeItemSelected( int x, int y, bool rightmouse, bool doubleclick );
  37. CWorkspace *m_pCurrentWorkspace;
  38. CBrowserTree *m_pTree;
  39. enum
  40. {
  41. NUM_BITMAPS = 12,
  42. };
  43. ITreeItem *m_pLastSelected;
  44. CWorkspaceManager *m_pManager;
  45. };
  46. #endif // WORKSPACEBROWSER_H