Frame

Defines the primary container for Vyzor Components.  Frames are modified via Components, and may hold other Frames.

Summary
FrameDefines the primary container for Vyzor Components.
Variables
first_frameUsed for very specific handling of the master Vyzor HUD.
resize_registeredDetermines whether or not the resize function has been registered as an event handler.
master_listHolds all Frames for reference.
Functions
new
New FrameA new Frame object.
Variables
is_firstIs this the HUD?
is_drawnHas this Frame been drawn?
is_boundingDoes this object obey bounding rules?
bounding_typeThe BoundingMode rules to which this object adheres.
containerThe Frame that contains this one.
componentsA list of Components this Frame contains.
mini_consolesStores MiniConsole Components.
compoundsStores Compounds.
framesA list of Frames this Frame contains.
callbackThe name of a function to be used as a Label callback.
callback_argsA table holding the arguments for a Label callback.
positionThe Position Supercomponent managing this Frame’s location.
sizeThe Size Supercomponent managing this Frame’s space.
stylesheetThis Frame’s Stylesheet.
Functions and Properties
updateStylesheetPolls all Component’s for their Stylesheets.
Frame Properties
AddAdds a new object to this Frame.
RemoveRemoves an object from this Frame.
DrawDraws this Frame.
ResizeResizes the Frame.
MoveRepositions the Frame.
HideHides the Frame.
ShowReveals the Frame.
EchoDisplays text on a Frame.
EchoDisplays text on a Frame.
ClearClears all text from the Frame.

Variables

first_frame

local first_frame

Used for very specific handling of the master Vyzor HUD.

resize_registered

local resize_registered

Determines whether or not the resize function has been registered as an event handler.

master_list

local master_list

Holds all Frames for reference.

Functions

new

local function new (_,
name,
x,
y,
width,
height)

Parameters

nameThe name of the Frame, used for addressing.
xInitial X position of the Frame.  Defaults to 0.
yInitial Y position of the Frame.  Defaults to 0.
widthInitial width of the Frame.  Defaults to 1.
heightInitial height of the Frame.  Defaults to 1.

Returns

A new Frame.

New Frame

A new Frame object.

Summary
Variables
is_firstIs this the HUD?
is_drawnHas this Frame been drawn?
is_boundingDoes this object obey bounding rules?
bounding_typeThe BoundingMode rules to which this object adheres.
containerThe Frame that contains this one.
componentsA list of Components this Frame contains.
mini_consolesStores MiniConsole Components.
compoundsStores Compounds.
framesA list of Frames this Frame contains.
callbackThe name of a function to be used as a Label callback.
callback_argsA table holding the arguments for a Label callback.
positionThe Position Supercomponent managing this Frame’s location.
sizeThe Size Supercomponent managing this Frame’s space.
stylesheetThis Frame’s Stylesheet.
Functions and Properties
updateStylesheetPolls all Component’s for their Stylesheets.
Frame Properties
AddAdds a new object to this Frame.
RemoveRemoves an object from this Frame.
DrawDraws this Frame.
ResizeResizes the Frame.
MoveRepositions the Frame.
HideHides the Frame.
ShowReveals the Frame.
EchoDisplays text on a Frame.
EchoDisplays text on a Frame.
ClearClears all text from the Frame.

Variables

is_first

local is_first

Is this the HUD?

is_drawn

local is_drawn

Has this Frame been drawn?

is_bounding

local is_bounding

Does this object obey bounding rules?

bounding_type

local bounding_type

The BoundingMode rules to which this object adheres.

container

local container

The Frame that contains this one.

components

local components

A list of Components this Frame contains.

mini_consoles

local mini_consoles

Stores MiniConsole Components.

compounds

local compounds

Stores Compounds.

frames

local frames

A list of Frames this Frame contains.

callback

local callback

The name of a function to be used as a Label callback.

callback_args

local callback_args

A table holding the arguments for a Label callback.

position

local position

The Position Supercomponent managing this Frame’s location.

size

local size

The Size Supercomponent managing this Frame’s space.

stylesheet

local stylesheet

This Frame’s Stylesheet.  Generated via updateStylesheet.

Functions and Properties

updateStylesheet

local function updateStylesheet ()

Polls all Component’s for their Stylesheets.  Constructs the final stylesheet applied by setLabelStyleSheet.

Frame Properties

NameReturn the Frame’s name.
IsBoundingGets and sets a boolean value.
BoundingModeGets and sets the BoundingMode for this Frame.
ContainerGets and sets the parent Frame for this Frame.
ComponentsReturns a copy of the Frame’s Components.
MiniConsolesReturns a copy of the Frame’s MiniConsoles.
CompoundsReturns a copy of the Frame’s Compounds.
FramesReturns a copy of the Frame’s child Frames.
PositionReturns this Frame’s Position Supercomponent.
SizeReturns this Frame’s Size Supercomponent.
StylesheetUpdates and returns this Frame’s Stylesheet.
CallbackGets and sets a Callback for this Frame.
CallbackArgumentsGets and sets the arguments passed to the Callback.  Should be a table.
IsDrawnHas this Frame been drawn?

Add

function new_frame:Add (object)

Adds a new object to this Frame.  Objects can be a string (must be a valid Frame name), a Frame object, or a Component object.

Parameters

objectA valid Frame name or object, or a Component.

Remove

function new_frame:Remove (object)

Removes an object from this Frame.  Objects must be a string (must be a valid Frame’s name or Component Subtype), a Frame object, or a Component object.

Parameters

objectA valid Frame name or object, or a Component Subtype or object.

Draw

function new_frame:Draw ()

Draws this Frame.  Is only called via Vyzor:Draw().  Should not be used directly on a Frame.

Resize

function new_frame:Resize (new_width,
new_height)

Resizes the Frame.

Parameters

new_widthThe Frame’s new width.
new_heightThe Frame’s new height.

Move

function new_frame:Move (new_x,
new_y)

Repositions the Frame.

Parameters

new_xThe Frame’s new X position.
new_yThe Frame’s new Y position.

Hide

function new_frame:Hide ()

Hides the Frame.  Iterates through the Frame’s children first, hiding each of them before hiding itself.

Show

function new_frame:Show ()

Reveals the Frame.  Reveals itself first, then iterates through each of its children, revealing them.

Echo

function new_frame:Echo (text)

Displays text on a Frame.

Parameters

textThe text to be displayed.

Echo

function new_frame:CEcho (text)

Displays text on a Frame.

Parameters

textThe text to be displayed.

Clear

function new_frame:Clear (do_children)

Clears all text from the Frame.

Paramaters

do_childrenWill call clear on child Frames if true.
local first_frame
Used for very specific handling of the master Vyzor HUD.
local resize_registered
Determines whether or not the resize function has been registered as an event handler.
local master_list
Holds all Frames for reference.
local function new (_,
name,
x,
y,
width,
height)
local is_first
Is this the HUD?
local is_drawn
Has this Frame been drawn?
local is_bounding
Does this object obey bounding rules?
local bounding_type
The BoundingMode rules to which this object adheres.
Gets and sets the BoundingMode for this Frame.
local container
The Frame that contains this one.
local components
A list of Components this Frame contains.
local mini_consoles
Stores MiniConsole Components.
local compounds
Stores Compounds.
local frames
A list of Frames this Frame contains.
local callback
The name of a function to be used as a Label callback.
local callback_args
A table holding the arguments for a Label callback.
local position
The Position Supercomponent managing this Frame’s location.
local size
The Size Supercomponent managing this Frame’s space.
local stylesheet
This Frame’s Stylesheet.
local function updateStylesheet ()
Polls all Component’s for their Stylesheets.
function new_frame:Add (object)
Adds a new object to this Frame.
function new_frame:Remove (object)
Removes an object from this Frame.
function new_frame:Draw ()
Draws this Frame.
function new_frame:Resize (new_width,
new_height)
Resizes the Frame.
function new_frame:Move (new_x,
new_y)
Repositions the Frame.
function new_frame:Hide ()
Hides the Frame.
function new_frame:Show ()
Reveals the Frame.
function new_frame:Echo (text)
Displays text on a Frame.
function new_frame:Clear (do_children)
Clears all text from the Frame.
Close