Building Tablet PC Applications ROB JARRETT
Building Tablet PC Applications
ROB JARRETT
Tablet PC 开发,有需要PDF的留下邮箱
目录
This text was added by using code.Building Tablet PC Applications......................................1
ROB JARRETT ...............................................................................................................1
PHILIP SU......................................................................................................................1
Chapter 3. Introduction to the Tablet PC Platform SDK.....................................................9
A Sort of Homecoming .............................................................................................................10
Finding the Right Operating System for the Job.......................................................17
Managed APIs .....................................................................................................................18
Ink Controls .........................................................................................................................20
COM Automation APIs ......................................................................................................21
Sample Applications .........................................................................................................23
Installing the Tablet PC Platform SDK..................................................................................26
System Requirements.......................................................................................................27
Getting the SDK..................................................................................................................28
Setting Up Your Environment.........................................................................................29
SETTING UP YOUR VISUAL STUDIO .NET ENVIRONMENT ..............31
NOTE .............................................................................................................................31
Anatomy of the Tablet PC Platform SDK .....................................................................37
NOTE .............................................................................................................................37
Overview of the Managed API.................................................................................................40
All That You Can’t Leave Behind ...................................................................................45
Design Goals of the API ...................................................................................................46
THE PRIME DIRECTIVE .......................................................................................49
WHAT’S COVERED BY THE MANAGED API..............................................49
WHAT’S NOT COVERED BY THE MANAGED API ...................................52
NOTE .............................................................................................................................54
Managed API Object Survey............................................................................................58
TABLET INPUT API................................................................................................59
Ink Data Management API................................................................................................64
Ink Recognition API...........................................................................................................67
Ink Control Comparison with Managed API ........................................................................70
Welcome to the Great Adventure...........................................................................................74
Chapter 4. Tablet PC Platform SDK: Tablet Input..............................................................75
Sample Applications .................................................................................................................76
Capturing Input from the Pen .................................................................................................77
NOTE .............................................................................................................................77
Requirement #1—Mouse Emulation..............................................................................78
NOTE .............................................................................................................................78
Requirement #2—Digital Ink............................................................................................79
Requirement #3—Pen-Based Actions ..........................................................................81
3 / 891
NOTE .............................................................................................................................82
Summing Up the Requirements .....................................................................................83
.Anatomy of the Tablet PC’s Tablet Input Subsystem......................................................83
Tablet Hardware..................................................................................................................85
NOTE .............................................................................................................................86
Chock-full of HID-y Goodness ........................................................................................86
NOTE .............................................................................................................................87
The Center of the TIS Universe: Wisptis.exe ..............................................................88
NOTE .............................................................................................................................89
GETTING INPUT FROM THE DRIVER............................................................90
PERFORMING MOUSE EMULATION ..............................................................91
DETECTING PEN-BASED ACTIONS ..............................................................96
NOTE .............................................................................................................................97
DISPATCHING EVENTS .......................................................................................98
MAKING SENSE OF IT ALL .............................................................................101
Winlogon Desktop Support ...........................................................................................103
What About Ink?...............................................................................................................104
Platform SDK Support for Tablet Input ..............................................................................104
Getting Ink from a Tablet................................................................................................105
SAY HELLO TO THE INKCOLLECTOR .......................................................105
NOTE ...........................................................................................................................106
SAMPLE APPLICATION: "HELLOINKCOLLECTOR"............................106
NOTE ...........................................................................................................................110
When Ink Is Not Enough.................................................................................................111
NOTE ...........................................................................................................................112
SAMPLE APPLICATION: HELLOINKOVERLAY ......................................113
CHANGING THE ERASER MODE ..................................................................122
THE INKCONTROL CLASS IN
THE BUILDINGTABLETAPPS LIBRARY ....................................................123
INKOVERLAY’S ATTACH MODE ...................................................................124
NOTE ...........................................................................................................................126
NOTE ...........................................................................................................................127
InkCollector Events .........................................................................................................127
NOTE ...........................................................................................................................128
INK STROKE EVENTS ........................................................................................129
PEN MOVEMENT EVENTS ................................................................................130
NOTE ...........................................................................................................................135
MOUSE TRIGGER EVENTS ..............................................................................135
TABLET HARDWARE EVENTS .......................................................................137
NOTE ...........................................................................................................................137
RENDERING EVENTS (INKOVERLAY ONLY) ..........................................138
INK EDITING EVENTS (INKOVERLAY ONLY) .........................................139
SAMPLE APPLICATION: INPUTWATCHER ..............................................143
ANALYZING THE EVENTS................................................................................166
4 / 891
TIP ................................................................................................................................170
InkOverlay Events............................................................................................................173
Specifying the Tablet Data to Capture—Packet Properties ..................................174
TIP ................................................................................................................................175
SAMPLE APPLICATION: PACKETPROPERTYWATCHER .................180
TIP ................................................................................................................................180
INK COORDINATES .............................................................................................198
Extending InkOverlay Behaviors .................................................................................198
Sample Application: TopOfPenErase .........................................................................200
Sample Application: ModelessSwitch ........................................................................207
Getting Introspective...............................................................................................................213
Tablets Collection ............................................................................................................214
Tablet Class .......................................................................................................................215
SAMPLE APPLICATION: DEVICEWALKER ..............................................218
Common Properties on InkCollector and InkOverlay.............................................227
Best Practices for InkCollector and InkOverlay...............................................................232
NewPackets and NewInAirPackets Events................................................................232
Choosing Desired Packet Properties..........................................................................233
Gesture Recognition .......................................................................................................233
Mouse Events....................................................................................................................234
Summary ....................................................................................................................................235
Chapter 5. Tablet PC Platform SDK: Ink Data Management, Part I .............................236
Ink and Stroke Objects ...........................................................................................................238
NOTE ...........................................................................................................................239
Introduction to the Ink, Stroke, and Strokes Classes.............................................242
THE INK CLASS ....................................................................................................243
THE STROKE CLASS ..........................................................................................245
THE STROKES CLASS .......................................................................................246
SAMPLE APPLICATION—STROKEIDVIEWER ........................................248
ANALYSIS OF STROKE ID BEHAVIOR ......................................................258
NOTE ...........................................................................................................................260
Using Strokes Collections .............................................................................................260
COLLECTION FUNCTIONALITY .....................................................................261
RECEIVING NOTIFICATION OF STROKE ADDITION OR REMOVAL
.......................................................................................................................................263
SAMPLE APPLICATION—INKSELECTOR .................................................264
Creation, Deletion, and Ownership of Stroke Objects ...........................................276
ADDING INK ............................................................................................................278
NOTE ...........................................................................................................................279
DELETING INK .......................................................................................................280
RECEIVING NOTIFICATION OF INK ADDITION AND DELETION ...283
SAMPLE APPLICATION—INKCOPY ............................................................284
SAMPLE APPLICATION—INKFACTORY....................................................294
Rendering Digital Ink...............................................................................................................304
5 / 891
Renderer Class .................................................................................................................305
CREATING AND MAINTAINING RENDERER OBJECTS .....................307
DRAWING INK ........................................................................................................308
SAMPLE APPLICATION—INKLAYERS .......................................................309
CONVERTING BETWEEN INK SPACE AND PIXELS ............................317
RENDERER TRANSFORMS—SCROLLING AND ZOOMING ..............318
SAMPLE APPLICATION—INKMAGNIFY ....................................................323
Adding Style—The DrawingAttributes Class............................................................339
ANTIALIASED.........................................................................................................342
FITTOCURVE PROPERTY.................................................................................343
NOTE ...........................................................................................................................345
IGNOREPRESSURE PROPERTY ...................................................................345
PENTIP ATTRIBUTE ............................................................................................346
RASTEROPERATION PROPERTY.................................................................347
USING THE DRAWINGATTRIBUTES PROPERTY ..................................348
NOTE ...........................................................................................................................348
SAMPLE APPLICATION—INKFORMATTER .............................................351
Special Rendering Effects .............................................................................................369
RENDERING SELECTION STATE..................................................................370
GLOWING INK ........................................................................................................373
TRULY TRANSPARENT INK ............................................................................375
PERFORMANCE IMPLICATIONS OF THESE METHODS ....................375
Summary ....................................................................................................................................376
Chapter 6. Tablet PC Platform SDK: Ink Data Management, Part II ............................378
Stroke Geometry ......................................................................................................................379
Computing the Bounding Box of a Stroke ................................................................379
THE GETBOUNDINGBOX METHOD..............................................................380
THE RENDERER CLASS’S MEASURE METHOD....................................383
CODE SNIPPET—DRAWBOUNDINGBOXES ............................................384
Retrieving the Points of a Stroke .................................................................................385
POLYLINE POINTS ..............................................................................................386
NOTE ...........................................................................................................................387
BÉZIER CONTROL POINTS .............................................................................387
CODE SNIPPET—DRAWPOINTS (DRAWS BÉZIER OR POLYLINE
POINTS OF INK) ....................................................................................................389
Computing Intersections of a Stroke..........................................................................391
CODE SNIPPET—DRAWINTERSECTIONS ................................................397
Retrieving and Setting the Packet Data of a Stroke................................................403
NOTE ...........................................................................................................................404
CODE SNIPPET—PRESSUREADJUST .......................................................406
Retrieving the Cusps of a Stroke .................................................................................408
CODE SNIPPET—DRAWCUSPS.....................................................................409
Putting It Together—the StrokeDataViewer Example.............................................412
SAMPLE APPLICATION—STROKEDATAVIEWER.................................412
6 / 891
Transforming Strokes .....................................................................................................433
SAMPLE APPLICATION—STROKEWARPER ...........................................436
Targeting and Hit-Testing Ink Strokes................................................................................444
Different Types of Hit-Testing.......................................................................................444
POINT-BASED ........................................................................................................445
RECTANGLE-BASED ..........................................................................................445
LASSO-BASED ......................................................................................................446
PERCENTAGE-BASED ENCLOSURE ..........................................................446
Hit-Testing Functions......................................................................................................450
NOTE ...........................................................................................................................451
COMPUTING THE NEAREST POINT ............................................................452
SAMPLE APPLICATION—INSERTREMOVESPACE ..............................453
SAMPLE APPLICATION—REALTIMELASSO ...........................................466
Splitting and Trimming Ink ....................................................................................................499
Splitting Strokes...............................................................................................................500
NOTE ...........................................................................................................................501
Clipping/Trimming Strokes............................................................................................501
SAMPLE APPLICATION—STROKECHOPPER.........................................502
NOTE ...........................................................................................................................522
NOTE ...........................................................................................................................524
Serialization, the Clipboard, and Drag and Drop .............................................................524
Serialization .......................................................................................................................524
PERSISTING STROKES COLLECTIONS ....................................................529
EXTENDED PROPERTY DATA .......................................................................530
SAMPLE APPLICATION—INKPERSIST ......................................................531
NOTE ...........................................................................................................................541
Using the Clipboard.........................................................................................................541
SAMPLE APPLICATION—INKCLIPPY.........................................................547
Implementing Drag and Drop........................................................................................555
SAMPLE APPLICATION—INKDRAGDROP ...............................................556
Summary ....................................................................................................................................563
Chapter 7. Tablet PC Platform SDK: Ink Recognition.....................................................564
Recognizer Architecture ........................................................................................................566
Text vs. Object Recognition ..........................................................................................567
Synchronous vs. Asynchronous Recognition .........................................................568
PARTIAL RECOGNITION ...................................................................................570
WHEN TO USE FOREGROUND AND BACKGROUND RECOGNITION
.......................................................................................................................................571
Recognition Results........................................................................................................572
Performing Simple Recognition...........................................................................................574
Recognizing Text..............................................................................................................575
SAMPLE APPLICATION—BASICRECO ......................................................575
Recognizing Application Gestures..............................................................................580
SPECIFYING APPLICATION GESTURES TO RECOGNIZE................581
7 / 891
RECEIVING APPLICATION GESTURE EVENTS .....................................593
SAMPLE APPLICATION—GESTUREPAD ..................................................594
Using the Recognition Classes ............................................................................................606
Obtaining a Recognizer to Use.....................................................................................608
Initiating a Recognition Session ..................................................................................610
THE RECOGNITION MODE...............................................................................611
PREFIX AND SUFFIX STRINGS .....................................................................614
THE CHARACTER AUTO-COMPLETE MODE ..........................................614
NOTE ...........................................................................................................................616
Supplying Strokes to the Recognizer .........................................................................617
Getting Results I: Easy Synchronous Recognition.................................................620
NOTE ...........................................................................................................................621
SAMPLE APPLICATION—INTERMEDIATERECO...................................621
Getting Results II: Electric Boogaloo (a.k.a. Harder Synchronous Recognition)
..............................................................................................................................................627
SAMPLE APPLICATION—ADVANCEDRECO ...........................................628
NOTE ...........................................................................................................................641
Getting Results III: The Final Chapter (a.k.a. Asynchronous Recognition)......642
SAMPLE APPLICATION—ASYNCRECO.....................................................644
Working with Recognition Results..............................................................................655
THE RECOGNITIONALTERNATE CLASS ..................................................657
SAMPLE APPLICATION—WORDSELECT .................................................662
SAMPLE APPLICATION—CORRECTIONUI ..............................................675
Storing Recognition Results .........................................................................................695
Recognition Properties...................................................................................................698
Improving Recognition Results....................................................................................703
FACTOIDS—CONTENT HINT...........................................................................703
WORD LISTS—CONTENT HINT .....................................................................712
DETERMINING IF A WORD IS SUPPORTED ............................................712
GUIDES—SPATIAL HINT...................................................................................713
Summary ....................................................................................................................................714
Chapter 8. Ink Controls...........................................................................................................716
Achtung Baby ...........................................................................................................................717
IMPORTANT .............................................................................................................719
InkEdit .........................................................................................................................................720
InkEdit Basics ...................................................................................................................721
BASIC PROPERTIES ...........................................................................................728
MOUSE-RELATED PROPERTIES ..................................................................733
NOTE ...........................................................................................................................734
BASIC PROPERTIES EXAMPLE ....................................................................736
Working with Ink...............................................................................................................742
ACCESSING INK WITH SELINKS ..................................................................742
TOGGLING INK DISPLAY WITH SELINKSDISPLAYMODE ................744
Recognizing Ink and Gestures .....................................................................................746
8 / 891
CHANGING RECOGNITION ..............................................................................746
RECOGNITION TIMING ......................................................................................752
GESTURES IN INKEDIT .....................................................................................756
NOTE ...........................................................................................................................763
InkEdit Parting Thoughts ...............................................................................................763
InkPicture ...................................................................................................................................767
NOTE ...........................................................................................................................768
Summary ....................................................................................................................................783
Part III. Advanced Tablet PC Topics ........................................................................................785
Chapter 9. Updating Existing Applications .......................................................................785
Even Better than the Real Thing ..........................................................................................786
User Benefits of Integration ..........................................................................................787
PEN-FRIENDLY USER INTERFACES...........................................................787
DIGITAL INK FEATURES ..................................................................................790
Business Benefits of Integration .................................................................................793
Technical Considerations ......................................................................................................795
Application Design ..........................................................................................................795
INKCOLLECTOR AND INKOVERLAY ..........................................................796
STORAGE .................................................................................................................798
CLIPBOARD ............................................................................................................801
NOTE ...........................................................................................................................802
UNDO..........................................................................................................................803
INK ARCHITECTURE...........................................................................................809
ACCESSIBILITY.....................................................................................................811
Performance ......................................................................................................................812
SPEED OF COMMON OPERATIONS ............................................................813
NOTE ...........................................................................................................................833
MEMORY AND STORAGE OF INK ................................................................841
NOTE ...........................................................................................................................842
NOTE ...........................................................................................................................850
InkPadJunior .............................................................................................................................855
Summary ....................................................................................................................................867
Part IV. Appendixes....................................................................................................................868
Appendix A. BuildingTabletApps Library Reference......................................................868
The InkInputPanel Class ........................................................................................................870
InkInputPanel ....................................................................................................................870
The InkControl and InkControl2 Classes...........................................................................870
NOTE ...........................................................................................................................871
InkControl...........................................................................................................................871
InkControl2 ........................................................................................................................871
InkOverlay ..........................................................................................................................872
InkInputPanel ....................................................................................................................872
The FormatInkDlg Class.........................................................................................................872
FormatInkDlg.....................................................................................................................873
9 / 891
DrawingAttributes ............................................................................................................873
Add NoteThe InkEx Class.........................................................................................................874
AddStrokesAtRectangle.................................................................................................874
The RendererEx Class ............................................................................................................874
InkSpaceToPixel...............................................................................................................875
PixelToInkSpace...............................................................................................................875
DrawSelected ....................................................................................................................875
DrawStrokeIds...................................................................................................................876
DrawBoundingBoxes ......................................................................................................876
DrawPoints.........................................................................................................................877
DrawIntersections............................................................................................................878
DrawCusps.........................................................................................................................879
The LassoUI Class ...................................................................................................................879
LassoUI...............................................................................................................................880
Start .....................................................................................................................................880
Continue .............................................................................................................................881
Render.................................................................................................................................881
Points ..................................................................................................................................881
BoundingRect ...................................................................................................................882
DotSpacing ........................................................................................................................882
DotSize................................................................................................................................882
DotBrush ............................................................................................................................883
The CopyAsTextDlg Class.....................................................................................................883
CopyAsTextDlg.................................................................................................................883
RecognitionResult ...........................................................................................................884
Appendix B. Tablet PC Hardware Guidelines ...................................................................884
Windows XP Tablet PC Edition Hardware Requirements..............................................885
Digitizer: .............................................................................................................................885
Power States: ....................................................................................................................887
Viewing Mode:...................................................................................................................889
Removal from Dock:........................................................................................................890
Legacy-Free:......................................................................................................................890
CTRL+ALT+DEL or Equivalent Functionality: ..........................................................891
Building Tablet PC Applications ROB JARRETT的更多相关文章
- 018.07 New BMW ICOM A3+B+C+D Plus EVG7 Controller Tablet PC with WIFI Function
2018.07 New BMW ICOM A3+B+C+D Plus EVG7 Controller Tablet PC with WIFI Function Software Version : ...
- 通通WPF随笔(4)——通通手写输入法(基于Tablet pc实现)
原文:通通WPF随笔(4)--通通手写输入法(基于Tablet pc实现) 从我在博客园写第一篇博客到现在已经有1年半了,我的第一篇博客写的就是手写识别,当时,客户需求在应用中加入手写输入功能,由于第 ...
- c#基于Tablet pc实现的手写输入
需要安装Tablet pc,win7的话 直接在控制面板>程序和应用>添加组建里面勾选上添加 然后就是下面的程序了,看代码 设计文件 namespace 手写识别 { partial cl ...
- Building real-time dashboard applications with Apache Flink, Elasticsearch, and Kibana
https://www.elastic.co/cn/blog/building-real-time-dashboard-applications-with-apache-flink-elasticse ...
- 微软职位内部推荐-Principal DEV Manager for Bing Client
微软近期Open的职位: Title: Principal DEV Manager for Bing ClientGroup: Search Technology Center Asia, BingW ...
- [转]Amazon DynamoDB – a Fast and Scalable NoSQL Database Service Designed for Internet Scale Applications
This article is from blog of Amazon CTO Werner Vogels. -------------------- Today is a very exciting ...
- C#判断PC是否支持触摸屏
C#判断PC是否支持触摸屏 添加引用PresentationFrameworkSystem.Windows.SystemParameters.IsTabletPC 使用win32api [csharp ...
- PHP判断是手机端访问还是PC端访问网站
Mobile_Detect 是一个轻量级的开源移动设备(手机)检测的 PHP Class, 它使用 User-Agent 中的字符串,并结合 HTTP Header,来检测移动设备环境. 这个设备检测 ...
- 【本人译作推荐】Windows 8应用开发:C#和XAML卷(原名:Building Windows 8 Apps with C# and XAML)
[图书推荐] 译名:Windows 8应用开发:C#和XAML卷 原名:Building Windows 8 Apps with C# and XAML 编辑推荐 国内第一本使用XAML与C#语言 ...
随机推荐
- 小程序中this和that用法
微信小程序中,在wx.request({});方法调用成功或者失败之后,有时候会需要获取页面初始化数据data的情况,这个时候,如果使用,this.data来获取,会出现获取不到的情况,调试页面也会报 ...
- Maximum Questions CodeForces - 900E (字符串,dp)
大意:给定长$n$的字符串$s$, 只含'a','b','?', '?'可以替换为任意字符, 在给定长$t$的字符串, "ababab...", 求替换尽量少的'?', 使得$s$ ...
- python记录_day14 内置函数二 迭代 二分法
一.匿名函数 形式: lambda 形参:返回值 lambda表示的是匿名函数. 不需要用def来声明, 一句话就可以声明出一个函数.匿名函数不是说一定没名字,而是他们的名字统一称为“lambda”, ...
- Android测试(二)——drozer使用
drozer启动: 1)首先在模拟 器或者安卓设备上开启drozer; 2)然后打开adb,转发端口: adb forward tcp:31415 tcp:31415 3)在电脑上开启drozer: ...
- ubuntu Sublime Text 2编辑器安装
官网下载http://www.sublimetext.com/2 选择合适的包下载回来的格式是.tar.bz2格式,需要进行解压. 1,解压:tar -xvf Sublime\ Text\ 2.0.2 ...
- leetcode-algorithms-2 Add Two Numbers
leetcode-algorithms-2 Add Two Numbers You are given two non-empty linked lists representing two non- ...
- C# 条件表达式max=(a>b)?a:b;含义
a?b:c 这个是条件表达式,表示如果a为真,则表达式值为b,如果a为假,则表达式值为c条件表达式具体说明如下条件语句: if(a>b) max=a; else max=b; 可用条件表达式写为 ...
- Mac下配置/使用GitHub
一.配置1. 查看是否有id_rsa.pub文件:cd ~/.ssh 2. 如果没有id_rsa.pub文件,执行如下命令来生成id_rsa.pub文件: ssh-keygen -t rsa -C & ...
- 接收上传的multi-file的文件(四)
构建工程 为例创建一个springmvc工程你需要spring-boot-starter-thymeleaf和 spring-boot-starter-web的起步依赖.为例能够上传文件在服务器,你需 ...
- git开发过程的配置和使用
git开发过程的使用 1.创建仓库 2.新建项目,填写项目名称等信息 3.初始化仓库,创建git仓库 git init 4.配置个人信息(配置过可忽略) git config --global use ...