C# Класс SIL.FieldWorks.SharpViews.Selections.Selection

The base class for all selections.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

ApplyStyle() публичный Метод

public ApplyStyle ( string style ) : void
style string
Результат void

CanApplyStyle() публичный Метод

public CanApplyStyle ( string style ) : bool
style string
Результат bool

CanDelete() публичный Метод

Return true if Delete() will delete something. Default is that it will not.
public CanDelete ( ) : bool
Результат bool

Contains() публичный Метод

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
Результат bool

Delete() публичный Метод

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
Результат void

GetSelectionLocation() публичный абстрактный Метод

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
Результат System.Drawing.Rectangle

InsertRtfString() публичный Метод

public InsertRtfString ( string input ) : bool
input string
Результат bool

InsertText() публичный Метод

public InsertText ( string input ) : bool
input string
Результат bool

InsertTsString() публичный Метод

public InsertTsString ( ITsString input ) : bool
input ITsString
Результат bool

Install() публичный Метод

Install this selection as the current one for the root box.
public Install ( ) : void
Результат void

MoveByKey() публичный Метод

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
Результат Selection

RestoreData() публичный абстрактный Метод

public abstract RestoreData ( Selection dataToSave ) : ISelectionRestoreData
dataToSave Selection
Результат ISelectionRestoreData

SelectedText() публичный Метод

public SelectedText ( ) : string
Результат string