Introduction to Tablet PC Development Gaurav Khanna 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 Increased Functionality Complex document authoring, editing and readingComplex document authoring, editing and reading Keyboard centric at the deskKeyboard centric at the desk Keyboard and mouse input methodsKeyboard and mouse input methods Full.NET Framework availableFull.NET Framework available Windows CE+ Windows XP Complex document authoring, editing and active readingComplex document authoring, editing and active reading Note taking and ink annotatingNote taking and ink annotating Keyboard centric at the desk, pen & keyboard away from the deskKeyboard centric at the desk, pen & keyboard away from the desk Keyboard, mouse plus pen, ink, and speech input methodsKeyboard, mouse plus pen, ink, and speech input methods Full.NET Framework preinstalledFull.NET Framework preinstalled Pen, ink, handwriting and speech recognition APIsPen, ink, handwriting and speech recognition APIs Integrated PDA with phoneIntegrated PDA with phone View and some data entryView and some data entry Interoperability with Office, Exchange and SQL ServerInteroperability with Office, Exchange and SQL Server.NET Compact Framework.NET Compact Framework Integrated phone with PDAIntegrated phone with PDA Data viewingData viewing Interoperability with ExchangeInteroperability with Exchange.NET Compact Framework.NET Compact Framework One-way networkOne-way network Information consumptionInformation consumption Smart Personal Objects Smartphone Pocket PC Phone Notebook PC Tablet PC
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 InkCollectorInkOverlay RealTimeStylus (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 InkCollectorInkOverlay Ink Strokes Renderer Tablet Stroke Recognizers Recognizer DrawingAttributes RecognizerContext
Hello Ink World
Ink Collection Objects
InkCollector 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
InkOverlay Superset of InkCollector Adds editing modes Ink – “Real-time” inking mode Select – Selection mode Delete – Eraser mode (point or stroke)
Ink Collection Events CursorInRange/CursorOutOfRangeNewInAirPacketsCursorDownNewPacketsStrokeGestureSystemGesture Mouse Events
Tablet Trivia What’s the difference between InkCollector and InkOverlay? InkOverlay adds editing modes Ink – “Real-time” inking mode Select – Selection mode Delete – Eraser mode (point or stroke)
ToDo - Ink Notepad
Ink Data Objects
Ink Object Container of stroke data Controls all means of persistence Binary stream Clipboard Can be extended using the ExtendedProperties property
Stroke Object Represents a single ink stroke Set of data captured in a single pen down, move and pen up sequence ExtendedProperties – allows application to store any data on the stroke DrawingAttributes – controls the rendering of the stroke Rich API Points, Bezier Points, BoundingBox, PacketData
Strokes Collection Represents a collection of references to stroke objects Useful for grouping related strokes together: By metadata – for filtering For recognition – RecognizerContext takes strokes collection for recognition
DrawingAttributes Controls the appearance of ink Color, width, transparency, smoothing, anti-aliasing PenTip – round, rectangular, height, width Can be scaled automatically using Renderer.Scale Each InkCollector/InkOverlay has a DefaultDrawingAttributes 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 BitmapMetafile Applications interacting with the clipboard can then choose the best format
ToDo - Ink Data Manipulation Demo
Tablet Trivia What’s the most important thing to remember about the Strokes collection? Represents a collection of references to Stroke objects
Ink Recognition Objects
RecognizerContext Is the instantiation of a given recognizer Allows recognition of a collection of strokes Synchronous recognition Asynchronous recognition
Enumerating Recognizers installed
RecognitionResult Has lattice structure with rich recognition results Provides access to paths through the RecognitionAlternates Can be stored on the strokes that created it
ToDo – Recognizing Ink
Tablet Trivia What did I warn you not to do in my reco demo that I did? New up a RecoContext without it iterating over recognizers
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, 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 InputScope API (New Win32 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 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 RealTimeStylus 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 InkOverlay or InkCollector
Development Environment The SDK can be installed on Tablet or Non-Tablet devices Windows 2000 SP4 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 Win9x Platform
Tablet Trivia Must you have a TabletPC to write tablet apps? No!
Tablet & Mobile PC Developer Center
Q & A: We want your feedback! Blog: WWW:
© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.