|
@@ -204,11 +204,16 @@
|
|
|
\def\eventpropagationfigure{
|
|
\def\eventpropagationfigure{
|
|
|
\begin{figure}[h!]
|
|
\begin{figure}[h!]
|
|
|
\center
|
|
\center
|
|
|
- \subfigure[An event is triggered in the white area. The event is first
|
|
|
|
|
- delegated to the white area from te gray area (2). After gesture
|
|
|
|
|
- detection, it is propagated back to the gray area (6) \emph{unless}
|
|
|
|
|
- propagation has been stopped in the rotation detection component
|
|
|
|
|
- between (3) and (4).]{
|
|
|
|
|
|
|
+ \subfigure[
|
|
|
|
|
+ An event is triggered in the white area. The event driver
|
|
|
|
|
+ delegates the event to the event area tree (1) and the gray root
|
|
|
|
|
+ area delegates it to the white area (2). The white area delegates
|
|
|
|
|
+ it to drag tracker for gesture detection (3), which may trigger a
|
|
|
|
|
+ gesture in the application (4-5). If propagation has not been
|
|
|
|
|
+ stopped by the drag tracker, the event is propagated to the gray
|
|
|
|
|
+ event area (6) which also detects drag gestures that may be
|
|
|
|
|
+ triggered in the application (7-9).
|
|
|
|
|
+ ]{
|
|
|
\begin{tikzpicture}[node distance=5.5em]
|
|
\begin{tikzpicture}[node distance=5.5em]
|
|
|
\draw node[draw=black, minimum width=190, minimum height=140] (screen) at (0,0) {};
|
|
\draw node[draw=black, minimum width=190, minimum height=140] (screen) at (0,0) {};
|
|
|
\draw node[fill=gray!50, draw=black!70, minimum height=100, minimum width=100] (screen) at (-0.1,-0.1) {};
|
|
\draw node[fill=gray!50, draw=black!70, minimum height=100, minimum width=100] (screen) at (-0.1,-0.1) {};
|
|
@@ -221,10 +226,10 @@
|
|
|
\draw node[block, below of=gray] (white) {White event area}
|
|
\draw node[block, below of=gray] (white) {White event area}
|
|
|
edge[linefrom, bend left=15] node[left] {2} (gray)
|
|
edge[linefrom, bend left=15] node[left] {2} (gray)
|
|
|
edge[lineto, bend right=15] node[right] {6} (gray);
|
|
edge[lineto, bend right=15] node[right] {6} (gray);
|
|
|
- \draw node[block, right of=white, xshift=4em] {rotation detection}
|
|
|
|
|
|
|
+ \draw node[block, right of=white, xshift=4em] {drag tracker}
|
|
|
edge[linefrom, bend right=15] node[above] {3} (white)
|
|
edge[linefrom, bend right=15] node[above] {3} (white)
|
|
|
edge[lineto, dotted, bend left=15] node[below] {4} (white);
|
|
edge[lineto, dotted, bend left=15] node[below] {4} (white);
|
|
|
- \draw node[block, right of=gray, xshift=4em] {rotation detection}
|
|
|
|
|
|
|
+ \draw node[block, right of=gray, xshift=4em] {drag tracker}
|
|
|
edge[linefrom, bend right=15] node[above] {7} (gray)
|
|
edge[linefrom, bend right=15] node[above] {7} (gray)
|
|
|
edge[lineto, dotted, bend left=15] node[below] {8} (gray);
|
|
edge[lineto, dotted, bend left=15] node[below] {8} (gray);
|
|
|
\draw node[block, below of=white] {Application}
|
|
\draw node[block, below of=white] {Application}
|
|
@@ -233,8 +238,14 @@
|
|
|
\end{tikzpicture}
|
|
\end{tikzpicture}
|
|
|
}
|
|
}
|
|
|
\quad
|
|
\quad
|
|
|
- \subfigure[An event is triggered in the gray event area, it does not even
|
|
|
|
|
- reach the white event area.]{
|
|
|
|
|
|
|
+ \subfigure[
|
|
|
|
|
+ An event is triggered in the gray area, but outside the white area.
|
|
|
|
|
+ The event driver delegates the event to the gray event area (1).
|
|
|
|
|
+ Since the white area does not contain the event, delegation stops
|
|
|
|
|
+ and the event is passed on to the drag tracker of the gray event
|
|
|
|
|
+ area (2). If a gesture is detected (3), the event area triggers the
|
|
|
|
|
+ corresponding handler in the application (4).
|
|
|
|
|
+ ]{
|
|
|
\begin{tikzpicture}[node distance=5.5em]
|
|
\begin{tikzpicture}[node distance=5.5em]
|
|
|
\draw node[draw=black, minimum width=190, minimum height=140] (screen) at (0,0) {};
|
|
\draw node[draw=black, minimum width=190, minimum height=140] (screen) at (0,0) {};
|
|
|
\draw node[fill=gray!50, draw=black!70, minimum height=100, minimum width=100] (screen) at (-0.1,-0.1) {};
|
|
\draw node[fill=gray!50, draw=black!70, minimum height=100, minimum width=100] (screen) at (-0.1,-0.1) {};
|
|
@@ -245,8 +256,8 @@
|
|
|
\draw node[block, below of=driver] (gray) {Gray event area}
|
|
\draw node[block, below of=driver] (gray) {Gray event area}
|
|
|
edge[linefrom] node[left] {1} (driver);
|
|
edge[linefrom] node[left] {1} (driver);
|
|
|
\draw node[block, below of=gray] (white) {White event area};
|
|
\draw node[block, below of=gray] (white) {White event area};
|
|
|
- \draw node[block, right of=white, xshift=4em] {rotation detection};
|
|
|
|
|
- \draw node[block, right of=gray, xshift=4em] {rotation detection}
|
|
|
|
|
|
|
+ \draw node[block, right of=white, xshift=4em] {drag tracker};
|
|
|
|
|
+ \draw node[block, right of=gray, xshift=4em] {drag tracker}
|
|
|
edge[linefrom, bend right=15] node[above] {2} (gray)
|
|
edge[linefrom, bend right=15] node[above] {2} (gray)
|
|
|
edge[lineto, dotted, bend left=15] node[below] {3} (gray);
|
|
edge[lineto, dotted, bend left=15] node[below] {3} (gray);
|
|
|
\draw node[block, below of=white] {Application}
|
|
\draw node[block, below of=white] {Application}
|
|
@@ -254,11 +265,13 @@
|
|
|
\end{tikzpicture}
|
|
\end{tikzpicture}
|
|
|
}
|
|
}
|
|
|
\caption{
|
|
\caption{
|
|
|
- Two nested squares both listen to ``tap'' gestures. The two figures
|
|
|
|
|
- both show a touch object triggering an event, represented by a
|
|
|
|
|
- black dot. The event is delegated through the event area tree in
|
|
|
|
|
- the order indicated by the numbered arrow labels. Dotted arrows
|
|
|
|
|
- represent a flow of gestures, regular arrows represent events.
|
|
|
|
|
|
|
+ Two nested squares both respond to ``drag'' gestures. When the
|
|
|
|
|
+ white square is dragged, the gray square stays at its current
|
|
|
|
|
+ position. The two figures both show a touch object triggering an
|
|
|
|
|
+ event, represented by a black dot. The event is delegated and
|
|
|
|
|
+ propagated through the event area tree in the order indicated by
|
|
|
|
|
+ the numbered arrow labels. Dotted arrows represent a flow of
|
|
|
|
|
+ gestures, regular arrows represent events.
|
|
|
}
|
|
}
|
|
|
\label{fig:eventpropagation}
|
|
\label{fig:eventpropagation}
|
|
|
\end{figure}
|
|
\end{figure}
|