Class Style

style properties

Inherits from

  • Object (base class)

Constructors

Name Description
this

Fields

Name Type Description
_align ubyte
_alpha uint
_backgroundColor uint
_backgroundDrawable Ref!(dlangui.graphics.resources.Drawable)
_backgroundImageId string
_children Style[]
_customColors uint[string]
_customDrawables DrawableAttribute[string]
_customLength uint[string]
_focusRectColors uint[]
_font Ref!(dlangui.graphics.fonts.Font)
_fontFace string
_fontFamily FontFamily
_fontSize int
_fontStyle ubyte
_fontWeight ushort
_id string
_layoutHeight int
_layoutWeight int
_layoutWidth int
_margins Rect
_maxHeight int
_maxLines int
_maxWidth int
_minHeight int
_minWidth int
_padding Rect
_parentId string
_parentStyle Style
_stateMask uint
_stateValue uint
_substates Style[]
_textColor uint
_textFlags uint
_theme Theme

Properties

Name Type Description
alignment [set] Style set alignment
alignment [get] ubyte get full alignment (both vertical and horizontal)
alpha [get] uint alpha (0=opaque .. 255=transparent)
alpha [set] Style
backgroundColor [get] uint background color
backgroundColor [set] Style
backgroundDrawable [get] Ref!(dlangui.graphics.resources.Drawable)
backgroundImageId [get] string font size
backgroundImageId [set] Style
focusRectColors [get] const(uint[]) returns colors to draw focus rectangle (one for solid, two for vertical gradient) or null if no focus rect should be drawn for style
focusRectColors [set] Style sets colors to draw focus rectangle or null if no focus rect should be drawn for style
font [get] Ref!(dlangui.graphics.fonts.Font)
fontFace [set] Style
fontFace [get] string font size
fontFamily [set] Style
fontFamily [get] FontFamily font size
fontItalic [get] bool font style - italic
fontSize [set] Style
fontSize [get] int font size
fontStyle [set] Style
fontWeight [set] Style
fontWeight [get] ushort font weight
halign [get] ubyte horizontal alignment: Left / HCenter / Right
id [get] string
id [set] Style
layoutHeight [get] uint layout height parameter
layoutHeight [set] Style set layout height
layoutWeight [get] uint layout weight parameter
layoutWeight [set] Style set layout weight
layoutWidth [get] uint layout width parameter
layoutWidth [set] Style set layout width
margins [get] const(Rect) margins
margins [set] Style
maxHeight [set] Style set max height constraint
maxHeight [get] uint max height constraint, SIZE_UNSPECIFIED if limit is not set
maxLines [get] int text color
maxLines [set] Style
maxWidth [set] Style set max width constraint
maxWidth [get] uint max width constraint, returns SIZE_UNSPECIFIED if limit is not set
minHeight [set] Style set min height constraint
minHeight [get] uint minimal height constraint, 0 if limit is not set
minWidth [set] Style set min width constraint
minWidth [get] uint minimal width constraint, 0 if limit is not set
padding [get] const(Rect) padding
padding [set] Style
parentStyle [get] const(Style) access to parent style for this style
parentStyleId [set] Style
parentStyleId [get] string
textColor [set] Style
textColor [get] uint text color
textFlags [get] uint text flags
textFlags [set] Style
theme [get] Theme
theme [get] const(Theme)
valign [get] ubyte vertical alignment: Top / VCenter / Bottom

Methods

Name Description
clone
createState create state substyle for this style
createSubstyle create named substyle of this style
customColor get custom color attribute
customDrawable get custom drawable attribute
customDrawableId get custom drawable attribute
customLength get custom length attribute
forState find substyle based on widget state (e.g. focused, pressed, ...)
getOrCreateState find exact existing state style or create new if no matched styles found
onThemeChanged
setCustomColor sets custom color attribute for style
setCustomDrawable sets custom drawable attribute for style
setCustomLength sets custom length attribute for style
setMargins
setPadding

Authors

Vadim Lopatin, coolreader.org@gmail.com

Copyright

Vadim Lopatin, 2014

License

Boost License 1.0