summaryrefslogtreecommitdiff
path: root/vcl/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-22 23:30:26 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-23 00:19:20 +0300
commit54ef5bd641ef5c6938b591697115d63af381ebc3 (patch)
tree714690adf71ad9cd358352da0de70eaf28e0d8fd /vcl/ios
parent025bd0fab4cd8e4f90c362ec03b51c23e0a55655 (diff)
More work on selection handling in iOS
Got the selection start and end handle dragging working... The trick was not to call SwWrtShell::SetCursor(), but SwCrsrShell::SetCrsr(). Sounds easy but took a lot of guessing and experimentation to figure out. Anyway, now it does what I had expected it to do a few das ago already. There are glitches, especially in corner cases like if you move the start handle past the end handle or vice versa. more Change-Id: Id6c1d99a4052531789bccf0d48165cfb41b89cfe 9b94c0dd55b04a7b6b3c40654562a9c51fa9b450
Diffstat (limited to 'vcl/ios')
-rw-r--r--vcl/ios/iosinst.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 50716f030dfc..ccec3f7d08cb 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -508,6 +508,32 @@ void touch_lo_keyboard_did_hide()
}
}
+IMPL_LINK( IosSalInstance, SelectionStartMove, SelectionStartMoveArg*, pArg )
+{
+ touch_lo_selection_start_move_impl(pArg->documentHandle, pArg->x, pArg->y);
+
+ delete pArg;
+
+ return 0;
+}
+
+extern "C"
+void touch_lo_selection_start_move(const void *documentHandle,
+ int x,
+ int y)
+{
+ IosSalInstance *pInstance = IosSalInstance::getInstance();
+
+ if ( pInstance == NULL )
+ return;
+
+ IosSalInstance::SelectionStartMoveArg *pArg = new IosSalInstance::SelectionStartMoveArg;
+ pArg->documentHandle = documentHandle;
+ pArg->x = x;
+ pArg->y = y;
+ Application::PostUserEvent( LINK( pInstance, IosSalInstance, SelectionStartMove), pArg );
+}
+
IMPL_LINK( IosSalInstance, SelectionEndMove, SelectionEndMoveArg*, pArg )
{
touch_lo_selection_end_move_impl(pArg->documentHandle, pArg->x, pArg->y);