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.

68 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Defines a special dockable dialog bar that activates itself when
  4. // the mouse cursor moves over it. This enables stacking of the
  5. // bars with only a small portion of each visible.
  6. //
  7. // $Workfile: $
  8. // $Date: $
  9. //
  10. //-----------------------------------------------------------------------------
  11. // $Log: $
  12. //
  13. // $NoKeywords: $
  14. //=============================================================================//
  15. #ifndef HAMMERBAR_H
  16. #define HAMMERBAR_H
  17. #pragma once
  18. #include "utlvector.h"
  19. #define RIGHT_JUSTIFY 0x01
  20. #define BOTTOM_JUSTIFY 0x02
  21. #define GROUP_BOX 0x04
  22. struct ControlInfo_t
  23. {
  24. int m_nIDDialogItem;
  25. DWORD m_dwPlacementFlag;
  26. int m_nWidthBuffer;
  27. int m_nHeightBuffer;
  28. int m_nPosX;
  29. int m_nPosY;
  30. };
  31. class CHammerBar : public CDialogBar
  32. {
  33. public:
  34. CHammerBar(void)
  35. {
  36. }
  37. ~CHammerBar(void);
  38. BOOL Create( CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID );
  39. BOOL Create( CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID, char *pszName );
  40. CSize m_sizeDocked;
  41. CSize m_sizeFloating;
  42. virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode);
  43. virtual void OnSize( UINT nType, int cx, int cy );
  44. void AddControl( int nIDTemplate, DWORD dwPlacementFlag );
  45. void AdjustControls( void );
  46. CUtlVector< ControlInfo_t > m_ControlList;
  47. protected:
  48. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  49. DECLARE_MESSAGE_MAP()
  50. };
  51. #endif // HAMMERBAR_H