410 likes | 566 Views
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
E N D
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 • 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 Pocket PC Phone Smart Personal Objects Notebook PC • Complex document authoring, editing and reading • Keyboard centric at the desk • Keyboard and mouse input methods • Full .NET Framework available • Integrated PDA with phone • View and some data entry • Interoperability with Office, Exchange and SQL Server • .NET Compact Framework • One-way network • Information consumption Smartphone • Integrated phone with PDA • Data viewing • Interoperability with Exchange • .NET Compact Framework Increased Functionality
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 • InkCollector • InkOverlay • 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 tobe 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 InkCollector InkOverlay Ink Strokes Stroke Renderer DrawingAttributes Tablet Recognizers Recognizer RecognizerContext
InkCollector • Top level object for collecting ink • Attaches to an HWND • Handles input from all attached digitizersand 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/CursorOutOfRange • NewInAirPackets • CursorDown • NewPackets • Stroke • Gesture • SystemGesture • Mouse Events
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 renderingof the stroke • Rich API • Points, Bezier Points, BoundingBox, PacketData
Strokes Collection • Represents a collection of referencesto 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 • Bitmap • Metafile • Applications interacting with the clipboard can then choose the best format
RecognizerContext • Is the instantiation of a given recognizer • Allows recognition of a collectionof strokes • Synchronous recognition • Asynchronous recognition
RecognitionResult • Has lattice structure with rich recognition results • Provides access to paths through the RecognitionAlternates • Can be stored on the strokes that created it
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 • InputScope API (New Win32 API) • See Tablet PC developer center whitepaper for .NET support • Existing applications • Context Tagging tool
Tablet Trivia What is Context?Why use it? Context is the ability to constrain theset 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 aweb 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 http://msdn.microsoft.com/mobilepc
Q & A: We want your feedback! Email: gkhanna@microsoft.comBlog: 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.