Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
GUIHyperText Class Reference

#include <guiHyperText.h>

+ Inheritance diagram for GUIHyperText:
+ Collaboration diagram for GUIHyperText:

Public Member Functions

 GUIHyperText (const wchar_t *text, gui::IGUIEnvironment *environment, gui::IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle, Client *client, ISimpleTextureSource *tsrc)
 constructor
 
virtual ~GUIHyperText ()
 destructor
 
virtual void draw ()
 draws the element and its children
 
core::dimension2du getTextDimension ()
 
bool OnEvent (const SEvent &event)
 

Protected Member Functions

ParsedText::ElementgetElementAt (s32 X, s32 Y)
 
void checkHover (s32 X, s32 Y)
 

Protected Attributes

ISimpleTextureSourcem_tsrc
 
GUIScrollBarm_vscrollbar
 
TextDrawer m_drawer
 
u32 m_scrollbar_width
 
core::rect< s32 > m_display_text_rect
 
core::position2d< s32 > m_text_scrollpos
 

Constructor & Destructor Documentation

◆ GUIHyperText()

GUIHyperText::GUIHyperText ( const wchar_t * text,
gui::IGUIEnvironment * environment,
gui::IGUIElement * parent,
s32 id,
const core::rect< s32 > & rectangle,
Client * client,
ISimpleTextureSource * tsrc )

constructor

References m_scrollbar_width, and m_vscrollbar.

◆ ~GUIHyperText()

GUIHyperText::~GUIHyperText ( )
virtual

destructor

References m_vscrollbar.

Member Function Documentation

◆ checkHover()

void GUIHyperText::checkHover ( s32 X,
s32 Y )
protected

References RenderingEngine::get_raw_device(), getElementAt(), m_drawer, TextDrawer::m_hovertag, and ParsedText::Element::tags.

Referenced by OnEvent().

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

◆ draw()

void GUIHyperText::draw ( )
virtual

draws the element and its children

References TextDrawer::draw(), TextDrawer::getHeight(), m_display_text_rect, m_drawer, m_scrollbar_width, m_text_scrollpos, m_vscrollbar, TextDrawer::place(), GUIScrollBar::setLargeStep(), GUIScrollBar::setMax(), GUIScrollBar::setPageSize(), GUIScrollBar::setPos(), and GUIScrollBar::setSmallStep().

+ Here is the call graph for this function:

◆ getElementAt()

ParsedText::Element * GUIHyperText::getElementAt ( s32 X,
s32 Y )
protected

References TextDrawer::getElementAt(), m_display_text_rect, m_drawer, and m_text_scrollpos.

Referenced by checkHover(), and OnEvent().

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

◆ getTextDimension()

core::dimension2du GUIHyperText::getTextDimension ( )

◆ OnEvent()

bool GUIHyperText::OnEvent ( const SEvent & event)

Member Data Documentation

◆ m_display_text_rect

core::rect<s32> GUIHyperText::m_display_text_rect
protected

Referenced by draw(), getElementAt(), and OnEvent().

◆ m_drawer

TextDrawer GUIHyperText::m_drawer
protected

◆ m_scrollbar_width

u32 GUIHyperText::m_scrollbar_width
protected

Referenced by GUIHyperText(), and draw().

◆ m_text_scrollpos

core::position2d<s32> GUIHyperText::m_text_scrollpos
protected

Referenced by draw(), getElementAt(), and OnEvent().

◆ m_tsrc

ISimpleTextureSource* GUIHyperText::m_tsrc
protected

◆ m_vscrollbar

GUIScrollBar* GUIHyperText::m_vscrollbar
protected

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