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.

75 lines
2.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ICONCOMBOBOX_H
  8. #define ICONCOMBOBOX_H
  9. #pragma once
  10. //=============================================================================
  11. //
  12. // Icon Combo Box
  13. //
  14. // NOTE: the combo box setting should contain the following:
  15. // Type: DropList
  16. // Owner Draw: Variable
  17. // HasStrings: checked
  18. // VSCROLL
  19. //
  20. class CIconComboBox : public CComboBox
  21. {
  22. public:
  23. //=========================================================================
  24. //
  25. // Construction/Deconstruction
  26. //
  27. CIconComboBox();
  28. virtual ~CIconComboBox();
  29. void Init( void );
  30. //=========================================================================
  31. //
  32. // Operations
  33. //
  34. int AddIcon( LPCTSTR pIconName );
  35. int InsertIcon( LPCTSTR pIconName, int ndx );
  36. int SelectIcon( LPCTSTR pIconName );
  37. int SelectIcon( int ndx );
  38. int DeleteIcon( LPCTSTR pIconName );
  39. int DeleteIcon( int ndx );
  40. //protected:
  41. CSize m_IconSize; // icon dimensions
  42. //=========================================================================
  43. //
  44. // Overloaded String Operations
  45. //
  46. int AddString( LPCTSTR lpszString );
  47. int InsertString( int nIndex, LPCTSTR lpszString );
  48. int DeleteString( int nIndex );
  49. //=========================================================================
  50. //
  51. // Overrides
  52. //
  53. void MeasureItem( LPMEASUREITEMSTRUCT lpMeasureItemStruct );
  54. void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
  55. //=========================================================================
  56. //
  57. //
  58. //
  59. void OnDrawIcon( LPDRAWITEMSTRUCT lpDrawItemStruct );
  60. void SetDisabledBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush **ppOldBrush, CPen **ppOldPen );
  61. void SetUnSelectedBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush **ppOldBrush, CPen **ppOldPen );
  62. void SetSelectedBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush **ppOldBrush, CPen **ppOldPen );
  63. void ResetBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush *pBrush, CPen *pPen );
  64. };
  65. #endif // ICONCOMBOBOX_H