37 #ifndef INCLUDED_IGUISCROLLBAR 38 #define INCLUDED_IGUISCROLLBAR 165 virtual void Draw() = 0;
174 virtual void HandleMessage(
SGUIMessage& Message) = 0;
179 virtual void SetPosFromMousePos(
const CPos& mouse) = 0;
205 virtual void SetPos(
float f) { m_Pos = f; UpdatePosBoundaries(); }
210 float GetMaxPos()
const {
return std::max(1.f, m_ScrollRange - m_ScrollSpace); }
220 virtual void ScrollPlus() { m_Pos += 30.f; UpdatePosBoundaries(); }
225 virtual void ScrollMinus() { m_Pos -= 30.f; UpdatePosBoundaries(); }
247 CGUI* GetGUI()
const;
265 void SetX(
float x) { m_X = x; }
271 void SetY(
float y) { m_Y = y; }
277 void SetZ(
float z) { m_Z = z; }
289 void SetScrollRange(
float range) { m_ScrollRange = std::max(range, 1.f); SetupBarSize(); UpdatePosBoundaries(); }
295 void SetScrollSpace(
float space) { m_ScrollSpace = space; SetupBarSize(); UpdatePosBoundaries(); }
319 virtual CRect GetBarRect()
const = 0;
326 virtual CRect GetOuterRect()
const = 0;
337 void UpdatePosBoundaries();
452 #endif // INCLUDED_IGUISCROLLBAR
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Definition: code_annotation.h:38
The main object that represents a whole GUI page.
Definition: CGUI.h:75
Made to represent screen positions and delta values.
Definition: Shapes.h:169
void Draw(DrawCalls &Calls, float Z)
Definition: GUIRenderer.cpp:345
Definition: CGUISprite.h:158
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
Definition: GUIbase.h:91
Rectangle class used for screen rectangles.
Definition: Shapes.h:73