Counter Strike : Global Offensive Source Code
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.

53 lines
1.4 KiB

  1. //========= Copyright � 1996-2001, Valve LLC, All rights reserved. ============
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef SCROLLABLEEDITABLEPANEL_H
  8. #define SCROLLABLEEDITABLEPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "vgui_controls/EditablePanel.h"
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. namespace vgui
  17. {
  18. class ScrollBar;
  19. }
  20. namespace vgui
  21. {
  22. //-----------------------------------------------------------------------------
  23. // An editable panel that has a scrollbar
  24. //-----------------------------------------------------------------------------
  25. class ScrollableEditablePanel : public vgui::EditablePanel
  26. {
  27. DECLARE_CLASS_SIMPLE( ScrollableEditablePanel, vgui::EditablePanel );
  28. public:
  29. ScrollableEditablePanel( vgui::Panel *pParent, vgui::EditablePanel *pChild, const char *pName );
  30. virtual ~ScrollableEditablePanel() {}
  31. virtual void PerformLayout();
  32. vgui::ScrollBar *GetScrollbar( void ) { return m_pScrollBar; }
  33. virtual void OnMouseWheeled(int delta);
  34. MESSAGE_FUNC( OnScrollBarSliderMoved, "ScrollBarSliderMoved" );
  35. private:
  36. vgui::ScrollBar *m_pScrollBar;
  37. vgui::EditablePanel *m_pChild;
  38. };
  39. } // end namespace vgui
  40. #endif // SCROLLABLEEDITABLEPANEL_H