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.

70 lines
1.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // This menu bar displays a couple extra labels:
  4. // one which contains the tool name, and one which contains a arbitrary info
  5. //
  6. //=============================================================================
  7. #ifndef TOOLMENUBAR_H
  8. #define TOOLMENUBAR_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "vgui_controls/menubar.h"
  13. using namespace vgui;
  14. //-----------------------------------------------------------------------------
  15. // Forward declarations
  16. //-----------------------------------------------------------------------------
  17. namespace vgui
  18. {
  19. class Panel;
  20. class Label;
  21. }
  22. class CBaseToolSystem;
  23. //-----------------------------------------------------------------------------
  24. // Main menu bar
  25. //-----------------------------------------------------------------------------
  26. class CToolMenuBar : public vgui::MenuBar
  27. {
  28. DECLARE_CLASS_SIMPLE( CToolMenuBar, vgui::MenuBar );
  29. public:
  30. CToolMenuBar( CBaseToolSystem *parent, const char *panelName );
  31. virtual void PerformLayout();
  32. void SetToolName( const char *name );
  33. void SetInfo( const char *text );
  34. CBaseToolSystem *GetToolSystem();
  35. protected:
  36. Label *m_pInfo;
  37. Label *m_pToolName;
  38. CBaseToolSystem *m_pToolSystem;
  39. };
  40. //-----------------------------------------------------------------------------
  41. // Main menu bar version that stores file name on it
  42. //-----------------------------------------------------------------------------
  43. class CToolFileMenuBar : public CToolMenuBar
  44. {
  45. DECLARE_CLASS_SIMPLE( CToolFileMenuBar, CToolMenuBar );
  46. public:
  47. CToolFileMenuBar( CBaseToolSystem *parent, const char *panelName );
  48. virtual void PerformLayout();
  49. void SetFileName( const char *pFileName );
  50. private:
  51. Label *m_pFileName;
  52. };
  53. #endif // TOOLMENUBAR_H