Luanti 5.17.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, video::SColor default_background_color, video::SColor default_color, bool is_hypertip=false)
 constructor
virtual ~GUIHyperText ()
 destructor
virtual void draw ()
 draws the element and its children
s32 getTextHeight ()
 Returns the height of the text in pixels when it is drawn.
bool OnEvent (const SEvent &event)
void setStyles (const std::array< StyleSpec, StyleSpec::NUM_STATES > &styles)

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
int m_draw_state = 0
video::SColor m_default_background_color
video::SColor m_default_color

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,
video::SColor default_background_color,
video::SColor default_color,
bool is_hypertip = false )

◆ ~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, 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 m_display_text_rect, m_draw_state, m_drawer, m_scrollbar_width, m_text_scrollpos, and m_vscrollbar.

◆ getElementAt()

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

References m_display_text_rect, m_drawer, and m_text_scrollpos.

Referenced by checkHover(), and OnEvent().

Here is the caller graph for this function:

◆ getTextHeight()

s32 GUIHyperText::getTextHeight ( )
inline

Returns the height of the text in pixels when it is drawn.

References m_drawer.

Referenced by GUIFormSpecMenu::showHyperTip().

Here is the caller graph for this function:

◆ OnEvent()

bool GUIHyperText::OnEvent ( const SEvent & event)

References checkHover(), g_gamecallback, RenderingEngine::get_raw_device(), getElementAt(), m_display_text_rect, m_drawer, m_text_scrollpos, m_vscrollbar, porting::open_url(), and ParsedText::Element::tags.

Here is the call graph for this function:

◆ setStyles()

void GUIHyperText::setStyles ( const std::array< StyleSpec, StyleSpec::NUM_STATES > & styles)

References StyleSpec::getBool(), StyleSpec::getStyleFromStatePropagation(), m_drawer, StyleSpec::NOCLIP, and StyleSpec::STATE_DEFAULT.

Referenced by GUIFormSpecMenu::drawMenu(), and GUIFormSpecMenu::parseHyperTip().

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

Member Data Documentation

◆ m_default_background_color

video::SColor GUIHyperText::m_default_background_color
protected

Referenced by GUIHyperText().

◆ m_default_color

video::SColor GUIHyperText::m_default_color
protected

Referenced by GUIHyperText().

◆ m_display_text_rect

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

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

◆ m_draw_state

int GUIHyperText::m_draw_state = 0
protected

Referenced by GUIHyperText(), and draw().

◆ 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

◆ m_tsrc

ISimpleTextureSource* GUIHyperText::m_tsrc
protected

Referenced by GUIHyperText().

◆ m_vscrollbar

GUIScrollBar* GUIHyperText::m_vscrollbar
protected

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