Suki RichInk
SpellBuddy.com
SpellBuddy.com




System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.Control
        SpellBuddy.WindowsCE.Forms.RichInkBox


Public Constructors

RichInkBox
public RichInkBox()

Creates the Rich Ink Box.

Note: When a RichInkBox instance is created in a Dialog window, the RichInkBox instance must be released before closing the Dialog window by calling Dispose.



Public Properties

BindingContext {inherited from Control}

Gets or sets the BindingContext for the control.


Bottom {inherited from Control}

Gets or sets the size and location of the control including its non-client elements.


ClientRectangle {inherited from Control}

Gets the rectangle that represents the client area of the control.


ClientSize {inherited from Control}

Gets or sets the height and width of the client area of the control.


Enabled {inherited from Control}

Gets a value indicating whether the control has input focus.


Focused {inherited from Control}

Gets or sets a value indicating whether the control can respond to user interaction.


Height {inherited from Control}

Gets or sets the height of the control.


InkData
public Byte[] InkData { get; set; }

Gets or sets the InkData in the control.

Example
private byte[] bInkData = new byte[InkData.GetLength()];
bInkData = Suki.InkData;
Suki.InkData = bInkData;

InkLayer
public RichInkInkLayer InkLayer { set; }

Sets the page style.

Example
Suki.InkLayer = RichInkBox.RichInkInkLayer.Smart;

InkStyle
public INKSTYLE InkStyle { get; set; }

Gets or sets the ink formatting.

Example
RichInkBox.INKSTYLE isinkstyle = new RichInkBox.INKSTYLE();
isinkstyle = Suki.InkStyle;
isinkstyle.FontSize = Convert.ToInt32(cbSize.Text, 10);
isinkstyle.SetFontSize = true;
isinkstyle.FontName = cbFont.Text;
isinkstyle.SetFontName = true;
isinkstyle.FontColor = e;
isinkstyle.SetFontColor = true;
isinkstyle.Alignment = 0;      // 0=left, 1=right, 2=center
isinkstyle.SetAlignment = true;
Suki.InkStyle = isinkstyle;

InkXHandle
public IntPtr InkXHandle { get; }

Gets the Handle to the InkX window.

Example
IntPtr hwndInkX = InkXHandle()

IsSelection
public bool IsSelection { get; }

Gets a value that indicates if ink is selected in the control.

Example
Boolean bSelection = IsSelection()

Left {inherited from Control}

Gets or sets the x-coordinate of a control's left edge in pixels.


Location {inherited from Control}

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.


Modified
public bool Modified { get; set; }

Gets or sets a value that indicates that the control has been modified by the user since the control was created or its contents were last set.

Example
Boolean bModified = Modified()

ObjectStyle
public OBJECTSTYLE ObjectStyle { get; set; }

Gets or sets the style for an ink object.

Example
RichInkBox.OBJECTSTYLE osobjectstyle = new RichInkBox.OBJECTSTYLE();
osobjectstyle = Suki.ObjectStyle;
osobjectstyle.PenWeight = 2;      // 0=fine, 1=normal, 2=bold, 3=heavy
osobjectstyle.SetPenWeight = true;
osobjectstyle.FillColor = e;
osobjectstyle.SetFillColor = true;
osobjectstyle.Filled = true;
osobjectstyle.SetFilled = true;
Suki.ObjectStyle = osobjectstyle;

PageStyle
public RichInkPageStyle PageStyle { get; set; }

Gets or sets the display style for a logical page.

Example
Suki.PageStyle = RichInkPageStyle.None;

ParagraphStyle
public PARAGRAPHSTYLE ParagraphStyle { get; set; }

Gets or sets the paragraph formatting.

Example
RichInkBox.PARAGRAPHSTYLE psparagraphstyle = new RichInkBox.PARAGRAPHSTYLE();
psparagraphstyle = Suki.ParagraphStyle;
psparagraphstyle.Alignment = 1;      // 0=left, 1=center, 2=right
psparagraphstyle.SetAlignment = true;
//psparagraphstyle.IndentLeft = 1;
//psparagraphstyle.SetIndentLeft = true;
//psparagraphstyle.RightLeft = 1;
//psparagraphstyle.SetIndentRight = true;
psparagraphstyle.Bullet = true;
psparagraphstyle.SetBullet = true;
ParagraphStyle.ObjectStyle = psparagraphstyle;

Parent {inherited from Control}

Gets or sets the parent container of the control.


PenMode
public RichInkPenMode PenMode { get; set; }

Gets or sets the pen type.

Example
Suki.PenMode = RichInkBox.RichInkPenMode.Select;

RichInkHandle
public IntPtr RichInkHandle { get; }

Gets the Handle to the RichInk window.

Example
IntPtr hwndRichInk = RichInkHandle()

Right {inherited from Control}

Gets the distance between the right edge of the control and the left edge of its container.


SelectedRTF
public String SelectedRTF { get; set; }

Gets or sets the selected RTF.

Example
String rtftext = Suki.SelectedRTF;

SelectedText
public String SelectedText { get; set; }

Gets or sets the selected text.

Example
String seltext = Suki.SelectedText;
Suki.SelectedText = "Hello";

SelectionBounds
public Rectangle SelectionBounds { get; set; }

Gets the size and location of the selection.

Example
// SelectionBounds can be used to position the spell check corrections list
System.Drawing.Rectangle selbounds = Suki.SelectionBounds;

SelectionLength
public Integer SelectionLength { get; set; }

Gets or sets the number of characters selected in the control.

Example
Suki.SelectionLength = 0;

SelectionStart
public Integer SelectionStart { get; set; }

Gets or sets the starting point of text selected in the Control.

Example
Suki.SelectionStart = 0;

Text
public String Text { get; set; }

Gets or Sets the text displayed in the control.

Example
Suki.Text = "Hello\nWorld!";
String ritext = Suki.Text;

Top {inherited from Control}

Gets or sets the y-coordinate of the control's top edge in pixels.


TopLevelControl {inherited from Control}

Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in.


ViewStyle
public RichInkViewStyle ViewStyle { get; set; }

Gets or sets view style for input.

Example
Suki.ViewStyle = RichInkBox.RichInkViewStyle.Typing;

Visible {inherited from Control}

Gets or sets a value indicating whether the control is displayed.


VoiceBar
public bool VoiceBar { get; set; }

Gets or sets a value indicating whether the Voice input bar is displayed.

Example
Suki.VoiceBar = true;

VoicePlaying
public bool VoicePlaying { get; }

Gets a value indicating whether voice input is playing.

Example
Boolean bvoiceplaying = Suki.VoicePlaying;

VoiceRecording
public bool VoiceRecording { get; }

Gets a value indicating whether voice input is recording.

Example
Boolean bvoicerecording = Suki.VoiceRecording;

Width {inherited from Control}

Gets or sets the width of the control.


WrapMode
public RichInkWrapMode WrapMode { get; set; }

Gets or sets the wrap mode for a virtual page.

Example
Suki.WrapMode = SukiRichInk.RichInkWrapMode.WrapToWindow;

ZoomPercent
public Integer ZoomPercent { get; set; }

Gets or sets the zoom level for a virtual page. Zoom percentage can be a value between 0 to 300.

Example
Suki.ZoomPercent = 100;


Public Methods

BringToFront {inherited from Control}

Brings the control to the front of the z-order.


CanPaste
public bool CanPaste(Integer ClipboardFormat)

Determines if a clipboard format can be sent to the clipboard.

Example
Boolean bcanpaste = Suki.CanPaste(0);      // 0 = test all clipboard formats

CanRedo
public bool CanRedo()

Determines if a re-do-able operation exists.

Example
Boolean bcanredo = Suki.CanRedo();

CanUndo
public bool CanUndo()

Determines if an undoable operation exists.

Example
Boolean bcanundo = Suki.CanUndo();

Clear
public void Clear()

Clears the current selection in the control.

Example
Suki.Clear();

ClearAll
public void ClearAll()

Clears all text and ink.

Example
Suki.ClearAll();

Copy
public void Copy()

Copies the current selection in the control to the Clipboard.

Example
Suki.Copy();

Cut
public void Cut()

Moves the current selection in the control to the Clipboard.

Example
Suki.Cut();

Dispose
public void Dispose()

Releases the resources used by the Component.

Important: The RichInkBox control must be released when exiting the application by calling Dispose.


Equals {inherited from Control}

Determines whether two Object instances are equal.


FileLoad
public bool FileLoad(String FileName)

Loads a file.

Example
Suki.FileLoad(strfilename);

FileSave
public bool FileSave(String FileName)

Saves a file.

Example
Suki.FileSave(strfilename);

FlushInkInput
public void FlushInkInput()

Flushes pending ink input.

Example
Suki.FlushInkInput();

Focus {inherited from Control}

Sets input focus to the control.


GetFileName
public String GetFileName()

Gets a value from the text in the control that can be used for a filename.

Example
String strfilename = Suki.GetFileName();

GetHashCode {inherited from Control}

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.


GetType {inherited from Control}

Gets the Type of the current instance.


Hide {inherited from Control}

Conceals the control from the user.


InsertLinks
public void InsertLinks(String Link)

Inserts a clickable link that performs an operation.

Example
Suki.InsertLinks("<file:iexplore www.spellbuddy.com{www.SpellBuddy.com}>");
Suki.InsertLinks("Tap <file:notes{Go to Notes}> to go to Notes\r");
Suki.InsertLinks("Tap <file:SHFind{Find}> to find things.");

Invalidate {inherited from Control}

Invalidates a specific region of the control and causes a paint message to be sent to the control.


Invoke {inherited from Control}

Executes a delegate on the thread that owns the control's underlying window handle.


Paste
public void Paste()

Replaces the current selection in the control with the contents of the Clipboard.

Example
Suki.Paste();

PointToClient {inherited from Control}
Computes the location of the specified screen point into client coordinates.


PointToScreen {inherited from Control}

Computes the location of the specified client point into screen coordinates.


Recognize
public void Recognize()

Converts ink data to text.

Example
Suki.Recognize();

RectangleToClient {inherited from Control}

Computes the size and location of the specified screen rectangle in client coordinates.


RectangleToScreen {inherited from Control}

Computes the size and location of the specified client rectangle in screen coordinates.


Redo
public void Redo()

Re-does the last action.

Example
Suki.Redo();

Refresh
public void Refresh()

Forces the control to invalidate its client area and immediately redraw itself and any child controls.

Example
Suki.Refresh();

ScrollToCaret
public void ScrollToCaret()

Scrolls the contents of the control to the current caret position.

Example
Suki.ScrollToCaret();

Select
public void Select(Integer Start, Integer Length)

Selects ink in the control.

Example
Suki.Select(0, 5);      // selects the first five characters

SelectAll
public void SelectAll()

Selects all ink in the control.

Example
Suki.SelectAll();

SendToBack {inherited from Control}

Sends the control to the back of the z-order.


Show {inherited from Control}

Displays the control to the user.


Undo
public void Undo()

Un-does the last action.

Example
Suki.Undo();

VoicePlay
public void VoicePlay()

Plays the voice input.

Example
Suki.VoicePlay();

VoiceRecord
public void VoiceRecord()

Starts recording voice input.

Example
Suki.VoiceRecord();

VoiceStop
public void VoiceStop()

Stops recording voice input.

Example
Suki.VoiceStop();


Public Events

Click {inherited from Control}

Occurs when the control is clicked.


CommandMessage

Occurs when the command message is received.


EnabledChanged {inherited from Control}

Occurs when the Enabled property value has changed.


GotFocus {inherited from Control}

Occurs when the control receives focus.


KeyDown

Occurs when a key is pressed while the control has focus.


KeyPress {inherited from Control}

Occurs when a key is pressed while the control has focus.


KeyUp

Occurs when a key is released while the control has focus.


LostFocus {inherited from Control}

Occurs when the control loses focus.


MouseDown

Occurs when the mouse pointer is over the control and a mouse button is pressed.


MouseMove

Occurs when the mouse pointer is moved over the control.


MouseUp

Occurs when the mouse pointer is over the control and a mouse button is released.


Paint {inherited from Control}

Occurs when the control is redrawn.


ParentChanged {inherited from Control}

Occurs when the Parent property value changes.


Resize {inherited from Control}

Occurs when the control is resized.


Validated {inherited from Control}

Occurs when the control is finished validating.


Validating {inherited from Control}

Occurs when the control is validating.



Public Enumerators

RichInkFontAlignment

Left = 0
Center = 1
Right = 2


RichInkFontWeight

Normal = 0
Light = 1
Bold = 2
Heavy = 3


RichInkInkLayer

Smart = 0
Writing = 1
Drawing = 2
Links = 3
SmartLinks = 4


RichInkPageStyle

LeftMargin = 0
TopMargin = 1
RuledLines = 2
GridLines = 4
TopLeftMargin = 8
None = 16
DottedLines = 32
YellowBackground = 64


RichInkParagraphAlignment

Left = 0
Center = 1
Right = 2


RichInkPenMode

Pen = 0
Select = 1
Space = 2


RichInkPenWeight

Normal = 0
Light = 1
Bold = 2
Heavy = 3


RichInkViewStyle

Typing = 0
Writing = 2
Drawing = 3


RichInkWrapMode

WrapToPage = 0
WrapToWindow = 1



SpellBuddy Copyright © 2003-2008, Craig Lubitz. All Rights Reserved. Parts of this web site are Copyright © 2002, John Minadeo. All Rights Reserved.