C# Class SIL.FieldWorks.IText.RawTextPane

RawTextPane displays an StText using the standard VC, except that if it is empty altogether, we display a message. (Eventually.)
Inheritance: SIL.FieldWorks.Common.RootSites.RootSite, IInterlinearTabControl, IHandleBookmark
ファイルを表示 Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
FindClosestWagParsed IAnalysis
GetSelectedWordPos bool
GetSelectedWordform bool
GetWsOfFirstWordOfFirstTextPara int
InsertInvisibleSpace bool
ReparseParaInUowIfNeeded void
ReparseParagraph void
SelectionBeginningGrowToWord IVwSelection
SetParaToReparse void
SetStyleSheet void
SetupVc void
Swap void
TurnOffClickInvisibleSpace void
TurnOnShowInvisibleSpaces void

Public Methods

Method Description
HandleKeyDownAndKeyPress ( Keys key ) : void
Init ( XCore.Mediator mediator, System configurationParameters ) : void

Save the configuration parameters in case we want to use them locally.

LexiconLookupEnabled ( ) : bool

Returns true if there's anything to select. This is needed so that the toolbar button is disabled when there's nothing to select and look up. Otherwise, crashes can result when it's clicked but there's nothing there to process! It's misleading to the user if nothing else. It would be nice if the processing could be minimized, but this seems to be minimal. (GJM - 23 Feb 2012 Is that better? LT-12726)

MakeRoot ( ) : void

Make the root box.

MakeTextSelectionAndScrollToView ( int ichMin, int ichLim, int ws, int ipara ) : void
OnDisplayClickInvisibleSpace ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

handle the message to see if the menu item should be enabled

OnDisplayGuessWordBreaks ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnDisplayShowInvisibleSpaces ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

handle the message to see if the menu item should be enabled

OnGuessWordBreaks ( object argument ) : void

Guess where we can break words.

OnLexiconLookup ( object argument ) : bool

Look up the selected wordform in the dictionary and display its lexical entry.

OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse

The user has attempted to delete something which the system does not inherently know how to delete. The dpt argument indicates the type of problem.

OnPropertyChanged ( string name ) : void

Receives the broadcast message "PropertyChanged"

RawTextPane ( ) : System
SelectBookmark ( IStTextBookmark bookmark ) : void
SetRoot ( int hvo ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

DoContextMenu ( IVwSelection sel, Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : bool

Handle a right mouse up, invoking an appropriate context menu.

Draw ( PaintEventArgs e ) : void

Draw to the given clip rectangle. This is overridden to *NOT* write the default message for an uninitialized rootsite.

HandleSelectionChange ( IVwRootBox rootb, IVwSelection vwselNew ) : void
MakeTextSelectionAndScrollToView ( int ichMin, int ichLim, int ws, int ipara, int ihvoEnd ) : void
OnKeyPress ( KeyPressEventArgs e ) : void
OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void
OnLostFocus ( EventArgs e ) : void
OnMouseDown ( MouseEventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void

Private Methods

Method Description
FindClosestWagParsed ( IStTxtPara para, int ichMin, int ichLim ) : IAnalysis
GetSelectedWordPos ( IVwSelection sel, int &hvo, int &tag, int &ws, int &ichMin, int &ichLim ) : bool
GetSelectedWordform ( IVwSelection sel, IWfiWordform &wordform ) : bool
GetWsOfFirstWordOfFirstTextPara ( ) : int

Returns WS of first character of first paragraph of m_hvoRoot text. It defaults to DefaultVernacularWs in case of a problem.

InsertInvisibleSpace ( MouseEventArgs e ) : bool
ReparseParaInUowIfNeeded ( IStTxtPara para ) : void
ReparseParagraph ( IStTxtPara para ) : void
SelectionBeginningGrowToWord ( IVwSelection sel ) : IVwSelection

Return a word selection based on the beginning of the current selection. Here the "beginning" of the selection is the offset corresponding to word order, not the selection anchor.

SetParaToReparse ( IStTxtPara para ) : void
SetStyleSheet ( int hvo ) : void
SetupVc ( ) : void
Swap ( int &first, int &second ) : void
TurnOffClickInvisibleSpace ( ) : void
TurnOnShowInvisibleSpaces ( ) : void

Method Details

Dispose() protected method

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
return void

DoContextMenu() protected method

Handle a right mouse up, invoking an appropriate context menu.
protected DoContextMenu ( IVwSelection sel, Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : bool
sel IVwSelection
pt Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return bool

Draw() protected method

Draw to the given clip rectangle. This is overridden to *NOT* write the default message for an uninitialized rootsite.
protected Draw ( PaintEventArgs e ) : void
e PaintEventArgs
return void

HandleKeyDownAndKeyPress() public method

public HandleKeyDownAndKeyPress ( Keys key ) : void
key Keys
return void

HandleSelectionChange() protected method

protected HandleSelectionChange ( IVwRootBox rootb, IVwSelection vwselNew ) : void
rootb IVwRootBox
vwselNew IVwSelection
return void

Init() public method

Save the configuration parameters in case we want to use them locally.
public Init ( XCore.Mediator mediator, System configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System
return void

LexiconLookupEnabled() public method

Returns true if there's anything to select. This is needed so that the toolbar button is disabled when there's nothing to select and look up. Otherwise, crashes can result when it's clicked but there's nothing there to process! It's misleading to the user if nothing else. It would be nice if the processing could be minimized, but this seems to be minimal. (GJM - 23 Feb 2012 Is that better? LT-12726)
public LexiconLookupEnabled ( ) : bool
return bool

MakeRoot() public method

Make the root box.
public MakeRoot ( ) : void
return void

MakeTextSelectionAndScrollToView() public method

public MakeTextSelectionAndScrollToView ( int ichMin, int ichLim, int ws, int ipara ) : void
ichMin int
ichLim int
ws int
ipara int
return void

MakeTextSelectionAndScrollToView() protected method

protected MakeTextSelectionAndScrollToView ( int ichMin, int ichLim, int ws, int ipara, int ihvoEnd ) : void
ichMin int
ichLim int
ws int
ipara int
ihvoEnd int
return void

OnDisplayClickInvisibleSpace() public method

handle the message to see if the menu item should be enabled
public OnDisplayClickInvisibleSpace ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayGuessWordBreaks() public method

public OnDisplayGuessWordBreaks ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayShowInvisibleSpaces() public method

handle the message to see if the menu item should be enabled
public OnDisplayShowInvisibleSpaces ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnGuessWordBreaks() public method

Guess where we can break words.
public OnGuessWordBreaks ( object argument ) : void
argument object
return void

OnKeyPress() protected method

protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
return void

OnLayout() protected method

protected OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void
levent System.Windows.Forms.LayoutEventArgs
return void

OnLexiconLookup() public method

Look up the selected wordform in the dictionary and display its lexical entry.
public OnLexiconLookup ( object argument ) : bool
argument object
return bool

OnLostFocus() protected method

protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMove() protected method

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnProblemDeletion() public method

The user has attempted to delete something which the system does not inherently know how to delete. The dpt argument indicates the type of problem.
public OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse
sel IVwSelection The selection
dpt VwDelProbType Problem type
return VwDelProbResponse

OnPropertyChanged() public method

Receives the broadcast message "PropertyChanged"
public OnPropertyChanged ( string name ) : void
name string
return void

RawTextPane() public method

public RawTextPane ( ) : System
return System

SelectBookmark() public method

public SelectBookmark ( IStTextBookmark bookmark ) : void
bookmark IStTextBookmark
return void

SetRoot() public method

public SetRoot ( int hvo ) : void
hvo int
return void