#include <chat.h>
◆ CursorOp
| Enumerator |
|---|
| CURSOROP_MOVE | |
| CURSOROP_SELECT | |
| CURSOROP_DELETE | |
◆ CursorOpDir
| Enumerator |
|---|
| CURSOROP_DIR_LEFT | |
| CURSOROP_DIR_RIGHT | |
◆ CursorOpScope
| Enumerator |
|---|
| CURSOROP_SCOPE_CHARACTER | |
| CURSOROP_SCOPE_WORD | |
| CURSOROP_SCOPE_LINE | |
| CURSOROP_SCOPE_SELECTION | |
◆ ChatPrompt()
| ChatPrompt::ChatPrompt |
( |
const std::wstring & | prompt, |
|
|
u32 | history_limit ) |
◆ ~ChatPrompt()
| ChatPrompt::~ChatPrompt |
( |
| ) |
|
|
default |
◆ addToHistory()
| void ChatPrompt::addToHistory |
( |
const std::wstring & | line | ) |
|
◆ clampView()
| void ChatPrompt::clampView |
( |
| ) |
|
|
protected |
References getLineRef(), m_cols, m_cursor, m_view, MYMAX, and MYMIN.
Referenced by cursorOperation(), historyNext(), historyPrev(), input(), input(), nickCompletion(), reformat(), and replace().
◆ clear()
| void ChatPrompt::clear |
( |
| ) |
|
◆ cursorOperation()
References clampView(), CURSOROP_DELETE, CURSOROP_DIR_RIGHT, CURSOROP_MOVE, CURSOROP_SCOPE_CHARACTER, CURSOROP_SCOPE_LINE, CURSOROP_SCOPE_SELECTION, CURSOROP_SCOPE_WORD, CURSOROP_SELECT, dir(), getLineRef(), m_cursor, m_cursor_len, makeLineRef(), MYMAX, and MYMIN.
Referenced by GUIChatConsole::OnEvent().
◆ getCursorLength()
| s32 ChatPrompt::getCursorLength |
( |
| ) |
const |
|
inline |
◆ getLine()
| std::wstring ChatPrompt::getLine |
( |
| ) |
const |
|
inline |
◆ getLineRef()
| const std::wstring & ChatPrompt::getLineRef |
( |
| ) |
const |
|
protected |
References m_history, m_history_index, and m_line.
Referenced by clampView(), cursorOperation(), getLine(), getSelection(), getVisiblePortion(), historyNext(), historyPrev(), nickCompletion(), and reformat().
◆ getSelection()
| std::wstring ChatPrompt::getSelection |
( |
| ) |
const |
|
inline |
◆ getVisibleCursorPosition()
| s32 ChatPrompt::getVisibleCursorPosition |
( |
| ) |
const |
◆ getVisiblePortion()
| std::wstring ChatPrompt::getVisiblePortion |
( |
| ) |
const |
◆ historyNext()
| void ChatPrompt::historyNext |
( |
| ) |
|
◆ historyPrev()
| void ChatPrompt::historyPrev |
( |
| ) |
|
◆ input() [1/2]
| void ChatPrompt::input |
( |
const std::wstring & | str | ) |
|
◆ input() [2/2]
| void ChatPrompt::input |
( |
wchar_t | ch | ) |
|
◆ makeLineRef()
| std::wstring & ChatPrompt::makeLineRef |
( |
| ) |
|
|
protected |
◆ nickCompletion()
| void ChatPrompt::nickCompletion |
( |
const std::set< std::string > & | names | ) |
|
< With matching substrings (case-insensitive)
< Shortest common nickname prefix
References clampView(), getLineRef(), m_chat_buffer, m_cursor, m_cursor_len, makeLineRef(), my_tolower(), PLAYERNAME_ALLOWED_CHARS, rawstream, str_starts_with(), utf8_to_wide(), wide_to_utf8(), and wstrgettext().
Referenced by GUIChatConsole::OnEvent().
◆ reformat()
| void ChatPrompt::reformat |
( |
u32 | cols | ) |
|
◆ replace()
| std::wstring ChatPrompt::replace |
( |
const std::wstring & | line | ) |
|
◆ setChatBuffer()
◆ m_chat_buffer
◆ m_cols
| s32 ChatPrompt::m_cols = 0 |
|
private |
◆ m_cursor
| s32 ChatPrompt::m_cursor = 0 |
|
private |
Referenced by clampView(), clear(), cursorOperation(), getSelection(), getVisibleCursorPosition(), historyNext(), historyPrev(), input(), input(), nickCompletion(), reformat(), and replace().
◆ m_cursor_len
| s32 ChatPrompt::m_cursor_len = 0 |
|
private |
◆ m_history
◆ m_history_index
| u32 ChatPrompt::m_history_index = 0 |
|
private |
◆ m_history_limit
| u32 ChatPrompt::m_history_limit |
|
private |
◆ m_line
| std::wstring ChatPrompt::m_line = L"" |
|
private |
◆ m_prompt
| std::wstring ChatPrompt::m_prompt = L"" |
|
private |
◆ m_view
| s32 ChatPrompt::m_view = 0 |
|
private |
The documentation for this class was generated from the following files: