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

This class is used for a run of text with the same writing system on a single line. String boxes are created and destroyed quite frequently as (for example) the paragraph layout width changes. Accordingly references to string boxes should not be held. To discourage this, for now StringBox is not a public class. A StringBox wraps an ILgRenderSegment, which does much of the actual rendering etc.
Inheritance: LeafBox
显示文件 Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
DrawIp void
DrawRange void
DrawUnderline void
MakeSelectionAt SIL.FieldWorks.SharpViews.Selections.Selection

Public Methods

Method Description
GetIpLocation ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans, bool &here ) : Rectangle

Get the IP location, if in this segment; if not return a dummy rectangle and 'here' will be false.

Layout ( LayoutInfo transform ) : void
PaintBackground ( IVwGraphics vg, PaintTransform ptrans ) : void
PaintForeground ( IVwGraphics vg, PaintTransform ptrans ) : void
StringBox ( AssembledStyles styles, ILgSegment segment, int ichMin ) : System

Make one.

ToString ( ) : string

Private Methods

Method Description
DrawIp ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans ) : void
DrawRange ( int ichMin, int ichLim, IVwGraphics vg, PaintTransform ptrans, int topOfLine, int bottomOfLine ) : void
DrawUnderline ( IVwGraphics pvg, int xdLeft, int xdRight, int ydTop, int dxScreenPix, int dyScreenPix, int clrUnder, FwUnderlineType unt, int xOffset ) : void

Draw an underline from xdLeft to xdRight at ydTop, given the specified screen resolution, the desired colur and underline type, and (for aligning squiggles) the offset in the destination drawing rectangle.

MakeSelectionAt ( Point where, IVwGraphics vg, PaintTransform ptrans ) : Selection

Method Details

GetIpLocation() public method

Get the IP location, if in this segment; if not return a dummy rectangle and 'here' will be false.
public GetIpLocation ( InsertionPoint ip, IVwGraphics vg, PaintTransform ptrans, bool &here ) : Rectangle
ip SIL.FieldWorks.SharpViews.Selections.InsertionPoint
vg IVwGraphics
ptrans PaintTransform
here bool
return System.Drawing.Rectangle

Layout() public method

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

PaintBackground() public method

public PaintBackground ( IVwGraphics vg, PaintTransform ptrans ) : void
vg IVwGraphics
ptrans PaintTransform
return void

PaintForeground() public method

public PaintForeground ( IVwGraphics vg, PaintTransform ptrans ) : void
vg IVwGraphics
ptrans PaintTransform
return void

StringBox() public method

Make one.
public StringBox ( AssembledStyles styles, ILgSegment segment, int ichMin ) : System
styles AssembledStyles
segment ILgSegment
ichMin int
return System

ToString() public method

public ToString ( ) : string
return string