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.

102 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WAVEBROWSER_H
  7. #define WAVEBROWSER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "mxtk/mxListView.h"
  12. #include "commctrl.h"
  13. #include "utldict.h"
  14. class CWorkspace;
  15. class CProject;
  16. class CScene;
  17. class CVCDFile;
  18. class CWaveFile;
  19. class CWaveList;
  20. class CWorkspaceManager;
  21. class CWaveFilterTab;
  22. class CWaveOptionsWindow;
  23. class CWaveFileTree;
  24. class CWaveBrowser : public mxWindow
  25. {
  26. typedef mxWindow BaseClass;
  27. public:
  28. CWaveBrowser( mxWindow *parent, CWorkspaceManager *manager, int id );
  29. virtual int handleEvent( mxEvent *event );
  30. virtual void OnDelete();
  31. CWorkspaceManager *GetManager();
  32. void RepopulateTree();
  33. void BuildSelectionList( CUtlVector< CWaveFile * >& selected );
  34. void OnPlay();
  35. void JumpToItem( CWaveFile *wav );
  36. CWaveFile *FindEntry( char const *wavname, bool jump = false );
  37. int GetSoundCount() const;
  38. CWaveFile *GetSound( int index );
  39. void OnSearch();
  40. private:
  41. char const *GetSearchString();
  42. bool LoadWaveFilesInDirectory( CUtlDict< CWaveFile *, int >& soundlist, char const* pDirectoryName, int nDirectoryNameLen );
  43. bool InitDirectoryRecursive( CUtlDict< CWaveFile *, int >& soundlist, char const* pDirectoryName );
  44. void OnWaveProperties();
  45. void OnEnableVoiceDucking();
  46. void OnDisableVoiceDucking();
  47. void OnCheckout();
  48. void OnCheckin();
  49. void OnImportSentence();
  50. void OnExportSentence();
  51. void OnGetSentence();
  52. void PopulateTree( char const *subdirectory, bool textsearch = false );
  53. void ShowContextMenu( void );
  54. void LoadAllSounds();
  55. void RemoveAllSounds();
  56. CWaveList *m_pListView;
  57. enum
  58. {
  59. NUM_BITMAPS = 6,
  60. };
  61. CWorkspaceManager *m_pManager;
  62. CUtlDict< CWaveFile *, int > m_AllSounds;
  63. CUtlSymbolTable m_ScriptTable;
  64. CUtlVector< CUtlSymbol > m_Scripts;
  65. CWaveOptionsWindow *m_pOptions;
  66. CWaveFileTree *m_pFileTree;
  67. CUtlVector< CWaveFile * > m_CurrentSelection;
  68. };
  69. #endif // WAVEBROWSER_H