C# Class SIL.FieldWorks.SharpViews.Selections.Selection

The base class for all selections.
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Méthode Description
ApplyStyle ( string style ) : void
CanApplyStyle ( string style ) : bool
CanDelete ( ) : bool

Return true if Delete() will delete something. Default is that it will not.

Contains ( InsertionPoint ip ) : bool

Answer true if the selection is contained in the other, that is, it is associated with one of the selected characters.

Delete ( ) : void

Delete the selected material, or whatever else is appropriate when the Delete key is pressed. (Insertion Point deletes the following character.) Default is to do nothing.

GetSelectionLocation ( IVwGraphics graphics, PaintTransform transform ) : Rectangle

Get the location, in the coordinates indicated by the transform, of a rectangle that contains the primary insertion point. Todo JohnT: there should be a parallel routine to get the location of the secondary rectangle.

InsertRtfString ( string input ) : bool
InsertText ( string input ) : bool
InsertTsString ( ITsString input ) : bool
Install ( ) : void

Install this selection as the current one for the root box.

MoveByKey ( KeyEventArgs args ) : Selection

Return the selection that should be produced by a KeyDown event with the specified arguments. If the argument does not specify a key-moving event or it is not possible to move (e.g., left arrow at start of document), return null.

RestoreData ( Selection dataToSave ) : ISelectionRestoreData
SelectedText ( ) : string

Private Methods

Méthode Description
Draw ( IVwGraphics vg, PaintTransform ptrans ) : void

Draw the selection on the VwGraphics.

Invalidate ( ) : void

Invalidate the selection, that is, mark the rectangle it occupies as needing to be painted in the containing control.

Method Details

ApplyStyle() public méthode

public ApplyStyle ( string style ) : void
style string
Résultat void

CanApplyStyle() public méthode

public CanApplyStyle ( string style ) : bool
style string
Résultat bool

CanDelete() public méthode

Return true if Delete() will delete something. Default is that it will not.
public CanDelete ( ) : bool
Résultat bool

Contains() public méthode

Answer true if the selection is contained in the other, that is, it is associated with one of the selected characters.
public Contains ( InsertionPoint ip ) : bool
ip InsertionPoint
Résultat bool

Delete() public méthode

Delete the selected material, or whatever else is appropriate when the Delete key is pressed. (Insertion Point deletes the following character.) Default is to do nothing.
public Delete ( ) : void
Résultat void

GetSelectionLocation() public abstract méthode

Get the location, in the coordinates indicated by the transform, of a rectangle that contains the primary insertion point. Todo JohnT: there should be a parallel routine to get the location of the secondary rectangle.
public abstract GetSelectionLocation ( IVwGraphics graphics, PaintTransform transform ) : Rectangle
graphics IVwGraphics
transform PaintTransform
Résultat System.Drawing.Rectangle

InsertRtfString() public méthode

public InsertRtfString ( string input ) : bool
input string
Résultat bool

InsertText() public méthode

public InsertText ( string input ) : bool
input string
Résultat bool

InsertTsString() public méthode

public InsertTsString ( ITsString input ) : bool
input ITsString
Résultat bool

Install() public méthode

Install this selection as the current one for the root box.
public Install ( ) : void
Résultat void

MoveByKey() public méthode

Return the selection that should be produced by a KeyDown event with the specified arguments. If the argument does not specify a key-moving event or it is not possible to move (e.g., left arrow at start of document), return null.
public MoveByKey ( KeyEventArgs args ) : Selection
args System.Windows.Forms.KeyEventArgs
Résultat Selection

RestoreData() public abstract méthode

public abstract RestoreData ( Selection dataToSave ) : ISelectionRestoreData
dataToSave Selection
Résultat ISelectionRestoreData

SelectedText() public méthode

public SelectedText ( ) : string
Résultat string