(svn r25689) -Add: [OSX] Display the IME composition string ourself.

This commit is contained in:
michi_cc
2013-08-05 20:37:44 +00:00
parent dab541ab73
commit 88a71979dd
5 changed files with 159 additions and 2 deletions

View File

@@ -55,6 +55,37 @@ public:
void HandleEditBox(Window *w, int wid);
Point GetCaretPosition(const Window *w, int wid) const;
/**
* Get the current text.
* @return Current text.
*/
const char *GetText() const
{
return this->text.buf;
}
/**
* Get the position of the caret in the text buffer.
* @return Pointer to the caret in the text buffer.
*/
const char *GetCaret() const
{
return this->text.buf + this->text.caretpos;
}
/**
* Get the currently marked text.
* @param[out] length Length of the marked text.
* @return Begining of the marked area or NULL if no text is marked.
*/
const char *GetMarkedText(size_t *length) const
{
if (this->text.markend == 0) return NULL;
*length = this->text.markend - this->text.markpos;
return this->text.buf + this->text.markpos;
}
};
void ShowOnScreenKeyboard(Window *parent, int button);