(svn r25681) -Change: [Win32] Position the IME composition window at the caret position.

This commit is contained in:
michi_cc
2013-08-05 20:37:14 +00:00
parent 21126aec62
commit da09fd3077
7 changed files with 88 additions and 0 deletions

View File

@@ -323,6 +323,20 @@ QueryString *Window::GetQueryString(uint widnum)
return query != this->querystrings.End() ? query->second : NULL;
}
/**
* Get the current caret position if an edit box has the focus.
* @return Top-left location of the caret, relative to the window.
*/
/* virtual */ Point Window::GetCaretPosition() const
{
if (this->nested_focus != NULL && this->nested_focus->type == WWT_EDITBOX) {
return this->GetQueryString(this->nested_focus->index)->GetCaretPosition(this, this->nested_focus->index);
}
Point pt = {0, 0};
return pt;
}
/**
* Set the window that has the focus