Classes
AddedRemovedEvent
AlertElement
AnchorContainerElement
ArrowShape
ButtonElement
CanvasElement
CanvasManager
CheckboxElement
CheckboxSkinElement
CollectionChangedEvent
CollectionSort
ColorPickerButtonElement
ColorPickerElement
ContainerBaseElement
CursorDefinition
DataGridColumnDefinition
DataGridDataRenderer
DataGridElement
DataGridHeaderColumnDividerSkinElement
DataGridHeaderElement
DataGridHeaderItemRenderer
DataGridItemData
DataGridItemRendererBase
DataGridLabelItemRenderer
DataListData
DataListElement
DataRendererBaseElement
DataRendererLabelElement
DatePickerButtonElement
DatePickerElement
DispatcherEvent
DrawMetrics
DropdownArrowButtonSkinElement
DropdownBaseElement
DropdownElement
ElementEvent
ElementGridItemClickEvent
ElementKeyboardEvent
ElementListItemClickEvent
ElementMouseEvent
ElementMouseWheelEvent
EllipseShape
EventDispatcher
FillBase
GridContainerElement
GridContainerRowColumnDefinition
ImageElement
IpInputElement
LabelElement
LinearGradientFill
ListCollection
ListContainerElement
ProgressElement
RadioButtonElement
RadioButtonSkinElement
RoundedRectangleShape
ScrollBarElement
ScrollButtonSkinElement
ShapeBase
SkinnableElement
SolidFill
StyleableBase
StyleChangedEvent
StyleData
StyleDefinition
StyleProxy
TextAreaElement
TextElement
TextFieldElement
TextInputElement
TimeInputElement
ToggleButtonElement
ToggleButtonGroup
Tween
ViewportElement


StyleableBase

Internal abstract base class for classes that define styles.
StylableBase defines no styles itself, but allows subclasses to define them by adding
and populating static Object _StyleTypes and StyleDefinition StyleDefault on the class.
See example.
There are three different types of styles, NORMAL, INHERITABLE, and SUBSTYLE.
StyleableBase.EStyleType.NORMAL: No special behavior.
StyleableBase.EStyleType.INHERITABLE: Only applicable for CanvasElements.
If no explicit style is set (instance, style definition, or proxy) look up the
parent chain for the first element supporting the style with inheritable.
If no style is found up the parent chain, use the element's default style.
StyleableBase.EStyleType.SUBSTYLE: Only applicable for CanvasElements.
Sub styles are a StyleDefinition or array of [StyleDefinition]s to be applied
as the style definition(s) of an element's sub component. For example, elements
that supports skins, will have several sub styles, one for each skin element.
You can apply styles to the skin elements, by setting StyleDefinitions to the elements
"___SkinStyle" sub styles. This is not limited to skins, many elements have sub styles
for many sub components, such as built in scroll bars, buttons, or other sub components.
The system handles sub styles differently than other styles, as sub styles are [StyleDefinition]s
that can contain many individual styles. When implementing a sub style for a custom component, you
should use CanvasElement's _applySubStylesToElement() function to apply the sub style [StyleDefinition]s
to your sub component, such as within the _doStylesUpdated() function when the sub style has changed.
Subclasses can add new styles and override the style types or defaults of their base
classes by creating their own _StyleTypes and StyleDefault objects.
Example:
StylableBaseSubclass._StyleTypes = Object.create(null);
StylableBaseSubclass._StyleTypes.Visible = StyleableBase.EStyleType.NORMAL;
StylableBaseSubclass._StyleTypes.BorderType = StyleableBase.EStyleType.NORMAL;
StylableBaseSubclass._StyleTypes.SkinStyle = StyleableBase.EStyleType.NORMAL;
StylableBaseSubclass._StyleTypes.TextStyle = StyleableBase.EStyleType.INHERITABLE;
StylableBaseSubclass._StyleTypes.TextFont = StyleableBase.EStyleType.INHERITABLE;
StylableBaseSubclass._StyleTypes.TextSize = StyleableBase.EStyleType.INHERITABLE;
StylableBaseSubclass.StyleDefault = new StyleDefinition();
StylableBaseSubclass.StyleDefault.setStyle("Visible", true);
StylableBaseSubclass.StyleDefault.setStyle("BorderType", "none");
StylableBaseSubclass.StyleDefault.setStyle("SkinStyle", null);
StylableBaseSubclass.StyleDefault.setStyle("TextStyle", "normal");
StylableBaseSubclass.StyleDefault.setStyle("TextFont", "Arial");
StylableBaseSubclass.StyleDefault.setStyle("TextSize", 12);

Inheritance:     StyleableBase ➞ StyleDefinitionEventDispatcher ➞ Object

Events
Show Inherited


Public Functions
Show Inherited
Function Defined By
StyleableBase() [Constructor] StyleableBase
Creates new StyleableBase instance.
 
getStyleData(styleName) StyleableBase
Gets the style data for the supplied style name, this includes
additional info than getStyle() such as the style priority. You should
not modify the returned StyleData.
  styleName     :    String
String representing style to return the associated StyleData.
  returns     :    StyleData
Returns the associated StyleData
 


Internal Functions
Function Defined By
_applySubStylesToElement(styleName, elementToApply) StyleableBase
Convienence function for setting sub styles of sub components.
Applies appropriate sub styling from this Styleable to the
supplied elements definition and default definition style lists.
  styleName     :    String
String representing the sub style to apply.
  elementToApply     :    CanvasElement
The sub component element to apply sub styles.
 
_getClassStyle(styleName) StyleableBase
Gets the default style value for the supplied style name specified on this
classes StyleDefault map. Subclasses override base class values.
  styleName     :    String
String representing the default style to return.
  returns     :    Any
Returns the associated default style value or undefined if none specified.
 
_getClassStyleList(styleName) StyleableBase
Gets the default style values for the supplied style name specified on this
classes and base classes StyleDefault maps. This is used for sub styles as all
stub styles in the inheritance chain are applied to sub components.
  styleName     :    String
String representing the default style list to return.
  returns     :    Array
Returns an array of all default styles on this class, and base classes
for the supplied styleName.
 
_getInstanceStyle(styleName) StyleableBase
Gets the assigned style value for the supplied style name specified.
  styleName     :    String
String representing the style to return.
  returns     :    Any
Returns the associated style value or undefined if none specified.