Class Index | File Index

Classes


Class Frame


Extends View.
a overlay view with it's own space and hierarchy, a 'window' in OS talk. Hidden by default !CONSTRUCTOR PARAMETERS ARE PROVIDED IN A OBJECT LITERAL!
Defined in: gamejs-gui.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Frame(parent, constrain, size, position, surface, visible)
Field Summary
Field Attributes Field Name and Description
 
Fields borrowed from class View:
children, parent, position, size, surface
Method Summary
Method Attributes Method Name and Description
 
Close frame.
 
closes frame, then destroys it
 
move(position)
implements restricting frame to GUI bounds.
 
Default implementation, white fill and gray border.
 
show()
Show frame, move it to top of the screen
Methods borrowed from class View:
addChild, blitChild, center, despatchEvent, draw, getGUI, getPosition, getRect, getSize, hide, isFocused, isHovered, isVisible, moveRelative, on, refresh, removeChild, resize, update
Class Detail
Frame(parent, constrain, size, position, surface, visible)
Parameters:
{GUI} parent
parent GUI object
{Bool} constrain
if true, frame cannot be moved out of visible area
{Array} size
array containing width & height of the element, eg. [width, height]
{Array} position
position of the view relative to parent, eg. [x, y]. OPTIONAL, default [0, 0]
{gamejs.Surface} surface
surface to render this view on, OPTIONAL
{Bool} visible
is this view visible? OPTIONAL, DEFAULT true
Field Detail
{Bool} constrain
Method Detail
close()
Close frame. You propably want to use this instead of hide()! generates EVT_CLOSE

destroy()
closes frame, then destroys it

move(position)
implements restricting frame to GUI bounds. generates EVT_MOVE
Parameters:
{Array} position
position to move frame to

paint()
Default implementation, white fill and gray border.

show()
Show frame, move it to top of the screen

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 15 2011 16:17:32 GMT+0300 (EEST)