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/hammerbar.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/hammerbar.h')
| -rw-r--r-- | hammer/hammerbar.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/hammer/hammerbar.h b/hammer/hammerbar.h new file mode 100644 index 0000000..67f0b12 --- /dev/null +++ b/hammer/hammerbar.h @@ -0,0 +1,68 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Defines a special dockable dialog bar that activates itself when +// the mouse cursor moves over it. This enables stacking of the +// bars with only a small portion of each visible. +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef HAMMERBAR_H +#define HAMMERBAR_H +#pragma once + +#include "utlvector.h" + +#define RIGHT_JUSTIFY 0x01 +#define BOTTOM_JUSTIFY 0x02 +#define GROUP_BOX 0x04 + +struct ControlInfo_t +{ + int m_nIDDialogItem; + DWORD m_dwPlacementFlag; + int m_nWidthBuffer; + int m_nHeightBuffer; + int m_nPosX; + int m_nPosY; +}; + +class CHammerBar : public CDialogBar +{ + public: + + CHammerBar(void) + { + } + + ~CHammerBar(void); + + BOOL Create( CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID ); + BOOL Create( CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID, char *pszName ); + + CSize m_sizeDocked; + CSize m_sizeFloating; + + virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode); + virtual void OnSize( UINT nType, int cx, int cy ); + + void AddControl( int nIDTemplate, DWORD dwPlacementFlag ); + void AdjustControls( void ); + + CUtlVector< ControlInfo_t > m_ControlList; + + protected: + + afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); + + DECLARE_MESSAGE_MAP() +}; + + +#endif // HAMMERBAR_H |