1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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
|