C# Class SIL.FieldWorks.Common.RootSites.OrientationManager

Orientation manager contains methods implementing parts of SimpleRootSite that need to be different when a view is oriented vertically. Subclasses handle non-standard orientations, while the default methods in OritentationManager itself handle normal horizontal orientation.
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
ConvertKeyValue int
GetCoordRects void
RotatePointDstToPaint Point
RotatePointPaintToDst Point
RotateRectDstToPaint System.Drawing.Rectangle

Public Methods

Method Description
DrawTheRoot ( IVwDrawRootBuffered vdrb, IVwRootBox rootb, IntPtr hdc, SIL drawRect, uint backColor, bool drawSel, Rectangle clipRect ) : void

The core of the Draw() method, where the rectangle actually gets painted. Vertical views use a rotated drawing routine.

GetAvailWidth ( ) : int

The width available for laying out a line of text, before subtracting margins. Normally this is the width of the pane, but for vertical alignment it is the height.

OrientationManager ( SimpleRootSite site ) : System

Make one.

Private Methods

Method Description
ConvertKeyValue ( int keyValue ) : int

Allow the orientation manager to convert arrow key codes. The default changes nothing.

GetCoordRects ( Rectangle &rcSrcRoot, Rectangle &rcDstRoot ) : void

Construct coord transformation rectangles. Height and width are dots per inch. src origin is 0, dest origin is controlled by scrolling.

RotatePointDstToPaint ( Point pt ) : Point

The specified point is in 'destination' coordinates. In a vertical view it requires rotation in the same way that the drawing code rotates the actual pixels drawn.

RotatePointPaintToDst ( Point pt ) : Point

The specified point is in 'paint' coordinates. In a vertical view it requires rotation reversing way that the drawing code rotates the actual pixels drawn to get 'destination' coordinates that the root box will interpret correctly.

RotateRectDstToPaint ( Rectangle rect ) : Rectangle

The specified rectangle is in 'destination' coordinates. In a vertical view it requires rotation in the same was that the drawing code rotates the actual pixels drawn.

Method Details

DrawTheRoot() public method

The core of the Draw() method, where the rectangle actually gets painted. Vertical views use a rotated drawing routine.
public DrawTheRoot ( IVwDrawRootBuffered vdrb, IVwRootBox rootb, IntPtr hdc, SIL drawRect, uint backColor, bool drawSel, Rectangle clipRect ) : void
vdrb IVwDrawRootBuffered
rootb IVwRootBox
hdc System.IntPtr
drawRect SIL
backColor uint
drawSel bool
clipRect System.Drawing.Rectangle
return void

GetAvailWidth() public method

The width available for laying out a line of text, before subtracting margins. Normally this is the width of the pane, but for vertical alignment it is the height.
public GetAvailWidth ( ) : int
return int

OrientationManager() public method

Make one.
public OrientationManager ( SimpleRootSite site ) : System
site SimpleRootSite
return System