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

This subclass is used to estimate the total width (and max height) of all text that the display shows. Currently it only supports a rough approximation by picking one font to use throughout. Could be enhanced to consider changes in text properties. Could be much more easily made to do the right thing if we had a valid base VwEnv.
Inheritance: CollectorEnv
Afficher le fichier Open project: sillsdev/FieldWorks

Protected Properties

Свойство Type Description
m_font System.Drawing.Font
m_width int

Méthodes publiques

Méthode Description
StringMeasureEnv ( IVwEnv baseEnv, ISilDataAccess sda, int hvoRoot, System graphics, System font ) : System

Initializes a new instance of the T:StringMeasureEnv class.

Méthodes protégées

Méthode Description
AddResultString ( string s ) : void

Accumulate a string into our result, by adding its width

AddStringWidth ( string s ) : void

update total pixel width for display

Method Details

AddResultString() protected méthode

Accumulate a string into our result, by adding its width
protected AddResultString ( string s ) : void
s string The s.
Résultat void

AddStringWidth() protected méthode

update total pixel width for display
protected AddStringWidth ( string s ) : void
s string
Résultat void

StringMeasureEnv() public méthode

Initializes a new instance of the T:StringMeasureEnv class.
public StringMeasureEnv ( IVwEnv baseEnv, ISilDataAccess sda, int hvoRoot, System graphics, System font ) : System
baseEnv IVwEnv The base env.
sda ISilDataAccess Date access to get prop values etc.
hvoRoot int The root object to display, if m_baseEnv is null. /// If baseEnv is not null, hvoRoot is ignored.
graphics System To use to measure string
font System To use to measure strings
Résultat System

Property Details

m_font protected_oe property

protected Font,System.Drawing m_font
Résultat System.Drawing.Font

m_width protected_oe property

total pixel width (and max height) of all text in the display
protected int m_width
Résultat int