C# Класс 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.
Наследование: CollectorEnv
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
m_font System.Drawing.Font
m_width int

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

Метод Описание
StringMeasureEnv ( IVwEnv baseEnv, ISilDataAccess sda, int hvoRoot, System graphics, System font ) : System

Initializes a new instance of the T:StringMeasureEnv class.

Защищенные методы

Метод Описание
AddResultString ( string s ) : void

Accumulate a string into our result, by adding its width

AddStringWidth ( string s ) : void

update total pixel width for display

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

AddResultString() защищенный Метод

Accumulate a string into our result, by adding its width
protected AddResultString ( string s ) : void
s string The s.
Результат void

AddStringWidth() защищенный Метод

update total pixel width for display
protected AddStringWidth ( string s ) : void
s string
Результат void

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

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

Описание свойств

m_font защищенное свойство

protected Font,System.Drawing m_font
Результат System.Drawing.Font

m_width защищенное свойство

total pixel width (and max height) of all text in the display
protected int m_width
Результат int