Module GeyserLabel

-- The Geyser Layout Manager by guy -- --

Functions

Geyser.Label:echo (message, color, format) Prints a message to the window.
Geyser.Label:setBackgroundImage (imageFileName) Sets a background image for this label.
Geyser.Label:setTiledBackgroundImage (imageFileName) Sets a tiled background image for this label.
Geyser.Label:setClickCallback (func, ...) Sets a callback to be used when this label is clicked.
Geyser.Label:setDoubleClickCallback (func, ...) Sets a callback to be used when this label is double clicked.
Geyser.Label:setReleaseCallback (func, ...) Sets a callback to be used when a mouse click is released over this label.
Geyser.Label:setMoveCallback (func, ...) Sets a callback to be used when the mouse cursor is moved over this label.
Geyser.Label:setWheelCallback (func, ...) Sets a callback to be used when the user scrolls over this label.
Geyser.Label:setOnEnter (func, ...) Sets a callback to be used when the mouse passes over this label.
Geyser.Label:setOnLeave (func, ...) Sets a callback to be used when the mouse leaves this label.
Geyser.Label:setStyleSheet (css) Sets the style sheet of the label
Geyser.Label:getWindow (label) Returns the Geyser object associated with the label name
closeAllLevels () closes all nested labels
closeNestChildren (label) Closes all nested labels under the given label, including any nested children those children might possess
closeNest (label) Internal function.
doNestScroll (label) Internal function.
Geyser.Label:displayNest (label) Displays the nested elements within label, and orients them appropiately
doNestClick (label) Internal function when a parent nest element is clicked to lay out the nested elements within
doNestEnter (label) Internal function when a nested element is moused over to lay out the nested elements within that nested element only active if flyOut is true
doNestLeave (label) Internal function when a nested element is left to renest elements and restore order
Geyser.Label:addScrollbars (parent, layout) internal function that adds the "More..." scrollbars
Geyser.Label:addChild (cons)

Tables

Geyser.Label Represents a label like we all know and love.
mouseClickEvent The table returned by setClickCallback
mouseWheelEvent The table returned by setWheelCallback


Functions

Geyser.Label:echo (message, color, format)
Prints a message to the window. All parameters are optional and if not specified will use the last set value. 'u' - underline, '##' - font size. For example, "cb18" specifies center bold 18pt font be used. Order doesn't matter.

Parameters:

  • message The message to print. Can contain html formatting.
  • color The color to use.
  • format A format list to use. 'c' - center, 'b' - bold, 'i' - italics,
Geyser.Label:setBackgroundImage (imageFileName)
Sets a background image for this label.

Parameters:

  • imageFileName The image to use for a background image.
Geyser.Label:setTiledBackgroundImage (imageFileName)
Sets a tiled background image for this label.

Parameters:

  • imageFileName The image to use for a background image.
Geyser.Label:setClickCallback (func, ...)
Sets a callback to be used when this label is clicked. When this function is called by the event system, details of the event will be appended as the final argument (see mouseClickEvent)

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setDoubleClickCallback (func, ...)
Sets a callback to be used when this label is double clicked. When this function is called by the event system, details of the event will be appended as the final argument (see mouseClickEvent)

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setReleaseCallback (func, ...)
Sets a callback to be used when a mouse click is released over this label. When this function is called by the event system, details of the event will be appended as the final argument (see mouseClickEvent)

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setMoveCallback (func, ...)
Sets a callback to be used when the mouse cursor is moved over this label. When this function is called by the event system, details of the event will be appended as the final argument (see mouseClickEvent)

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setWheelCallback (func, ...)
Sets a callback to be used when the user scrolls over this label. When this function is called by the event system, details of the event will be appended as the final argument (see mouseWheelEvent)

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setOnEnter (func, ...)
Sets a callback to be used when the mouse passes over this label.

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setOnLeave (func, ...)
Sets a callback to be used when the mouse leaves this label.

Parameters:

  • func The function to use.
  • ... Parameters to pass to the function. Must be strings or numbers.
Geyser.Label:setStyleSheet (css)
Sets the style sheet of the label

Parameters:

  • css The style sheet string
Geyser.Label:getWindow (label)
Returns the Geyser object associated with the label name

Parameters:

  • label The name of the label to use
closeAllLevels ()
closes all nested labels
closeNestChildren (label)
Closes all nested labels under the given label, including any nested children those children might possess

Parameters:

  • label The name of the label to use
closeNest (label)
Internal function. This is a timer callback from a nested labels OnLeave function which takes care of renesting labels

Parameters:

  • label The name of the label to use
doNestScroll (label)
Internal function. This is a callback from a nested labels scrollbar.

Parameters:

  • label The name of the scrollbar
Geyser.Label:displayNest (label)
Displays the nested elements within label, and orients them appropiately

Parameters:

  • label The name of the label to use
doNestClick (label)
Internal function when a parent nest element is clicked to lay out the nested elements within

Parameters:

  • label The name of the label to use
doNestEnter (label)
Internal function when a nested element is moused over to lay out the nested elements within that nested element only active if flyOut is true

Parameters:

  • label The name of the label to use
doNestLeave (label)
Internal function when a nested element is left to renest elements and restore order

Parameters:

  • label The name of the label to use
Geyser.Label:addScrollbars (parent, layout)
internal function that adds the "More..." scrollbars

Parameters:

  • parent
  • layout
Geyser.Label:addChild (cons)

Parameters:

  • cons table of Geyser window options such as name, width, and height
    • name a unique name for the label
    • height height of the label - specify it as the defaults are huge
    • width width of the label - specify it as the defaults are huge
    • layoutDir specifies in which direction and axis should the labels align, where 2 letters combine into the option: first letter R for right, L for left, T for top, B for bottom, followed by the orientation: V for vertical or H for horizontal. So options are: layoutDir="RV", layoutDir="RH", layoutDir="LV", layoutDir="LH", and so on (default 'LV')
    • flyOut allows labels to show up when mouse is hovered over (default false)
    • message initial message to show on the label (default '')
    • fgColor optional foreground colour - colour to use for text on the label (default 'white')
    • bgColor optional background colour - colour of the whole label (default 'black')
    • fillBg 1 if the background is to be filled, 0 for no background (default 1)

Tables

Geyser.Label
Represents a label like we all know and love.

Fields:

  • fillBg 1 if the background is to be filled, 0 for no background.
mouseClickEvent
The table returned by setClickCallback

Fields:

  • x The x coordinate of the click local to the label
  • y The y coordinate of the click local to the label
  • globalX The global x coordinate of the click
  • globalY The global y coordinate of the click
  • button A string corresponding to the button clicked
  • buttons A table of strings correspinding to additional buttons held down during the click event
mouseWheelEvent
The table returned by setWheelCallback

Fields:

  • x The x coordinate of the click local to the label
  • y The y coordinate of the click local to the label
  • globalX The global x coordinate of the click
  • globalY The global y coordinate of the click
  • buttons A table of strings correspinding to additional buttons held down during the click event
  • angleDeltaX A number corresponding with the vertical wheel motion. For most devices, this number is in increments of 120
  • angleDeltaY A number corresponding with the horizontal wheel motion. For most devices, this number is in increments of 120
generated by LDoc 1.4.6 Last updated 2018-08-13 19:10:34