This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
MyGameFramework/lib/gwen/controls/gwen_verticalscrollbar.h
Gered c5cdddbeaa initial commit
current versions of all of my basic framework sources, build configurations/scripts, and supporting assets
2013-01-31 12:53:05 -05:00

48 lines
1.1 KiB
C++

/*
GWEN
Copyright (c) 2010 Facepunch Studios
See license in Gwen.h
*/
#pragma once
#ifndef GWEN_CONTROLS_VERTICALSCROLLBAR_H
#define GWEN_CONTROLS_VERTICALSCROLLBAR_H
#include "gwen_base.h"
#include "gwen_scrollbar.h"
#include "../gwen.h"
#include "../gwen_skin.h"
namespace Gwen
{
namespace Controls
{
class GWEN_EXPORT VerticalScrollBar : public BaseScrollBar
{
GWEN_CONTROL( VerticalScrollBar, BaseScrollBar );
virtual void Layout( Skin::Base* skin );
virtual void OnMouseClickLeft( int x, int y, bool bDown );
virtual void OnBarMoved( Controls::Base* control );
virtual int GetBarSize() { return m_Bar->Height(); }
virtual int GetBarPos() { return m_Bar->Y() - Width(); }
virtual void SetBarSize( int size ) { m_Bar->SetHeight( size ); }
virtual int GetButtonSize() { return Width(); }
virtual void ScrollToTop();
virtual void ScrollToBottom();
virtual void NudgeUp( Base* control );
virtual void NudgeDown( Base* control );
virtual float GetNudgeAmount();
virtual float CalculateScrolledAmount();
virtual bool SetScrolledAmount(float amount, bool forceUpdate);
};
}
}
#endif