#include <chat.h>
Collaboration diagram for ChatBuffer:Public Member Functions | |
| ChatBuffer (u32 scrollback) | |
| ~ChatBuffer ()=default | |
| void | addLine (const std::wstring &name, const std::wstring &text) |
| void | clear () |
| u32 | getLineCount () const |
| const ChatLine & | getLine (u32 index) const |
| void | step (f32 dtime) |
| void | deleteOldest (u32 count) |
| void | deleteByAge (f32 maxAge) |
| u32 | getRows () const |
| void | reformat (u32 cols, u32 rows) |
| const ChatFormattedLine & | getFormattedLine (u32 row) const |
| void | scroll (s32 rows) |
| void | scrollAbsolute (s32 scroll) |
| void | scrollBottom () |
| bool | getLinesModified () const |
| void | resetLinesModified () |
| u32 | formatChatLine (const ChatLine &line, u32 cols, std::vector< ChatFormattedLine > &destination) const |
| void | resize (u32 scrollback) |
| s32 | getScrollPosition () const |
| s32 | getTopScrollPos () const |
| s32 | getBottomScrollPos () const |
Private Attributes | |
| u32 | m_scrollback |
| std::vector< ChatLine > | m_unformatted |
| u32 | m_cols = 0 |
| u32 | m_rows = 0 |
| s32 | m_scroll = 0 |
| std::vector< ChatFormattedLine > | m_formatted |
| ChatFormattedLine | m_empty_formatted_line |
| bool | m_cache_clickable_chat_weblinks |
| irr::video::SColor | m_cache_chat_weblink_color |
| bool | m_lines_modified = true |
| ChatBuffer::ChatBuffer | ( | u32 | scrollback | ) |
References ChatFormattedLine::first, g_settings, Settings::get(), Settings::getBool(), m_cache_chat_weblink_color, m_cache_clickable_chat_weblinks, m_empty_formatted_line, m_scrollback, and parseColorString().
Here is the call graph for this function:
|
default |
| void ChatBuffer::addLine | ( | const std::wstring & | name, |
| const std::wstring & | text ) |
References deleteOldest(), formatChatLine(), getBottomScrollPos(), m_cols, m_formatted, m_lines_modified, m_rows, m_scroll, m_scrollback, and m_unformatted.
Referenced by ChatBackend::addMessage().
Here is the call graph for this function:
Here is the caller graph for this function:| void ChatBuffer::clear | ( | ) |
References m_formatted, m_lines_modified, m_scroll, and m_unformatted.
Referenced by ChatBackend::clearRecentChat().
Here is the caller graph for this function:| void ChatBuffer::deleteByAge | ( | f32 | maxAge | ) |
References deleteOldest(), and m_unformatted.
Referenced by ChatBackend::step().
Here is the call graph for this function:
Here is the caller graph for this function:| void ChatBuffer::deleteOldest | ( | u32 | count | ) |
References getBottomScrollPos(), m_formatted, m_lines_modified, m_scroll, m_unformatted, sanity_check, and scrollAbsolute().
Referenced by addLine(), deleteByAge(), and resize().
Here is the call graph for this function:
Here is the caller graph for this function:| u32 ChatBuffer::formatChatLine | ( | const ChatLine & | line, |
| u32 | cols, | ||
| std::vector< ChatFormattedLine > & | destination ) const |
References ChatFormattedFragment::column, ChatFormattedLine::first, ChatFormattedLine::fragments, EnrichedString::getString(), m_cache_chat_weblink_color, m_cache_clickable_chat_weblinks, EnrichedString::setDefaultColor(), EnrichedString::size(), EnrichedString::substr(), ChatFormattedFragment::text, ChatFormattedFragment::weblink, and wide_to_utf8().
Referenced by addLine(), and reformat().
Here is the call graph for this function:
Here is the caller graph for this function:| s32 ChatBuffer::getBottomScrollPos | ( | ) | const |
References m_formatted, and m_rows.
Referenced by addLine(), deleteOldest(), reformat(), scrollAbsolute(), scrollBottom(), and GUIChatConsole::updateScrollbar().
Here is the caller graph for this function:| const ChatFormattedLine & ChatBuffer::getFormattedLine | ( | u32 | row | ) | const |
References m_empty_formatted_line, m_formatted, and m_scroll.
Referenced by GUIChatConsole::drawText(), and GUIChatConsole::weblinkClick().
Here is the caller graph for this function:| const ChatLine & ChatBuffer::getLine | ( | u32 | index | ) | const |
References getLineCount(), and m_unformatted.
Referenced by ChatBackend::getRecentChat().
Here is the call graph for this function:
Here is the caller graph for this function:| u32 ChatBuffer::getLineCount | ( | ) | const |
References m_unformatted.
Referenced by getLine(), ChatBackend::getRecentChat(), and GUIChatConsole::updateScrollbar().
Here is the caller graph for this function:
|
inline |
References m_lines_modified.
| u32 ChatBuffer::getRows | ( | ) | const |
References m_rows.
Referenced by GUIChatConsole::drawPrompt(), GUIChatConsole::drawText(), ChatBackend::scrollPageDown(), and ChatBackend::scrollPageUp().
Here is the caller graph for this function:
|
inline |
References m_scroll.
Referenced by GUIChatConsole::updateScrollbar().
Here is the caller graph for this function:| s32 ChatBuffer::getTopScrollPos | ( | ) | const |
References m_formatted, and m_rows.
Referenced by scrollAbsolute(), and GUIChatConsole::updateScrollbar().
Here is the caller graph for this function:| void ChatBuffer::reformat | ( | u32 | cols, |
| u32 | rows ) |
References formatChatLine(), getBottomScrollPos(), m_cols, m_formatted, m_rows, m_scroll, m_unformatted, scrollAbsolute(), and scrollBottom().
Referenced by ChatBackend::reformat().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_lines_modified.
Referenced by Game::updateChat().
Here is the caller graph for this function:| void ChatBuffer::resize | ( | u32 | scrollback | ) |
References deleteOldest(), m_scrollback, and m_unformatted.
Referenced by ChatBackend::applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:| void ChatBuffer::scroll | ( | s32 | rows | ) |
References m_scroll, and scrollAbsolute().
Referenced by ChatBackend::scroll(), scrollAbsolute(), ChatBackend::scrollPageDown(), and ChatBackend::scrollPageUp().
Here is the call graph for this function:
Here is the caller graph for this function:| void ChatBuffer::scrollAbsolute | ( | s32 | scroll | ) |
References getBottomScrollPos(), getTopScrollPos(), m_scroll, and scroll().
Referenced by deleteOldest(), GUIChatConsole::OnEvent(), reformat(), and scroll().
Here is the call graph for this function:
Here is the caller graph for this function:| void ChatBuffer::scrollBottom | ( | ) |
References getBottomScrollPos(), and m_scroll.
Referenced by reformat().
Here is the call graph for this function:
Here is the caller graph for this function:| void ChatBuffer::step | ( | f32 | dtime | ) |
References m_unformatted.
Referenced by ChatBackend::step().
Here is the caller graph for this function:
|
private |
Referenced by ChatBuffer(), and formatChatLine().
|
private |
Referenced by ChatBuffer(), and formatChatLine().
|
private |
Referenced by addLine(), and reformat().
|
private |
Referenced by ChatBuffer(), and getFormattedLine().
|
private |
Referenced by addLine(), clear(), deleteOldest(), getBottomScrollPos(), getFormattedLine(), getTopScrollPos(), and reformat().
|
private |
Referenced by addLine(), clear(), deleteOldest(), getLinesModified(), and resetLinesModified().
|
private |
Referenced by addLine(), getBottomScrollPos(), getRows(), getTopScrollPos(), and reformat().
|
private |
Referenced by addLine(), clear(), deleteOldest(), getFormattedLine(), getScrollPosition(), reformat(), scroll(), scrollAbsolute(), and scrollBottom().
|
private |
Referenced by ChatBuffer(), addLine(), and resize().
|
private |
Referenced by addLine(), clear(), deleteByAge(), deleteOldest(), getLine(), getLineCount(), reformat(), resize(), and step().