C# Class SIL.FieldWorks.SharpViews.Paragraphs.ParaBox

Inheritance: GroupBox, IStringParaNotification
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
DoRangePaintingOp void
DoRangePaintingOp void
DrawSelectionInBox void
GetRangeLocation System.Drawing.Rectangle
GetRangeLocationInBox bool
InsertRun void
Relayout void
RemoveRuns void
SelectAt SIL.FieldWorks.SharpViews.Selections.InsertionPoint
SetParaInfo void

Public Methods

Method Description
DrawIp ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans ) : void

Draw an insertion point. Currently every segment is given the chance to draw it, though typically only one will. Sometimes a split insertion point may be drawn at an unexpected place. Enhance JohnT: Support Graphite by passing other draw modes when there is a split cursor at segment boundaries.

DrawRange ( RangeSelection range, IVwGraphics vg, PaintTransform ptrans ) : void

Draw a range selection. For now we assume the range is entirely within this paragraph, but this will eventually change. Todo JohnT: handle non-string-box children and ranges that don't start or end in this paragraph. Optimize JohnT: there may be a safe way to skip string boxes outside the selection.

GetIpLocation ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans ) : Rectangle

Get the location of the primary insertion point. Review JohnT: is it possible that more than one segment contains this, and we need to combine them? Or that none does?

Layout ( LayoutInfo transform ) : void
ParaBox ( AssembledStyles styles ) : System
ParaBox ( AssembledStyles styles, TextSource source ) : System
SelectAtEnd ( ) : InsertionPoint
SelectAtStart ( ) : InsertionPoint
StringChanged ( int clientRunIndex, ITsString newValue ) : void
StringChanged ( int clientRunIndex, IViewMultiString newValue ) : void
StringChanged ( int index, string newValue ) : void

Replace the client run at the specified index, which must be a StringClientRun, with the specified new string.

ToString ( ) : string

Private Methods

Method Description
DoRangePaintingOp ( RangeSelection range, IVwGraphics vg, PaintTransform ptrans, RangePaintingOp op ) : void
DoRangePaintingOp ( int ichMin, int ichLim, IVwGraphics vg, PaintTransform ptrans, RangePaintingOp op ) : void
DrawSelectionInBox ( Box box, IVwGraphics vg, PaintTransform childTrans, int top, int bottom, int ichMin, int ichLim ) : void
GetRangeLocation ( RangeSelection sel, IVwGraphics vg1, PaintTransform ptrans ) : Rectangle

Get the location where a range selection is drawn within this paragraph. This is a rectangle that contains anything this paragraph draws for DrawRange with the same arguments. It is not critical that it contains nothing more, but is important that it contains nothing less. It should be fairly close (e.g., close enough to estimate a scroll position to show the selection). This rectangle may need to be combined with those from other paragraphs involved in a selection to get a rectangle covering the whole selection.

GetRangeLocationInBox ( Box box, IVwGraphics vg, PaintTransform ptrans, int top, int bottom, int ichMin, int ichLim, bool first, Rect &bounds ) : bool
InsertRun ( int index, IClientRun run ) : void

Add another run. This causes the MapRuns to be recalculated when needed, but does not redo layout or update display; it is intended for use by the ViewBuilder during box construction.

Relayout ( SourceChangeDetails details ) : void

Redo the layout of the paragraph given the Source changes indicated in the given details.

RemoveRuns ( int first, int count ) : void
SelectAt ( int ich, bool asscociatePrevious ) : InsertionPoint

Make a selection at the specified character offset (associated with the previous character if associatePrevious is true).

SetParaInfo ( List lines, int width, int height ) : void

Called by the ParaBuilder to set the info for the paragraph itself.

Method Details

DrawIp() public method

Draw an insertion point. Currently every segment is given the chance to draw it, though typically only one will. Sometimes a split insertion point may be drawn at an unexpected place. Enhance JohnT: Support Graphite by passing other draw modes when there is a split cursor at segment boundaries.
public DrawIp ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans ) : void
ip SIL.FieldWorks.SharpViews.Selections.InsertionPoint
vg IVwGraphics
ptrans PaintTransform
return void

DrawRange() public method

Draw a range selection. For now we assume the range is entirely within this paragraph, but this will eventually change. Todo JohnT: handle non-string-box children and ranges that don't start or end in this paragraph. Optimize JohnT: there may be a safe way to skip string boxes outside the selection.
public DrawRange ( RangeSelection range, IVwGraphics vg, PaintTransform ptrans ) : void
range RangeSelection
vg IVwGraphics
ptrans PaintTransform
return void

GetIpLocation() public method

Get the location of the primary insertion point. Review JohnT: is it possible that more than one segment contains this, and we need to combine them? Or that none does?
public GetIpLocation ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans ) : Rectangle
ip SIL.FieldWorks.SharpViews.Selections.InsertionPoint
vg IVwGraphics
ptrans PaintTransform
return System.Drawing.Rectangle

Layout() public method

public Layout ( LayoutInfo transform ) : void
transform LayoutInfo
return void

ParaBox() public method

public ParaBox ( AssembledStyles styles ) : System
styles AssembledStyles
return System

ParaBox() public method

public ParaBox ( AssembledStyles styles, TextSource source ) : System
styles AssembledStyles
source TextSource
return System

SelectAtEnd() public method

public SelectAtEnd ( ) : InsertionPoint
return SIL.FieldWorks.SharpViews.Selections.InsertionPoint

SelectAtStart() public method

public SelectAtStart ( ) : InsertionPoint
return SIL.FieldWorks.SharpViews.Selections.InsertionPoint

StringChanged() public method

public StringChanged ( int clientRunIndex, ITsString newValue ) : void
clientRunIndex int
newValue ITsString
return void

StringChanged() public method

public StringChanged ( int clientRunIndex, IViewMultiString newValue ) : void
clientRunIndex int
newValue IViewMultiString
return void

StringChanged() public method

Replace the client run at the specified index, which must be a StringClientRun, with the specified new string.
public StringChanged ( int index, string newValue ) : void
index int
newValue string
return void

ToString() public method

public ToString ( ) : string
return string