GRAPHICS: MACGUI: Initial code for copying selection to clipboard
This commit is contained in:
parent
66f59aa893
commit
23649e8d87
4 changed files with 94 additions and 0 deletions
|
@ -212,6 +212,20 @@ void MacTextWindow::drawSelection() {
|
|||
}
|
||||
}
|
||||
|
||||
Common::String MacTextWindow::getSelection(bool formatted) {
|
||||
if (_selectedText.endY == -1)
|
||||
return Common::String("");
|
||||
|
||||
SelectedText s = _selectedText;
|
||||
|
||||
if (s.startY > s.endY) {
|
||||
SWAP(s.startRow, s.endRow);
|
||||
SWAP(s.startCol, s.endCol);
|
||||
}
|
||||
|
||||
return _mactext->getTextChunk(s.startRow, s.startCol, s.endRow, s.endCol, formatted);
|
||||
}
|
||||
|
||||
bool MacTextWindow::processEvent(Common::Event &event) {
|
||||
/*WindowClick click =*/ isInBorder(event.mouse.x, event.mouse.y);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue