PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ScrollBarContainer Class Reference

Private Member Functions

void ~ScrollBarContainer ()
 
void ScrollFixedAmount (bool down, float amount)
 
void ScrollToPos (float pos)
 
void ScrollToBottom ()
 
void ScrollToTop ()
 
float GetContentYPos ()
 
float GetRootHeight ()
 
void UpdateScroller ()
 
void OnWidgetScriptInit (Widget w)
 
protected void StopScrolling ()
 
protected void UpdateScroll (int mouse_x, int mouse_y, bool is_dragging)
 
override bool OnMouseButtonDown (Widget w, int x, int y, int button)
 
override bool OnMouseButtonUp (Widget w, int x, int y, int button)
 
override bool OnMouseWheel (Widget w, int x, int y, int wheel)
 
override bool OnResize (Widget w, int x, int y)
 

Private Attributes

reference bool Invert
 
protected Widget Content
 
protected Widget ScrollBar
 
protected Widget Scroller
 
protected Widget m_root
 
const int WHEEL_STEP = 20
 
protected float m_root_height
 
protected float m_content_height
 
protected float m_position
 
protected bool m_scrolling
 
protected float m_scrolling_start_pos
 
protected int m_scrolling_mouse_pos
 

Constructor & Destructor Documentation

◆ ~ScrollBarContainer()

void ~ScrollBarContainer ( )
inlineprivate

Member Function Documentation

◆ GetContentYPos()

float GetContentYPos ( )
inlineprivate

References Content, x, and y.

◆ GetRootHeight()

float GetRootHeight ( )
inlineprivate

References m_root_height.

◆ OnMouseButtonDown()

override bool OnMouseButtonDown ( Widget  w,
int  x,
int  y,
int  button 
)
inlineprivate

◆ OnMouseButtonUp()

override bool OnMouseButtonUp ( Widget  w,
int  x,
int  y,
int  button 
)
inlineprivate

References StopScrolling().

◆ OnMouseWheel()

override bool OnMouseWheel ( Widget  w,
int  x,
int  y,
int  wheel 
)
inlineprivate

◆ OnResize()

override bool OnResize ( Widget  w,
int  x,
int  y 
)
inlineprivate

References Content, m_root, and UpdateScroller().

◆ OnWidgetScriptInit()

void OnWidgetScriptInit ( Widget  w)
inlineprivate

References m_root, m_scrolling, and UpdateScroller().

◆ ScrollFixedAmount()

void ScrollFixedAmount ( bool  down,
float  amount 
)
inlineprivate

◆ ScrollToBottom()

void ScrollToBottom ( )
inlineprivate

◆ ScrollToPos()

void ScrollToPos ( float  pos)
inlineprivate

◆ ScrollToTop()

void ScrollToTop ( )
inlineprivate

References m_position, and UpdateScroller().

◆ StopScrolling()

protected void StopScrolling ( )
inlineprivate

◆ UpdateScroll()

protected void UpdateScroll ( int  mouse_x,
int  mouse_y,
bool  is_dragging 
)
inlineprivate

◆ UpdateScroller()

Field Documentation

◆ Content

◆ Invert

reference bool Invert
private

Referenced by UpdateScroller().

◆ m_content_height

protected float m_content_height
private

◆ m_position

◆ m_root

◆ m_root_height

◆ m_scrolling

protected bool m_scrolling
private

◆ m_scrolling_mouse_pos

protected int m_scrolling_mouse_pos
private

Referenced by OnMouseButtonDown(), and UpdateScroll().

◆ m_scrolling_start_pos

protected float m_scrolling_start_pos
private

Referenced by OnMouseButtonDown(), and UpdateScroll().

◆ ScrollBar

protected Widget ScrollBar
private

Referenced by UpdateScroller().

◆ Scroller

protected Widget Scroller
private

◆ WHEEL_STEP

const int WHEEL_STEP = 20
private

Referenced by OnMouseWheel().


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