window.js

Summary
window.js
Window
Events
OnStartModalOccurs when modal window curtain is going to be displayed.
OnStopModalOccurs when modal window curtain is going to be removed.
ngStartModalControlShows modal window curtain.
ngStopModalControlHides modal window curtain.
ngCreateWindowCreates window by definition.
ngWindowThis class implements a generic window control.
Definition
CWClientRect width.
CHClientRect height.
ParentReferences...
ControlsPanelControls panel definition.
Properties
Text...
HTMLEncode...
BackgroundColor...
Sizeable...
Moveable...
Modal...
DisposeOnClose...
AutoSize...
Centered...
MinimizedBounds...
MinWidth...
MinHeight...
MaxWidth...
MaxHeight...
Buttons...
Img...
Frame...
CaptionImg...
Methods
ShowMakes a window visible.
HideMakes a window invisible.
CloseCloses the window.
MinimizeShrinks the window.
MaximizeExpands the window to its maximal size.
RestoreRestores a window to its normal size.
CenterCenters the window.
CalcAutoSizeCalculates automatic window dimensions.
GetClientRectGets client rectangle dimensions.
SetClientRectSets client rectangle dimensions.
IsMaximizedDetermines if window is maximized.
IsMinimizedDetermines if window is miminized.
SetTextSets window caption.
GetTextGets window caption.
GetImgGets image.
Events
OnGetText
OnGetImg
OnClick
OnDblClick
OnMinimize
OnMaximize
OnRestore
OnClose
OnMouseMoving
OnMouseMove
OnMouseResizing
OnMouseResize
ngCreateHintCreates hint by definition.
ngPopupHintCreates hint by definition.
ngPopupCtrlHintCreates hint by definition.
ngHintThis class implements a generic hint control.
Definition
CWClientRect width.
CHClientRect height.
ControlsPanelControls panel definition.
Properties
AutoSize...
MinWidth...
MinHeight...
MaxWidth...
MaxHeight...
Anchor...
Anchors...
PreferredAnchors...
Frame...
ControlsInside...
AutoHideTimeoutDefines the timeout in milliseconds when hint automatically hides itself (0=disabled).
DisposeOnHide...
PopupXHorizontal popup position in pixels.
PopupYVertical popup position in pixels.
PopupElmElement to which hint was aligned during popup.
Methods
PopupPopups hint at specified position.
PopupCtrlPopups hint along specified control.
GetClientRectGets client rectangle dimensions.
SetClientRectSets client rectangle dimensions.
CalcAutoSizeCalculates automatic window dimensions.
BorderCollisionCalculates the border overflow of popup.
BoundRectCollisionCalculates the collision of popup and given boundary rectangle.
Events
OnCheckPlacement
OnPopup
ngCreateTextHintCreates hint by definition.
ngPopupTextHintCreates hint by definition.
ngPopupCtrlTextHintCreates hint by definition.
ngTextHintSimple hint text component (based on ngHint).
Definition
ParentReferences...
Methods
SetTextSets hint text.
GetTextGets hint text.
Events
OnClick
OnSetText
OnGetText
Controls
HintngText

Window

Events

OnStartModal

Occurs when modal window curtain is going to be displayed.

Syntax

bool OnStartModal ()

Returns

FALSE if curtain shouldn’t be displayed.

OnStopModal

Occurs when modal window curtain is going to be removed.

Syntax

bool OnStopModal ()

Returns

FALSE if curtain shouldn’t be removed.

ngStartModalControl

function ngStartModalControl()

Shows modal window curtain.

Syntax

void ngStartModalControl ()

Returns

-

ngStopModalControl

function ngStopModalControl()

Hides modal window curtain.

Syntax

void ngStopModalControl ()

Returns

-

ngCreateWindow

function ngCreateWindow(def,
parent)

Creates window by definition.

Syntax

object ngCreateWindow (object def, object parent)

Returns

Created window object (ngWindow).

ngWindow

This class implements a generic window control.

Syntax

new ngWindow ([string id])

Parameters

idparent element

See also

Abstract class ngControl.

Summary
Definition
CWClientRect width.
CHClientRect height.
ParentReferences...
ControlsPanelControls panel definition.
Properties
Text...
HTMLEncode...
BackgroundColor...
Sizeable...
Moveable...
Modal...
DisposeOnClose...
AutoSize...
Centered...
MinimizedBounds...
MinWidth...
MinHeight...
MaxWidth...
MaxHeight...
Buttons...
Img...
Frame...
CaptionImg...
Methods
ShowMakes a window visible.
HideMakes a window invisible.
CloseCloses the window.
MinimizeShrinks the window.
MaximizeExpands the window to its maximal size.
RestoreRestores a window to its normal size.
CenterCenters the window.
CalcAutoSizeCalculates automatic window dimensions.
GetClientRectGets client rectangle dimensions.
SetClientRectSets client rectangle dimensions.
IsMaximizedDetermines if window is maximized.
IsMinimizedDetermines if window is miminized.
SetTextSets window caption.
GetTextGets window caption.
GetImgGets image.
Events
OnGetText
OnGetImg
OnClick
OnDblClick
OnMinimize
OnMaximize
OnRestore
OnClose
OnMouseMoving
OnMouseMove
OnMouseResizing
OnMouseResize
ngCreateHintCreates hint by definition.
ngPopupHintCreates hint by definition.
ngPopupCtrlHintCreates hint by definition.

Definition

CW

ClientRect width.  Type: integer

CH

ClientRect height.  Type: integer

ParentReferences

...  Type: bool Default value: false

ControlsPanel

Controls panel definition.  Type: object

Properties

Text

this.Text

...  Type: string

HTMLEncode

this.HTMLEncode

...  Type: bool Default value: false

BackgroundColor

this.BackgroundColor

...  Type: string

Sizeable

this.Sizeable

...  Type: bool Default value: true

Moveable

this.Moveable

...  Type: bool Default value: true

Modal

this.Modal

...  Type: bool Default value: false

DisposeOnClose

this.DisposeOnClose

...  Type: bool Default value: false

AutoSize

this.AutoSize

...  Type: bool Default value: true

Centered

this.Centered

...  Type: bool Default value: false

MinimizedBounds

...  Type: object Default value: undefined

MinWidth

this.MinWidth

...  Type: int Default value: 100

MinHeight

this.MinHeight

...  Type: int Default value: 100

MaxWidth

this.MaxWidth

...  Type: int Default value: 0

MaxHeight

this.MaxHeight

...  Type: int Default value: 0

Buttons

this.Buttons

...  Type: object

Img

this.Img

...  Type: object

Frame

this.Frame

...  Type: object

CaptionImg

this.CaptionImg

...  Type: object

Methods

Show

Makes a window visible.

Syntax

void Show ()

Parameters

Returns

-

Hide

Makes a window invisible.

Syntax

void Hide ()

Parameters

Returns

-

Close

Closes the window.

Syntax

void Close ()

Parameters

Returns

-

Minimize

Shrinks the window.

Syntax

void Minimize ()

Parameters

Returns

-

Maximize

Expands the window to its maximal size.

Syntax

void Maximize ()

Parameters

Returns

-

Restore

Restores a window to its normal size.

Syntax

void Restore ()

Parameters

Returns

-

Center

Centers the window.

Syntax

void Restore ()

Parameters

Returns

-

CalcAutoSize

Calculates automatic window dimensions.

Syntax

void CalcAutoSize ()

Parameters

Returns

-

GetClientRect

Gets client rectangle dimensions.

Syntax

object GetClientRect ()

Returns

Rectangle dimensions in format { W: width, H: height }.

SetClientRect

Sets client rectangle dimensions.

Syntax

void SetClientRect (object rect)

Parameters

rect{ W: width, H: height } Returns: -

IsMaximized

Determines if window is maximized.

Syntax

bool IsMaximized ()

Parameters

Returns

-

IsMinimized

Determines if window is miminized.

Syntax

bool IsMinimized ()

Parameters

Returns

-

SetText

Sets window caption.

Syntax

void SetText (string text)

Parameters

Returns

-

GetText

Gets window caption.

Syntax

string GetText (void)

Returns

Window caption.

GetImg

Gets image.

Syntax

object GetImg (void)

Returns

The image.

Events

OnGetText

OnGetImg

OnClick

OnDblClick

OnMinimize

OnMaximize

OnRestore

OnClose

OnMouseMoving

OnMouseMove

OnMouseResizing

OnMouseResize

ngCreateHint

function ngCreateHint(def,
parent)

Creates hint by definition.

Syntax

object ngCreateHint (object def, object parent)

Returns

Created hint object (ngHint).

ngPopupHint

function ngPopupHint(def,
x,
y,
anchor,
parent)

Creates hint by definition.

Syntax

object ngPopupHint (object def, int x, int y, string anchor, object parent)

Returns

Created hint object (ngHint).

ngPopupCtrlHint

function ngPopupCtrlHint(def,
ctrl,
anchor,
parent)

Creates hint by definition.

Syntax

object ngPopupCtrlHint (object def, object ctrl, string anchor, object parent)

Returns

Created hint object (ngHint).

ngHint

This class implements a generic hint control.

Syntax

new ngHint ([string id])

Parameters

idparent element

See also

Abstract class ngControl.

Summary
Definition
CWClientRect width.
CHClientRect height.
ControlsPanelControls panel definition.
Properties
AutoSize...
MinWidth...
MinHeight...
MaxWidth...
MaxHeight...
Anchor...
Anchors...
PreferredAnchors...
Frame...
ControlsInside...
AutoHideTimeoutDefines the timeout in milliseconds when hint automatically hides itself (0=disabled).
DisposeOnHide...
PopupXHorizontal popup position in pixels.
PopupYVertical popup position in pixels.
PopupElmElement to which hint was aligned during popup.
Methods
PopupPopups hint at specified position.
PopupCtrlPopups hint along specified control.
GetClientRectGets client rectangle dimensions.
SetClientRectSets client rectangle dimensions.
CalcAutoSizeCalculates automatic window dimensions.
BorderCollisionCalculates the border overflow of popup.
BoundRectCollisionCalculates the collision of popup and given boundary rectangle.
Events
OnCheckPlacement
OnPopup
ngCreateTextHintCreates hint by definition.
ngPopupTextHintCreates hint by definition.
ngPopupCtrlTextHintCreates hint by definition.

Definition

CW

ClientRect width.  Type: integer

CH

ClientRect height.  Type: integer

ControlsPanel

Controls panel definition.  Type: object

Properties

AutoSize

this.AutoSize

...  Type: bool Default value: true

MinWidth

this.MinWidth

...  Type: int Default value: 0

MinHeight

this.MinHeight

...  Type: int Default value: 0

MaxWidth

this.MaxWidth

...  Type: int Default value: 0

MaxHeight

this.MaxHeight

...  Type: int Default value: 0

Anchor

this.Anchor

...  Type: string Default value: ’auto’

Anchors

this.Anchors

...  Type: object

PreferredAnchors

...  Type: array

Frame

this.Frame

...  Type: object

ControlsInside

this.ControlsInside

...  Type: bool Default value: true

AutoHideTimeout

Defines the timeout in milliseconds when hint automatically hides itself (0=disabled).  Type: integer Default value: 0

DisposeOnHide

this.DisposeOnHide

...  Type: bool Default value: false

PopupX

Horizontal popup position in pixels.  Type: integer Default value: undefined

PopupY

Vertical popup position in pixels.  Type: integer Default value: undefined

PopupElm

Element to which hint was aligned during popup.  Type: integer Default value: undefined

Methods

Popup

Popups hint at specified position.

Syntax

void Popup (integer x, integer y [, string anchor])

Returns

-

PopupCtrl

Popups hint along specified control.

Syntax

void PopupCtrl (object ctrl [, string anchor])

Returns

-

GetClientRect

Gets client rectangle dimensions.

Syntax

object GetClientRect ()

Returns

Rectangle dimensions in format { W: width, H: height }.

SetClientRect

Sets client rectangle dimensions.

Syntax

void SetClientRect (object rect)

Parameters

rect{ W: width, H: height } Returns: -

CalcAutoSize

Calculates automatic window dimensions.

Syntax

void CalcAutoSize ()

Parameters

Returns

-

BorderCollision

Calculates the border overflow of popup.  Helper function for placement calculation.

Syntax

int BorderCollision (object placement, int left, int top, int right, int bottom)

Parameters

Returns

Affected area.

BoundRectCollision

Calculates the collision of popup and given boundary rectangle.  Helper function for placement calculation.

Syntax

int BoundRectCollision (object placement, int left, int top, int right, int bottom)

Parameters

Returns

Affected area.

Events

OnCheckPlacement

OnPopup

ngCreateTextHint

function ngCreateTextHint(def,
text,
parent)

Creates hint by definition.

Syntax

object ngCreateTextHint (object def, string text, object parent)

Returns

Created hint object (ngHint).

ngPopupTextHint

function ngPopupTextHint(def,
x,
y,
text,
anchor,
parent)

Creates hint by definition.

Syntax

object ngPopupTextHint (object def, int x, int y, string text, string anchor, object parent)

Returns

Created hint object (ngHint).

ngPopupCtrlTextHint

function ngPopupCtrlTextHint(def,
ctrl,
text,
anchor,
parent)

Creates hint by definition.

Syntax

object ngPopupCtrlTextHint (object def, object ctrl, string text, string anchor, object parent)

Returns

Created hint object (ngHint).

ngTextHint

Simple hint text component (based on ngHint).

Definition

ParentReferences

ParentReferences: false

...  Type: bool Default value: false

Methods

SetText

Sets hint text.

Syntax

void SetText (string text)

Returns

-

GetText

Gets hint text.

Syntax

string GetText ()

Returns

Hint text.

Events

OnClick

OnSetText

OnGetText

Controls

Hint

Hint: { Type: 'ngText', Events: { OnGetText: nghtxt_OnGetText } }

ngText

function ngStartModalControl()
Shows modal window curtain.
function ngStopModalControl()
Hides modal window curtain.
function ngCreateWindow(def,
parent)
Creates window by definition.
this.Text
...
this.HTMLEncode
...
this.BackgroundColor
...
this.Sizeable
...
this.Moveable
...
this.Modal
...
this.DisposeOnClose
...
this.AutoSize
...
this.Centered
...
this.MinWidth
...
this.MinHeight
...
this.MaxWidth
...
this.MaxHeight
...
this.Buttons
...
this.Img
...
this.Frame
...
this.CaptionImg
...
function ngCreateHint(def,
parent)
Creates hint by definition.
function ngPopupHint(def,
x,
y,
anchor,
parent)
Creates hint by definition.
function ngPopupCtrlHint(def,
ctrl,
anchor,
parent)
Creates hint by definition.
this.AutoSize
...
this.MinWidth
...
this.MinHeight
...
this.MaxWidth
...
this.MaxHeight
...
this.Anchor
...
this.Anchors
...
this.Frame
...
this.ControlsInside
...
this.DisposeOnHide
...
function ngCreateTextHint(def,
text,
parent)
Creates hint by definition.
function ngPopupTextHint(def,
x,
y,
text,
anchor,
parent)
Creates hint by definition.
function ngPopupCtrlTextHint(def,
ctrl,
text,
anchor,
parent)
Creates hint by definition.
This class implements a generic hint control.
ParentReferences: false
...
Hint: { Type: 'ngText', Events: { OnGetText: nghtxt_OnGetText } }
ngText
This class implements a generic static text control.
This class implements a generic window control.
Extensions of ngControl definition.
Close