(svn r25691) -Add: [OSX] Support for mouse selection in the IME composition string.

This commit is contained in:
michi_cc
2013-08-05 20:37:53 +00:00
parent e2ec0ddb03
commit 30867c487f
10 changed files with 129 additions and 2 deletions

View File

@@ -351,12 +351,21 @@ struct IConsoleWindow : Window
int delta = min(this->width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH, 0);
Point p1 = GetCharPosInString(_iconsole_cmdline.buf, from, FS_NORMAL);
Point p2 = from != to ? GetCharPosInString(_iconsole_cmdline.buf, from, FS_NORMAL) : p1;
Point p2 = from != to ? GetCharPosInString(_iconsole_cmdline.buf, from) : p1;
Rect r = {this->line_offset + delta + p1.x, this->height - this->line_height, this->line_offset + delta + p2.x, this->height};
return r;
}
virtual const char *GetTextCharacterAtPosition(const Point &pt) const
{
int delta = min(this->width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH, 0);
if (!IsInsideMM(pt.y, this->height - this->line_height, this->height)) return NULL;
return GetCharAtPosition(_iconsole_cmdline.buf, pt.x - delta);
}
virtual void OnMouseWheel(int wheel)
{
this->Scroll(-wheel);