summaryrefslogtreecommitdiff
path: root/public/vgui_controls/ScrollableEditablePanel.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/vgui_controls/ScrollableEditablePanel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/vgui_controls/ScrollableEditablePanel.h')
-rw-r--r--public/vgui_controls/ScrollableEditablePanel.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/public/vgui_controls/ScrollableEditablePanel.h b/public/vgui_controls/ScrollableEditablePanel.h
new file mode 100644
index 0000000..6796405
--- /dev/null
+++ b/public/vgui_controls/ScrollableEditablePanel.h
@@ -0,0 +1,55 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================
+
+#ifndef SCROLLABLEEDITABLEPANEL_H
+#define SCROLLABLEEDITABLEPANEL_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "vgui_controls/EditablePanel.h"
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+namespace vgui
+{
+ class ScrollBar;
+}
+
+namespace vgui
+{
+
+//-----------------------------------------------------------------------------
+// An editable panel that has a scrollbar
+//-----------------------------------------------------------------------------
+class ScrollableEditablePanel : public vgui::EditablePanel
+{
+ DECLARE_CLASS_SIMPLE( ScrollableEditablePanel, vgui::EditablePanel );
+
+public:
+ ScrollableEditablePanel( vgui::Panel *pParent, vgui::EditablePanel *pChild, const char *pName );
+ virtual ~ScrollableEditablePanel() {}
+
+ virtual void ApplySettings( KeyValues *pInResourceData );
+ virtual void PerformLayout();
+
+ vgui::ScrollBar *GetScrollbar( void ) { return m_pScrollBar; }
+
+ MESSAGE_FUNC( OnScrollBarSliderMoved, "ScrollBarSliderMoved" );
+ virtual void OnMouseWheeled(int delta); // respond to mouse wheel events
+
+private:
+ vgui::ScrollBar *m_pScrollBar;
+ vgui::EditablePanel *m_pChild;
+};
+
+
+} // end namespace vgui
+
+#endif // SCROLLABLEEDITABLEPANEL_H \ No newline at end of file