Developer   API   User Interface   Application

  •  Config(0)
  •  Properties(22)
  •  Methods(34)
  •  Events(11)

Application : Screen

Application is base class in Enterprise application development.

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 Control (in pixels).
  • initialisation : Boolean
    Initialisation in progress.
  • keyboard : Keyboard
    Application Keyboard handler.
  • 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.
  • orientation : Symbol
    Orientation of application.
  • parent : Any
    Parent, instance of native UI object where current Control is assigned. Basicaly is a container where control was added.(View,ScrollView,>Window)
  • skin : Skin
    Skin property.
  • 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.
  • top : Integer
    Y - coordinates of control's position.
  • visible : Boolean
    Visibility of the Control. Default is True.
  • width : Integer
    Width of the Control (in pixels).

Methods

  • _loadSkin(skinName)
    Load skin instance.
  • add(form, force = false, order = #front)
    Funcian add forms to application.
  • 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.
  • 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.
  • hideAll()
    Function make all registered form invisible
  • hideKeyboard()
    Function makes keyboard invisible.
  • 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 class controls.
  • invalidate()
    This function ensure redrawing a rectangle, determined by parameters. Redrawing manages the function, which is set to onDraw event.
  • isForm(name) : Boolean
    Function checks if form with name exists in application
  • performLayout()
    Performs (force) layout calculations.
  • pop() : Any
    Function makes current form invisible and call on deactivation method, and makes previous form visible and call on activation method.
  • push(form)
    Functiom makes form visible, register form to application and raise onActivate method. If form is already registered in application, it makes form visible and raise onActivate method only.
  • quit() : Screen
    Function signals to terminate application.
  • remove(form)
    Remove form from application and raise on deactivate.
  • removeAll()
    Remove all child controls from container.
  • replace(form,remove=false)
    Function replace current form.
  • requestKeyboard(callback,keyboardType = #UIKeyboardTypeDefault) : Array
    Function for request of keyboard. Application can by system one or Moscrif keyboard.
  • resumeLayout()
    Resume layer's recalculating.
  • run() : Screen
    Run method, runs game or application.
  • 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(overlay) : Object
    Function shows modal window.
  • suspendLayout()
    Pause layer's recalculating.
  • this(options = {}) : Application
    Public constructor of Application class. This class is Singelton and application instance is stored in Application.instance variable. Once Application is constructing it check if options contains skin instance, if not application includes and set skin based on project settings.
  • undefined(k,v) : Form
    Make form instace accesible via application instance. If propery is undefined it looks for name of the form stored in application. In the case form with same name as requested property is stored in application it returns instance of the form.

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.
  • onQuit : Function
    On Quit Handler, executed when game or application ends.
  • onResize(sender,charCode) : Function
    Occurs when the control is resized.
  • onStart : Function
    This event appears, when application starts - only once during the application life cycle.