aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-05 00:05:44 +0200
committerEugene Sandulenko2017-08-05 00:05:44 +0200
commit4fea533dfdf222574e78dc835c2977a4e3f4bed9 (patch)
tree1f012b629962b7c337b5faaba7f4f36b7b22bc6a /graphics/macgui
parentdfaadb176385761503906bdc90a1916c6c7e628e (diff)
downloadscummvm-rg350-4fea533dfdf222574e78dc835c2977a4e3f4bed9.tar.gz
scummvm-rg350-4fea533dfdf222574e78dc835c2977a4e3f4bed9.tar.bz2
scummvm-rg350-4fea533dfdf222574e78dc835c2977a4e3f4bed9.zip
GRAPHICS: MACGUI: Added more selection manipulation methods to MacTextWindow
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/mactextwindow.cpp4
-rw-r--r--graphics/macgui/mactextwindow.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index 2af4aef9af..22731b7c39 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -226,6 +226,10 @@ Common::String MacTextWindow::getSelection(bool formatted) {
return _mactext->getTextChunk(s.startRow, s.startCol, s.endRow, s.endCol, formatted);
}
+void MacTextWindow::clearSelection() {
+ _selectedText.endY = _selectedText.startY = -1;
+}
+
bool MacTextWindow::processEvent(Common::Event &event) {
WindowClick click = isInBorder(event.mouse.x, event.mouse.y);
diff --git a/graphics/macgui/mactextwindow.h b/graphics/macgui/mactextwindow.h
index e6672c77fa..dfc7072322 100644
--- a/graphics/macgui/mactextwindow.h
+++ b/graphics/macgui/mactextwindow.h
@@ -70,6 +70,8 @@ public:
void appendInput(Common::String str);
Common::String getSelection(bool formatted = false);
+ void clearSelection();
+ const SelectedText *getSelectedText() { return &_selectedText; }
private:
void undrawInput();