#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, ISimpleTextureSource *tsrc) | |
| virtual void | draw () override |
| virtual void | updateAbsolutePosition () override |
| virtual bool | OnEvent (const SEvent &event) override |
| virtual void | OnPostRender (u32 time_ms) override |
| s32 | getMax () const |
| s32 | getMin () const |
| s32 | getLargeStep () const |
| s32 | getSmallStep () const |
| s32 | getPos () const |
| s32 | getTargetPos () const |
| bool | isHorizontal () 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) |
| Sets a position immediately, aborting any ongoing interpolation. | |
| void | setPosAndSend (const s32 &pos) |
| The same as setPos, but it takes care of sending EGET_SCROLL_BAR_CHANGED events. | |
| void | setPosInterpolated (const s32 &pos) |
| Sets a target position for interpolation. | |
| void | setPageSize (const s32 &size) |
| void | setArrowsVisible (ArrowVisibility visible) |
Private Member Functions | |
| void | refreshControls () |
| s32 | getPosFromMousePos (const core::position2di &p) const |
| f32 | range () const |
| void | setPosRaw (const s32 &pos) |
| void | updatePos () |
| void | interpolatePos () |
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 |
| ISimpleTextureSource * | m_tsrc |
| std::optional< s32 > | target_pos |
| u32 | last_time_ms = 0 |
| u32 | last_delta_ms = 17 |
| GUIScrollBar::GUIScrollBar | ( | IGUIEnvironment * | environment, |
| IGUIElement * | parent, | ||
| s32 | id, | ||
| core::rect< s32 > | rectangle, | ||
| bool | horizontal, | ||
| bool | auto_scale, | ||
| ISimpleTextureSource * | tsrc ) |
|
overridevirtual |
References current_icon_color, draw_center, is_horizontal, range(), refreshControls(), slider_rect, and thumb_size.
Here is the call graph for this function:
|
inline |
References large_step.
|
inline |
References max_pos.
Referenced by GUIEditBox::updateVScrollBar().
Here is the caller graph for this function:
|
inline |
References min_pos.
| s32 GUIScrollBar::getPos | ( | ) | const |
References scroll_pos.
Referenced by GUIFormSpecMenu::acceptInput(), GUITable::autoScroll(), GUITable::draw(), GUITable::getDynamicData(), GUITable::getRowAt(), GUIHyperText::OnEvent(), GUIScrollContainer::updateScrolling(), and GUIEditBox::updateVScrollBar().
Here is the caller graph for this function:
|
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:
|
inline |
References small_step.
Referenced by GUIHyperText::OnEvent(), and GUIEditBox::processMouse().
Here is the caller graph for this function:| s32 GUIScrollBar::getTargetPos | ( | ) | const |
References max_pos, min_pos, scroll_pos, and target_pos.
Referenced by GUIHyperText::OnEvent(), OnEvent(), GUITable::OnEvent(), and GUIEditBox::processMouse().
Here is the caller graph for this function:
|
private |
References interpolate_scroll(), last_delta_ms, scroll_pos, setPosRaw(), and target_pos.
Referenced by OnPostRender(), and setPosInterpolated().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References is_horizontal.
Referenced by GUIScrollContainer::setScrollBar().
Here is the caller graph for this function:
|
overridevirtual |
References down_button, drag_offset, dragged_by_slider, getPosFromMousePos(), getTargetPos(), is_dragging, is_horizontal, large_step, max_pos, min_pos, p(), setPosAndSend(), setPosInterpolated(), 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:
|
overridevirtual |
References porting::getDeltaMs(), interpolatePos(), last_delta_ms, and last_time_ms.
Here is the call graph for this function:
|
inlineprivate |
References max_pos, and min_pos.
Referenced by draw(), getPosFromMousePos(), setMax(), setMin(), and setPosRaw().
Here is the caller graph for this function:
|
private |
References GUIButton::addButton(), arrow_visibility, border_size, current_icon_color, DEFAULT, down_button, HIDE, is_horizontal, m_tsrc, and up_button.
Referenced by GUIScrollBar(), draw(), setArrowsVisible(), and updateAbsolutePosition().
Here is the call graph for this function:
Here is the caller graph for this function:| 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:| void GUIScrollBar::setLargeStep | ( | const s32 & | step | ) |
References large_step.
Referenced by GUIEditBoxWithScrollBar::createVScrollBar(), GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), and GUITable::updateScrollBar().
Here is the caller graph for this function:| void GUIScrollBar::setMax | ( | const s32 & | max | ) |
References down_button, max_pos, min_pos, range(), up_button, and updatePos().
Referenced by GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), GUIScrollContainer::setScrollBar(), GUITable::updateScrollBar(), and GUIEditBox::updateVScrollBar().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScrollBar::setMin | ( | const s32 & | min | ) |
References down_button, max_pos, min_pos, range(), up_button, and updatePos().
Referenced by GUIFormSpecMenu::parseScrollBar(), and GUIScrollContainer::setScrollBar().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScrollBar::setPageSize | ( | const s32 & | size | ) |
References page_size, and updatePos().
Referenced by GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), GUIScrollContainer::setScrollBar(), GUITable::updateScrollBar(), and GUIEditBox::updateVScrollBar().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScrollBar::setPos | ( | const s32 & | pos | ) |
Sets a position immediately, aborting any ongoing interpolation.
References setPosRaw(), and target_pos.
Referenced by GUIScrollBar(), GUITable::GUITable(), GUITable::autoScroll(), GUIEditBoxWithScrollBar::calculateScrollPos(), GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), GUITable::setDynamicData(), setPosAndSend(), and GUIEditBox::updateVScrollBar().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScrollBar::setPosAndSend | ( | const s32 & | pos | ) |
The same as setPos, but it takes care of sending EGET_SCROLL_BAR_CHANGED events.
References scroll_pos, and setPos().
Referenced by OnEvent(), and setPosInterpolated().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScrollBar::setPosInterpolated | ( | const s32 & | pos | ) |
Sets a target position for interpolation.
References g_settings, Settings::getBool(), interpolatePos(), max_pos, min_pos, scroll_pos, setPosAndSend(), and target_pos.
Referenced by GUIHyperText::OnEvent(), OnEvent(), GUITable::OnEvent(), and GUIEditBox::processMouse().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References border_size, draw_center, is_auto_scaling, is_horizontal, max_pos, min_pos, page_size, range(), S32_MAX, scroll_pos, and thumb_size.
Referenced by interpolatePos(), setPos(), and updatePos().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScrollBar::setSmallStep | ( | const s32 & | step | ) |
References small_step.
Referenced by GUIEditBoxWithScrollBar::createVScrollBar(), GUIHyperText::draw(), GUIFormSpecMenu::parseScrollBar(), and GUITable::updateScrollBar().
Here is the caller graph for this function:
|
overridevirtual |
|
private |
References scroll_pos, and setPosRaw().
Referenced by setMax(), setMin(), setPageSize(), and updateAbsolutePosition().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by refreshControls(), and setArrowsVisible().
|
private |
Referenced by getPosFromMousePos(), refreshControls(), and setPosRaw().
|
private |
Referenced by draw(), and refreshControls().
|
private |
Referenced by OnEvent(), refreshControls(), setMax(), and setMin().
|
private |
Referenced by getPosFromMousePos(), and OnEvent().
|
private |
Referenced by getPosFromMousePos(), and OnEvent().
|
private |
Referenced by draw(), and setPosRaw().
|
private |
Referenced by setPosRaw().
|
private |
Referenced by OnEvent().
|
private |
Referenced by draw(), getPosFromMousePos(), isHorizontal(), OnEvent(), refreshControls(), and setPosRaw().
|
private |
Referenced by getLargeStep(), OnEvent(), and setLargeStep().
|
private |
Referenced by interpolatePos(), and OnPostRender().
|
private |
Referenced by OnPostRender().
|
private |
Referenced by refreshControls().
|
private |
Referenced by getMax(), getTargetPos(), OnEvent(), range(), setMax(), setMin(), setPosInterpolated(), and setPosRaw().
|
private |
Referenced by getMin(), getPosFromMousePos(), getTargetPos(), OnEvent(), range(), setMax(), setMin(), setPosInterpolated(), and setPosRaw().
|
private |
Referenced by setPageSize(), and setPosRaw().
|
private |
Referenced by getPos(), getTargetPos(), interpolatePos(), setPosAndSend(), setPosInterpolated(), setPosRaw(), and updatePos().
|
private |
Referenced by getSmallStep(), OnEvent(), and setSmallStep().
|
private |
Referenced by getTargetPos(), interpolatePos(), setPos(), and setPosInterpolated().
|
private |
Referenced by draw(), getPosFromMousePos(), OnEvent(), and setPosRaw().
|
private |
Referenced by OnEvent().
|
private |
Referenced by OnEvent(), refreshControls(), setMax(), and setMin().