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.

89 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef SOUNDBROWSER_H
  7. #define SOUNDBROWSER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "mxtk/mxListView.h"
  12. #include "commctrl.h"
  13. #include "utlsymbol.h"
  14. class CWorkspace;
  15. class CProject;
  16. class CScene;
  17. class CVCDFile;
  18. class CSoundEntry;
  19. class CSoundList;
  20. class CWorkspaceManager;
  21. class CSoundFilterTab;
  22. class COptionsWindow;
  23. class CSoundBrowser : public mxWindow
  24. {
  25. typedef mxWindow BaseClass;
  26. public:
  27. CSoundBrowser( mxWindow *parent, CWorkspaceManager *manager, int id );
  28. virtual int handleEvent( mxEvent *event );
  29. virtual void OnDelete();
  30. CWorkspaceManager *GetManager();
  31. void RepopulateTree();
  32. void BuildSelectionList( CUtlVector< CSoundEntry * >& selected );
  33. void OnPlay();
  34. void JumpToItem( CSoundEntry *se );
  35. void OnSearch();
  36. private:
  37. char const *GetSearchString();
  38. void OnShowInWaveBrowser();
  39. void OnSoundProperties();
  40. void OnAddSound();
  41. void OnRemoveSound();
  42. void OnGetSentence();
  43. void PopulateTree( bool voiceonly, char const *scriptonly );
  44. void ShowContextMenu( void );
  45. void LoadAllSounds();
  46. void RemoveAllSounds();
  47. CSoundList *m_pListView;
  48. enum
  49. {
  50. NUM_BITMAPS = 8,
  51. };
  52. CWorkspaceManager *m_pManager;
  53. CUtlVector< CSoundEntry * > m_AllSounds;
  54. CUtlSymbolTable m_ScriptTable;
  55. CUtlVector< CUtlSymbol > m_Scripts;
  56. CSoundFilterTab *m_pFilter;
  57. COptionsWindow *m_pOptions;
  58. CUtlVector< CSoundEntry * > m_CurrentSelection;
  59. };
  60. #endif // SOUNDBROWSER_H