Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multitouch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
multitouch
Commits
44060f57
Commit
44060f57
authored
Jun 10, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added example usage to architecture design in report.
parent
3268b80f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
68 deletions
+46
-68
docs/data/diagrams.tex
docs/data/diagrams.tex
+21
-44
docs/report.tex
docs/report.tex
+25
-24
No files found.
docs/data/diagrams.tex
View file @
44060f57
...
...
@@ -103,7 +103,6 @@
\end{figure}
}
\newcommand
{
\trackerdiagram
}
[1]
{
\begin{figure}
[H]
\label
{
fig:trackerdiagram
}
...
...
@@ -125,54 +124,32 @@
\end{figure}
}
\newcommand
{
\examplediagram
s
}
{
\newcommand
{
\examplediagram
}
[1]
{
\begin{figure}
[H]
\hspace
{
-2.3em
}
\subfigure
[Architecture using a single widget, demonstration gesture
delegation from the widget to the application. Dotted arrows
represent gestures, regular arrows represent events (unless
labeled otherwise).]
{
\architecture
{
\node
[block, below of=driver]
(eventdriver)
{
Event driver
}
edge[linefrom] node[right, near end]
{
driver-specific messages
}
(driver);
\node
[block, below of=eventdriver]
(widget)
{
Widget
}
edge[linefrom] (eventdriver);
\node
[block, right of=widget, xshift=5em]
(tracker)
{
Gesture tracker
}
edge[lineto, dotted, bend left=10] (widget)
edge[linefrom, bend right=10] (widget);
\node
[block, below of=widget]
{
Application
}
edge[linefrom, dotted] node[right, near start]
{
delegation
}
(widget);
\group
{
eventdriver
}{
eventdriver
}{
tracker
}{
tracker
}{
Architecture
}
}
}
\hspace
{
1.5em
}
\subfigure
[Architecture using a sub widget, demonstrating gesture
propagation. Dotted arrows represent gestures, regular arrows
represent events (unless labeled otherwise).]
{
\architecture
{
\node
[block, below of=driver]
(eventdriver)
{
Event driver
}
edge[linefrom] node[right, near end]
{
driver-specific messages
}
(driver);
\center
\architecture
{
\node
[block, below of=driver]
(eventdriver)
{
Event driver
}
edge[linefrom] node[right, near end]
{
driver-specific messages
}
(driver);
\node
[block, below of=eventdriver]
(rootwidget)
{
Root widget
}
edge[linefrom] (eventdriver);
\node
[block, below of=eventdriver]
(rootwidget)
{
Root widget
}
edge[linefrom] (eventdriver);
\node
[block, below of=rootwidget]
(subwidget)
{
Sub
widget
}
edge[linefrom] (rootwidget)
edge[lineto, bend right=45] node[right=3]
{
propagation
}
(rootwidget);
\node
[block, right of=rootwidget, xshift=5em]
{
Gesture
tracker
}
edge[lineto, dotted, bend left=10] (rootwidget)
edge[linefrom, bend right=10] (rootwidget);
\node
[block, below of=rootwidget]
(subwidget)
{
Button
widget
}
edge[linefrom] (rootwidget)
edge[lineto, bend right=45] node[right=3]
{
event
propagation
}
(rootwidget);
\node
[block, right of=rootwidget, xshift=5em]
{
\emph
{
pinch
}
tracker
}
edge[lineto, dotted, bend left=10] (rootwidget)
edge[linefrom, bend right=10] (rootwidget);
\node
[block, right of=subwidget, xshift=5em]
(tracker)
{
Gesture
tracker
}
edge[lineto, dotted, bend left=10] (subwidget)
edge[linefrom, bend right=10] (subwidget);
\node
[block, below of=subwidget, yshift=-.5em]
{
Application
}
edge[linefrom, dotted, bend left=60] (rootwidget)
edge[linefrom, dotted] (subwidget);
\node
[block, right of=subwidget, xshift=5em]
(tracker)
{
\emph
{
tap
}
tracker
}
edge[lineto, dotted, bend left=10] (subwidget)
edge[linefrom, bend right=10] (subwidget);
\node
[block, below of=subwidget, yshift=-.5em]
{
Application
}
edge[linefrom, dotted, bend left=60] (rootwidget)
edge[linefrom, dotted] (subwidget);
\group
{
subwidget
}{
eventdriver
}{
tracker
}{
subwidget
}{
Architecture
}
}
\group
{
subwidget
}{
eventdriver
}{
tracker
}{
subwidget
}{
Architecture
}
}
\caption
{
#1
}
\end{figure}
}
docs/report.tex
View file @
44060f57
...
...
@@ -314,52 +314,53 @@ messages to some simple touch gestures that are used by a test application.
\ref
{
fig:widgetdiagram
}
, showing the position of gesture trackers in
the architecture.
}
\section
{
Nog iets hier met example diagrams...
}
% TODO
\section
{
Example usage
}
This section describes an example that illustrates the API of the
architecture. The example application listens to tap events in a GUI
window.
architecture. The example application listens to tap events on a button.
The button is located inside an application window, which can be resized
using pinch gestures.
\begin{verbatim}
# Add a new window to the server, representing the GUI
widget = new rectangular Widget object
set widget position and size to that of the GUI window
initialize GUI, creating a window
# If the GUI toolkit allows it, bind window movement and resize handlers
# that alter the position size and sieze of the window object
# Add widgets representing the application window and button
rootwidget = new rectangular Widget object
set rootwidget position and size to that of the application window
buttonwidget = new rectangular Widget object
set buttonwidget position and size to that of the GUI button
# Create an event server that will be started later
server = new EventServer object
set widget as root widget for server
set rootwidget as root widget for server
# Define handlers and bind them to corresponding widgets
begin function resize
_
handler(gesture)
resize GUI window
update position and size of root wigdet
end function
# Define a handler that must be triggered when a tap gesture is detected
begin function handler(gesture)
# Do something
begin function tap
_
handler
_
handler(gesture)
# Perform some action that the button is meant to do
end function
# Bind the handler to the 'tap' event (the widget creates a tap tracker)
bind ('tap',
handler) to
widget
bind ('pinch', resize
_
handler) to rootwidget
bind ('tap',
tap
_
handler) to button
widget
# Start event server (which in turn starts a driver-specific event server)
start server
\end{verbatim}
\examplediagram
{
Diagram representation of the example above. Dotted arrows
represent gestures, normal arrows represent events (unless labeled
otherwise).
}
\chapter
{
Test applications
}
% TODO
% testprogramma's met PyGame/Cairo
%\chapter{Conclusions}
% TODO
% Windows zijn een manier om globale events toe te wijzen aan vensters
% Trackers zijn een effectieve manier om gebaren te detecteren
% Trackers zijn uitbreidbaar door object-orientatie
\chapter
{
Suggestions for future work
}
% TODO
...
...
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