Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bdf2b506
Kaydet (Commit)
bdf2b506
authored
Eki 20, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Intermediate commit of experimental iOS app hacking
Change-Id: I9326c9684a9c53f1f9a3ea5603bcb44c941e8918
üst
6cc508ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
View.m
ios/experimental/LibreOffice/LibreOffice/View.m
+21
-15
No files found.
ios/experimental/LibreOffice/LibreOffice/View.m
Dosyayı görüntüle @
bdf2b506
...
...
@@ -155,10 +155,22 @@
-
(
void
)
panGesture
:
(
UIPanGestureRecognizer
*
)
gestureRecognizer
{
static
enum
{
NONE
,
TOPLEFT
,
BOTTOMRIGHT
}
draggedHandle
=
NONE
;
static
CGFloat
previousX
=
0
.
0
f
,
previousY
=
0
.
0
f
;
static
CGFloat
previousX
,
previousY
;
CGPoint
translation
=
[
gestureRecognizer
translationInView
:
self
];
if
(
gestureRecognizer
.
state
==
UIGestureRecognizerStateBegan
)
{
previousX
=
previousY
=
0
;
}
CGFloat
deltaX
=
translation
.
x
-
previousX
;
CGFloat
deltaY
=
translation
.
y
-
previousY
;
NSLog
(
@"drag: %f,%f"
,
deltaX
,
deltaY
);
previousX
=
translation
.
x
;
previousY
=
translation
.
y
;
if
(
gestureRecognizer
.
state
==
UIGestureRecognizerStateBegan
&&
gestureRecognizer
.
numberOfTouches
==
1
)
{
if
(
CGRectContainsPoint
([
self
topLeftResizeHandle
],
...
...
@@ -172,16 +184,17 @@
if
(
draggedHandle
==
TOPLEFT
)
{
const
int
N
=
self
.
selectionRectangleCount
;
self
.
selectionRectangles
[
0
].
origin
.
x
+=
translation
.
x
;
self
.
selectionRectangles
[
0
].
origin
.
y
+=
translation
.
y
;
self
.
selectionRectangles
[
0
].
size
.
width
-=
translation
.
x
;
self
.
selectionRectangles
[
0
].
size
.
height
-=
translation
.
y
;
self
.
selectionRectangles
[
0
].
origin
.
x
+=
deltaX
;
self
.
selectionRectangles
[
0
].
origin
.
y
+=
deltaY
;
self
.
selectionRectangles
[
0
].
size
.
width
-=
deltaX
;
self
.
selectionRectangles
[
0
].
size
.
height
-=
deltaY
;
#if 0
touch_lo_selection_attempt_resize(self.documentHandle,
self.selectionRectangles,
self.selectionRectangleCount);
#else
touch_lo_tap
(
0
,
0
);
touch_lo_mouse
(
self
.
selectionRectangles
[
0
].
origin
.
x
,
self
.
selectionRectangles
[
0
].
origin
.
y
,
DOWN
,
NONE
);
...
...
@@ -197,16 +210,15 @@
}
else
if
(
draggedHandle
==
BOTTOMRIGHT
)
{
const
int
N
=
self
.
selectionRectangleCount
;
self
.
selectionRectangles
[
N
-
1
].
origin
.
x
+=
translation
.
x
;
self
.
selectionRectangles
[
N
-
1
].
origin
.
y
+=
translation
.
y
;
self
.
selectionRectangles
[
N
-
1
].
size
.
width
+=
translation
.
x
;
self
.
selectionRectangles
[
N
-
1
].
size
.
height
+=
translation
.
y
;
self
.
selectionRectangles
[
N
-
1
].
size
.
width
+=
deltaX
;
self
.
selectionRectangles
[
N
-
1
].
size
.
height
+=
deltaY
;
#if 0
touch_lo_selection_attempt_resize(self.documentHandle,
self.selectionRectangles,
self.selectionRectangleCount);
#else
touch_lo_tap
(
0
,
0
);
touch_lo_mouse
(
self
.
selectionRectangles
[
0
].
origin
.
x
,
self
.
selectionRectangles
[
0
].
origin
.
y
,
DOWN
,
NONE
);
...
...
@@ -222,16 +234,10 @@
}
if
(
gestureRecognizer
.
state
!=
UIGestureRecognizerStateBegan
)
{
int
deltaX
=
translation
.
x
-
previousX
;
int
deltaY
=
translation
.
y
-
previousY
;
// NSLog(@"panGesture: pan (delta): (%d,%d)", deltaX, deltaY);
touch_lo_pan
(
deltaX
,
deltaY
);
}
previousX
=
translation
.
x
;
previousY
=
translation
.
y
;
}
-
(
void
)
pinchGesture
:
(
UIPinchGestureRecognizer
*
)
gestureRecognizer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment