Module dlangui.widgets.styles
This module contains declaration of themes and styles implementation.
Synopsis
import dlangui.widgets.styles;
Functions
Name | Description |
---|---|
createDefaultTheme
|
|
currentTheme
|
current theme accessor |
currentTheme
|
set new current theme
|
decodeAlignment
|
parses string like "Left|VCenter" to bit set of Align flags
|
decodeFocusRectColors
|
Decode color list attribute, e.g.: "#84A, #99FFFF" -> [0x8844aa, 0x99ffff] |
decodeFontFamily
|
decode FontFamily item name to value |
decodeLayoutDimension
|
decode layout dimension (FILL_PARENT , WRAP_CONTENT , or just size)
|
decodeRect
|
decode comma delimited dimension list or single value - and put to Rect |
decodeTextFlags
|
parses string like "HotKeys|UnderlineHotKeysWhenAltPressed" to bit set of TextFlag flags
|
isSpecialSize
|
returns true for WRAP_CONTENT , WRAP_CONTENT , SIZE_UNSPECIFIED
|
loadStyleAttributes
|
load style attributes from XML element
|
loadTheme
|
load theme from XML document
|
loadTheme
|
load theme from XML file (null if failed) |
loadTheme
|
load theme from file
|
Classes
Name | Description |
---|---|
DrawableAttribute
|
custom drawable attribute container for styles
|
Style
|
style properties |
Theme
|
Theme - root for style hierarhy.
|
Enums
Name | Description |
---|---|
Align
|
Align option bit constants
|
TextFlag
|
text drawing flag bits |
Global variables
Name | Type | Description |
---|---|---|
ALIGN_UNSPECIFIED
|
immutable(ubyte)
|
unspecified align - to take parent's value instead |
ATTR_SCROLLBAR_BUTTON_DOWN
|
immutable(char[])
|
|
ATTR_SCROLLBAR_BUTTON_LEFT
|
immutable(char[])
|
|
ATTR_SCROLLBAR_BUTTON_RIGHT
|
immutable(char[])
|
|
ATTR_SCROLLBAR_BUTTON_UP
|
immutable(char[])
|
|
ATTR_SCROLLBAR_INDICATOR_HORIZONTAL
|
immutable(char[])
|
|
ATTR_SCROLLBAR_INDICATOR_VERTICAL
|
immutable(char[])
|
|
FILL_PARENT
|
immutable(int)
|
layout option, to occupy all available place |
FONT_SIZE_UNSPECIFIED
|
immutable(ushort)
|
unspecified font size constant - to take parent style property value |
FONT_STYLE_ITALIC
|
immutable(ubyte)
|
italic font style constant |
FONT_STYLE_NORMAL
|
immutable(ubyte)
|
normal font style constant |
FONT_STYLE_UNSPECIFIED
|
immutable(ubyte)
|
unspecified font style constant - to take parent style property value |
FONT_WEIGHT_UNSPECIFIED
|
immutable(ushort)
|
unspecified font weight constant - to take parent style property value |
SIZE_UNSPECIFIED
|
immutable(int)
|
use as widget.layout() param to avoid applying of parent size |
STYLE_BUTTON
|
immutable(char[])
|
standard style id for Button |
STYLE_BUTTON_IMAGE
|
immutable(char[])
|
standard style id for Button image |
STYLE_BUTTON_LABEL
|
immutable(char[])
|
standard style id for Button label |
STYLE_BUTTON_NOMARGINS
|
immutable(char[])
|
style id for Button w/o margins |
STYLE_BUTTON_TRANSPARENT
|
immutable(char[])
|
style id for transparent Button |
STYLE_CHECKBOX
|
immutable(char[])
|
standard style id for CheckBox |
STYLE_CHECKBOX_IMAGE
|
immutable(char[])
|
standard style id for CheckBox image |
STYLE_CHECKBOX_LABEL
|
immutable(char[])
|
standard style id for CheckBox label |
STYLE_COMBO_BOX
|
immutable(char[])
|
standard style id for combo box |
STYLE_COMBO_BOX_BODY
|
immutable(char[])
|
standard style id for combo box body (current item) |
STYLE_COMBO_BOX_BUTTON
|
immutable(char[])
|
standard style id for combo box button |
STYLE_DOCK_HOST
|
immutable(char[])
|
standard style id for dock host |
STYLE_DOCK_HOST_BODY
|
immutable(char[])
|
standard style id for dock host body |
STYLE_DOCK_WINDOW
|
immutable(char[])
|
standard style id for dock window |
STYLE_DOCK_WINDOW_BODY
|
immutable(char[])
|
standard style id for dock window body |
STYLE_DOCK_WINDOW_CAPTION
|
immutable(char[])
|
standard style id for dock window caption |
STYLE_DOCK_WINDOW_CAPTION_LABEL
|
immutable(char[])
|
standard style id for dock window caption label |
STYLE_EDIT_BOX
|
immutable(char[])
|
standard style id for EditBox |
STYLE_EDIT_LINE
|
immutable(char[])
|
standard style id for EditLine |
STYLE_HSPACER
|
immutable(char[])
|
standard style id for HSpacer |
STYLE_LIST_ITEM
|
immutable(char[])
|
standard style id for list items |
STYLE_MAIN_MENU
|
immutable(char[])
|
standard style id for main menu |
STYLE_MAIN_MENU_ITEM
|
immutable(char[])
|
standard style id for main menu item |
STYLE_MAIN_MENU_LABEL
|
immutable(char[])
|
standard style id for main menu item label |
STYLE_MENU_ACCEL
|
immutable(char[])
|
standard style id for menu item accelerators label |
STYLE_MENU_ICON
|
immutable(char[])
|
standard style id for menu item icon |
STYLE_MENU_ITEM
|
immutable(char[])
|
standard style id for menu item |
STYLE_MENU_LABEL
|
immutable(char[])
|
standard style id for menu item label |
STYLE_PAGE_SCROLL
|
immutable(char[])
|
standard style id for ScrollBar page control |
STYLE_POPUP_MENU
|
immutable(char[])
|
standard style id for PopupMenu |
STYLE_RADIOBUTTON
|
immutable(char[])
|
standard style id for RadioButton |
STYLE_RADIOBUTTON_IMAGE
|
immutable(char[])
|
standard style id for RadioButton image |
STYLE_RADIOBUTTON_LABEL
|
immutable(char[])
|
standard style id for RadioButton label |
STYLE_SCROLLBAR
|
immutable(char[])
|
standard style id for ScrollBar |
STYLE_SCROLLBAR_BUTTON
|
immutable(char[])
|
standard style id for ScrollBar button |
STYLE_SLIDER
|
immutable(char[])
|
standard style id for Slider |
STYLE_STATUS_LINE
|
immutable(char[])
|
standard style id for app frame status line |
STYLE_TAB_HOST
|
immutable(char[])
|
standard style id for TabHost |
STYLE_TAB_UP
|
immutable(char[])
|
standard style id for Tab with Up alignment |
STYLE_TAB_UP_BUTTON
|
immutable(char[])
|
standard style id for button of Tab with Up alignment |
STYLE_TAB_UP_BUTTON_DARK
|
immutable(char[])
|
standard style id for tab control tab button in dock frame |
STYLE_TAB_UP_BUTTON_DARK_TEXT
|
immutable(char[])
|
standard style id for tab control tab button text in dock frame |
STYLE_TAB_UP_BUTTON_TEXT
|
immutable(char[])
|
standard style id for button of Tab with Up alignment |
STYLE_TAB_UP_DARK
|
immutable(char[])
|
standard style id for tab control in dock frame |
STYLE_TAB_WIDGET
|
immutable(char[])
|
standard style id for TabWidget |
STYLE_TEXT
|
immutable(char[])
|
standard style id for TextWidget |
STYLE_TOOLBAR
|
immutable(char[])
|
standard style id for toolbars |
STYLE_TOOLBAR_BUTTON
|
immutable(char[])
|
standard style id for toolbar button |
STYLE_TOOLBAR_HOST
|
immutable(char[])
|
standard style id for toolbars layout |
STYLE_TOOLBAR_SEPARATOR
|
immutable(char[])
|
standard style id for toolbar separator |
STYLE_TRANSPARENT_BUTTON_BACKGROUND
|
immutable(char[])
|
standard style id for background similar to transparent button |
STYLE_TREE_ITEM
|
immutable(char[])
|
standard style id for tree item |
STYLE_TREE_ITEM_EXPAND_ICON
|
immutable(char[])
|
standard style id for tree item expand icon |
STYLE_TREE_ITEM_ICON
|
immutable(char[])
|
standard style id for tree item icon |
STYLE_TREE_ITEM_LABEL
|
immutable(char[])
|
standard style id for tree item label |
STYLE_VSPACER
|
immutable(char[])
|
standard style id for VSpacer |
TEXT_FLAGS_UNSPECIFIED
|
immutable(uint)
|
use text flags from parent style |
TEXT_FLAGS_USE_PARENT
|
immutable(uint)
|
use text flags from parent widget |
WEIGHT_UNSPECIFIED
|
immutable(int)
|
to take layout weight from parent |
WRAP_CONTENT
|
immutable(int)
|
layout option, for size based on content |
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0