次の方法で共有


Selecting and Editing Ink

Selection is often implemented as a separate mode or tool from ink input. A tablet pen is used both as a pointing device and as a means of writing. For a writing surface that is actively accepting ink from a tablet pen, the application needs to distinguish pen movements that are intended to select ink from pen movements that are intended to write or draw. With a selection tool, the user can select ink and then apply editing operations such as moving, copying, deleting, or formatting.

The ink collecting objects such as InkOverlay support selection and editing behavior such as moving and resizing. To review a simple example of selection and editing that uses InkOverlay, you can download the Tablet PC hands-on lab called Getting Started with the Tablet PC Platform.

As noted in Providing Erasers, you can activate a selection tool in various ways: a toolbar button can activate a selection mode that remains active until a writing tool is selected, or users can temporarily enter a selection mode when they hold down a barrel button. Barrel button equivalents are useful because they reduce the round-trip hand movements between the writing surface and the toolbar. Because they aren't as discoverable as a toolbar button, and because not all tablet pens include buttons, you should implement both approaches in your application.

Determining what to select

A complex ink document can include paragraphs, bulleted lists, flowcharts, shapes, and tables.

The following illustration shows an organizational chart in ink.

 

ms698559.18d3d1e8-6037-4240-9a86-592b65f9c9c8(en-us,VS.85).gif

 

If the user taps the topmost box in the organizational chart, is it possible that she wants to select the entire chart so that she can move it to a different location, or copy it to a different page? Or does she want to select only the topmost box? To answer questions like these, you need to consider your user scenarios. You can use the ink analysis API to implement an intuitive selection interface that's aware of the possible structures and relationships within ink documents.

Selection tools

With a selection tool (seen also in many paint programs), users can select the non-rectangular objects that are typically created with a tablet pen. Users can easily draw a loop around an inked drawing, word, or paragraph, to select precisely the elements that they are interested in editing. Users can also use the selection tool to easily select irregularly shaped elements in their writing.

The following illustration shows the use of the Selection tool in Windows Journal.

 

Lasso selection

Lasso selection

 

Similar icons are used in OneNote, and in ink collecting objects such as InkOverlay.

You can also allow users to tap a stroke, word, or drawing to select it. Once you've determined which stroke was tapped, you can use the ink analysis API to determine what to select. Depending on the scenario, you might select the stroke or the word, paragraph, or drawing to which it belongs. For more information, see Ink Analysis.

Editing

Once the user has established an ink selection, he can edit in the same way he would edit with the mouse. Typical editing commands for ink selections include the following:

  • Moving
  • Resizing
  • Formatting (generally using properties covered in Pens and Pen Options)
  • Converting to text or to shape objects

The InkOverlay object supports moving and resizing as part of its selection mode. When the user taps and drags within the area of the selection border, most applications interpret these movements as a move command, not as the application of ink. You can experiment with these editing commands by modifying the sample provided with the hands-on lab Getting Started with the Tablet PC Platform.

Recognition

Text and shape recognition converts handwritten words and drawings to text and shapes. Your users might want to recognize a block of text or a drawing to improve its presentation, transfer it to other applications, or share it with others. The ink analysis API provides powerful capabilities for recognizing text and shapes, and for determining how inked elements relate to one another. See Ink Analysis Overview for more information.

Copying and pasting ink

Users want to share the ink data they create with others, and transfer it to other applications. You should support the following critical clipboard formats for ink:

  • Ink Serialized Format (ISF)
  • Fortified Graphics Interchange Format (GIF)

For more information, see Ink Interoperability.

 

 

Send comments about this topic to Microsoft

Build date: 2/8/2011