Luanti 5.16.0-dev
Loading...
Searching...
No Matches
GUIScrollContainer Class Reference

#include <guiScrollContainer.h>

Inheritance diagram for GUIScrollContainer:
Collaboration diagram for GUIScrollContainer:

Public Member Functions

 GUIScrollContainer (gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle, const std::string &orientation, f32 scrollfactor)
virtual bool OnEvent (const SEvent &event) override
virtual void draw () override
void setContentPadding (std::optional< s32 > padding)
void onScrollEvent (gui::IGUIElement *caller)
void setScrollBar (GUIScrollBar *scrollbar)
void updateScrolling ()
f32 getScrollFactor () const

Private Types

enum  OrientationEnum { VERTICAL , HORIZONTAL , UNDEFINED }

Private Attributes

GUIScrollBarm_scrollbar
OrientationEnum m_orientation
f32 m_scrollfactor
std::optional< s32 > m_content_padding_px

Member Enumeration Documentation

◆ OrientationEnum

Enumerator
VERTICAL 
HORIZONTAL 
UNDEFINED 

Constructor & Destructor Documentation

◆ GUIScrollContainer()

GUIScrollContainer::GUIScrollContainer ( gui::IGUIEnvironment * env,
gui::IGUIElement * parent,
s32 id,
const core::rect< s32 > & rectangle,
const std::string & orientation,
f32 scrollfactor )

Member Function Documentation

◆ draw()

void GUIScrollContainer::draw ( )
overridevirtual

◆ getScrollFactor()

f32 GUIScrollContainer::getScrollFactor ( ) const
inline

References m_scrollfactor.

◆ OnEvent()

bool GUIScrollContainer::OnEvent ( const SEvent & event)
overridevirtual

References m_scrollbar.

◆ onScrollEvent()

void GUIScrollContainer::onScrollEvent ( gui::IGUIElement * caller)
inline

References m_scrollbar, and updateScrolling().

Here is the call graph for this function:

◆ setContentPadding()

void GUIScrollContainer::setContentPadding ( std::optional< s32 > padding)
inline

References m_content_padding_px.

Referenced by GUIFormSpecMenu::parseScrollContainer().

Here is the caller graph for this function:

◆ setScrollBar()

void GUIScrollContainer::setScrollBar ( GUIScrollBar * scrollbar)

◆ updateScrolling()

void GUIScrollContainer::updateScrolling ( )

References HORIZONTAL, m_orientation, m_scrollbar, m_scrollfactor, and VERTICAL.

Referenced by onScrollEvent().

Here is the caller graph for this function:

Member Data Documentation

◆ m_content_padding_px

std::optional<s32> GUIScrollContainer::m_content_padding_px
private

Referenced by setContentPadding(), and setScrollBar().

◆ m_orientation

OrientationEnum GUIScrollContainer::m_orientation
private

◆ m_scrollbar

GUIScrollBar* GUIScrollContainer::m_scrollbar
private

◆ m_scrollfactor

f32 GUIScrollContainer::m_scrollfactor
private

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