Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
CGUIScrollBarVertical Class Reference

Vertical implementation of IGUIScrollBar. More...

#include <CGUIScrollBarVertical.h>

Inheritance diagram for CGUIScrollBarVertical:
IGUIScrollBar

Public Member Functions

 CGUIScrollBarVertical ()
 
virtual ~CGUIScrollBarVertical ()
 
virtual void Draw ()
 Draw the scroll-bar. More...
 
virtual void HandleMessage (SGUIMessage &Message)
 If an object that contains a scrollbar has got messages, send them to the scroll-bar and it will see if the message regarded itself. More...
 
virtual void SetPosFromMousePos (const CPos &mouse)
 Set m_Pos with g_mouse_x/y input, i.e. More...
 
virtual bool HoveringButtonMinus (const CPos &mouse)
 
virtual bool HoveringButtonPlus (const CPos &mouse)
 
void SetRightAligned (const bool &align)
 Set Right Aligned. More...
 
virtual CRect GetBarRect () const
 Get the rectangle of the actual BAR. More...
 
virtual CRect GetOuterRect () const
 Get the rectangle of the outline of the scrollbar, every component of the scroll-bar should be inside this area. More...
 
- Public Member Functions inherited from IGUIScrollBar
 IGUIScrollBar ()
 
virtual ~IGUIScrollBar ()
 
float GetPos () const
 Get scroll-position. More...
 
virtual void SetPos (float f)
 Set scroll-position by hand. More...
 
float GetMaxPos () const
 Get the value of m_Pos that corresponds to the bottom of the scrollable region. More...
 
virtual void ScrollPlus ()
 Increase scroll one step. More...
 
virtual void ScrollMinus ()
 Decrease scroll one step. More...
 
virtual void ScrollPlusPlenty ()
 Increase scroll three steps. More...
 
virtual void ScrollMinusPlenty ()
 Decrease scroll three steps. More...
 
void SetHostObject (IGUIScrollBarOwner *pOwner)
 Set host object, must be done almost at creation of scroll bar. More...
 
CGUIGetGUI () const
 Get GUI pointer. More...
 
void SetGUI (CGUI *pGUI)
 Set GUI pointer. More...
 
void SetWidth (float width)
 Set Width. More...
 
void SetX (float x)
 Set X Position. More...
 
void SetY (float y)
 Set Y Position. More...
 
void SetZ (float z)
 Set Z Position. More...
 
void SetLength (float length)
 Set Length of scroll bar. More...
 
void SetScrollRange (float range)
 Set content length. More...
 
void SetScrollSpace (float space)
 Set space that is visible in the scrollable control. More...
 
void SetBarPressed (bool b)
 Set bar pressed. More...
 
void SetUseEdgeButtons (bool b)
 Set use edge buttons. More...
 
void SetScrollBarStyle (const CStr &style)
 Set Scroll bar style string. More...
 
const SGUIScrollBarStyleGetStyle () const
 Get style used by the scrollbar. More...
 

Protected Attributes

bool m_RightAligned
 Should the scroll bar proceed to the left or to the right of the m_X value. More...
 
- Protected Attributes inherited from IGUIScrollBar
bool m_UseEdgeButtons
 True if you want edge buttons, i.e. More...
 
float m_Width
 Width of the scroll bar. More...
 
float m_X
 Absolute X Position. More...
 
float m_Y
 Absolute Y Position. More...
 
float m_Z
 Absolute Z Position. More...
 
float m_Length
 Total length of scrollbar, including edge buttons. More...
 
float m_ScrollRange
 Content that can be scrolled, in pixels. More...
 
float m_ScrollSpace
 Content that can be viewed at a time, in pixels. More...
 
float m_BarSize
 Use input from the scroll-wheel? True or false. More...
 
CStr m_ScrollBarStyle
 Scroll bar style reference name. More...
 
SGUIScrollBarStylem_pStyle
 Pointer to scroll bar style used. More...
 
IGUIScrollBarOwnerm_pHostObject
 Host object, prerequisite! More...
 
CGUIm_pGUI
 Reference to CGUI object, these cannot work stand-alone. More...
 
CPos m_BarPressedAtPos
 Mouse position when bar was pressed. More...
 
bool m_BarPressed
 If the bar is currently being pressed and dragged. More...
 
bool m_BarHovered
 Bar being hovered or not. More...
 
bool m_ButtonMinusHovered
 Scroll buttons hovered. More...
 
bool m_ButtonPlusHovered
 
bool m_ButtonMinusPressed
 Scroll buttons pressed. More...
 
bool m_ButtonPlusPressed
 
float m_Pos
 Position of scroll bar, 0 means scrolled all the way to one side. More...
 
float m_PosWhenPressed
 Position from 0.f to 1.f it had when the bar was pressed. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IGUIScrollBar
void SetupBarSize ()
 Sets up bar size. More...
 
void UpdatePosBoundaries ()
 Call every time m_Pos has been updated. More...
 

Detailed Description

Vertical implementation of IGUIScrollBar.

See Also
IGUIScrollBar

Definition at line 55 of file CGUIScrollBarVertical.h.

Constructor & Destructor Documentation

CGUIScrollBarVertical::CGUIScrollBarVertical ( )

Definition at line 28 of file CGUIScrollBarVertical.cpp.

CGUIScrollBarVertical::~CGUIScrollBarVertical ( )
virtual

Definition at line 32 of file CGUIScrollBarVertical.cpp.

Member Function Documentation

void CGUIScrollBarVertical::Draw ( )
virtual

Draw the scroll-bar.

Implements IGUIScrollBar.

Definition at line 47 of file CGUIScrollBarVertical.cpp.

CRect CGUIScrollBarVertical::GetBarRect ( ) const
virtual

Get the rectangle of the actual BAR.

Returns
Rectangle, CRect

Implements IGUIScrollBar.

Definition at line 129 of file CGUIScrollBarVertical.cpp.

CRect CGUIScrollBarVertical::GetOuterRect ( ) const
virtual

Get the rectangle of the outline of the scrollbar, every component of the scroll-bar should be inside this area.

Returns
Rectangle, CRect

Implements IGUIScrollBar.

Definition at line 154 of file CGUIScrollBarVertical.cpp.

void CGUIScrollBarVertical::HandleMessage ( SGUIMessage Message)
virtual

If an object that contains a scrollbar has got messages, send them to the scroll-bar and it will see if the message regarded itself.

See Also
IGUIObject::HandleMessage()

Implements IGUIScrollBar.

Definition at line 124 of file CGUIScrollBarVertical.cpp.

bool CGUIScrollBarVertical::HoveringButtonMinus ( const CPos mouse)
virtual
See Also
IGUIScrollBar::HoveringButtonMinus

Reimplemented from IGUIScrollBar.

Definition at line 168 of file CGUIScrollBarVertical.cpp.

bool CGUIScrollBarVertical::HoveringButtonPlus ( const CPos mouse)
virtual
See Also
IGUIScrollBar::HoveringButtonPlus

Reimplemented from IGUIScrollBar.

Definition at line 181 of file CGUIScrollBarVertical.cpp.

void CGUIScrollBarVertical::SetPosFromMousePos ( const CPos mouse)
virtual

Set m_Pos with g_mouse_x/y input, i.e.

when dragging.

Calculate the position for the top of the item being scrolled

Implements IGUIScrollBar.

Definition at line 36 of file CGUIScrollBarVertical.cpp.

void CGUIScrollBarVertical::SetRightAligned ( const bool &  align)
inline

Set Right Aligned.

Parameters
alignAlignment

Definition at line 95 of file CGUIScrollBarVertical.h.

Member Data Documentation

bool CGUIScrollBarVertical::m_RightAligned
protected

Should the scroll bar proceed to the left or to the right of the m_X value.

Notice, this has nothing to do with where the owner places it.

Definition at line 115 of file CGUIScrollBarVertical.h.


The documentation for this class was generated from the following files: