Luanti 5.19.0-dev
Loading...
Searching...
No Matches
ChatBackend Class Reference

#include <chat.h>

Collaboration diagram for ChatBackend:

Public Member Functions

 ChatBackend ()
 ~ChatBackend ()=default
void addMessage (const std::wstring &name, std::wstring text)
void addUnparsedMessage (std::wstring line)
ChatBuffer & getConsoleBuffer ()
ChatBuffer & getRecentBuffer ()
EnrichedString getRecentChat () const
ChatPrompt & getPrompt ()
void reformat (u32 cols, u32 rows)
void clearRecentChat ()
void step (float dtime)
void scroll (s32 rows)
void scrollPageDown ()
void scrollPageUp ()
void applySettings ()

Private Attributes

ChatBuffer m_console_buffer
ChatBuffer m_recent_buffer
ChatPrompt m_prompt

Constructor & Destructor Documentation

◆ ChatBackend()

ChatBackend::ChatBackend ( )

References m_console_buffer, m_prompt, m_recent_buffer, and ChatPrompt::setChatBuffer().

Here is the call graph for this function:

◆ ~ChatBackend()

ChatBackend::~ChatBackend ( )
default

References addMessage(), addUnparsedMessage(), applySettings(), clearRecentChat(), getConsoleBuffer(), getPrompt(), getRecentBuffer(), getRecentChat(), reformat(), scroll(), scrollPageDown(), scrollPageUp(), and step().

Here is the call graph for this function:

Member Function Documentation

◆ addMessage()

void ChatBackend::addMessage ( const std::wstring & name,
std::wstring text )

References ChatBuffer::addLine(), EnrichedString::getNextLine(), m_console_buffer, m_recent_buffer, and EnrichedString::size().

Referenced by ~ChatBackend(), addUnparsedMessage(), Game::shutdown(), and Game::updateChat().

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

◆ addUnparsedMessage()

void ChatBackend::addUnparsedMessage ( std::wstring line)

References addMessage().

Referenced by ~ChatBackend(), Game::updateChat(), and GUIChatConsole::weblinkClick().

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

◆ applySettings()

void ChatBackend::applySettings ( )

References g_settings, Settings::getU32(), m_recent_buffer, rangelim(), and ChatBuffer::resize().

Referenced by ~ChatBackend(), and Game::initGui().

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

◆ clearRecentChat()

void ChatBackend::clearRecentChat ( )

References ChatBuffer::clear(), and m_recent_buffer.

Referenced by ~ChatBackend(), and Game::initGui().

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

◆ getConsoleBuffer()

ChatBuffer & ChatBackend::getConsoleBuffer ( )

References m_console_buffer.

Referenced by ~ChatBackend(), GUIChatConsole::drawPrompt(), GUIChatConsole::drawText(), GUIChatConsole::OnEvent(), GUIChatConsole::updateScrollbar(), and GUIChatConsole::weblinkClick().

Here is the caller graph for this function:

◆ getPrompt()

ChatPrompt & ChatBackend::getPrompt ( )

References m_prompt.

Referenced by ~ChatBackend(), GUIChatConsole::drawPrompt(), GUIChatConsole::OnEvent(), GUIChatConsole::replaceAndAddToHistory(), and GUIChatConsole::updatePrimarySelection().

Here is the caller graph for this function:

◆ getRecentBuffer()

ChatBuffer & ChatBackend::getRecentBuffer ( )

References m_recent_buffer.

Referenced by ~ChatBackend(), and Game::updateChat().

Here is the caller graph for this function:

◆ getRecentChat()

EnrichedString ChatBackend::getRecentChat ( ) const

References ChatBuffer::getLine(), ChatBuffer::getLineCount(), and m_recent_buffer.

Referenced by ~ChatBackend(), and Game::updateChat().

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

◆ reformat()

void ChatBackend::reformat ( u32 cols,
u32 rows )

References m_console_buffer, m_prompt, ChatBuffer::reformat(), and ChatPrompt::reformat().

Referenced by ~ChatBackend(), and GUIChatConsole::reformatConsole().

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

◆ scroll()

void ChatBackend::scroll ( s32 rows)

References m_console_buffer, and ChatBuffer::scroll().

Referenced by ~ChatBackend(), and GUIChatConsole::OnEvent().

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

◆ scrollPageDown()

void ChatBackend::scrollPageDown ( )

References ChatBuffer::getRows(), m_console_buffer, and ChatBuffer::scroll().

Referenced by ~ChatBackend(), and GUIChatConsole::OnEvent().

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

◆ scrollPageUp()

void ChatBackend::scrollPageUp ( )

References ChatBuffer::getRows(), m_console_buffer, and ChatBuffer::scroll().

Referenced by ~ChatBackend(), and GUIChatConsole::OnEvent().

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

◆ step()

void ChatBackend::step ( float dtime)

References ChatBuffer::deleteByAge(), m_recent_buffer, and ChatBuffer::step().

Referenced by ~ChatBackend(), and Game::updateChat().

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

Member Data Documentation

◆ m_console_buffer

ChatBuffer ChatBackend::m_console_buffer
private

◆ m_prompt

ChatPrompt ChatBackend::m_prompt
private

Referenced by ChatBackend(), getPrompt(), and reformat().

◆ m_recent_buffer

ChatBuffer ChatBackend::m_recent_buffer
private

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