C# 클래스 SIL.FieldWorks.SharpViews.AssembledStyles

AssembledStyles (roughly equivalent to the old VwPropertyStore) represents the results of applying various styles (and explicit formatting). It is designed to be especially efficient when the same properties are independently derived for different parts of the display; for example, if parts of several lexical entries are independently marked bold, only a single AssembledStyles object is created to represent the effect of adding 'Bold' to whatever the context AssembledStyles was. Enhance JohnT: this is only a skeleton at present, it eventually needs most if not all the properties in VwPropertyStore.
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ApplyCharacterStyleInfo void
ApplyParagraphStyleInfo void
AssembledStyles System
AssembledStyles System
AssembledStyles System
CanonicalInstance AssembledStyles
ResetNonInherited AssembledStyles
SetFaceName void
SetFaceName void
SetNonInheritedDefaults void

공개 메소드들

메소드 설명
ApplyTextProps ( ITsTextProps props ) : AssembledStyles

Compute the assembled styles that results from applying the properties specified in the text props to this. We might start with a root assembled styles that says to use a 10-point font, then apply a paragraph style which says to use a 12-point font, except for French use 14-point. Then in another text props we may tell it the writing system is French, and must get 14-point as the result. Or, in a single TsTextProps, we may tell it the WS is French and to apply a character style which says to use 16-point, except for French 18-point; the result needs to be 18-point. It's also theoretically possible that the same text props again says directly to use 20-point; that should win over all the others. We achieve most of this by simply looking for the ws, then the named style, then everything else (and when we process a style, if we already know a ws we include the overrides for that ws). However, when we process the paragraph style, we don't know what ws a run in that paragraph will have.

AssembledStyles ( ) : System

Default constructor sets initial state

AssembledStyles ( IStylesheet stylesheet ) : System

Default constructor sets initial state

BackColorSetter ( Color backColor ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified foreground color.

BaselineOffsetSetter ( int height ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified baseline offset.

BorderColorSetter ( Color backColor ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified foreground color.

BordersSetter ( Thickness margins ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified borders. Enhance JohnT: may want a mechanism to allow only certain borders to be modified.

Equals ( AssembledStyles other ) : bool
Equals ( object obj ) : bool
FaceNameFromChrp ( LgCharRenderProps chrp ) : string
FaceNameSetter ( string name ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified font face.

FirstLineIndentSetter ( int indent ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified first line indent.

FontItalicSetter ( FwTextToggleVal ttv ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified (or possibly inverted) italic setting.

FontSizeSetter ( int height ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified font size.

FontWeightSetter ( int weight ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified font weight.

ForeColorSetter ( Color foreColor ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified foreground color.

GetHashCode ( ) : int
LineHeightSetter ( int height ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified line height.

MarginsSetter ( Thickness margins ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified margins (space in the color of the containing box, outside the border, allowed to overlap with adjacent boxes top and bottom). Enhance JohnT: may want a mechanism to allow only certain margins to be modified.

PadsSetter ( Thickness margins ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified pads (space in the box's own background color, if any, inside the border). Enhance JohnT: may want a mechanism to allow only certain margins to be modified.

RtlSetter ( bool rtl ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified RTL value.

StyleSetter ( string name ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified style.

UnderlineColorSetter ( Color underlineColor ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified underline color.

UnderlineSetter ( FwUnderlineType unt ) : PropSetter

Return an object which, when passed to WithProperties, will return an assembled styles with the specified underline type.

WithBackColor ( Color backColor ) : AssembledStyles
WithBaselineOffset ( int mp ) : AssembledStyles
WithBorderColor ( Color borderColor ) : AssembledStyles
WithBorders ( Thickness borders ) : AssembledStyles

Return a new styles (or existing canonical one) like the current one but with the specified margins.

WithFaceName ( string faceName ) : AssembledStyles
WithFirstLineIndent ( int mp ) : AssembledStyles
WithFontBold ( FwTextToggleVal ttv ) : AssembledStyles
WithFontItalic ( FwTextToggleVal ttv ) : AssembledStyles
WithFontSize ( int mp ) : AssembledStyles
WithFontWeight ( int weight ) : AssembledStyles
WithForeColor ( Color foreColor ) : AssembledStyles
WithLineHeight ( int mp ) : AssembledStyles
WithMargins ( Thickness margins ) : AssembledStyles

Return a new styles (or existing canonical one) like the current one but with the specified margins.

WithNamedStyle ( string styleName ) : AssembledStyles
WithPads ( Thickness pads ) : AssembledStyles

Return a new styles (or existing canonical one) like the current one but with the specified pads.

WithParaAlignment ( FwTextAlign alignment ) : AssembledStyles
WithProperties ( PropSetter setter ) : AssembledStyles

Return an AssembledStyles that has the properties of the recipient, modified as specified by the given setter (and any that have been appended to it).

WithRightToLeft ( bool rtl ) : AssembledStyles
WithUnderline ( FwUnderlineType underlineType ) : AssembledStyles
WithUnderlineColor ( Color clrUnder ) : AssembledStyles
WithWs ( int ws ) : AssembledStyles

비공개 메소드들

메소드 설명
ApplyCharacterStyleInfo ( ICharacterStyleInfo fontInfo ) : void
ApplyParagraphStyleInfo ( IParaStyleInfo paraInfo ) : void
AssembledStyles ( AssembledStyles basedOn ) : System

Intended for use only by AssembledStylesCache to make derived styles.

AssembledStyles ( AssembledStyles basedOn, PropSetter setter ) : System
AssembledStyles ( AssembledStyles basedOn, bool inheritedOnly ) : System

Intended for use only by AssembledStylesCache to make derived styles. If inheritedOnly is true, only those properties are copied which should be inherited by nested boxes.

CanonicalInstance ( AssembledStyles astyles ) : AssembledStyles
ResetNonInherited ( ) : AssembledStyles

Return an assembled styles with inherited properties the same as this, but non-inherited ones reset to defaults.

SetFaceName ( LgCharRenderProps &chrp, string fontName ) : void
SetFaceName ( string fontName ) : void
SetNonInheritedDefaults ( ) : void

메소드 상세

ApplyTextProps() 공개 메소드

Compute the assembled styles that results from applying the properties specified in the text props to this. We might start with a root assembled styles that says to use a 10-point font, then apply a paragraph style which says to use a 12-point font, except for French use 14-point. Then in another text props we may tell it the writing system is French, and must get 14-point as the result. Or, in a single TsTextProps, we may tell it the WS is French and to apply a character style which says to use 16-point, except for French 18-point; the result needs to be 18-point. It's also theoretically possible that the same text props again says directly to use 20-point; that should win over all the others. We achieve most of this by simply looking for the ws, then the named style, then everything else (and when we process a style, if we already know a ws we include the overrides for that ws). However, when we process the paragraph style, we don't know what ws a run in that paragraph will have.
public ApplyTextProps ( ITsTextProps props ) : AssembledStyles
props ITsTextProps
리턴 AssembledStyles

AssembledStyles() 공개 메소드

Default constructor sets initial state
public AssembledStyles ( ) : System
리턴 System

AssembledStyles() 공개 메소드

Default constructor sets initial state
public AssembledStyles ( IStylesheet stylesheet ) : System
stylesheet IStylesheet
리턴 System

BackColorSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified foreground color.
public static BackColorSetter ( Color backColor ) : PropSetter
backColor Color
리턴 PropSetter

BaselineOffsetSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified baseline offset.
public static BaselineOffsetSetter ( int height ) : PropSetter
height int
리턴 PropSetter

BorderColorSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified foreground color.
public static BorderColorSetter ( Color backColor ) : PropSetter
backColor Color
리턴 PropSetter

BordersSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified borders. Enhance JohnT: may want a mechanism to allow only certain borders to be modified.
public static BordersSetter ( Thickness margins ) : PropSetter
margins Thickness
리턴 PropSetter

Equals() 공개 메소드

public Equals ( AssembledStyles other ) : bool
other AssembledStyles
리턴 bool

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

FaceNameFromChrp() 공개 정적인 메소드

public static FaceNameFromChrp ( LgCharRenderProps chrp ) : string
chrp LgCharRenderProps
리턴 string

FaceNameSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified font face.
public static FaceNameSetter ( string name ) : PropSetter
name string
리턴 PropSetter

FirstLineIndentSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified first line indent.
public static FirstLineIndentSetter ( int indent ) : PropSetter
indent int
리턴 PropSetter

FontItalicSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified (or possibly inverted) italic setting.
public static FontItalicSetter ( FwTextToggleVal ttv ) : PropSetter
ttv FwTextToggleVal
리턴 PropSetter

FontSizeSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified font size.
public static FontSizeSetter ( int height ) : PropSetter
height int
리턴 PropSetter

FontWeightSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified font weight.
public static FontWeightSetter ( int weight ) : PropSetter
weight int
리턴 PropSetter

ForeColorSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified foreground color.
public static ForeColorSetter ( Color foreColor ) : PropSetter
foreColor Color
리턴 PropSetter

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

LineHeightSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified line height.
public static LineHeightSetter ( int height ) : PropSetter
height int
리턴 PropSetter

MarginsSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified margins (space in the color of the containing box, outside the border, allowed to overlap with adjacent boxes top and bottom). Enhance JohnT: may want a mechanism to allow only certain margins to be modified.
public static MarginsSetter ( Thickness margins ) : PropSetter
margins Thickness
리턴 PropSetter

PadsSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified pads (space in the box's own background color, if any, inside the border). Enhance JohnT: may want a mechanism to allow only certain margins to be modified.
public static PadsSetter ( Thickness margins ) : PropSetter
margins Thickness
리턴 PropSetter

RtlSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified RTL value.
public static RtlSetter ( bool rtl ) : PropSetter
rtl bool
리턴 PropSetter

StyleSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified style.
public static StyleSetter ( string name ) : PropSetter
name string
리턴 PropSetter

UnderlineColorSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified underline color.
public static UnderlineColorSetter ( Color underlineColor ) : PropSetter
underlineColor Color
리턴 PropSetter

UnderlineSetter() 공개 정적인 메소드

Return an object which, when passed to WithProperties, will return an assembled styles with the specified underline type.
public static UnderlineSetter ( FwUnderlineType unt ) : PropSetter
unt FwUnderlineType
리턴 PropSetter

WithBackColor() 공개 메소드

public WithBackColor ( Color backColor ) : AssembledStyles
backColor Color
리턴 AssembledStyles

WithBaselineOffset() 공개 메소드

public WithBaselineOffset ( int mp ) : AssembledStyles
mp int
리턴 AssembledStyles

WithBorderColor() 공개 메소드

public WithBorderColor ( Color borderColor ) : AssembledStyles
borderColor Color
리턴 AssembledStyles

WithBorders() 공개 메소드

Return a new styles (or existing canonical one) like the current one but with the specified margins.
public WithBorders ( Thickness borders ) : AssembledStyles
borders Thickness
리턴 AssembledStyles

WithFaceName() 공개 메소드

public WithFaceName ( string faceName ) : AssembledStyles
faceName string
리턴 AssembledStyles

WithFirstLineIndent() 공개 메소드

public WithFirstLineIndent ( int mp ) : AssembledStyles
mp int
리턴 AssembledStyles

WithFontBold() 공개 메소드

public WithFontBold ( FwTextToggleVal ttv ) : AssembledStyles
ttv FwTextToggleVal
리턴 AssembledStyles

WithFontItalic() 공개 메소드

public WithFontItalic ( FwTextToggleVal ttv ) : AssembledStyles
ttv FwTextToggleVal
리턴 AssembledStyles

WithFontSize() 공개 메소드

public WithFontSize ( int mp ) : AssembledStyles
mp int
리턴 AssembledStyles

WithFontWeight() 공개 메소드

public WithFontWeight ( int weight ) : AssembledStyles
weight int
리턴 AssembledStyles

WithForeColor() 공개 메소드

public WithForeColor ( Color foreColor ) : AssembledStyles
foreColor Color
리턴 AssembledStyles

WithLineHeight() 공개 메소드

public WithLineHeight ( int mp ) : AssembledStyles
mp int
리턴 AssembledStyles

WithMargins() 공개 메소드

Return a new styles (or existing canonical one) like the current one but with the specified margins.
public WithMargins ( Thickness margins ) : AssembledStyles
margins Thickness
리턴 AssembledStyles

WithNamedStyle() 공개 메소드

public WithNamedStyle ( string styleName ) : AssembledStyles
styleName string
리턴 AssembledStyles

WithPads() 공개 메소드

Return a new styles (or existing canonical one) like the current one but with the specified pads.
public WithPads ( Thickness pads ) : AssembledStyles
pads Thickness
리턴 AssembledStyles

WithParaAlignment() 공개 메소드

public WithParaAlignment ( FwTextAlign alignment ) : AssembledStyles
alignment FwTextAlign
리턴 AssembledStyles

WithProperties() 공개 메소드

Return an AssembledStyles that has the properties of the recipient, modified as specified by the given setter (and any that have been appended to it).
public WithProperties ( PropSetter setter ) : AssembledStyles
setter PropSetter
리턴 AssembledStyles

WithRightToLeft() 공개 메소드

public WithRightToLeft ( bool rtl ) : AssembledStyles
rtl bool
리턴 AssembledStyles

WithUnderline() 공개 메소드

public WithUnderline ( FwUnderlineType underlineType ) : AssembledStyles
underlineType FwUnderlineType
리턴 AssembledStyles

WithUnderlineColor() 공개 메소드

public WithUnderlineColor ( Color clrUnder ) : AssembledStyles
clrUnder Color
리턴 AssembledStyles

WithWs() 공개 메소드

public WithWs ( int ws ) : AssembledStyles
ws int
리턴 AssembledStyles