diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2016-01-05 12:42:04 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2016-05-04 14:22:51 +0000 |
commit | a76d7094a4c2e512da4c0be39933dd0e4f47a92f (patch) | |
tree | 8293f2d0a67840cee70955e8d4c4c11b881d1ba9 /src/plugins/platforms/ios/qiosintegration.h | |
parent | e563273c22a72262e5230791f55cdfd25e63f4ea (diff) |
iOS: Add text selection support from the platform plugin
This patch will add touch based text selection support
to Qt from the iOS plugin.
QIOSTextInputOverlay will listen to changes to the
focus object, and if IM enabled, create three different
gesture recognizers that tracks what the user is doing.
The first recogniser detects if the user does a press
and hold on the text when there is no selection. If
triggered, it will show a loupe that follows the touch
around together with the cursor.
The second recogniser will instead be active when text
is selected, and takes care of drawing a set of handles
on each side of the selection. If the user drags on any
of the handles, a loupe will show that follows the
touch/text line together with the handle.
The third recogniser detects if the user does a tap, and
depending on if there's a selection, or if the cursor didn't
move, it will show or hide the edit menu.
The handles and loupe are implemented as overlays using
Core Animation layers.
Change-Id: Idff6e40e12307a458c9c399b0487bb976fce29c8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosintegration.h')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.h b/src/plugins/platforms/ios/qiosintegration.h index 3372fd539b..a50d9aa571 100644 --- a/src/plugins/platforms/ios/qiosintegration.h +++ b/src/plugins/platforms/ios/qiosintegration.h @@ -46,6 +46,7 @@ #include "qiosapplicationstate.h" #include "qiosfileenginefactory.h" +#include "qiostextinputoverlay.h" QT_BEGIN_NAMESPACE @@ -108,6 +109,7 @@ private: QIOSServices *m_platformServices; mutable QPlatformAccessibility *m_accessibility; QIOSFileEngineFactory m_fileEngineFactory; + QIOSTextInputOverlay m_textInputOverlay; bool m_debugWindowManagement; }; |