Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#ifndef RAGNAROK_SOURCE_CLIENT_INPUT_TEXTINPUTBUFFER_H
|
|
#define RAGNAROK_SOURCE_CLIENT_INPUT_TEXTINPUTBUFFER_H
|
|
|
|
#include <string>
|
|
#include <windows.h>
|
|
|
|
class UIWindow;
|
|
class WindowManagerWindows;
|
|
|
|
class TextInputSuggestions {
|
|
public:
|
|
virtual void Update(const char* text) = 0;
|
|
|
|
protected:
|
|
~TextInputSuggestions() = default;
|
|
};
|
|
|
|
struct TextInputBuffer {
|
|
std::string& text;
|
|
int& cursor;
|
|
int& anchor;
|
|
std::string& composition;
|
|
std::string& candidate;
|
|
int& compositionState;
|
|
HWND& window;
|
|
const bool& suggestionsEnabled;
|
|
UIWindow* const& focused;
|
|
UIWindow* const& chatInput;
|
|
const bool& chatOpen;
|
|
TextInputSuggestions& suggestions;
|
|
|
|
void CancelComposition();
|
|
void DeleteSelection();
|
|
void Insert(const char* value);
|
|
void Select(int anchor, int cursor);
|
|
void CopyDisplayText(std::string& output) const;
|
|
void Selection(int& anchor, int& cursor) const;
|
|
|
|
void SelectionRange(int& begin, int& end) const;
|
|
|
|
void RefreshComposition(unsigned codePage);
|
|
|
|
void CopySelection(bool password);
|
|
void Paste(UIWindow* blockedFocus, WindowManagerWindows& windows);
|
|
|
|
void MoveBack(unsigned codePage);
|
|
|
|
void MoveForward(unsigned codePage);
|
|
|
|
void Character(unsigned value, LPARAM unused, unsigned codePage);
|
|
|
|
void KeyDown(
|
|
unsigned key, LPARAM unused, unsigned codePage, bool password, UIWindow* blockedPasteFocus, WindowManagerWindows& windows, UIWindow* const& chatArrows
|
|
);
|
|
};
|
|
|
|
#endif
|