Module component.View

Functions

View:acceptsFirstResponder () Overridden by subclasses.
View:addSubview (...) Adds each subview in ...
View:apply (t) For each key k in t, view[k]=t[k].
View:calculateScissor () Re-calculates the view's scissor frame.
View:display () Draws background if view.opaque is set to true.
View:displaySubviews () Internally used by LoveUI to call the display methods of the view's subviews.
View:getFrame () Getter for view.frame Automatically run whenever view.frame is queried.
View:getIndex () Determines the index this view resides in the superview's subview array
View:getNextTabAccessControl () Selects next view in the tree of views that is tab accessible returns if found another view other than itself
View:getNextView () Gets the next view in the superview's subview array
View:getNextViewInHierarchy () Gets the next view in the tree of views
View:getPreviousTabAccessControl () Selects previous view in the tree of views that is tab accessible returns if found another view other than itself
View:getPreviousView () Gets the previous view in the superview's subview array
View:getPreviousViewInHierarchy () Gets the previous view in the tree of views
View:getScissor () Getter for view.scissor.
View:init (frame) Initializes the view object.
View:keyDown (theEvent) Called whenever a key is pressed while this View is focused.
View:load (lib) Loads the View class, automatically called when it's required by LoveUI
View:postDisplay () Alternate display function that runs in the superview's perspective (i.e using the superview's scissor frames, translation, etc).
View:removeSubview (...) Removes each subview in ...
View:setFrame (frame) Setter for view.frame.
View:setScissor (value) Setter for view.scissor.
View:toSubviews (fn) Internally used by LoveUI when adding views with subviews Do not override.
View:update (dt) Overridden by subclasses for their respective update methods.
View:updateSubviews (...) Internally used by LoveUI to update the subviews of each view.


Functions

View:acceptsFirstResponder ()
Overridden by subclasses. Returns true when the view can be focused by mouse clicks, tab, etc, return false if not.

Return value:

boolean
View:addSubview (...)
Adds each subview in ... to the view. Added views cannot have superviews already.

Parameters

  • ...: a list of views
View:apply (t)
For each key k in t, view[k]=t[k]. Useful for changing the styles of multiple widgets.

Parameters

  • t: table
View:calculateScissor ()
Re-calculates the view's scissor frame. It is called whenever the view's frame is changed. Also re-calculates the view's subviews scissor frames.
View:display ()
Draws background if view.opaque is set to true. Overridden by subclasses for their respective drawing methods.
View:displaySubviews ()
Internally used by LoveUI to call the display methods of the view's subviews. Do not override.
View:getFrame ()
Getter for view.frame Automatically run whenever view.frame is queried. Gets the view's frame

Return value:

table
View:getIndex ()
Determines the index this view resides in the superview's subview array

Return value:

number
View:getNextTabAccessControl ()
Selects next view in the tree of views that is tab accessible returns if found another view other than itself

Return value:

boolean
View:getNextView ()
Gets the next view in the superview's subview array

Return value:

View
View:getNextViewInHierarchy ()
Gets the next view in the tree of views

Return value:

View
View:getPreviousTabAccessControl ()
Selects previous view in the tree of views that is tab accessible returns if found another view other than itself

Return value:

boolean
View:getPreviousView ()
Gets the previous view in the superview's subview array

Return value:

View
View:getPreviousViewInHierarchy ()
Gets the previous view in the tree of views

Return value:

View
View:getScissor ()
Getter for view.scissor. Automatically called when scissor is queried.

Return value:

table
View:init (frame)
Initializes the view object. frame is a rectangle {x, y, w, h}. Coordinates x, y are relative to the view (a superview) that is going to contain this view.

Parameters

  • frame: table

Return value:

object
View:keyDown (theEvent)
Called whenever a key is pressed while this View is focused. Overridden by subclasses to implement their own key press events The default keydown method responds to a tab and shift+tab key press to select the next or previous view.

Parameters

  • theEvent: Event
View:load (lib)
Loads the View class, automatically called when it's required by LoveUI

Parameters

  • lib: table

Return value:

class
View:postDisplay ()
Alternate display function that runs in the superview's perspective (i.e using the superview's scissor frames, translation, etc). Primarily used to draw borders and/or selection rectangles around widgets.
View:removeSubview (...)
Removes each subview in ... that belongs to the view.

Parameters

  • ...: a list of views
View:setFrame (frame)
Setter for view.frame. Automatically run whenever view.frame is set. Re-calculates the scissor frame.

Parameters

  • frame: table
View:setScissor (value)
Setter for view.scissor. Automatically called when scissor is set.

Parameters

  • value: table
View:toSubviews (fn)
Internally used by LoveUI when adding views with subviews Do not override.

Parameters

  • fn:
View:update (dt)
Overridden by subclasses for their respective update methods.

Parameters

  • dt:
View:updateSubviews (...)
Internally used by LoveUI to update the subviews of each view. Do not override.

Parameters

  • ...:

Valid XHTML 1.0!