UIStatic (not a class)

Namespace: TSUI.UI
Extends: N/A
Implements: N/A
Exported: N/A
JSDoc status: Complete

Associated source files:

Description

Contains static UI handling variables, functions and event methods.

Variables

OpenWindows: number = 0;
This is used to keep global track of the number of open windows so that new windows can have z-index set so they are on top.
JustUsedTabKeyTime: number = 0;
The time when the tab key was last pressed. Used in tab key overriding.
CurrentFocusedControl: IControl = null;
Keeps global track of which control currently has focus. Used in global keyboard events to invoke them on the correct control.
_currTabIndex = 0;
The current max allocated tabindex so new controls can have new tab index assigned.
Global_MouseUpEvent: Events.MouseUpEvent = new Events.MouseUpEvent();
This event is attached the the global document mouse up event. This event handles tab key management and then passes the event off to the currently focused control.
Global_MouseMoveEvent: Events.MouseMoveEvent = new Events.MouseMoveEvent();
This event is attached the the global document mouse move event. This event reduces the number of mouse move events that are attached to improve performance by reducing the load on the DOM.
preventTabKey: bool = false;
Whether to prevent the tab key event. This used primarily by List controls which use out of order tab indexing so override tab key functionality.
OnKeyDown_Global_First = function (jqEvent: JQueryEventObject)
Each control attaches its own key down event. This method is called by the key down handling control immediately before the control handles the event. The return value is currently irrelevant.
OnKeyDown_Global_Last = function (jqEvent: JQueryEventObject)
Each control attaches its own key down event. This method is called by the key down handling control immediately after the control handles the event. The return value is returned by the handler.

Private Event Handlers

document : OnMouseUp
Adds and handles the document mouse up event. Standardises the event then invokes Global_MouseUpEvent. After invoking the event it defocuses the current control.
document : OnMouseMove
Adds and handles the document mouse move event. Standardises the event then invokes Global_MouseMoveEvent.
document : OnKeyUp
Adds and handles the document key up event. If the tab key is pressed it defocuses the currently focused control.

Last edited Jul 27, 2013 at 1:33 PM by EdwardNutting, version 3

Comments

No comments yet.