Bachelor Thesis - Computer Graphics Group
Bachelor Thesis - Computer Graphics Group
Bachelor Thesis - Computer Graphics Group
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
shape of the gesture. It can also contain a variable number of pattern samples,<br />
defined by individual user to allow better recognition. Pattern recognizers can<br />
use the samples either optionally or exclusively. The current PatternList<br />
owned by the Engine cannot be edited; it can only be replaced completely by<br />
a new one. Whenever the PatternList is modified, all trainable recognizers<br />
have to be retrained. If changes were allowed, new training would be started<br />
on every single modification. Moreover, the user would not be able to discard<br />
the changes without affecting the state of the recognizers.<br />
The recognized gesture is represented by a Gesture class. It is a simple<br />
structure containing a flag to determine whether it is a regular or wheel gesture.<br />
Regular gestures are identified by their name, wheel gestures by the wheel<br />
direction.<br />
5.5 Action mapping<br />
The purpose of the ActionMapping class is to store and provide access to<br />
user-defined configuration:<br />
• application exclusions specify a list of programs, in which the gesture<br />
processing is ignored. The isApplicationIgnored method is a simple<br />
look-up to determine whether the exclusion list contains the given application.<br />
Individual exclusions can be enabled or disabled<br />
• gesture to action mappings, which are divided into three different groups:<br />
– default settings are general mappings valid in any application<br />
– desktop settings are a special application like group, they match<br />
gestures performed on the Desktop<br />
– specific settings define separate application specific list of mappings<br />
Applications in specific settings, as well as individual gesture mapping<br />
items in all three groups, can be enabled or disabled<br />
The main method provided by the ActionMapping class is determineAction,<br />
which is given an Application::Window and a Gesture. The result<br />
is an Action. This class is a convenience wrapper for ICommand instances,<br />
described in the following section. The decision process is simple. Firstly, the<br />
application specific or desktop settings are consulted. If specific settings for<br />
the given application exist and the list contains the gesture, the corresponding<br />
action is returned. Otherwise, the default settings are used. However, there<br />
is a property called inheritDefaults, which affects further processing in case<br />
the gesture has not been found on the list. Unless cleared, the default settings<br />
35