Minetest  5.4.0
GUIScrollBar Class Reference

#include <guiScrollBar.h>

+ Inheritance diagram for GUIScrollBar:
+ Collaboration diagram for GUIScrollBar:

Public Types

enum  ArrowVisibility { HIDE , SHOW , DEFAULT }
 

Public Member Functions

 GUIScrollBar (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle, bool horizontal, bool auto_scale)
 
virtual void draw ()
 
virtual void updateAbsolutePosition ()
 
virtual bool OnEvent (const SEvent &event)
 
s32 getMax () const
 
s32 getMin () const
 
s32 getLargeStep () const
 
s32 getSmallStep () const
 
s32 getPos () const
 
void setMax (const s32 &max)
 
void setMin (const s32 &min)
 
void setSmallStep (const s32 &step)
 
void setLargeStep (const s32 &step)
 
void setPos (const s32 &pos)
 
void setPageSize (const s32 &size)
 
void setArrowsVisible (ArrowVisibility visible)
 

Private Member Functions

void refreshControls ()
 
s32 getPosFromMousePos (const core::position2di &p) const
 
f32 range () const
 

Private Attributes

IGUIButton * up_button
 
IGUIButton * down_button
 
ArrowVisibility arrow_visibility = DEFAULT
 
bool is_dragging
 
bool is_horizontal
 
bool is_auto_scaling
 
bool dragged_by_slider
 
bool tray_clicked
 
s32 scroll_pos
 
s32 draw_center
 
s32 thumb_size
 
s32 min_pos
 
s32 max_pos
 
s32 small_step
 
s32 large_step
 
s32 drag_offset
 
s32 page_size
 
s32 border_size
 
core::rect< s32 > slider_rect
 
video::SColor current_icon_color
 

Member Enumeration Documentation

◆ ArrowVisibility

Enumerator
HIDE 
SHOW 
DEFAULT 

Constructor & Destructor Documentation

◆ GUIScrollBar()

GUIScrollBar::GUIScrollBar ( IGUIEnvironment *  environment,
IGUIElement *  parent,
s32  id,
core::rect< s32 >  rectangle,
bool  horizontal,
bool  auto_scale 
)

References refreshControls(), and setPos().

+ Here is the call graph for this function:

Member Function Documentation

◆ draw()

void GUIScrollBar::draw ( )
virtual

References current_icon_color, draw_center, is_horizontal, range(), refreshControls(), slider_rect, and thumb_size.

+ Here is the call graph for this function:

◆ getLargeStep()

s32 GUIScrollBar::getLargeStep ( ) const
inline

◆ getMax()

s32 GUIScrollBar::getMax ( ) const
inline

Referenced by GUIEditBox::updateVScrollBar().

+ Here is the caller graph for this function:

◆ getMin()

s32 GUIScrollBar::getMin ( ) const
inline

◆ getPos()

s32 GUIScrollBar::getPos ( ) const

References scroll_pos.

Referenced by GUIFormSpecMenu::acceptInput(), GUITable::autoScroll(), GUITable::draw(), GUITable::getDynamicData(), GUITable::getRowAt(), GUIHyperText::OnEvent(), OnEvent(), GUITable::OnEvent(), GUIEditBox::processMouse(), GUIScrollContainer::updateScrolling(), and GUIEditBox::updateVScrollBar().

+ Here is the caller graph for this function:

◆ getPosFromMousePos()

s32 GUIScrollBar::getPosFromMousePos ( const core::position2di &  p) const
private

References border_size, drag_offset, dragged_by_slider, is_horizontal, min_pos, p(), range(), and thumb_size.

Referenced by OnEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSmallStep()

s32 GUIScrollBar::getSmallStep ( ) const
inline

Referenced by GUIHyperText::OnEvent(), and GUIEditBox::processMouse().

+ Here is the caller graph for this function:

◆ OnEvent()

bool GUIScrollBar::OnEvent ( const SEvent &  event)
virtual

References down_button, drag_offset, dragged_by_slider, getPos(), getPosFromMousePos(), is_dragging, is_horizontal, large_step, max_pos, min_pos, p(), scroll_pos, setPos(), slider_rect, small_step, thumb_size, tray_clicked, and up_button.

Referenced by GUIScrollContainer::OnEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ range()

f32 GUIScrollBar::range ( ) const
inlineprivate

Referenced by draw(), getPosFromMousePos(), setMax(), setMin(), and setPos().

+ Here is the caller graph for this function:

◆ refreshControls()

void GUIScrollBar::refreshControls ( )
private

References arrow_visibility, border_size, current_icon_color, DEFAULT, down_button, HIDE, is_horizontal, and up_button.

Referenced by GUIScrollBar(), draw(), setArrowsVisible(), and updateAbsolutePosition().

+ Here is the caller graph for this function:

◆ setArrowsVisible()

void GUIScrollBar::setArrowsVisible ( ArrowVisibility  visible)

References arrow_visibility, and refreshControls().

Referenced by GUIFormSpecMenu::parseScrollBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLargeStep()

void GUIScrollBar::setLargeStep ( const s32 &  step)

References large_step.

Referenced by GUIEditBoxWithScrollBar::createVScrollBar(), irr::gui::intlGUIEditBox::createVScrollBar(), GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), and GUITable::updateScrollBar().

+ Here is the caller graph for this function:

◆ setMax()

void GUIScrollBar::setMax ( const s32 &  max)

References down_button, max_pos, min_pos, range(), scroll_pos, setPos(), and up_button.

Referenced by GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), GUITable::updateScrollBar(), and GUIEditBox::updateVScrollBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMin()

void GUIScrollBar::setMin ( const s32 &  min)

References down_button, max_pos, min_pos, range(), scroll_pos, setPos(), and up_button.

Referenced by GUIFormSpecMenu::parseScrollBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPageSize()

void GUIScrollBar::setPageSize ( const s32 &  size)

References page_size, scroll_pos, and setPos().

Referenced by GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), GUITable::updateScrollBar(), and GUIEditBox::updateVScrollBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPos()

void GUIScrollBar::setPos ( const s32 &  pos)

References border_size, draw_center, is_auto_scaling, is_horizontal, max_pos, min_pos, page_size, range(), scroll_pos, and thumb_size.

Referenced by GUIScrollBar(), GUITable::GUITable(), GUITable::autoScroll(), GUIEditBoxWithScrollBar::calculateScrollPos(), irr::gui::intlGUIEditBox::calculateScrollPos(), GUIHyperText::draw(), GUIHyperText::OnEvent(), OnEvent(), GUITable::OnEvent(), GUIFormSpecMenu::parseScrollBar(), GUIEditBox::processMouse(), GUITable::setDynamicData(), setMax(), setMin(), setPageSize(), updateAbsolutePosition(), and GUIEditBox::updateVScrollBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSmallStep()

void GUIScrollBar::setSmallStep ( const s32 &  step)

References small_step.

Referenced by GUIEditBoxWithScrollBar::createVScrollBar(), irr::gui::intlGUIEditBox::createVScrollBar(), GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), and GUITable::updateScrollBar().

+ Here is the caller graph for this function:

◆ updateAbsolutePosition()

void GUIScrollBar::updateAbsolutePosition ( )
virtual

References refreshControls(), scroll_pos, and setPos().

+ Here is the call graph for this function:

Member Data Documentation

◆ arrow_visibility

ArrowVisibility GUIScrollBar::arrow_visibility = DEFAULT
private

◆ border_size

s32 GUIScrollBar::border_size
private

◆ current_icon_color

video::SColor GUIScrollBar::current_icon_color
private

Referenced by draw(), and refreshControls().

◆ down_button

IGUIButton* GUIScrollBar::down_button
private

◆ drag_offset

s32 GUIScrollBar::drag_offset
private

Referenced by getPosFromMousePos(), and OnEvent().

◆ dragged_by_slider

bool GUIScrollBar::dragged_by_slider
private

Referenced by getPosFromMousePos(), and OnEvent().

◆ draw_center

s32 GUIScrollBar::draw_center
private

Referenced by draw(), and setPos().

◆ is_auto_scaling

bool GUIScrollBar::is_auto_scaling
private

Referenced by setPos().

◆ is_dragging

bool GUIScrollBar::is_dragging
private

Referenced by OnEvent().

◆ is_horizontal

bool GUIScrollBar::is_horizontal
private

◆ large_step

s32 GUIScrollBar::large_step
private

Referenced by OnEvent(), and setLargeStep().

◆ max_pos

s32 GUIScrollBar::max_pos
private

Referenced by OnEvent(), setMax(), setMin(), and setPos().

◆ min_pos

s32 GUIScrollBar::min_pos
private

◆ page_size

s32 GUIScrollBar::page_size
private

Referenced by setPageSize(), and setPos().

◆ scroll_pos

s32 GUIScrollBar::scroll_pos
private

◆ slider_rect

core::rect<s32> GUIScrollBar::slider_rect
private

Referenced by draw(), and OnEvent().

◆ small_step

s32 GUIScrollBar::small_step
private

Referenced by OnEvent(), and setSmallStep().

◆ thumb_size

s32 GUIScrollBar::thumb_size
private

◆ tray_clicked

bool GUIScrollBar::tray_clicked
private

Referenced by OnEvent().

◆ up_button

IGUIButton* GUIScrollBar::up_button
private

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