24 #ifndef INCLUDED_IGUISCROLLBAR 25 #define INCLUDED_IGUISCROLLBAR 175 virtual void HandleMessage(
SGUIMessage& Message) = 0;
180 virtual void SetPosFromMousePos(
const CVector2D& mouse) = 0;
206 virtual void SetPos(
float f) { m_Pos = f; UpdatePosBoundaries(); }
211 float GetMaxPos()
const {
return std::max(0.f, m_ScrollRange - m_ScrollSpace); }
221 virtual void ScrollPlus() { m_Pos += 30.f; UpdatePosBoundaries(); }
226 virtual void ScrollMinus() { m_Pos -= 30.f; UpdatePosBoundaries(); }
254 void SetX(
float x) { m_X = x; }
260 void SetY(
float y) { m_Y = y; }
266 void SetZ(
float z) { m_Z = z; }
278 void SetScrollRange(
float range) { m_ScrollRange = std::max(range, 1.f); SetupBarSize(); UpdatePosBoundaries(); }
284 void SetScrollSpace(
float space) { m_ScrollSpace = space; SetupBarSize(); UpdatePosBoundaries(); }
308 virtual CRect GetBarRect()
const = 0;
315 virtual CRect GetOuterRect()
const = 0;
326 void UpdatePosBoundaries();
441 #endif // INCLUDED_IGUISCROLLBAR
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Definition: code_annotation.h:38
void Draw(DrawCalls &Calls, CCanvas2D &canvas)
Definition: GUIRenderer.cpp:314
The main object that represents a whole GUI page.
Definition: CGUI.h:60
Definition: Canvas2D.h:35
Definition: Vector2D.h:31
Definition: CGUISprite.h:133
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
Definition: SGUIMessage.h:67
Rectangle class used for screen rectangles.
Definition: Rect.h:30