Luanti 5.10.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)
 

Private Types

enum  OrientationEnum { VERTICAL , HORIZONTAL , UNDEFINED }
 

Private Member Functions

void updateScrolling ()
 

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

◆ OnEvent()

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

References m_scrollbar, and GUIScrollBar::OnEvent().

+ Here is the call graph for this function:

◆ 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)

References GUIScrollBar::isHorizontal(), m_content_padding_px, m_orientation, m_scrollbar, m_scrollfactor, GUIScrollBar::setMax(), GUIScrollBar::setMin(), GUIScrollBar::setPageSize(), updateScrolling(), and VERTICAL.

+ Here is the call graph for this function:

◆ updateScrolling()

void GUIScrollContainer::updateScrolling ( )
private

References GUIScrollBar::getPos(), HORIZONTAL, m_orientation, m_scrollbar, m_scrollfactor, and VERTICAL.

Referenced by onScrollEvent(), and setScrollBar().

+ Here is the call graph for this function:
+ 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

Referenced by setScrollBar(), and updateScrolling().


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