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
|
CheckboxSkinElement
Default skin class for the CheckboxElement.
Styles
Show Inherited
| Style |
Defined By |
|
CheckColor : String
|
CheckboxSkinElement
|
Hex color value to be used for the check icon. Format like "#FF0000" (red).
|
|
|
CheckSize : Number
|
CheckboxSkinElement
|
Value between 0 and 1 used to determine the size that the "selected" indicator
should be rendered relative to this element's size.
|
|
| Style |
Defined By |
|
Alpha : Number
|
CanvasElement
|
Alpha value to use when rendering this component. Allowable values are between 0 and 1 with
0 being transparent and 1 being opaque. This causes the element to perform composite rendering
when a value between 1 and 0 is used.
|
|
|
BackgroundFill : FillBase
|
CanvasElement
|
Fill to use when filling the background. May be any FillBase subclass instance,
"color" string, or null for transparent.
|
|
|
BackgroundShape : ShapeBase
|
CanvasElement
|
Shape to be used when rendering the elements background. May be any ShapeBase subclass instance.
|
|
|
BorderColor : String
|
CanvasElement
|
Hex color value to be used when drawing the border. Format like "#FF0000" (red)
|
|
|
BorderThickness : Number
|
CanvasElement
|
Thickness in pixels to be used when drawing the border.
|
|
|
BorderType : String
|
CanvasElement
|
Determines the border type the CanvasElement should render. Allowable values are
"solid", "inset", "outset" or "none" / null. Note that borders are internal and drawn on the inside
of the elements bounding area.
|
|
|
Bottom : Number
|
CanvasElement
|
The distance the element should be positioned from the lower bounds of the parent container.
This only works if the element is a child of an AnchorContainer.
|
|
|
CheckColor : String
|
CheckboxSkinElement
|
Hex color value to be used for the check icon. Format like "#FF0000" (red).
|
|
|
CheckSize : Number
|
CheckboxSkinElement
|
Value between 0 and 1 used to determine the size that the "selected" indicator
should be rendered relative to this element's size.
|
|
|
ClipContent : boolean
|
CanvasElement
|
Determines if out of bounds rendering is allowed. If true the element will clip all rendering
and children's rendering to the elements bounding box. This style is inheritable for container elements.
|
|
|
CompositeLayer : boolean
|
CanvasElement
|
When true, this element renders itself and all children to a single layer and is treated
by its parent as a single element when rendering. This is necessary and automatically enabled
for styles like alpha where the component and all its children must be pre-rendered, and then
re-rendered with the appropriate effect.
This is very expensive but can also be very beneficial when used appropriately.
For example, if you have an application with a scrolling or constantly changing background
thereby always causing a full screen redraw, its beneficial to make the layer on top of the
background a composite layer. This effectively buffers the layer. Only the delta changes
will be drawn to the composite. Otherwise the entire display chain would have to be re-drawn
when the background moves. This is memory intensive as it effectively duplicates the rendering
area. Composite elements/children changing will update their region of their composite parent,
then that region of the composite parent needs to be copied up to the grandparent,
resulting in an additional buffer copy.
|
|
|
Cursor : CursorDefinition
|
CanvasElement
|
Specifies the cursor to be displayed when the mouse is over the element. A custom CursorDefinition
may be used or a browser type String ("text", "none", etc) may be used.
|
|
|
Draggable : boolean
|
CanvasElement
|
When true allows the element to be dragged by the user. This does not work for containers
that do not allow absolute positioning such as a ListContainer.
|
|
|
Enabled : boolean
|
CanvasElement
|
When false disables user interaction with the element.
|
|
|
FocusColor : String
|
[Inheritable] CanvasElement
|
Hex color value to be used when drawing the elements focus indicator. Format "#FF0000" (Red).
The focus indicator is only rendered when the element gains focus due to a tab stop.
|
|
|
FocusThickness : Number
|
[Inheritable] CanvasElement
|
Size in pixels that the focus ring should be rendered. Note that the focus ring is rendered
outside the elements bounding area.
|
|
|
Height : Number
|
CanvasElement
|
The Height the element should be rendered relative to its parent container. This only
works if the element is a child of a Container element.
|
|
|
HorizontalCenter : Number
|
CanvasElement
|
The distance in pixels from the horizontal center of the parent the element should be positioned.
Negative numbers indicate left of center, positive right of center.
This only works if the element is a child of an AnchorContainer.
|
|
|
IncludeInLayout : boolean
|
CanvasElement
|
When false, the element is no longer considered in the parent container's layout.
Typically this is used in conjunction with Visible, however sometimes you may want to
hide an element, but still have it consume container space.
|
|
|
IncludeInMeasure : boolean
|
CanvasElement
|
When false, the element is no longer considered in the parent container's measurement.
This is useful if you do not want containers to respect this child's measured size and/or
do not care if content is clipped, such as when using MinSize, MaxSize, and percent sizing together.
This also prevents the element's _doMeasure() function from running and forces a 0x0 measured size.
However, this will not prevent the "measurecomplete" event after this element finishes its measure phase.
|
|
|
Left : Number
|
CanvasElement
|
The distance the element should be positioned from the left most bounds of the parent container.
This only works if the element is a child of an AnchorContainer.
|
|
|
MaxHeight : Number
|
CanvasElement
|
The maximum height in pixels the element should consume. This only
works if the element is a child of a Container element.
|
|
|
MaxWidth : Number
|
CanvasElement
|
The maximum width in pixels the element should consume. This only
works if the element is a child of a Container element.
|
|
|
MinHeight : Number
|
CanvasElement
|
The minimum height in pixels the element should consume. This only
works if the element is a child of a Container element.
|
|
|
MinWidth : Number
|
CanvasElement
|
The minimum width in pixels the element should consume. This only
works if the element is a child of a Container element.
|
|
|
MouseEnabled : boolean
|
CanvasElement
|
When false disables mouse events for the element.
|
|
|
Padding : Number
|
CanvasElement
|
Size in pixels that inner content should be spaced from the outer bounds of the element.
Padding effects all sides of the element. Padding may be negative under certain circumstances like
expanding an inner child to allow border collapsing with its parent.
|
|
|
PaddingBottom : Number
|
CanvasElement
|
Size in pixels that inner content should be spaced from the lower bounds of the element.
This will override the Padding style.
|
|
|
PaddingLeft : Number
|
CanvasElement
|
Size in pixels that inner content should be spaced from the left most bounds of the element.
This will override the Padding style.
|
|
|
PaddingRight : Number
|
CanvasElement
|
Size in pixels that inner content should be spaced from the right most bounds of the element.
This will override the Padding style.
|
|
|
PaddingTop : Number
|
CanvasElement
|
Size in pixels that inner content should be spaced from the upper bounds of the element.
This will override the Padding style.
|
|
|
PasswordMaskCharacter : String
|
[Inheritable] CanvasElement
|
Character to use when masking a password field
|
|
|
PercentHeight : Number
|
CanvasElement
|
The percentage of available height the element should consume relative to its parent container. This only
works if the element is a child of a Container element. Note that percentage height is calculated
based on the available space left over *after* static sized elements considered. Percentages
are allowed to add to more than 100 and will consume all of the available space. For containers
like ListContainers, when percents add to more than 100 the elements will share the available space
per the ratio of percent vs total percent used so it is perfectly reasonable to set 3 elements all
to 100 and allow them to split the real-estate by 3.
|
|
|
PercentWidth : Number
|
CanvasElement
|
The percentage of available width the element should consume relative to its parent container. This only
works if the element is a child of a Container element. Note that percentage width is calculated
based on the available space left over *after* static sized elements considered. Percentages
are allowed to add to more than 100 and will consume all of the available space. For containers
like ListContainers, when percents add to more than 100 the elements will share the available space
per the ratio of percent vs total percent used so it is perfectly reasonable to set 3 elements all
to 100 and allow them to split the real-estate by 3.
|
|
|
Right : Number
|
CanvasElement
|
The distance the element should be positioned from the right most bounds of the parent container.
This only works if the element is a child of an AnchorContainer.
|
|
|
RotateCenterX : Number
|
CanvasElement
|
The X position of the parent container the element should be rotated around.
This only works if the element is a child of an AnchorContainer.
|
|
|
RotateCenterY : Number
|
CanvasElement
|
The Y position of the parent container the element should be rotated around.
This only works if the element is a child of an AnchorContainer.
|
|
|
RotateDegrees : Number
|
CanvasElement
|
The number of degrees the element should be rotated (clockwise). When no RotateCenterX or
RotateCenterY is set, the element is rotated via its center point and rotated objects are
still positioned relative to their parent's coordinate plane after the transform has occurred.
|
|
|
ShadowColor : String
|
CanvasElement
|
Hex color value to be used when drawing the drop shadow. This may be set to null and no
shadow will be rendered. Format like "#FF0000" (red)
|
|
|
ShadowOffsetX : Number
|
CanvasElement
|
X offset that the drop shadow will be rendered.
|
|
|
ShadowOffsetY : Number
|
CanvasElement
|
Y offset that the drop shadow will be rendered.
|
|
|
ShadowSize : Number
|
CanvasElement
|
Size in pixels that the drop shadow should be rendered. Note that the drop shadow may be rendered
outside the elements bounding area. This will cause the element to be composite rendered.
|
|
|
SkinState : String
|
CanvasElement
|
This is an internal style used to toggle an element's current skin for different states such
as normal, mouse-over, mouse-down, etc. Its also commonly used by skin classes to identify their skin state.
|
|
|
TabStop : int
|
CanvasElement
|
Determines if an element can be focused using tab stops. -1 indicates the element cannot
take focus, 0 is default and the element will be focused in the order it appears in the display chain.
Numbers higher than 0 indicate a specific order to be used (not yet implemented).
|
|
|
TextCaretColor : String
|
[Inheritable] CanvasElement
|
Hex color value to be used when drawing blinking text caret. "#FF0000" (red)
|
|
|
TextColor : String
|
[Inheritable] CanvasElement
|
Hex color value to be used when drawing text. Format like "#FF0000" (red)
|
|
|
TextDecoration : String
|
[Inheritable] CanvasElement
|
Determines the text decoration used. Available values are "none" or "underline".
|
|
|
TextFillType : String
|
[Inheritable] CanvasElement
|
Determines the fill type when rendering text. Available values are "fill" and "stroke".
Stroke draws a border around characters, while fill completely fills them.
|
|
|
TextFont : String
|
[Inheritable] CanvasElement
|
Determines the font family to use when rendering text such as "Arial".
|
|
|
TextHighlightedColor : String
|
[Inheritable] CanvasElement
|
Hex color value to be used when drawing highlighted text. Format like "#FF0000" (red)
|
|
|
TextHorizontalAlign : String
|
[Inheritable] CanvasElement
|
Determines alignment when rendering text. Available values are "left", "center", and "right".
|
|
|
TextLinePaddingBottom : Number
|
[Inheritable] CanvasElement
|
Padding to apply to the bottom of each line of text. This also impacts the size of the highlight background.
This is useful when using strange fonts that exceed their typical vertical bounds.
|
|
|
TextLinePaddingTop : Number
|
[Inheritable] CanvasElement
|
Padding to apply to the top of each line of text. This also impacts the size of the highlight background.
This is useful when using strange fonts that exceed their typical vertical bounds.
|
|
|
TextLineSpacing : Number
|
[Inheritable] CanvasElement
|
Vertical line spacing in pixels.
|
|
|
TextSize : int
|
[Inheritable] CanvasElement
|
Determines the size in pixels to render text.
|
|
|
TextStyle : String
|
[Inheritable] CanvasElement
|
Determines the style to render text. Available values are "normal", "bold", "italic", and "bold italic".
|
|
|
TextVerticalAlign : String
|
[Inheritable] CanvasElement
|
Determines the baseline when rendering text. Available values are "top", "middle", or "bottom".
|
|
|
Top : Number
|
CanvasElement
|
The distance the element should be positioned from the upper bounds of the parent container.
This only works if the element is a child of an AnchorContainer.
|
|
|
VerticalCenter : Number
|
CanvasElement
|
The distance in pixels from the vertical center of the parent the element should be positioned.
Negative numbers indicate left of center, positive right of center.
This only works if the element is a child of an AnchorContainer.
|
|
|
Visible : boolean
|
CanvasElement
|
When false the element will not be rendered.
|
|
|
Width : Number
|
CanvasElement
|
The Width the element should be rendered relative to its parent container. This only
works if the element is a child of a Container element.
|
|
|
X : Number
|
CanvasElement
|
The X position the element should be rendered relative to its parent container. This only
works if the element is a child of an AnchorContainer.
|
|
|
Y : Number
|
CanvasElement
|
The Y position the element should be rendered relative to its parent container. This only
works if the element is a child of an AnchorContainer.
|
|
Events
Show Inherited
| Event |
Defined By |
|
added : AddedRemovedEvent
|
CanvasElement
|
Dispatched when this element is added to the display hierarchy and becomes a descendant of CanvasManager.
|
|
|
click : ElementMouseEvent
|
CanvasElement
|
Dispatched when the mouse is pressed and released over the same element.
|
|
|
dragging : ElementEvent
|
CanvasElement
|
Dispatched when this element is moved due to it being dragged.
|
|
|
enterframe : DispatcherEvent
|
[Broadcast] CanvasElement
|
Dispatched at the beginning of the frame before any life cycle processing begins.
|
|
|
exitframe : DispatcherEvent
|
[Broadcast] CanvasElement
|
Dispatched at the end of the frame after life cycle processing ends.
|
|
|
focusin : ElementEvent
|
CanvasElement
|
Dispatched when this element gains focus.
|
|
|
focusout : ElementEvent
|
CanvasElement
|
Dispatched when this element loses focus.
|
|
|
keydown : ElementKeyboardEvent
|
CanvasElement
|
Dispatched when the element has focus and a key is pressed, repeatedly dispatched if the key is held down.
|
|
|
keyup : ElementKeyboardEvent
|
CanvasElement
|
Dispatched when the element has focus and a key is released.
|
|
|
layoutcomplete : DispatcherEvent
|
CanvasElement
|
Typically an internal event. Dispatched when an element has completed its
layout phase. This is used when it is necessary to wait for an element to
finish its layout pass so things such as its PercentWidth calculation is complete.
This is very expensive and should only be used when absolutely necessary. Its usually
only needed when elements are not directly related via parent/child.
For example, DropdownElement uses this to adjust the height of the dropdown popup
since we do not know how much height it will need until after it has finished layout.
|
|
|
localechanged : DispatcherEvent
|
[Broadcast] CanvasElement
|
Dispatched when CanvasManager's locale selection changes.
|
|
|
measurecomplete : DispatcherEvent
|
CanvasElement
|
Typically an internal event. Dispatched when an element has completed its
measure phase. This is used when it is necessary to wait for an element to
finish its measure pass so that its content size or _measuredSize calculation is complete.
This is very expensive and should only be used when absolutely necessary. Its usually
only needed when elements are not directly related via parent/child.
For example, ViewportElement uses this to invoke a layout pass when its content child
changes _measuredSize. The Viewport uses an intermediate CanvasElement as a clipping container
for the content child, which does not measure children, so an event is needed to notify the Viewport.
|
|
|
mousedown : ElementMouseEvent
|
CanvasElement
|
Dispatched when the mouse is pressed over this element.
|
|
|
mousemove : ElementMouseEvent
|
CanvasElement
|
Dispatched when the mouse moves over this element.
|
|
|
mousemoveex : ElementMouseEvent
|
[Broadcast] CanvasElement
|
Dispatched when the mouse moves anywhere, even outside of the browser window. Mouse coordinates are relative to CanvasManager.
|
|
|
mouseup : ElementMouseEvent
|
CanvasElement
|
Dispatched when the mouse is released. Note that the mouse may not still be over the element.
|
|
|
removed : AddedRemovedEvent
|
CanvasElement
|
Dispatched when this element is removed from the display hierarchy and is no longer a descendant of CanvasManager.
|
|
|
resize : DispatcherEvent
|
CanvasElement
|
Dispatched when the element's size changes.
|
|
|
rollout : ElementEvent
|
CanvasElement
|
Dispatched when the mouse moves outside of this element.
|
|
|
rollover : ElementEvent
|
CanvasElement
|
Dispatched when the mouse moves over this element.
|
|
|
stylechanged : StyleChangedEvent
|
StyleDefinition
|
Dispatched when a style is added, cleared, or changed.
|
|
|
wheel : ElementMouseWheelEvent
|
CanvasElement
|
Dispatched when the mouse wheel is rolled while over this element.
|
|
Public Functions
Show Inherited
| Function |
Defined By |
|
CheckboxSkinElement()
|
[Constructor] CheckboxSkinElement
|
Creates new CheckboxSkinElement instance.
|
|
| Function |
Defined By |
|
CheckboxSkinElement()
|
[Constructor] CheckboxSkinElement
|
Creates new CheckboxSkinElement instance.
|
|
|
addCaptureListener(type, callback)
|
CanvasElement
|
Registers an event listener function to be called during capture phase.
| |
type : String
String representing the event type.
|
| |
callback : Function
Function to be called when the event occurs.
|
|
|
|
addEventListener(type, callback)
|
EventDispatcher
|
Registers an event lister function to be called when an event occurs.
| |
type : String
String representing the event type.
|
| |
callback : Function
Function to be called when the event occurs.
|
|
|
|
addStyleDefinition(styleDefinition)
|
CanvasElement
|
Adds a style definition to the end element's definition list. Styles in this definition
will override styles in previously added definitions (lower index). Instance styles, set
using setStyle() will override all definition styles.
Adding style definitions to elements already attached to the display chain is expensive,
for better performance add definitions before attaching the element via addElement()
| |
styleDefinition : StyleDefinition
The StyleDefinition to add and associate with the element.
|
| |
returns : StyleDefinition
The style definition just added.
|
|
|
|
addStyleDefinitionAt(styleDefinition, index)
|
CanvasElement
|
Inserts a style definition to this elements definition list at the specified index.
Definitions with higher indexes (added later) are higher priority. Instance styles, set
using setStyle() will override all definition styles.
Adding style definitions to elements already attached to the display chain is expensive,
for better performance add definitions before attaching the element via addElement()
| |
styleDefinition : StyleDefinition
StyleDefinition to be added to this elements definition list.
|
| |
index : int
The index to insert the style definition within the elements definition list.
|
| |
returns : StyleDefinition
Returns StyleDefinition just added when successfull, null if the StyleDefinition could not be added due to the index being out of range or other error.
|
|
|
|
clearStyle(styleName)
|
StyleDefinition
|
Clears style data from this object. This is the same
passing undefined to setStyle().
| |
styleName : String
String representing the style to clear.
|
|
|
|
clearStyleDefinitions()
|
CanvasElement
|
Removes all style definitions from the element. This is more efficient than
removing definitions one at a time.
|
|
|
dispatchEvent(event)
|
EventDispatcher
|
Dispatches an event to be processed by registered event listeners. The Event's target is the
EventDispatcher which called dispatchEvent. The Event will be cloned prior to passing to callback functions
to ensure the callback cannot modify the Event data or properties. You can check if the event was canceled
by calling the Event's getIsCanceled after dispatching it. Re-dispatching the same event will re-set its canceled state to false.
| |
event : DispatcherEvent
The DispatcherEvent class or subclass to be dispatched.
|
|
|
|
getManager()
|
CanvasElement
|
Gets the CanvasManager currently associated with this element.
| |
returns : CanvasManager
The CanvasManager currently associated with this element.
|
|
|
|
getMetrics(relativeToElement)
|
CanvasElement
|
Gets a DrawMetrics object containing the elements bounding box information
x, y, width, height, relative to the supplied element regardless of this element's transformation,
depth, or position in the display hierarchy. For example, you can call this get the elements width and height,
or to get this element's bounding box relative to the canvas or any other element.
| |
relativeToElement : CanvasElement
The element to translate this elements bounding box too. If relativeToElement equals null or this, will return metrics relative to this element: {x:0, y:0, width:thisWidth, height:thisHeight}.
|
| |
returns : DrawMetrics
DrawMetrics of this element relative to the supplied element.
|
|
|
|
getMouseIsDown()
|
CanvasElement
|
Gets the state of the mouse for this element.
| |
returns : boolean
Returns true if the mouse is currently pressed, false otherwise.
|
|
|
|
getName()
|
CanvasElement
|
Gets the name associated with this element.
| |
returns : String
The name associated with this element.
|
|
|
|
getNumStyleDefinitions()
|
CanvasElement
|
Gets the number of style definitions associated with this element.
| |
returns : int
The number of style definitions.
|
|
|
|
getParent()
|
CanvasElement
|
Gets this element's parent element.
|
|
|
getStyle(styleName)
|
[Override] CanvasElement
|
Gets the style value for this element. When retrieving a style, CanvasElements look
through their associated style chain, at each step if undefined is returned, they look
at the next step until a non-undefined value is found.
1) Instance - Styles set directly to the element via setStyle()
2) StyleDefinitions - Styles associated via its assigned StyleDefinitions
3) StyleProxy - If proxy element is assigned, move to proxy element and repeat steps 1-3
4) Inheritable - If style is inheritable, move up to parent element and repeat steps 1-4
5) Default styles
| |
styleName : String
String representing the style value to be returned.
|
| |
returns : Any
Returns the associated style value if found, otherwise undefined.
|
|
|
|
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
|
|
|
|
getStyleDefinitionAt(index)
|
CanvasElement
|
Gets the style definition at the supplied zero base index.
| |
index : int
Index of the style definition to return;
|
| |
returns : StyleDefinition
The style defenition at the supplied index, or null if index is out of range.
|
|
|
|
getStyleDefinitionIndex(styleDefinition)
|
CanvasElement
|
Returns the index of the supplied style definition or -1 if the style definition
has not been added.
| |
styleDefinition : StyleDefinition
StyleDefinition to return associated index.
|
| |
returns : int
Index of the StyleDefinition supplied via the styleDefinition parameter, or -1 if does not exist.
|
|
|
|
hasCaptureListener(type, callback)
|
CanvasElement
|
Checks if an event capture listener has been registered with this CanvasElement
| |
type : String
String representing the event type.
|
| |
callback : Function
Function callback to be called when the event occurs. This may be null to check if the CanvasElement has any capture events registered for the provided type.
|
| |
returns : boolean
Returns true if the CanvasElement has the provided capture callback registered for the provided type, or any capture callback for the provided type if the callback parameter is null. Otherwise, returns false.
|
|
|
|
hasEventListener(type, callback)
|
EventDispatcher
|
Checks if an event listener has been registered with this EventDispatcher
| |
type : String
String representing the event type.
|
| |
callback : Function
Function callback to be called when the event occurs. This may be null to check if the EventDispatcher has any events registered for the provided type.
|
| |
returns : boolean
Returns true if the EventDispatcher has the provided callback registered for the provided type, or any callback for the provided type if the callback parameter is null. Otherwise, returns false.
|
|
|
|
removeCaptureListener(type, callback)
|
CanvasElement
|
Removes a capture event listener.
| |
type : String
String representing the event type.
|
| |
callback : Function
Function callback to be removed.
|
| |
returns : boolean
Returns true if the callback was successfully removed, otherwise false such as if the function callback was not previously registered.
|
|
|
|
removeEventListener(type, callback)
|
EventDispatcher
|
Removes a callback from the EventDispatcher
| |
type : String
String representing the event type.
|
| |
callback : Function
Function callback to be removed.
|
| |
returns : boolean
Returns true if the callback was successfully removed, otherwise false such as if the function callback was not previously registered.
|
|
|
|
removeStyleDefinition(styleDefinition)
|
CanvasElement
|
Removes the supplied style definition from the element's style chain.
| |
styleDefinition : StyleDefinition
The StyleDefinition to remove from the element.
|
| |
returns : StyleDefinition
The style definition just removed, or null if the supplied style definition is not associated with this element.
|
|
|
|
removeStyleDefinitionAt(index)
|
CanvasElement
|
Removes the style definition from the elements definition list at the supplied index.
| |
index : int
Index to be removed.
|
| |
returns : StyleDefinition
Returns the StyleDefinition just removed if successfull, null if the definition could not be removed due it it not being in this elements definition list, or index out of range.
|
|
|
|
rotatePoint(point, reverse)
|
CanvasElement
|
Rotates a point point on this element's parent relative to this element's rotation transformation.
This is used to transform a point from the parent's coordinate plane to a child's coordinate plane or vice versa.
Typically you should use translatePointFrom() or translatePointTo() rather than rotatePoint().
| |
point : Object
Point object {x:0, y:0};
|
| |
reverse : boolean
When true, rotates a point on the parent's plane, to the childs plane. When false, rotates a point on the childs plane, to the parents plane.
|
|
|
|
setName(name)
|
CanvasElement
|
Sets an arbitrary name to this element. The system does not use this value,
it is for use by implementors if a way to differentiate elements is needed.
| |
name : String
A String to use as the element's name.
|
|
|
|
setStyle(styleName, value)
|
StyleDefinition
|
Sets the stored style value for this object.
| |
styleName : String
String representing the style to set.
|
| |
value : Any
The value to store. This may be null or undefined. Note that a null style is different from an absent (undefined) style. A null style will terminate a style chain lookup and return null value. An undefined style will cause the system to look further up the style chain for a value. Passing undefined is the same as calling clearStyle().
|
|
|
|
setStyleDefinitions(styleDefinitions)
|
CanvasElement
|
Replaces the elements current style definition list. This is more effecient than removing or
adding style definitions one at a time.
| |
styleDefinitions : StyleDefinition
May be a StyleDefinition, or an Array of StyleDefinition, including nested Arrays. Note that nested arrays will be flattened into a single array.
|
|
|
|
translateMetricsFrom(metrics, relativeFromElement)
|
CanvasElement
|
Translates a DrawMetrics from another element's to this element regardless of this element's transformation,
depth, or position in the display hierarchy.
| |
metrics : DrawMetrics
Metrics to transform from the relative to this element.
|
| |
relativeFromElement : CanvasElement
The element to translate the supplied metrics too. If relativeToElement equals null or this, will return metrics the same as the supplied metrics.
|
| |
returns : DrawMetrics
Translated DrawMetrics relative to the supplied element.
|
|
|
|
translateMetricsTo(metrics, relativeToElement)
|
CanvasElement
|
Translates a DrawMetrics from this element's to another element regardless of this element's transformation,
depth, or position in the display hierarchy.
| |
metrics : DrawMetrics
Metrics to transform to from this element to the supplied relative element.
|
| |
relativeToElement : CanvasElement
The element to translate the supplied metrics too. If relativeToElement equals null or this, will return metrics the same as the supplied metrics.
|
| |
returns : DrawMetrics
Translated DrawMetrics relative to the supplied element.
|
|
|
|
translatePointFrom(point, relativeFromElement)
|
CanvasElement
|
Translates a point from an element to this element regardless of this element's transformation,
depth, or position in the display hierarchy. For example, you can call this to translate a point on
the canvas to the relative point on this element.
| |
point : Object
Point - object containing {x:0, y:0}.
|
| |
relativeFromElement : CanvasElement
The element that the supplied point is relative too.
|
|
|
|
translatePointTo(point, relativeToElement)
|
CanvasElement
|
Translates a point from this element to another element regardless of this element's transformation,
depth, or position in the display hierarchy. For example, you can call this to translate a point on
this element to a point on the canvas.
| |
point : Object
Point - object containing {x:0, y:0}.
|
| |
relativeToElement : CanvasElement
The element to translate this element's point too.
|
|
|
Internal Members
Show Inherited
| Member |
Defined By |
|
_height : Number
|
CanvasElement
|
Read only - This element's actual height in pixels. This is not updated immediately, only
after our parent has finished its layout phase will this be valid.
|
|
|
_isFocused : boolean
|
CanvasElement
|
Read only - true if this element currently has focus, otherwise false.
|
|
|
_itemData : Object
|
CanvasElement
|
Read only - Collection item associated with this DataRenderer
|
|
|
_listData : DataListData
|
CanvasElement
|
Read only - List data provided by parent DataList when acting as a DataRenderer
|
|
|
_listSelected : Any
|
CanvasElement
|
Read only - DataRenderer selected state.
|
|
|
_measuredHeight : Number
|
CanvasElement
|
Read only - This element's measured height in pixels. This is not updated immediately, only
after this element has finished its measure phase will this be valid.
|
|
|
_measuredWidth : Number
|
CanvasElement
|
Read only - This element's measured width in pixels. This is not updated immediately, only
after this element has finished its measure phase will this be valid.
|
|
|
_mouseIsDown : boolean
|
CanvasElement
|
Read only - true if the mouse is pressed on this element, otherwise false.
|
|
|
_mouseIsOver : boolean
|
CanvasElement
|
Read only - true if the mouse is over this element, otherwise false.
|
|
|
_owner : CanvasElement
|
CanvasElement
|
Read only - This elements owner element. This is set by elements that pop up other elements.
Such as DropdownBase sets this on the pop up element.
|
|
|
_parent : CanvasElement
|
CanvasElement
|
Read only - This elements parent element.
|
|
|
_renderVisible : boolean
|
CanvasElement
|
Read only - False if any element in the parent chain is not visible.
This is not updated immediately, only after redraw regions have been updated.
Useful for things like "enterframe" listeners to prevent processing when not necessary.
|
|
|
_rotateCenterX : Number
|
CanvasElement
|
Read only - The X position relative to the element's parent this element is rotated around. This is not updated immediately, only
after our parent has finished its layout phase will this be valid.
|
|
|
_rotateCenterY : Number
|
CanvasElement
|
Read only - The Y position relative to the element's parent this element is rotated around. This is not updated immediately, only
after our parent has finished its layout phase will this be valid.
|
|
|
_rotateDegrees : Number
|
CanvasElement
|
Read only - Degrees this element is rotated. This is not updated immediately, only
after our parent has finished its layout phase will this be valid.
|
|
|
_width : Number
|
CanvasElement
|
Read only - This element's actual width in pixels. This is not updated immediately, only
after our parent has finished its layout phase will this be valid.
|
|
|
_x : Number
|
CanvasElement
|
Read only - X position in pixels relative to this elements parent. This is not updated immediately, only
after our parent has finished its layout phase.
|
|
|
_y : Number
|
CanvasElement
|
Read only - Y position in pixels relative to this elements parent. This is not updated immediately, only
after our parent has finished its layout phase will this be valid.
|
|
Internal Functions
Show Inherited
| Function |
Defined By |
|
_addChild(element)
|
CanvasElement
|
Adds a child element to the end of this element's child list.
| |
element : CanvasElement
CanvasElement to be added as a child of this element.
|
| |
returns : CanvasElement
Returns the element just added.
|
|
|
|
_addChildAt(element, index)
|
CanvasElement
|
Inserts a child element to this elements child list at the specified index.
| |
element : CanvasElement
CanvasElement to be added as a child of this element.
|
| |
index : int
The index position to insert the child in the elements child list.
|
| |
returns : CanvasElement
Returns the element just added when successfull, null if the element could not be added due to the index being out of range.
|
|
|
|
_addStyleDefinitionAt(styleDefinition, index, isDefault)
|
CanvasElement
|
Inserts a style definition to this elements style definition or default definition lists.
Adding style definitions to elements already attached to the display chain is expensive,
for better performance add definitions before attaching the element via addElement().
Default definitions are used when styling sub components with sub styles.
| |
styleDefinition : StyleDefinition
StyleDefinition to be added to this elements definition list.
|
| |
index : int
The index to insert the style definition within the elements definition list.
|
| |
isDefault : bool
When true, inserts the definition into the element's default definition list.
|
| |
returns : StyleDefinition
Returns StyleDefinition just added when successfull, null if the StyleDefinition could not be added due to the index being out of range or other error.
|
|
|
|
_applySubStylesToElement(styleName, elementToApply)
|
[Override] CanvasElement
|
Convienence function for setting sub styles of sub components.
Applies appropriate sub styling from this element to the
supplied elements definition and default definition style lists.
You should call this on sub components from within the _doStylesUpdated()
function when the associated sub style changes.
| |
styleName : String
String representing the sub style to apply.
|
| |
elementToApply : CanvasElement
The sub component element to apply sub styles.
|
|
|
|
_doLayout(paddingMetrics)
|
CanvasElement
|
Lifecycle method for custom component development. Never call this function directly. The system
calls this function in response to changes that effect layout or elements being added to the display hierarchy.
Override this function to layout its children. You should call layout functions such as _setActualPosition() and
_setActualSize() on child elements from within this function. Sometimes you may need to add/remove additional elements
during layout such as when a Datagrid or Viewport adds/removes scroll bars. Keep in mind that adding/removing elements
automatically re-invalidates layout, so its best to bail out and wait for the next layout pass for best performance
under this scenario.
| |
paddingMetrics : DrawMetrics
Contains metrics to use after considering the element's padding. Simply a convienence as padding typically effects layout (but not always) depending on the component. Use any supporting functions such as _getBorderMetrics() that are needed to layout the element.
|
|
|
|
_doMeasure(padWidth, padHeight)
|
CanvasElement
|
Lifecycle method for custom component development. Never call this function directly. The system
calls this function in response to changes that effect measurement or elements being added to the display hierarchy.
Override this function to calculate the measured size of the element based on its styling, children, etc.
You should set the elements measured size by calling _setMeasuredSize() from within this function.
| |
padWidth : Number
Simply a convienence as padding typically effects measurement (but not always) depending on the component. Use any supporting functions such as _getBorderThickness that are needed to measure the element.
|
| |
padHeight : Number
Simply a convienence as padding typically effects measurement (but not always) depending on the component. Use any supporting functions such as _getBorderThickness that are needed to measure the element.
|
|
|
|
_doRender()
|
CanvasElement
|
Lifecycle method for custom component development. Never call this function directly. The system
calls this function in response to changes that effect rendering or elements being added to the display hierarchy.
Override this function to render the element. Keep in mind that any child elements are rendered on top of this
element. This function is typically not needed unless rendering a very primitive object such as a custom skin or
a display object that cannot be handled via a BackgroundShape class and/or _fillBackground() function.
Most advanced objects should use skins and other means to render themselves.
CanvasElement draws its background and border via supplied shape and gradient settings.
|
|
|
_doStylesUpdated(stylesMap)
|
CanvasElement
|
Lifecycle method for custom component development. Never call this function directly. The system
calls this function in response to style changes or elements being added to the display hierarchy.
Override this function to handle style changes to the element. Style changes may impact other styles,
event listeners, layout, measurement, rendering, etc. You should call appropriate _invalidate() method per style.
Note that style handling should not be dependent on the *current* state of a style. This function
should be able to run repeatedly with the same values. An example of when this may happen is if
an element is temporarily removed from the display hierarchy then added back. Whenever an element is added
all of its styles are invalidated. This is necessary as when an element is *not* part of the display chain
style changes are not tracked. So when an element is added there is no way to know which styles may have changed
hence all of them are invalidated.
| |
stylesMap : Object
An Object map containing all the style names that have been updated. Map contains entries {styleName:true}. Elements should typically check this map before assuming a style has changed for performance reasons. You should always call the base method. If you wish to override the style handling behavior of a specific style, you can simply delete it from the map before passing it to the base function.
|
|
|
|
_drawBackgroundShape(ctx, borderMetrics)
|
CanvasElement
|
Used to draw the path to the Canvas2DContext that is to be used to render the focus ring,
fill the background, and draw the border. You should never need to explicitly call this.
The system calls this during render phase.
Typically you should use the BackgroundShape style
for this, but may override it under more complex scenarios.
| |
ctx : Canvas2DContext
Canvas2DContext to draw the background shape path.
|
| |
borderMetrics : DrawMetrics
The DrawMetrics containing x,y,width,height used to draw the background. These metrics should be the same as the ones used to stroke a solid border.
|
|
|
|
_drawBorder(ctx, borderMetrics)
|
CanvasElement
|
Used to render the elements border according to the element's style settings.
You should never need to explicitly call this. The system calls this during
the render phase. You may override if you need to do a more complex border. The border
is rendered last, on top of the focus ring and background fill.
| |
ctx : Canvas2DContext
Canvas2DContext to render the border.
|
| |
borderMetrics : DrawMetrics
The DrawMetrics containing x,y,width,height used to draw the background. These metrics should be the same as the ones used to stroke a solid border.
|
|
|
|
_drawFocusRing(ctx, borderMetrics)
|
CanvasElement
|
Used to draw the focus ring when a tab-able element gains focus due to a tab stop per the elements styles.
You should never need to explicitly call this. The system calls this during
the render phase. You may override if you wish to draw a more complex focus indicator.
Focus ring is drawn *outside* the elements bounding box. Focus ring is rendered
before the background and border.
| |
ctx : Canvas2DContext
Canvas2DContext to render the focus ring.
|
| |
borderMetrics : DrawMetrics
The DrawMetrics containing x,y,width,height used to draw the background. These metrics should be the same as the ones used to stroke a solid border.
|
|
|
|
_fillBackground(ctx, borderMetrics)
|
CanvasElement
|
Used to fill the elements background shape according to the element's BackgroundShape and BackgroundFill styles.
You should never need to explicitly call this. The system calls this during
the render phase. You may override if you need to do a more complex background fill. The background fill
is rendered after the focus ring and before the border.
| |
ctx : Canvas2DContext
Canvas2DContext to fill the background shape.
|
| |
borderMetrics : DrawMetrics
The DrawMetrics containing x,y,width,height used to draw the background. These metrics should be the same as the ones used to stroke a solid border.
|
|
|
|
_getBorderMetrics()
|
CanvasElement
|
Helper function that returns a DrawMetrics object whose bounding area is inside this elements border.
| |
returns : DrawMetrics
Returns DrawMetrics that define a bounding area inside this elements border.
|
|
|
|
_getBorderThickness()
|
CanvasElement
|
Helper function that returns the elements border thickness per its applied styles.
| |
returns : Number
The elements border thickness.
|
|
|
|
_getChildAt(index)
|
CanvasElement
|
Gets the child element at the supplied index.
| |
index : int
Index of child element to return;
|
| |
returns : CanvasElement
The element at the supplied index, or null if index is out of range.
|
|
|
|
_getChildIndex(element)
|
CanvasElement
|
Returns the index of the supplied child element.
| |
element : CanvasElement
Child element to return the index.
|
| |
returns : int
Returns the child index or -1 if the element is not a child of this element.
|
|
|
|
_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.
|
|
|
|
_getDefaultStyleList(styleName)
|
CanvasElement
|
Gets the style values for the supplied style name in this elements
default style definition list and class list styles for the supplied style name.
This is used for sub styles as all stub styles in the list are applied to sub components.
This list should be supplied to the sub components default style definition list.
| |
styleName : String
String representing the default style list to return.
|
| |
returns : Array
Returns an array of all styles in this elements default definition and class list styles for the associated style name.
|
|
|
|
_getFontString()
|
CanvasElement
|
Gets a font string that can be applied to the canvas's Context2D via the element's text styles.
This is just a helper to gather and format the styles for the canvas context.
| |
returns : String
String to be applied to the canvas contex's font. "bold 14px Arial".
|
|
|
|
_getGraphicsCtx()
|
CanvasElement
|
Returns the canvas context used when rendering this element. This should typically
only be called from within the element's _doRender() phase, and only if you intend
to actually draw. Calling this will impact the canvas redraw regions.
| |
returns : Canvas2DContext
Canvas context used when rendering this element.
|
|
|
|
_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.
|
|
|
|
_getNumChildren()
|
CanvasElement
|
Gets this elements number of children.
| |
returns : int
The number of child elements.
|
|
|
|
_getNumStyleDefinitions(isDefault)
|
CanvasElement
|
Gets the number of style definitions or default definitions associated with this element.
| |
isDefault : bool
When true, returns the number of default definitions.
|
| |
returns : int
The number of style definitions.
|
|
|
|
_getPaddingMetrics()
|
CanvasElement
|
Helper function that returns a DrawMetrics object whose bounding area is inside this elements padding area.
| |
returns : DrawMetrics
Returns DrawMetrics that define a bounding area inside this elements padding area.
|
|
|
|
_getPaddingSize()
|
CanvasElement
|
Helper function that returns the elements total padding width and height per its applied styles.
| |
returns : Object
Returns an object containing {width:paddingWidth, height:paddingHeight, paddingBottom:paddingBottom, paddingTop:paddingTop, paddingLeft:paddingLeft, paddingRight:paddingRight}.
|
|
|
|
_getStyleDefinitionAt(index, isDefault)
|
CanvasElement
|
Gets the style definition or default definition at the supplied zero base index.
| |
index : int
Index of the style definition to return;
|
| |
isDefault : bool
When true, returns the default definition at the supplied index.
|
| |
returns : StyleDefinition
The style defenition at the supplied index, or null if index is out of range.
|
|
|
|
_getStyledOrMeasuredHeight()
|
CanvasElement
|
Helper function that returns this elements styled height, or measured height if no style is set. Typically
called from within a parent containers layout phase.
| |
returns : Number
The elements height.
|
|
|
|
_getStyledOrMeasuredWidth()
|
CanvasElement
|
Helper function that returns this elements styled width, or measured width if no style is set. Typically
called from within a parent containers layout phase.
| |
returns : Number
The elements width.
|
|
|
|
_getStyleList(styleName)
|
CanvasElement
|
Gets the style values for the supplied style name in this elements
style definition list and instance styles for the supplied style name.
This is used for sub styles as all stub styles in the list are applied to sub components.
This list should be supplied to the sub components style definition list.
| |
styleName : String
String representing the style list to return.
|
| |
returns : Array
Returns an array of all styles in this elements definition list and instance styles for the associated style name.
|
|
|
|
_invalidateLayout()
|
CanvasElement
|
Invalidates the elements child layout and causes the system to invoke doLayout() on
the next layout phase. The system calls this automatically for all existing components,
this is only necessary for custom component development.
This should only be called when a change is made to the element that will impact its layout.
Such as property changes or from within the elements doStylesUpdated() when a style change impacts
the element's layout (such as Padding). On rare occasions you may need to re-invalidate layout
from within the doLayout() function. An example is when a DataList adds a new DataRenderer it
re-invalidates layout to allow the renderer to measure before continuing layout.
Do not override this function.
|
|
|
_invalidateMeasure()
|
CanvasElement
|
Invalidates the element's measured sizes and causes the system to invoke
doMeasure() on the next measure phase. The system calls this automatically for all
existing components, this is only necessary for custom component development.
This should only be called when a change is made
to the element that will impact its measurement. Such as property changes or from within the elements doStylesUpdated()
when a style change impacts the elements measurement (such as Padding). On rare occasions
you may need to re-invalidate measurement from within the doMeasure() function (such as wrapping text).
This will cause a 2nd measurement pass for that element which is valid (but expensive).
Do not override this function.
|
|
|
_invalidateRender()
|
CanvasElement
|
Invalidates the elements child render and causes the system to invoke doRender() on
the next render phase. The system calls this automatically for all existing components,
this is only necessary for custom component development.
This should only be called when a change is made to the element that will impact its rendering.
Such as property changes or from within the elements doStylesUpdated() when a style change impacts
the element's rendering (such as BackgroundFill).
Do not override this function.
|
|
|
_invalidateStyle(styleName)
|
CanvasElement
|
Invalidates the supplied style and causes the system to invoke the _doStylesChanged() function.
This should never concievably be called and is exclusively handled by the system.
This is the starting point for the element lifecycle. If you're program is dependent on
_doStylesChanged() when no styles have actually changed, you might have a design issue.
Do not override this function.
| |
styleName : String
String representing the style to be invalidated.
|
|
|
|
_onCanvasElementAdded(addedRemovedEvent)
|
CanvasElement
|
Invoked when the element is added to the canvas. Every CanvasElement already adds its own
"added" event listener so overriding this is identical but more efficient than adding your own "added" event listener.
You should *always* call the base class function.
|
|
|
_onCanvasElementRemoved(addedRemovedEvent)
|
CanvasElement
|
Invoked when the element is removed to the canvas. Every CanvasElement already adds its own
"removed" event listener so overriding this is identical but more efficient than adding your own "removed" event listener.
You should *always* call the base class function.
|
|
|
_removeChild(element)
|
CanvasElement
|
Removes a child element from this elements child list.
| |
element : CanvasElement
Child to be removed.
|
| |
returns : CanvasElement
Returns the element just removed if successfull, null if the element could not be removed due to it not being a child of this element.
|
|
|
|
_removeChildAt(index)
|
CanvasElement
|
Removes a child element at specified index.
| |
index : int
Index to be removed.
|
| |
returns : CanvasElement
Returns the element just removed if successfull, null if the element could not be removed due it it not being a child of this element, or index out of range.
|
|
|
|
_removeStyleDefinitionAt(index, isDefault)
|
CanvasElement
|
Removes a style definition from this elements style definition or default definitions at the supplied index.
Default definitions are used when styling sub components with sub styles.
| |
index : int
Index to be removed.
|
| |
isDefault : bool
When true, removes the definition from the element's default definition list.
|
| |
returns : StyleDefinition
Returns the StyleDefinition just removed if successfull, null if the definition could not be removed due it it not being in this elements definition list, or index out of range.
|
|
|
|
_setActualPosition(x, y)
|
CanvasElement
|
Sets the elements position within its parent. Note that if the element is transformed or rotated,
this sets the elements position within its transformed plane. If you wish to position a transformed
element relative to its parents coordinate plane, use _setRelativePosition(). This should typically
only be called from within the parents layout phase.
| |
x : int
The X position to move the element.
|
| |
y : int
The Y position to move the element.
|
|
|
|
_setActualRotation(degrees, centerX, centerY)
|
CanvasElement
|
Sets this elements rotation degrees and rotation point relative to its parent. This should typically
only be called from within the parent's layout phase.
| |
degrees : Number
Degrees to rotate the element (clockwise).
|
| |
centerX : Number
The X position relative to the elements parent to rotate around.
|
| |
centerY : Number
The Y position relative to the elements parent to rotate around.
|
|
|
|
_setActualSize(width, height)
|
CanvasElement
|
Sets this element's size in pixels prior to any transformation or rotation.
This should typically only be called from within the parents layout phase.
| |
width : Number
The width in pixels to size this element.
|
| |
height : Number
The height in pixels to size this element.
|
|
|
|
_setChildIndex(element, index)
|
CanvasElement
|
Changes a child element's index.
| |
element : CanvasElement
Child element to change index.
|
| |
index : int
New index of the child element.
|
| |
returns : boolean
Returns true if the child's index is successfully changed, false if the element is not a child of this element or the index is out of range.
|
|
|
|
_setListData(listData, itemData)
|
CanvasElement
|
This function is called when the element is being used as a DataRenderer for containers
like DataList and DataGrid. Override this function to make any changes to the DataRenderer
per the supplied DataListData and itemData objects. Update any styles, states, add/remove children, call any
necessary _invalidate() functions, etc.
| |
listData : DataListData
A DataListData or subclass object passed by the parent DataList or subclass with data necessary to update the DataRender like the parent DataList reference and row/column index being rendered.
|
| |
itemData : Object
The data Object (such as row data) supplied by the implementor's ListCollection to render the row/column DataRenderer.
|
|
|
|
_setListSelected(selectedData)
|
CanvasElement
|
This function is called when the element is being used as a DataRenderer for containers
like DataList and DataGrid to change the DataRenderer's selection state.
Override this function to make any changes to the DataRenderer per the selection state.
Update any styles, states, add/remove children, call any necessary _invalidate() functions, etc.
| |
selectedData : Any
Selected data, differs per container.
|
|
|
|
_setRelativePosition(x, y, relativeToElement)
|
CanvasElement
|
Sets the elements position relative to a supplied element regardless of this element's transformation,
depth, or position in the display hierarchy or relation to the supplied relativeToElement. This should typically
only be called during the parent element's layout phase. Setting relativeToElement to null has an identical
effect to calling _setActualPosition(). This is used by some containers to position the element relative
to a parent's coordinate plane rather than the child's transformed plane.
| |
x : Number
The relative X position to move this element's position.
|
| |
y : Number
The relative Y position to move this element's position.
|
| |
relativeToElement : CanvasElement
The CanvasElement to move this element relative too.
|
|
|
|
_setStyleDefinitions(styleDefinitions, isDefault, styleNamesChangedMap)
|
CanvasElement
|
Replaces the elements current style definition or default definition lists.
This is more effecient than removing or adding style definitions one at a time.
Default definitions are used when styling sub components with sub styles.
| |
styleDefinitions : StyleDefinition
May be a StyleDefinition, or an Array of StyleDefinition
|
| |
isDefault : bool
When true, replaces the default definition list.
|
| |
styleNamesChangedMap : Object
Optional - A empty map object - Object.create(null) to populate style changes due to swapping definitions while this element is attached to the display chain. When specified (not null), does not automatically invoke style changed events.
|
|
|
|
_setStyleProxy(styleProxy)
|
CanvasElement
|
Sets the element which is to proxy styles to this element. See getStyle() and StyleProxy.
This should be set prior to added this element to the display hierarchy via addElement() or _addChild().
| |
styleProxy : StyleProxy
The StyleProxy element wrapper to use to proxy styles from the proxy element to this element.
|
|
|
|


var daysOfWeekDisabled: Array<Int>
Days of the week that should be disabled. Multiple values should be comma separated.


Eviratec Software
View our app & website dev services
Join our mailing list
To stay informed about new products, services, and promotions.


Manchester United financial results: Red Devils announce slight rise in revenue at Old Trafford
by Press AssociationManchester United have posted revenues of £135.4million for the first quarter of 2019-20, with the figure representing a £400,000 increase on the same period for the previous year.
Commercial revenue was £80.4million, a 5.9 percent increase on the previous year, the club said in a financial statement.
United are expecting 2020 annual revenue to be down this year to somewhere between £560-580million, compared to £627.1million for the year ending June 30, 2019.
In part that will be due to the club's lack of Champions League football this season. Broadcasting revenue for the quarter was £32.9million, a 23.1 per cent and £9.9million drop on the same quarter the year before.
The figures published on Monday cover the period July 1, 2019 to September 30 of this year.
One of the most eye-catching points on the balance sheet is the increase of net debt, from £247.2million to £384.5million, a rise of 55.5 per cent.
The club's wage bill has dropped by 8.8 per cent "primarily due to reductions in player salaries as a result of non-participation in the UEFA Champions League", the statement said.
United's executive vice-chairman Ed Woodward said: "We have a clear vision in terms of football philosophy and recruitment.
"The significant investments that we have made in recent years in areas such as transfers, recruitment infrastructure, analytics and our academy are already beginning to bear fruit.
"We are very proud to be shortly approaching a milestone 4,000th game featuring an academy player, and we are particularly optimistic regarding the considerable young talent currently coming through.
"Our ultimate goal is to win trophies by playing exciting football with a team that fuses graduates from our academy with world-class acquisitions."
United's on-field fortunes have improved in recent weeks after pressure had been growing on manager Ole Gunnar Solskjaer.
The team have won five of their last six matches in all competitions, and prior to that claimed a 1-1 draw at league leaders Liverpool.
They are seventh in the Premier League, nine points adrift of the Champions League qualification places.


EvenLighterWallet
New Wallet
Create New Wallet
Restore Wallet
Restore wallet from Seed
Address
Refresh
Send Ether
From:
To:
Ether:
Send Ether
Show Seed
Show Seed


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/problems.20with.20coercion.20to.20function.html ---
Can someone explain to me how I should convince Lean that f
and g
can be coerced to a function in the assumption h
on this line: https://github.com/leanprover-community/mathlib/pull/1064/files#diff-694e7969af05a14241540bb2e6204a01R1132
@[extensionality] lemma ext {f g : β ≃ₗ[α] γ} (h : f.to_fun = g.to_fun) : f = g := to_equiv_injective (equiv.eq_of_to_fun_eq h)
I can't write (h : (f : β → γ) = g)
. I also can't write (h : ∀ x:β, f x = g x)
.
Put it later in the file, so it's after the has_coe
instance.
Oooh, that was silly.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


{% extends "layout.html" %} {% load static from staticfiles %} {% block static %} {% endblock %} {% block content %}
Some of the most popular courses students start with
Track
{{course.description}
{{course.description|truncatewords:12}}


risk \documentclass[pt]{minimal} \setlength{\oddsidemargin}{-pt} \usepackage{amsbsy} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{upgreek} \usepackage{wasysym} contributions game loss climate wealth round individuals rich players poor curves effects losses probability change contribute \ast collective player < {border-style case individual px;} #ffffff;} (Fig. heterogeneity games potential threshold round, total behavior collective-risk linear multiple Fig. \begin{document}$$c_{\mathrm{R}}^ best events evolutionary fraction inequality payoff timing Change Clim. However, contribution different event public random strategy values \begin{document}$$c_{\mathrm{P}}^ \frac{W}{{\lambda \frac{{W_{\mathrm{R}} \le _{\mathrm{R}} _{\mathrm{R}}}}$$\end{document} curve response results round. single \left( cooperation explore rounds set Sci. consider function group population ≤ (Eq. ./nclimate Nat. Supplementary Thus, \ast$$\end{document} \begin{document}$$\frac{{W_{\mathrm{R}} \hfill act catastrophic depends endowment game, global intermediate large lose px; size {font-family $$\end{document} Evolutionary Santos University W_{\mathrm{P}}}}{{\lambda \lambda} average cooperative font-size given goods high individuals, initial lost low stable thresholds uncertainty )). ./pnas. ./s--- Acad. Natl Proc. Traulsen USA \begin{document}$$C \begin{document}$$\lambda \lambda \right) _{\mathrm{R}}}} condition decision deviation double; factors fixed four-round general generation, long quickly reduce remaining shape standard used various (games Abou Chakra Econ. Methods Nature Pacheco R R ≥ W_{\mathrm{P}}$$\end{document} W_{\mathrm{P}}}}{{W_{\mathrm{P}}}}$$\end{document} \ge \right)\left( affect assume border-color border-width c_{\mathrm{P}} cases climatic contributions. current depend developed difficult dynamics effect effects, example, future game. groups higher influence lead model mutation mutations played possible power rounds. setup similar situations solid; state tend unpredictable wait {font-style {font-weight μ = ., − > Commons Creative C = Heterogeneity N = , Press, R ≤ \begin{document}$$\pi \right]} action analyze behavior, beneficial bold c_{\mathrm{R}}} change, commons courier; dangerous differ dilemmas disaster distribution efforts em; end event. expected experimental failure far, framework functions future. good happens increase increases investment know leads longer material model, number perceived players. problem pt;} rate recover requires risk, risks. rounds, scenario scenarios shown social subjects successful theoretical timings tragedy typically uncertainties use value {C_r} {W_{\mathrm{P}} {W_{\mathrm{R}} =


The goal of this project is to port the previously built pattern recognition project onto android platform. The program is a mixture of Java, C++ and OpenCV.
Please refer to the link below if you are interested in my previous work, the Stage 1.
Android Phone with Android ver. 5.0 or Higher
Rear camera supporting resolution 1920x1080 100MB or more space to install the package
(Tested on: Pixel2, Samsung Note 4 and OnePlus 5)
In order to have stable exposure and white balance, extra lighting is expected. In this project, I chose external LED lighting (from an iPhone 6s or from a desk lamp) instead of the built-in flash light because the position of the flash is too close to the sample and it causes over-exposure. In the future, the development of a mounted lighting paired with the program is necessary.
As long as the package is downloaded, users can build and install the apk with Android Studio.
Android/Java
The Java portion is responsible for the camera control, external storage access and user interface.
The User Interface
At the first time opening the program, two pop-up windows would show and ask for permission using camera and storage. Once the user agrees, a preview mode would show as in screenshot below.
The user should align (roughly) the test pattern with the blue rectangle, make sure the tiny circles aligned with the long sides of the blue box, check if the focus is correct and press the capture button for the analysis process to begin.
Once the analysis finished, a pop-up in the center would show to provide the average saturation
value of this analysis. Another pop-up at the buttom indicates the path and the file name of the unprocessed image file. The image is stored in the folder named as the program.
If the reading is not as expected, the user can refer the image stored in the root folder of the storage. The file has the same name of the image file in the application folder except with a prefix of the saturation reading. In the image, the user is able to see where the program extracts reading.
Occasionally, there could be no detections at all. If things like this happen, the pop-up in the middle would show No test area recognized
to remind the user to recapture.
The layout is with RelativeLayout
to ensure the position of the buttons doesn’t change on phones with different resolution. The blue rectanle is however needed to be adjust to fit the phone. It is not due to the resolution but due to the different minimum focus distance of the camera used. The setup in this program should work on most phones.
Once the CAPTURE
button is clicked, two pop-up windows would show. One in the center indicates the average saturation value of the test area it captured. Another is the location and the file name of the stored image. Please note there are two images being stored. Both are under the application sub-foler in the Gallery folder. Users can check both of the images and retake if the features are not well-recognized or the picture is blurry or shaded.
Below is a demostration of how a picture with false detection look like. One of the circle is not within the test area. When a detection like this shows, it is suggested that the user to redo the capture.
A good detection is as illustrated below where all the circles are within the test areas.
The Camera2 Package
From API 21 (ver. 5.0), the new camera2 replaces the camera package. The core function is the same. In the program, I locked the capture resolution to 1920x1080 to save the bandwidth and to shorten the processing time. Also, the resolution should work on most of the phones. In the takePicture
function, we look for the preset and output an error log if the preset is not within the supported resolution list.
CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraDevice.getId());
Size[] jpegSizes = null;
if (characteristics != null){
jpegSizes = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
.getOutputSizes(ImageFormat.JPEG);
}
if (jpegSizes != null && jpegSizes.length > 0){
for(int i=0; i<jpegSizes.length; i++){
if (jpegSizes[i].getWidth() == width && jpegSizes[i].getHeight() == height){
break;
}
Log.e("ResolutionError", "Failed to find the target picture resolution");
}
}
The auto exposure was set to ON in this program and the flash is set to OFF since we use external lighting.
captureBuilder.set(CaptureRequest.CONTROL_AE_MODE, CameraMetadata.CONTROL_AE_MODE_ON);
captureBuilder.set(CaptureRequest.FLASH_MODE, CameraMetadata.FLASH_MODE_OFF);
After capturing the image, I convert the buffer to bitmap to store and to convert again to cv::Mat format fo C++ function to manipulate. Once the C++ function finish its work. We then display the detection result in the center by calling the toast
. And, we convert the cv::Mat back to bitmap and store both the raw image and the modified one. The opencv matToBitmap function and the store_img helper function do the trink in takPicture function.
JNI and C++ Part
In Java, I can not pass the Mat directly. In stead, JNI allows us to pass the address of the Mat to C++. So, here we use getNativeObjAddr()
to pass the address to C++ function. There are some helper functions to do the format conversion. You can refer to the source code listed in the bottom for details.
The c++ function is matProcessing, it takes the address of the Mat, and a boolean value of which mode it is with. The return value of the function is the average saturation value it collects.
satReading = matProcessing(imageGrab.getNativeObjAddr(), switchKey);
Most of the C++ function is the same as in the stage 1 except there is no color checker in the demostration so the calibration target is the pad itself. Originally, we store the images on the computer. On the android, we have the java part to use the buffer to store the image. Another modified Mat with features marked is stored back at the same address the JNI passed into C++.
OpenCV and CMakeLists.txt
To have the Android working with OpenCV, we need opencv-android-sdk
. And, to work with C++, at the time creating project, be sure to check C++ support.
My way making this project working with OpenCV is to import the OpenCV into the project and adding it to the app dependencies.
In the app/src/main folder, create a jniLibs
and copy the ABIs folders located in the /sdk/native/libs parent folder inside opencv-android-sdk. This is to build the code for corresponding ABIs. For example, the Samsung note 4 is armeabi-v7a
. During cmake, the program looks for corresponding library in these sub-folders.
the android studio supports cmake so I can modify the CMakeLists.txt to add OpenCV support. The modification includes set include directories, add_library, set lib_opencv property.
include_directories(WHERE THE OpenCV-android-sdk/sdk/native/jni/include LOCATES)
add_library( lib_opencv SHARED IMPORTED )
set_target_properties(lib_opencv PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libopencv_java3.so)
In this project, I don’t have the real samples to make the calibration and to fit the curve. Instead, I have the scanned digital pictures. So, the performance evaluation is based on the reading from printed pictures. (Here is the link to the folder of the images been processed.)
As illustrated below, there isn’t reading of 10mM due to reading not available with the mobile app. I also disabled the white balance/contrast enhancement function (simpleCB) to prevent overkill due to lower dynamic range. As you may find in my code, the exposure control is done by fixing the ISO and the exposure time. The white balance is control by the stable external lighting.
captureBuilder.set(CaptureRequest.SENSOR_SENSITIVITY, isoValue);
captureBuilder.set(CaptureRequest.SENSOR_EXPOSURE_TIME, exposureTimeValueInMilliseconds);
From the reading, we see that as long as we have a stable light source, we have roughly the same trend on the PC software and the Android application. One thing to note is that the mobile is not noise-proof, which means to get a proper reading, one might need to take a few shots to make sure. Plus, the mobile app doesn’t work with lower concentration.
Once I have samples with better resolution, for example, 5mM delta between each, I can evaluate the linearity in more detail.
Considering the use cases are normally not in lab environment, plus the sample we have are not with fine resolution, the linearity is not guaranteed. Thus, I would suggest to use the application as a reference but not as an instrument at this moment.
On the note 4, there are several open issues to be dealt with:
There isn’t permission window pop-up first time executing this program. The program still has the permission to access the camera and the storage. However, it uses the internal storage instead of the external one. this issue doesn’t show on the OnePlus phone and the pixel 2.
The image stored don’t show up before restart. This is related to the issue 1. To access the image in the photo or the galary app, a restart is necessary. Otherwise, one can access the image in the built-in explorer app.
Long capture gap: After taking a picture for analysis, the program captures the image and stores it. It then calls the creatCameraPreview function to return to the preview mode for next capture. However, it takes long time for the program to clear the cache and move back to the preview mode. If users face this failure, suspend/resume cycles solve this failure.
In order to support different features, I also plan to add a function so the users can draw a custom overlay, crosshair for example, to guide the program where the features locate. This can further prevent false detection and improve the accuracy.
If you are interested in the details of this application. Here is the link to this project. The OpenCV folder is removed due to size consideration so you need to add the module back to the project. If you want to try out this apk, the link to this apk is here. Feel free to contact me with any question.


Take a look at the code for how id's and classes are used.
See how you can set each border side.
The rounded retangle is created using a border radius.


Like the user ID, the group ID or GID is what the system really
uses to enforce permissions on files and processes. If two groups have the
same GID they will be considered equivalent when it comes to checking
permissions. When creating a new group, Webmin will fill this field with
a GID that is not in use by another group.


Example paragraph text to show how it's displayed within a card.
Example paragraph text to show what overlayed text looks like within a card.


Zimbabwe bans South Africa livestock import over disease fears
Zimbabwe has suspended imports of livestock and meat from South Africa for the second time this year after an outbreak of foot and mouth in the north of its neighbouring country.
In a statement on Friday, the agriculture ministry called the move "a precautionary measure designed to prevent the spread of the infection into Zimbabwe".
More:
In January, Zimbabwe joined Botswana and the Kingdom of eSwatini, formerly Swaziland, in suspending meat imports from South Africa while following the outbreak of the highly contagious foot and mouth disease.
Foot and mouth disease does not affect humans but poses a threat to cattle, goats and sheep.
The agriculture ministry said it had been notified by South African veterinary services that the latest outbreak had been identified at a farm in Limpopo province, close to the border with Zimbabwe.
Importation of live cattle, goats, sheep and pigs and related products had been suspended as authorities seek to identify the virus strain and extent of the outbreak, the ministry said.
Zimbabwe imports livestock from South Africa for breeding as well as meat products.


BRAM STOKER'S DRACULA A film review by Robert Dorsett Copyright 1992 Robert Dorsett
Gary Oldman stars as the vampire, who's been simmering away in his castle for several hundred years. He invites Jonathan Harker (Keanu Reeves) to his castle in Transylvania, to sign and deliver a real estate deal: the count wants to move to London (happy hunting grounds?). While Harker is there, the Count learns of the existence of Mina (Winona Ryder), who is Harker's fiance, but who also bears an uncanny resemblance to the count's betrothed, who died in tragic circumstances, several hundred years earlier. The count feels his destiny drawing him to London; the rest of the movie revolves around (a) his attempts to seduce Mina, (b) the vampire-killer Van Helsing's (Anthony Hopkins) attempts to find and kill him, (c) Harker's attempts to escape from the er, vamps holding him in the castle, and (d) a major plot-crisis involving Mina's somewhat ah, flirtatious friend, Lucy.
Before proceeding, let me confess that I've never read Stoker's novel, which the hype says this movie is faithful to. Maybe it is, maybe it isn't. I don't know. I have seen just about all the *movies*, though, my favorite of which, by far, is the Frank Langella version. Just so you know where I'm coming from.
So, does this one work? Not really. It's an attractive movie, but very choppy; several audience members confessed to some confusion, after it, as to what they had just seen. Some scenes are just plain BAD (especially the opening scenes introducing Mina and Lucy), so contrived that it's embarrassing to see them included.
I didn't see much in this movie that lived up to its hype (net or otherwise). When I think "Dracula," I think three things: "tragedy," "love story," and "horror," in about that order. This movie reversed the priority, and didn't really make much of the first element, until the *very* end.
I would suggest that for a Dracula movie to work, you have to have a sympathetic vampire. And this vampire wasn't sympathetic. By playing up the horror, they had to de-humanize the vampire: the movie deals more with Mina than Dracula. And Mina's a fairly one-dimensional character.
The problem is, the horror didn't really work: it was more repulsive than frightening; Lucy wasn't a particularly endearing character to get worked up about, and Mina was a tad bit whiny; Harker's exploits were of interest, but his eventual escape just wasn't terribly believable. Even Hopkins's Van Helsing fell flat, his flippant remarks in "polite" company about chopping off heads and removing hearts quickly becoming old (very nice sense of menace, though, as to what he MIGHT do if the various characters didn't answer his casual questions in just the right way). Perhaps I'm getting old, but I'm just not impressed by crosses spurting blood, or latex masks, anymore: effective horror movies, to me, emphasize the monsters *within* men (or women).
The music is monotonous, and doesn't help the story along any: this is an opera, but only has episodic theme music.
How about the cinematography? It is unique; I'll give it that, and often visually attractive. Did it help the story along, any? Not reaaaaally.
Acting? I don't see why people are commenting about Reeves: he was perfectly adequate for the part. Hopkins was interesting, but a bit flat. Oldman had a great deal of fun as Dracula, but, again, failed to convey that essential "something" to divide our loyalties between him and the "good guys."
So what did this movie add to the canon? Namely: the nature of Dracula's fall from grace, and his intense interest in Mina. Dracula is also explicitly identified as Vlad the Impaler (the "Draculs" were a line of "defenders of Christianity," who were "betrayed" by the church). The aggressiveness of Mina's behavior late in the movie was of interest, but the metaphysical relationship between her and her predecessor (and why she apparently *rationally* found the vampire so interesting) was not well established. Of particular interest is how Vlad's trial as a vampire ultimately ends in absolution, thus giving a meaning, of sorts, to all the madness...
It is worth seeing. The second half is much better than the first half; if the quality of the last 30 minutes had been sustained for the rest of the movie, this would be very good, indeed. 2.5 stars (out of four), +1 on the [-4,+4] scale, a 5 on the 0-10 scale. Catch it matinee.
--- Robert Dorsett<EMAIL_ADDRESS>...cs.utexas.edu!cactus.org!rdd
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


On Saturday, January 20th, 2018, TEDx Gunn High School will host the eight iteration of its annual conference in the Palo Alto High School Haymarket Theatre. The theme this year is Crossroads.
Registration is now open!
Mike Johnson is an FBI officer who will find you and arrest you for the IRS tax evasion. He somehow got out of jail and is hiding out in Riverside. He will find you.


Mahmudul Hasan
Designer & Front End Developer
About Me
My name is Mahmudul Hasan, living in Lisbon, Portugal. I started learning Front End Web Development from October, 2017 with a Google funded Scholarship by Udacity. I started feeling this is my passion, and I enjoy working with it. I worked almost eight years in restaurants for living. Though my background was in Business Studies and Political Science. Finally, I found something with Front End Web Development exciting.
My Skills
Responsive Web Design
Responsive web design (RWD) is an approach to web design which makes web pages render well on a variety of devices and window or screen sizes. Recent work also considers the viewer proximity as part of the viewing context as an extension for RWD.
Javascript/jQuery
JavaScript (JS) is a lightweight interpreted or JIT-compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.
HTML5/CSS3
HTML5 is the latest evolution of the standard that defines HTML. The term represents two different concepts. And CSS3 is the latest evolution of the Cascading Style Sheets language and aims at extending CSS2.1.


Don't Worry, Your Marvel Movies Aren't Stopping Anytime Soon
by Germain LussierThis summer, Marvel Studios announced titles for all its movies coming out through 2021. A few months later, we found out what movie was coming out in May 2022. At that point, the last movie on the studio’s schedule was slated for July of that year. Now, it goes much further than that.
Disney just announced a tonne of new release dates, almost all of which are just placeholder “Untitled” films. Most are labelled as Fox movies. But scattered in the huge list are five new Marvel Studios movies: one more in 2022, and then four in 2023.
So, yeah, those Marvel Studios movies aren’t stopping anytime soon.
Here’s the full list of what’s coming to cinemas from Marvel Studios, for 2020 and beyond:
- May 1, 2020: Black Widow
- November 6, 2020: The Eternals
- February 12, 2021: Shang Chi and the Legend of the Ten Rings
- May 7, 2021: Doctor Strange in the Multiverse of Madness
- November 5, 2021: Thor: Love and Thunder
- February 18, 2022: Untitled
- May 5, 2022: Black Panther 2
- July 29, 2022: Untitled
- Oct. 7, 2022: Untitled
- Feb. 17, 2023: Untitled
- May 5, 2023: Untitled
- July 28, 2023: Untitled
- Nov. 3, 2023: Untitled
Those last five are the new ones, and they could be anything, from titles we already know are in the works – like Guardians of the Galaxy 3, Captain Marvel 3, Ant-Man 3, or Blade – to maybe even some Fox stuff, like X-Men, Fantastic Four, or Deadpool. And no, you aren’t going crazy; as of now, we’re getting four Marvel Studios movies in 2022 and four more in 2023. That’s on top of all the Disney+ stuff coming a little before that. Marvel Studios isn’t going anywhere – in fact, it’s busier than ever.


- Remaster is easy to use, powerful and configurable.
- Remaster is safe and stable. Unlike other operating systems, it is not prone to computer viruses or spyware, it does not suffer from disk fragmentation, and it has no registry that requires periodic cleaning.
- Remaster can detect other operating systems and install itself beside them. You can choose which operating system to launch when you start the computer.


--- title: Sebastian Kunz | About layout: basic_page ---
Hi, my name is Sebastian and I am a Software Developer from Germany.
I am currently working for Mercedes-Benz Tech Innovation GmbH, a Mercedes-Benz AG subsidiary, in Stuttgart (Germany). My interests are mainly focused on backend development and operations, but I also like frontend development for mobile applications.
Born and raised in and around Stuttgart, my passion for cars, especially Mercedes-Benz, developed early. After finishing my high school (german: Gymnasium), I started my Software Engineering studies at the University of Stuttgart.
During my studies, I got a student trainee at Daimler TSS GmbH (now Mercedes-Benz Tech Innovation GmbH) and after finishing my Bachelor of Science in Software Engineering I joined Daimler TSS as a Software Developer. This was (and still is) a dream come true. Working for the inventors of the automobile.


Ex-Japan PM Nakasone dies at 101
Former Japanese prime minister Yasuhiro Nakasone, famed for his friendship with Ronald Reagan and reforms passes away at age 101,
by AFPFormer Japanese Prime Minister Yasuhiro Nakasone, an ardent conservative who worked to forge a stronger military alliance with the United States, has died at the age of 101, local media said Friday.
In office for five years from November 1982 to November 1987, Nakasone was known for trying to integrate the nation defeated in World War II as a full-fledged member of the West during the Cold War era.
He poured his efforts into strengthening security ties with the US at a time of intensifying trade friction with the world's biggest economy, building a first-name friendship with America's then president Ronald Reagan.
In his inaugural speech in 1982, Nakasone said Japan's basic foreign policy is to become "a member of the free world led by Europe and the United States," and described the US as "the most important partner for Japan."


This article covers basics of OAuth 2 and explains how to implement oAuth provider for authenticating a set of REST APIs. Implementation is explained keeping rails (2.3.x) in mind.
Scope -
To provide a way for other applications to use our APIs by authenticating and authorizing through Oauth.
This should cover the following -
- Server flow as described in Oauth 2.0 (We follow v22 spec of Oauth - http://tools.ietf.org/html/draft-ietf-oauth-v2-22)
- Endpoint for clients to request authorization code.
- Endpoint to request an access token using the authorization code.
OAuth 2.0 Spec & discussion -
There are 4 different types of token grant are available. We use two of them which are famous and applicable to majority of the cases.
1. Grant type - password
+--------+ +---------------+
| |--(A)- Authorization Request -> | Authorization|
| | (with username, password) | Server |
| |<-(D)----- Access Token ------- | |
| | +---------------+
| Client |
| | +---------------+
| |--(E)----- API request ------> | Resource |
| | (With access token) | Server |
| |<-(F)------ API response ------- | |
+--------+ +---------------+
The following are the important points from our oauth implementation.
- The token exchange and authentication will happen over SSL so that the token security is not compromised.
-
The access token is expired every 2 days. (This can be kept as less as possible to avoid security risks.)
- Though ‘refresh_token’ is recommended to regenerate access token, to keep the implementation simple in some apps, every time a token is expired user can be forced to has to enter his username and password with the client and get the access token generated.
Sample Oauth Request and Response -
Request URI - https://api.myauthserver.com/api/authentication/token
Parameters - client_id, client_secret, grant_type, username, password.
-
The value of grant_type should be - passsword
-
The default value of format is xml.
Successful authentication response -
1. XML -
<oauth2-token>
<access-token>6uJ0xn1mynyh9UZZ3gC46L8UPImLv6r9fsEWmz9T</access-token>
<token-type>bearer</token-type>
<expires-in>5183999</expires-in>
</oauth2-token>
2. JSON -
{"oauth2_token":
{"token_type":"bearer",
"expires_in":5183999,
"access_token":"WFfKQaElw1dvNggDK4eBuiyNbrcS2xajCDs2LI2p"
}
}
Failed authentication Response -
1. XML -
<api>
<response>
<error>
<description>invalid_user</description>
<error-code>ERRR00005</error-code>
</error>
</response>
</api>
2. JSON -
{"api":
"response":
{"error":
{"description":"invalid_user","error_code":"ERRR00005"}
}
}
2. Grant type - auth_code
+--------+ +---------------+
| |--(A)- Authorization Request ->| Resource |
| | | Owner |
| |<-(B)-- Authorization Grant ---| |
| | +---------------+
| |
| | +---------------+
| |--(C)-- Authorization Grant -->| Authorization |
| Client | | Server |
| |<-(D)----- Access Token -------| |
| | +---------------+
| |
| | +---------------+
| |--(E)----- Access Token ------>| Resource |
| | | Server |
| |<-(F)--- Protected Resource ---| |
+--------+ +---------------+
Sample oAuth Requests and Response
STEP 1: Client app sends a request to authorize url of myauthserver -
- The Client application sends a request to the authorize url of myauthserver.
Request URI -
https://api.myauthserver.com/api/authentication/oauth/authorize?response_type=code&client_id=<client_app_id>&redirect_uri=<client_app_redirect_uri>
This redirects user to a login page.
1. On successful login and authorize -
-
The user will be redirected to
<client_app_redirect_uri>?code=W25JoW2cktPurc7vpBaI
-
The client sends a request to the token url mentioned above and receives token.
-
The only difference is that the grant_type param value should be authorization_code when requesting for token.
2. On unsuccessful login and authorize -
-
The client will be redirected to
<client_app_redirect_uri>?error=<error_description>
-
The most common error_desription will be access_denied
STEP 2: 1. Client app sends a request for access token-
The Client application sends a request to the token url of myauthserver.
Request URI - https://api.myauthserver.com/api/authentication/token
Parameters - client_id, client_secret, grant_type, username, password,
-
The value of grant_type should be - authorization_code
-
The response for this call is same as the one we have above for password grant_type.
Implementation -
Providing OAuth Service -
The service provision for Oauth is developed by inspiring from the plugin - https://github.com/pelle/oauth-plugin
This gem does not cover the complete flow but it can be used base and the tweaks can be made to incorporate it with your app flow.
Prerequisites -
This plugin requires oauth2 gem to be installed. App should use restful_athentication or any other equivalent plugin.
Note -
One more alternative explored was - https://github.com/ThoughtWorksStudios/oauth2_provider
It has a cleaner design but we are not using it as it only supports version 2-09 of OAuth 2.0 spec as of the date.
Consuming OAuth service (for clients) -
The Oauth plugin ()https://github.com/pelle/oauth-plugin) has some code which can be tweaked to implement a client for the Oauth service.
In addition to this we can also use the following ruby based libraries to implement clients-
https://github.com/intridea/oauth2
https://github.com/aflatter/oauth2-ruby
Oauth2 is the industry standard for the authentication of APIs as of now and it is recommended to use this for any web services without a second thought.


Go Back
Add new User
Email address
First Name
Last Name
Login/ User name
Login/ Password
Show Password
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


Defines |
| #define | UNIGEEZLIBAPI __declspec(dllexport) |
| #define | wparam newMsg->wParam |
| #define | msg newMsg->message |
Functions |
| BOOL CALLBACK | LibMain (HANDLE hModule, DWORD dwReason, LPVOID lpReserved) |
| LRESULT CALLBACK | MsgFilterFunc (int nCode, WPARAM wParam, LPARAM lParam ) |
| LRESULT CALLBACK | CBTFilterFunc (int nCode, WPARAM wParam, LPARAM lParam ) |
| int CALLBACK | InitHooksDll (const HWND hwndMainWindow, char _appName[][MAX_CH], char _format[][MAX_CH], const int _howmany) |
| | appName, format, & howmany are read into shared memory.
|
| int CALLBACK | setFontSize (const int size, HWND hDlg) |
| | sets the current font size.
|
| HMODULE | ModuleFromAddress (PVOID pv) |
| | returns the HMODULE that contains the specified memory address.
|
| BOOL WINAPI | InstallFilter (INT nCode) |
| | Install / Remove Filter function.
|
| LRESULT CALLBACK | MsgFilterFunc (INT nCode, WPARAM wParam, LPARAM lParam) |
| | global for this function and the next.
|
| LRESULT CALLBACK | CBTFilterFunc (INT nCode, WPARAM wParam, LPARAM lParam) |
| | Filter function for the WH_CBT hook. More...
|
Variables |
| HANDLE | hInstance |
| BOOL | InitCalled = FALSE |
| | DLL instance handle.
|
| BOOL | hookState = FALSE |
| | whether the hook is installed.
|
| FARPROC | msgHookProc = { (FARPROC) MsgFilterFunc } |
| | state of hooks.
|
| FARPROC | cbtHookProc = { (FARPROC) CBTFilterFunc } |
| | address for msg filter function.
|
| bool | ExcelMode = false |
| | address for CBT filter function.
|
| HWND | hwndUniGeez = NULL |
| | are we in Excel?? Shared DATA set up between UniGeez and the injected dll only one per instance of the UniGeez interface.
|
| HHOOK | hMsgHook = NULL |
| | main handle from UniGeez Transliterator.
|
| HHOOK | hCBTHook = NULL |
| | handle to the installed WH_GETMESSAGE hook.
|
| HWND | hCurrent = NULL |
| | handle to the installed WH_CBT hook.
|
| HWND | hFontDlg = NULL |
| bool | useRtf = false |
| | handle to dialog box in UniGeez (not used) determines what format is to be used.
|
| bool | useHtml = false |
| bool | useUnicode = true |
| int | howmany = 0 |
| int | fs = 12 |
| bool | oneTimeReadFile = true |
| | used to determine font size format info read in from UniGeez userinterface window.
|
| const int | MAX_APPS = 100 |
| const int | MAX_CHARS = 80 |
| char | appName [MAX_APPS][MAX_CHARS] = {"\0"} |
| char | format [MAX_APPS][MAX_CHARS] = {"\0"} |
| struct NTandWord | NTandWord |
| | Filter function for the WH_GETMESSAGE. More...
|


Orange
Apple
Banana
Cherry, disabled
Grape, checked, disabled
Kiwi, (ionChange) Secondary color
Strawberry, (ionChange) checked="true"
Checkbox right, checked, really long text that should ellipsis
Checkbox right side
Button w/ right side default icon, really long text that should ellipsis
Custom
Stop Immediate Event Propagation
Grape Checked
Grape Disabled
Print Form
Stand-alone toggle:


Enter your details to complete the reservation.
Please enter a valid name.
Please enter a valid email.
Please enter a valid mobile number that contain 10 numbers.
Please choose 1 option.


Picture By : Trevor Cole (Creative Commons Certified)
Ethiopian White Collars (E-W-C) is a web-site based application. This site is dedicated to mobilizing professional Ethiopians to create in-person networking, in Ethiopia. Our principle relies on networking, sharing ideas & be a means of knowledge transformation. We aim to fly very high altitude with high professionalism, just like an Eagle.


-
I think I rediscover this every 6 months, but a thermos of coffee is a great thing to bring with me in the morning.
-
Written Log: blog
Video Log: vlog
Audio Log: alog? aug? augh? ugh?
-
With hindsight, it seems bloody obvious the Sun and not the Earth is the center of the solar system. Occam's razor and all that.
-
.@kjaymiller No, Peach is just a new version of the same thing. For now I've got my own microblog. Twitter is becoming just chat for me.
-
PSA: Never remove the Logitech adapter from your Mac, not even for 2 minutes. You'll forget to put it back, and you'll be sad at work.
-
As of today, I won't really be posting to Twitter anymore. I'll still reply, and DM, but all of my normal tweets will be auto-posted from my Microblog.
http://sonicrocketman.snippets.xyz
-
Posting to Hacker News is so hit or miss.
-
Breaking up is hard to do (A breakup letter to Twitter)
-
Coffee. It's the good stuff.
-
I have not seen the new Star Wars Trailer.
-
Today has been a whirlwind of a day.
-
Got some new data in today. Time to start digging.
-
Though, since I'm not a biologist, I probably won't be able to tell.
-
Got this DNA analysis going. Hopefully it leads to something interesting.
-
Hello world and all who inhabit it!


Welcome to KellyCTF
Diabolical riddles devised by a scintillating intellect...
InstaHam
Uncle Jim-Bob