Developer   API   User Interface   Dialog   InfoDialog

  •  Config(0)
  •  Properties(25)
  •  Methods(23)
  •  Events(10)

InfoDialog : Dialog

Info dialog, displays modal window with message and button OK.

Example

include "lib://uix-skin/metro/skin.metro.ms" include "lib://uix/application.ms" include "lib://uix/form.ms" include "lib://uix/dialog/infoDialog.ms" include "lib://uix/dialog/confirmDialog.ms" var app = new Application({skin: new MetroSkin()}); var quit = false; app.onStart = function(sender) { var form = new Form(); app.add(form); // TODO: to example // dialog with only OK button var dialog = new InfoDialog({text : "Info dialog"}); // confirm button event dialog.onOk = function(sender) { logI("OK"); } // show dialog dialog.showModal(); } app.onProcess = function(sender) { return quit ? 0 : 1; } app.onKeyPressed = function(sender, key) { quit = true; } app.onDraw = function(sender, canvas) { canvas.clear(0xffdadada); } app.init().run();

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.
  • clipToBounds : Boolean
    Set/Get if the view is not clipped to its bounds.
  • defaults : Object
    Sets default controls options.
  • detach : UIX.View
    Remove this view form it's parent.
  • fg : TextDrawing
    Foreground drawing of Label.
  • fgPressed : TextDrawing
  • height : Integer
    Height of the Control (in pixels).
  • initialisation : Boolean
    Initialisation in progress.
  • label : String
    Dialog label.
  • 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.
  • overlay : Overlay
    Overlay prpperty, holds instance of Overlay.
  • 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.
  • stretch : Symbol
    Gets or sets if the view's width is stretchable.
  • text : String
    Text of Dialog.
  • 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
    Dialog width, it set dialog into middle of the screen.

Methods

  • add(control,order = #front)
    Add Control to container.
  • 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.
  • close()
    Hide dialog (modal window).
  • find(name) : Control
    Search for child Controls, which name is same as name from function's param.
  • 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()
    Info Dialog controls init.
  • invalidate()
    This function ensure redrawing a rectangle, determined by parameters. Redrawing manages the function, which is set to onDraw event.
  • performLayout()
    Performs (force) layout calculations.
  • removeAll()
    Remove all child controls from container.
  • 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.
  • showModal()
    Displays dialog as modal window.
  • 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.
  • onOk(sender) : Function
    On OK Event. What application should do when ok button is pressed.
  • 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.
API Navigation