[dasher: 70/217] Added GetTextAroundCursor to dasher interface + Win32 stubs



commit 8c9a8cc3f02b9da0d24faa771cf60efb873972ea
Author: ipomoena <amajorek google com>
Date:   Thu Oct 15 18:17:46 2015 -0700

    Added GetTextAroundCursor to dasher interface + Win32 stubs
    
    Needed for features like speak|copy|delete|cut current
    word|sentence|paragraph

 Src/DasherCore/DasherInterfaceBase.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/Src/DasherCore/DasherInterfaceBase.h b/Src/DasherCore/DasherInterfaceBase.h
index 9af3644..3ff06e6 100644
--- a/Src/DasherCore/DasherInterfaceBase.h
+++ b/Src/DasherCore/DasherInterfaceBase.h
@@ -350,6 +350,13 @@ public:
   /// Subclasses should return the length of whole text. In letters, not bytes.
   virtual int GetAllContextLenght() = 0;
 
+  /// Subclasses should return character, word, sentence, ... at current text cursor position.
+  /// For character around cursor decision is arbitrary. Let's settle for character before cursor.
+  /// TODO. Consistently name functions dealing with dasher context, versus functions dealing with editor 
text.
+  /// I.E. GetAllContext should be named GetAllTtext
+  virtual std::string GetTextAroundCursor(CControlManager::EditDistance) { // =0;
+    return std::string();
+  }
 
   /// Set a key value pair by name - designed to allow operation from
   /// the command line.  Returns 0 on success, an error string on failure.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]