代码拉取完成,页面将自动刷新
//===== Copyright ?1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#ifndef SCROLLBARSLIDER_H
#define SCROLLBARSLIDER_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui/VGUI2.h>
#include "Panel.h"
namespace vgui2
{
class IBorder;
//-----------------------------------------------------------------------------
// Purpose: ScrollBarSlider bar, as used in ScrollBar's
//-----------------------------------------------------------------------------
class ScrollBarSlider : public Panel
{
DECLARE_CLASS_SIMPLE( ScrollBarSlider, Panel );
public:
ScrollBarSlider(Panel *parent, const char *panelName, bool vertical);
// Set the ScrollBarSlider value of the nob.
virtual void SetValue(int value);
virtual int GetValue();
// Check whether the scroll bar is vertical or not
virtual bool IsVertical();
// Set max and min range of lines to display
virtual void SetRange(int min, int max);
virtual void GetRange(int &min, int &max);
// Set number of rows that can be displayed in window
virtual void SetRangeWindow(int rangeWindow);
// Get number of rows that can be displayed in window
virtual int GetRangeWindow();
// Set the size of the ScrollBarSlider nob
virtual void SetSize(int wide, int tall);
// Get current ScrollBarSlider bounds
virtual void GetNobPos(int &min, int &max);
virtual bool HasFullRange();
virtual void SetButtonOffset(int buttonOffset);
virtual void OnCursorMoved(int x, int y);
virtual void OnMousePressed(MouseCode code);
virtual void OnMouseDoublePressed(MouseCode code);
virtual void OnMouseReleased(MouseCode code);
// Return true if this slider is actually drawing itself
virtual bool IsSliderVisible(void);
protected:
virtual void Paint();
virtual void PaintBackground();
virtual void PerformLayout();
virtual void ApplySchemeSettings(IScheme *pScheme);
private:
virtual void RecomputeNobPosFromValue();
virtual void RecomputeValueFromNobPos();
virtual void SendScrollBarSliderMovedMessage();
bool _vertical;
bool _dragging;
int _nobPos[2];
int _nobDragStartPos[2];
int _dragStartPos[2];
int _range[2];
int _value; // the position of the ScrollBarSlider, in coordinates as specified by SetRange/SetRangeWindow
int _rangeWindow;
int _buttonOffset;
IBorder *_ScrollBarSliderBorder;
bool _imageBackground;
IImage *_verticalImage[3];
};
} // namespace vgui
#endif // SCROLLBARSLIDER_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。