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.

101 lines
2.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #if !defined(AFX_SOUNDBROWSER_H__33046A12_7CF9_4031_AD10_A76200E73280__INCLUDED_)
  7. #define AFX_SOUNDBROWSER_H__33046A12_7CF9_4031_AD10_A76200E73280__INCLUDED_
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11. // SoundBrowser.h : header file
  12. //
  13. #include "soundsystem.h"
  14. #include "AutoSelCombo.h"
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CSoundBrowser dialog
  17. class CSoundBrowser : public CDialog
  18. {
  19. // Construction
  20. public:
  21. CSoundBrowser( const char *pCurrentSoundName, CWnd* pParent = NULL); // standard constructor
  22. const char *GetSelectedSound();
  23. // Dialog Data
  24. //{{AFX_DATA(CSoundBrowser)
  25. enum { IDD = IDD_SOUNDBROWSER };
  26. CListBox m_SoundList;
  27. CString m_SoundNameSelected;
  28. int m_SoundType;
  29. BOOL m_Autoplay;
  30. CString m_SoundFile;
  31. CString m_SoundSource;
  32. //}}AFX_DATA
  33. // Overrides
  34. // ClassWizard generated virtual function overrides
  35. //{{AFX_VIRTUAL(CSoundBrowser)
  36. public:
  37. virtual int DoModal();
  38. protected:
  39. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  40. //}}AFX_VIRTUAL
  41. void SaveValues();
  42. // Implementation
  43. protected:
  44. // Generated message map functions
  45. //{{AFX_MSG(CSoundBrowser)
  46. virtual BOOL OnInitDialog();
  47. afx_msg void OnClose();
  48. afx_msg void OnChangeFilter();
  49. afx_msg void OnUpdateFilterNOW();
  50. afx_msg void OnSelchangeSoundType();
  51. afx_msg void OnSelchangeSoundList();
  52. afx_msg void OnDblclkSoundList();
  53. afx_msg void OnPreview();
  54. afx_msg void OnAutoplay();
  55. afx_msg void OnBnClickedStopsound();
  56. afx_msg void OnRefreshSounds();
  57. afx_msg void OnTimer(UINT nIDEvent);
  58. afx_msg void OnOpenSource();
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. private:
  62. void Shutdown();
  63. void ClearSoundList();
  64. void PopulateSoundList();
  65. void CopySoundNameToSelected();
  66. SoundType_t GetSoundType() const;
  67. bool ShowSoundInList( const char *pSoundName );
  68. void OnFilterChanged( const char *pFilter );
  69. DWORD m_uLastFilterChange;
  70. BOOL m_bFilterChanged;
  71. BOOL m_bSoundPlayed; // used so we can do a timer query to keep disable the stop sound button
  72. DWORD m_uSoundPlayTime;
  73. int m_nSelectedSoundIndex;
  74. CAutoSelComboBox m_cFilter;
  75. char m_szFilter[256]; // Name filter, space, comma, or semicolon delimited.
  76. int m_nFilters; // The number of names that were parsed out of the name filter.
  77. char *m_Filters[64]; // The individual name filters.
  78. static CStringArray m_FilterHistory;
  79. static int m_nFilterHistory;
  80. };
  81. //{{AFX_INSERT_LOCATION}}
  82. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  83. #endif // !defined(AFX_SOUNDBROWSER_H__33046A12_7CF9_4031_AD10_A76200E73280__INCLUDED_)