Introduction to Tablet PC Development Gaurav Khanna gkhannamicrosoft
Introduction to Tablet PC Development Gaurav Khanna gkhanna@microsoft. com Developer Evangelist Microsoft India
Agenda Tablet PC platform overview Description of the object model Overview of key objects Demos Other features of the SDK Tablet PC development environment Questions and answers
Microsoft Mobility Platform Windows XP Windows CE+ Tablet PC Smart Personal Objects • One-way network • Information consumption Pocket PC Phone • Integrated PDA Smartphone with phone • View and some • Integrated phone data entry with PDA • Interoperability • Data viewing with Office, Exchange and SQL • Interoperability Server with Exchange • . NET Compact Framework Notebook PC • Complex document authoring, editing and reading • Keyboard centric at the desk • Keyboard and mouse input methods • Full. NET Framework available Increased Functionality • Complex document authoring, editing and active reading • Note taking and ink annotating • Keyboard centric at the desk, pen & keyboard away from the desk • Keyboard, mouse plus pen, ink, and speech input methods • Full. NET Framework preinstalled • Pen, ink, handwriting and speech recognition APIs
Tablet PC Platform Overview Ink collection Ink data and management Ink recognition
Ink Collection (Input) Digitizer basics Very high resolution Very high throughput Packet properties X, Y Pressure, angle, rotation, etc … Using the API to collect ink Ink. Collector Ink. Overlay Real. Time. Stylus (SDK version 1. 7)
Ink Data and Management Ink is a data type Ink looks good Bezier smoothed Anti-aliased Rich, extensible API Copy to/paste from the clipboard Multiple persistence formats
Ink Recognition 10 language recognizers available Provides a full set of recognition results Extensibility architecture allows for custom application recognizers to be built
Tablet PC Platform SDK 2 full APIs: COM automation compliant API. NET API Set of controls Provides common functionality Set of components Provides building blocks for platform extension Documentation and samples
Object Model Overview Ink. Collector Ink. Overlay Ink Strokes Renderer Tablet Stroke Drawing. Attributes Recognizer. Context
Hello Ink World
Ink Collection Objects
Ink. Collector Top level object for collecting ink Attaches to an HWND Handles input from all attached digitizers and cursors (pens) Intercepts pen/mouse movements and can draw Ink dynamically Three ink collection modes: Ink Only Gesture Only Ink and Gesture Fires events
Ink. Overlay Superset of Ink. Collector Adds editing modes Ink – “Real-time” inking mode Select – Selection mode Delete – Eraser mode (point or stroke)
Ink Collection Events Cursor. In. Range/Cursor. Out. Of. Range New. In. Air. Packets Cursor. Down New. Packets Stroke Gesture System. Gesture Mouse Events
To. Do - Ink Notepad
Ink Data Objects
Ink Object Container of stroke data Controls all means of persistence Binary stream Clipboard Can be extended using the Extended. Properties property
Stroke Object Represents a single ink stroke Set of data captured in a single pen down, move and pen up sequence Extended. Properties – allows application to store any data on the stroke Drawing. Attributes – controls the rendering of the stroke Rich API Points, Bezier Points, Bounding. Box, Packet. Data
Strokes Collection Represents a collection of references to stroke objects Useful for grouping related strokes together: By metadata – for filtering For recognition – Recognizer. Context takes strokes collection for recognition
Drawing. Attributes Controls the appearance of ink Color, width, transparency, smoothing, anti-aliasing Pen. Tip – round, rectangular, height, width Can be scaled automatically using Renderer. Scale Each Ink. Collector/Ink. Overlay has a Default. Drawing. Attributes property that specifies the drawing attributes for all cursors Can be applied to a single stroke, to a strokes collection, or to a cursor (pen)
Renderer Two coordinate systems on a Tablet PC Screen coordinates Digitizer coordinates Renderer object enables: Mapping between digitizer and screen Drawing Ink to a device context Manipulating Ink rendering Object and View transforms supported Helper methods: Scale, Move, Rotate
Clipboard Support Use the Ink APIs to cut or copy multiple formats to the clipboard ISF – Ink serialized format Bitmap Metafile Applications interacting with the clipboard can then choose the best format
To. Do - Ink Data Manipulation Demo
Ink Recognition Objects
Recognizer. Context Is the instantiation of a given recognizer Allows recognition of a collection of strokes Synchronous recognition Asynchronous recognition
Enumerating Recognizers installed
Recognition. Result Has lattice structure with rich recognition results Provides access to paths through the Recognition. Alternates Can be stored on the strokes that created it
To. Do – Recognizing Ink
Additional Features in the Tablet SDK Version 1. 7
Context What is Context? Context is the ability to constrain the set of information used for recognition Context can greatly improve recognition accuracy Context can be applied in many ways Lists of words Types of expected text URL, E-mail Address, Number, etc. Where do you see Context? Microsoft Internet Explorer Address bar Any other application that enables context Microsoft Office Outlook 2003 To: line
Enabling Context New applications Input. Scope API (New Win 32 API) See Tablet PC developer center whitepaper for. NET support Existing applications Context Tagging tool
Context Tagging Demo
Tablet Trivia What is Context? Why use it? Context is the ability to constrain the set of information used for recognition Context can greatly improve recognition accuracy
Web Support for Windows Forms controls hosted in HTML Allows you to ink in a control on a web page Support for Single Click Deployment. NET application hosted in the Internet Explorer application domain
Real Time Input Features Real. Time. Stylus Object Model that provides direct access to stylus input even before it is rendered Allows for the creation of new Real Time components Custom dynamic rendering, gesture recognition, disabled regions, etc. Allows for the creation new Ink Collection components Build your own Ink. Overlay or Ink. Collector
Development Environment The SDK can be installed on Tablet or Non-Tablet devices Windows 2000 SP 4 and above External HID compatible digitizer or mouse can simulate tablet digitizer Tablet OS available through MSDN Install on a desktop or laptop for development purposes The Recognizer Pack can be used for development purposes as well
Distributing Tablet Applications Redistributable Merge Module MSM files for all parts of the tablet platform except recognition Application deployment considerations Recognition may be used only on the Tablet OS Controls are designed to collect ink only on the Tablet OS Input Panel usage will only work only on the Tablet OS No support for the Win 9 x Platform
Tablet Trivia Must you have a Tablet. PC to write tablet apps? No!
Tablet & Mobile PC Developer Center http: //msdn. microsoft. com/mobilepc
Q & A: We want your feedback! Email: gkhanna@microsoft. com Blog: http: //blogs. msdn. com/gkhanna/ WWW: http: //www. wintoolzone. com/
© 2003 -2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
- Slides: 41