Theme

Theme - root for style hierarhy.

Constructors

this
this(string id)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

createSubstyle
Style createSubstyle(string id)

create new named style or get existing

customColor
uint customColor(string id, uint defColor)

get custom color attribute - transparent by default

customDrawable
DrawableRef customDrawable(string id)
Undocumented in source. Be warned that the author may not have intended to support it.
customDrawableId
string customDrawableId(string id)
Undocumented in source. Be warned that the author may not have intended to support it.
customLength
uint customLength(string id, uint defValue)

get custom color attribute - transparent by default

dumpStats
void dumpStats()
Undocumented in source. Be warned that the author may not have intended to support it.
forState
const(Style) forState(uint state)

find substyle based on widget state (e.g. focused, pressed, ...)

forState
Style forState(uint state)

find substyle based on widget state (e.g. focused, pressed, ...)

modifyStyle
Style modifyStyle(string id)

create wrapper style which will have currentTheme.get(id) as parent instead of fixed parent - to modify some base style properties in widget

onThemeChanged
void onThemeChanged()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

backgroundImageId
string backgroundImageId [@property getter]

font size

border
string border [@property getter]

border

boxShadow
string boxShadow [@property getter]

box shadow

focusRectColors
const(uint[]) focusRectColors [@property getter]

returns colors to draw focus rectangle or null if no focus rect should be drawn for style

get
string get [@property setter]

find style by id, returns theme if not style with specified ID is not found

maxHeight
uint maxHeight [@property getter]

max height constraint, SIZE_UNSPECIFIED if limit is not set

maxWidth
uint maxWidth [@property getter]

max width constraint, returns SIZE_UNSPECIFIED if limit is not set

minHeight
uint minHeight [@property getter]

minimal height constraint, 0 if limit is not set

minWidth
uint minWidth [@property getter]

minimal width constraint, 0 if limit is not set

Variables

_byId
Style[string] _byId;
Undocumented in source.
unknownStyleIds
int[string] unknownStyleIds;

to track unknown styles refernced from code

Inherited Members

From Style

_id
string _id;
Undocumented in source.
_theme
Theme _theme;
Undocumented in source.
_parentStyle
Style _parentStyle;
Undocumented in source.
_parentId
string _parentId;
Undocumented in source.
_stateMask
uint _stateMask;
Undocumented in source.
_stateValue
uint _stateValue;
Undocumented in source.
_align
ubyte _align;
Undocumented in source.
_fontStyle
ubyte _fontStyle;
Undocumented in source.
_fontFamily
FontFamily _fontFamily;
Undocumented in source.
_fontWeight
ushort _fontWeight;
Undocumented in source.
_fontSize
int _fontSize;
Undocumented in source.
_backgroundColor
uint _backgroundColor;
Undocumented in source.
_textColor
uint _textColor;
Undocumented in source.
_textFlags
uint _textFlags;
Undocumented in source.
_alpha
uint _alpha;
Undocumented in source.
_fontFace
string _fontFace;
Undocumented in source.
_backgroundImageId
string _backgroundImageId;
Undocumented in source.
_boxShadow
string _boxShadow;
Undocumented in source.
_border
string _border;
Undocumented in source.
_padding
Rect _padding;
Undocumented in source.
_margins
Rect _margins;
Undocumented in source.
_minWidth
int _minWidth;
Undocumented in source.
_maxWidth
int _maxWidth;
Undocumented in source.
_minHeight
int _minHeight;
Undocumented in source.
_maxHeight
int _maxHeight;
Undocumented in source.
_layoutWidth
int _layoutWidth;
Undocumented in source.
_layoutHeight
int _layoutHeight;
Undocumented in source.
_layoutWeight
int _layoutWeight;
Undocumented in source.
_maxLines
int _maxLines;
Undocumented in source.
_focusRectColors
uint[] _focusRectColors;
Undocumented in source.
_substates
Style[] _substates;
Undocumented in source.
_children
Style[] _children;
Undocumented in source.
_customDrawables
DrawableAttributeList _customDrawables;
Undocumented in source.
_customColors
uint[string] _customColors;
Undocumented in source.
_customLength
uint[string] _customLength;
Undocumented in source.
_font
FontRef _font;
Undocumented in source.
_backgroundDrawable
DrawableRef _backgroundDrawable;
Undocumented in source.
onThemeChanged
void onThemeChanged()
Undocumented in source. Be warned that the author may not have intended to support it.
theme
const(Theme) theme [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
theme
Theme theme [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
string id [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
string id [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
parentStyle
const(Style) parentStyle [@property getter]

access to parent style for this style

parentStyle
Style parentStyle [@property getter]

access to parent style for this style

parentStyleId
string parentStyleId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
parentStyleId
string parentStyleId [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
backgroundDrawable
DrawableRef backgroundDrawable [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
customDrawable
DrawableRef customDrawable(string id)

get custom drawable attribute

customDrawableId
string customDrawableId(string id)

get custom drawable attribute

setCustomDrawable
Style setCustomDrawable(string id, string resourceId)

sets custom drawable attribute for style

customColor
uint customColor(string id, uint defColor)

get custom color attribute

setCustomColor
Style setCustomColor(string id, uint color)

sets custom color attribute for style

customLength
uint customLength(string id, uint defLength)

get custom length attribute

setCustomLength
Style setCustomLength(string id, uint value)

sets custom length attribute for style

clearCachedObjects
void clearCachedObjects()
Undocumented in source. Be warned that the author may not have intended to support it.
font
FontRef font [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
fontFamily
FontFamily fontFamily [@property getter]

font size

fontFace
string fontFace [@property getter]

font size

fontItalic
bool fontItalic [@property getter]

font style - italic

fontWeight
ushort fontWeight [@property getter]

font weight

fontSize
int fontSize [@property getter]

font size

boxShadow
string boxShadow [@property getter]

box shadow

border
string border [@property getter]

border

padding
const(Rect) padding [@property getter]

padding

margins
const(Rect) margins [@property getter]

margins

alpha
uint alpha [@property getter]

alpha (0=opaque .. 255=transparent)

textColor
uint textColor [@property getter]

text color

maxLines
int maxLines [@property getter]

text color

textFlags
uint textFlags [@property getter]

text flags

backgroundColor
uint backgroundColor [@property getter]

background color

backgroundImageId
string backgroundImageId [@property getter]

background image id

minWidth
uint minWidth [@property getter]

minimal width constraint, 0 if limit is not set

maxWidth
uint maxWidth [@property getter]

max width constraint, returns SIZE_UNSPECIFIED if limit is not set

minHeight
uint minHeight [@property getter]

minimal height constraint, 0 if limit is not set

maxHeight
uint maxHeight [@property getter]

max height constraint, SIZE_UNSPECIFIED if limit is not set

minWidth
int minWidth [@property setter]

set min width constraint

maxWidth
int maxWidth [@property setter]

set max width constraint

minHeight
int minHeight [@property setter]

set min height constraint

maxHeight
int maxHeight [@property setter]

set max height constraint

layoutWidth
uint layoutWidth [@property getter]

layout width parameter

layoutHeight
uint layoutHeight [@property getter]

layout height parameter

layoutWeight
uint layoutWeight [@property getter]

layout weight parameter

layoutHeight
int layoutHeight [@property setter]

set layout height

layoutWidth
int layoutWidth [@property setter]

set layout width

layoutWeight
int layoutWeight [@property setter]

set layout weight

alignment
ubyte alignment [@property getter]

get full alignment (both vertical and horizontal)

valign
ubyte valign [@property getter]

vertical alignment: Top / VCenter / Bottom

halign
ubyte halign [@property getter]

horizontal alignment: Left / HCenter / Right

alignment
ubyte alignment [@property setter]

set alignment

fontFace
string fontFace [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fontFamily
FontFamily fontFamily [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fontStyle
ubyte fontStyle [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fontWeight
ushort fontWeight [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
fontSize
int fontSize [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
textColor
uint textColor [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
maxLines
int maxLines [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
alpha
uint alpha [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
textFlags
uint textFlags [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
backgroundColor
uint backgroundColor [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
backgroundImageId
string backgroundImageId [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
boxShadow
string boxShadow [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
border
string border [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
margins
Rect margins [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
setMargins
Style setMargins(int left, int top, int right, int bottom)
Undocumented in source. Be warned that the author may not have intended to support it.
padding
Rect padding [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
focusRectColors
const(uint[]) focusRectColors [@property getter]

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
uint[] focusRectColors [@property setter]

sets colors to draw focus rectangle or null if no focus rect should be drawn for style

setPadding
Style setPadding(int left, int top, int right, int bottom)
Undocumented in source. Be warned that the author may not have intended to support it.
instanceCount
int instanceCount [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
~this
~this()
Undocumented in source.
createSubstyle
Style createSubstyle(string id)

create named substyle of this style

createState
Style createState(uint stateMask, uint stateValue)

create state substyle for this style

clone
Style clone()
Undocumented in source. Be warned that the author may not have intended to support it.
getOrCreateState
Style getOrCreateState(uint stateMask, uint stateValue)

find exact existing state style or create new if no matched styles found

forState
Style forState(uint state)

find substyle based on widget state (e.g. focused, pressed, ...)

forState
const(Style) forState(uint state)

find substyle based on widget state (e.g. focused, pressed, ...)

Meta