diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/iconcombobox.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/iconcombobox.h')
| -rw-r--r-- | hammer/iconcombobox.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/hammer/iconcombobox.h b/hammer/iconcombobox.h new file mode 100644 index 0000000..a7cbfbb --- /dev/null +++ b/hammer/iconcombobox.h @@ -0,0 +1,76 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef ICONCOMBOBOX_H +#define ICONCOMBOBOX_H +#pragma once + +//============================================================================= +// +// Icon Combo Box +// +// NOTE: the combo box setting should contain the following: +// Type: DropList +// Owner Draw: Variable +// HasStrings: checked +// VSCROLL +// +class CIconComboBox : public CComboBox +{ +public: + + //========================================================================= + // + // Construction/Deconstruction + // + CIconComboBox(); + virtual ~CIconComboBox(); + + void Init( void ); + + //========================================================================= + // + // Operations + // + int AddIcon( LPCTSTR pIconName ); + int InsertIcon( LPCTSTR pIconName, int ndx ); + int SelectIcon( LPCTSTR pIconName ); + int SelectIcon( int ndx ); + int DeleteIcon( LPCTSTR pIconName ); + int DeleteIcon( int ndx ); + +//protected: + + CSize m_IconSize; // icon dimensions + + //========================================================================= + // + // Overloaded String Operations + // + int AddString( LPCTSTR lpszString ); + int InsertString( int nIndex, LPCTSTR lpszString ); + int DeleteString( int nIndex ); + + //========================================================================= + // + // Overrides + // + void MeasureItem( LPMEASUREITEMSTRUCT lpMeasureItemStruct ); + void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct ); + + //========================================================================= + // + // + // + void OnDrawIcon( LPDRAWITEMSTRUCT lpDrawItemStruct ); + void SetDisabledBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush **ppOldBrush, CPen **ppOldPen ); + void SetUnSelectedBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush **ppOldBrush, CPen **ppOldPen ); + void SetSelectedBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush **ppOldBrush, CPen **ppOldPen ); + void ResetBrushAndPen( LPDRAWITEMSTRUCT lpDrawItemStruct, CBrush *pBrush, CPen *pPen ); +}; + +#endif // ICONCOMBOBOX_H
\ No newline at end of file |