Image Control. It defines bittmap or vector image.
Properties
-
bg : BGDrawing
Background drawing, it holds instance of BGDrawing to decorate background.
-
bgPressed : BGDrawing
-
border : Drawing
Border drawing, it holds instance of Drawing to decorate border.
-
defaults : Object
Sets default controls options.
-
fg : TextDrawing
Foreground drawing, it holds instance of TextDrawing object to decorate text of Control.
-
fgPressed : TextDrawing
-
height : Integer
Height of the Image (in pixels). Size of picture is recalculated based on the size of container(Moscrif view).
-
initialisation : Boolean
Initialisation in progress.
-
layout : StackLayout
StackLayout used to layout elements into the object.
-
left : Integer
X - coordinates of Control's position.
-
name : String
Name of the Control.
-
native : Any
Native, instance of native UI object(View,ScrollView,Window).
-
options : Object
Position of navigation bar.
-
paint : Paint
Paint property to decorate Image.
-
parent : Any
Parent, instance of native UI object where current Control is assigned. Basicaly is a container where control was added.(View,ScrollView,>Window)
-
skipDrawing : Boolean
Skip control drawing. It used if control is part of composite control what manage drawing bu itself.
-
source : Any
Source of the image. It allows instane of bitmap or instance of Path. If string is given, it tries to create bitmap from string location.
-
stretch : Symbol
Gets or sets if the view's width is stretchable.
-
this
Construct of the object calls following method in order.
-
top : Integer
Y - coordinates of control's position.
-
visible : Boolean
Visibility of the Control. Default is True.
-
width : Integer
Width of the Image (in pixels). Size of picture is recalculated based on the size of container(Moscrif view).
Methods
-
add(control,order = #front) : Component
Add child is not permitted in component.
-
afterInit()
After Init Control, set control defaults from current theme setting.
-
afterInitControls
Method is executed after init controls.
-
beforeInit()
After Init Control, set control defaults from current theme setting.
-
beforeInitControls
Method is executed before init controls.
-
drawImage(canvas, left = 0, top = 0, paint = this._paint)
Drawing of image to canvas.
-
focusable() : Boolean
Ability to have a focus.
-
getChildrenBounds() : MultiValue
Returns four values (left, top, right, bottom) of child's union content.
-
getChildrenSize() : MultiValue
Returns two values (width, height) of child's union content.
-
hasFocus() : Boolean
Returns true if this Control has focus. Otherwise, function returns false.
-
icon(width, height) : Control
Icon, other way how o set control image. It accept symbol of vector, location to bitmap, instance of bitmap or instance of path. This property can be used only if image is defined.
-
init()
Init Image controls.
-
init()
Init controls, native is Moscrif View.
-
invalidate()
This function ensure redrawing a rectangle, determined by parameters. Redrawing manages the function, which is set to onDraw event.
-
invokeValidator(sender) : Function
Invoke validation handler.
-
performLayout()
Performs (force) layout calculations.
-
resize(w, h)
Change image dimensions (do not keep aspect ratio).
-
resumeLayout()
Resume layer's recalculating.
-
setFocus() : Control
Function sets focus to the Control.
-
setLocation(left, top) : Control
Function to set control left and top position.
-
setSize(width, height) : Control
Function to set width and hight of control.
-
suspendLayout()
Pause layer's recalculating.
-
undefined(k,v)
Special property executed when priperty is undefined. It can be that JSON format is in format "key" : "value". Key is an string, so if this is the case methot return "value". Ass well as k is a regular property of the class it returns getter of this property.
Events
-
onChar(sender,charCode) : Function
This event is raised by release an UNICODE character key.
-
onDraw(sender,canvas) : Function
This event occurs, when it is necessary to redraw object. onDraw event is usually managed by skin.
-
onKeyPressed(sender,key) : Function
This event is raised by press the key.
-
onKeyReleased(sender,key) : Function
This event is raised by release the key.
-
onPointerDragged(sender,x,y) : Function
Called when touch (click) is moved.
-
onPointerPressed(sender,x,y) : Fucntion
Called when touch (click) is stared.
-
onPointerReleased(sender,x,y) : Function
Called when touch (click) is finished.
-
onProcess : Function
Callback function, which is called from the object every 25ms.
-
onResize(sender,charCode) : Function
Occurs when the control is resized.
-
onValidate(sender) : Function
On validate event, executed for each control.
|
|
|
 |
Badge
|
|
|
 |
Button
|
|
|
 |
CheckBox
|
|
|
 |
Image
|
|
|
 |
Label
|
|
|
 |
Row
|
|
|
 |
SwitchControl
|
|
|
 |
TextBox
|
|
 |
Application
|
|
 |
Controller
|
|
 |
Form
|
|
 |
Model
|
|