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
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode 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 méthode

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
Résultat void

DoContextMenu() protected méthode

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
Résultat bool

Draw() protected méthode

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
Résultat void

HandleKeyDownAndKeyPress() public méthode

public HandleKeyDownAndKeyPress ( Keys key ) : void
key Keys
Résultat void

HandleSelectionChange() protected méthode

protected HandleSelectionChange ( IVwRootBox rootb, IVwSelection vwselNew ) : void
rootb IVwRootBox
vwselNew IVwSelection
Résultat void

Init() public méthode

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
Résultat void

LexiconLookupEnabled() public méthode

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
Résultat bool

MakeRoot() public méthode

Make the root box.
public MakeRoot ( ) : void
Résultat void

MakeTextSelectionAndScrollToView() public méthode

public MakeTextSelectionAndScrollToView ( int ichMin, int ichLim, int ws, int ipara ) : void
ichMin int
ichLim int
ws int
ipara int
Résultat void

MakeTextSelectionAndScrollToView() protected méthode

protected MakeTextSelectionAndScrollToView ( int ichMin, int ichLim, int ws, int ipara, int ihvoEnd ) : void
ichMin int
ichLim int
ws int
ipara int
ihvoEnd int
Résultat void

OnDisplayClickInvisibleSpace() public méthode

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
Résultat bool

OnDisplayGuessWordBreaks() public méthode

public OnDisplayGuessWordBreaks ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Résultat bool

OnDisplayShowInvisibleSpaces() public méthode

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
Résultat bool

OnGuessWordBreaks() public méthode

Guess where we can break words.
public OnGuessWordBreaks ( object argument ) : void
argument object
Résultat void

OnKeyPress() protected méthode

protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
Résultat void

OnLayout() protected méthode

protected OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void
levent System.Windows.Forms.LayoutEventArgs
Résultat void

OnLexiconLookup() public méthode

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

OnLostFocus() protected méthode

protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnMouseDown() protected méthode

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnMouseMove() protected méthode

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnProblemDeletion() public méthode

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
Résultat VwDelProbResponse

OnPropertyChanged() public méthode

Receives the broadcast message "PropertyChanged"
public OnPropertyChanged ( string name ) : void
name string
Résultat void

RawTextPane() public méthode

public RawTextPane ( ) : System
Résultat System

SelectBookmark() public méthode

public SelectBookmark ( IStTextBookmark bookmark ) : void
bookmark IStTextBookmark
Résultat void

SetRoot() public méthode

public SetRoot ( int hvo ) : void
hvo int
Résultat void