Module lcdproc.widgets

A LCDproc screen widgets module.

Info:

  • Copyright: denpamusic 2020
  • License: MIT
  • Author: denpamusic

Class Widget

Widget:new (screen, id, type) create new widget
Widget:init (vars) initialize widget on the server
Widget:create () create widget on the server
Widget:delete () delete widget on the server

Class String

String.new (screen, id, x, y, text) create string widget
String:update () update string on the server
String:set_position (x, y) set string position
String:set_text (text) set text to display

Class Title

Title.new (screen, id, text) create title widget
Title:update () update title on the server
Title:set_text (text) set text to display

Class Bar

Bar:new (screen, id, x, y, length, type) create progress bar
Bar:update () update progress bar on the server
Bar:set_position (x, y) set progress bar position
Bar:set_length (length) set progress bar length

Class HBar

HBar.new (screen, id, x, y, length) create horizontal progress bar widget

Class VBar

VBar.new (screen, id, x, y, length) create vertical progress bar widget

Class Icon

Icon.icons list of available icons
Icon.new (screen, id, x, y, icon) create new icon widget
Icon:update () update icon on the server
Icon:set_position (x, y) set icon position
Icon:set_icon (icon) set icon name

Class Scroller

Scroller.new (screen, id, left, top, right, bottom, direction, speed, text) create scroller widget
Scroller:update () update scroller
Scroller:set_position (left, top, right, bottom) set scroller position
Scroller:set_direction (direction) set scroll direction
Scroller:set_speed (speed) set scroll speed
Scroller:set_text (text) set text to scroll

Class Frame

Frame.new (screen, id, left, top, right, bottom, width, height, direction, speed) create frame widget
Frame:update () update frame on the server
Frame:set_position (left, top, right, bottom) set frame position
Frame:set_size (width, height) set frame size
Frame:set_direction (direction) set scroll direction
Frame:set_speed (speed) set scroll speed

Class Number

Number.new (screen, id, x, number) create big number widget
Number:update () update big number on the server
Number:set_position (x) set big number position
Number:set_number (number) set displayed number
Number.widgets widgets table


Class Widget

A widget abstract class.
Widget:new (screen, id, type)
create new widget

Parameters:

  • screen Screen Screen instance
  • id string widget id
  • type string widget type

Returns:

    the new widget
Widget:init (vars)
initialize widget on the server

Parameters:

  • vars

Returns:

  1. string initialized widget
  2. string error description
Widget:create ()
create widget on the server

Returns:

  1. string LCDproc server response
  2. string error description
Widget:delete ()
delete widget on the server

Returns:

  1. string LCDproc server response
  2. string error description

Class String

A string widget class.
String.new (screen, id, x, y, text)
create string widget

Parameters:

  • screen Screen screen instance
  • id string widget id
  • x int horizontal position
  • y int vertical position
  • text string text to display

Returns:

    String then new string widget
String:update ()
update string on the server

Returns:

  1. string LCDproc server response
  2. string error description
String:set_position (x, y)
set string position

Parameters:

  • x int horizontal position
  • y int vertical position

Returns:

  1. string LCDproc server response
  2. string error description
String:set_text (text)
set text to display

Parameters:

  • text string a text to display

Returns:

  1. string LCDproc server response
  2. string error description

Class Title

A title widget class.
Title.new (screen, id, text)
create title widget

Parameters:

  • screen Screen screen instance
  • id string widget id
  • text string text to display

Returns:

    Title the new title widget
Title:update ()
update title on the server

Returns:

  1. string LCDproc server response
  2. string error description
Title:set_text (text)
set text to display

Parameters:

  • text string a text to display

Returns:

  1. string LCDproc server response
  2. string error description

Class Bar

Parent class of HBar and VBar. This SHOULD NOT be used directly.
Bar:new (screen, id, x, y, length, type)
create progress bar

Parameters:

  • screen Screen Screen instance
  • id string progress bar id
  • x int horizontal position
  • y int vertical position
  • length int progress bar length
  • type string progress bar type (hbar, vbar)

Returns:

    the new bar
Bar:update ()
update progress bar on the server

Returns:

  1. string LCDproc server response
  2. string error description
Bar:set_position (x, y)
set progress bar position

Parameters:

  • x int horizontal position
  • y int vertical position

Returns:

  1. string LCDproc server response
  2. string error description
Bar:set_length (length)
set progress bar length

Parameters:

  • length int progress bar length

Returns:

  1. string LCDproc server response
  2. string error description

Class HBar

Horizontal progress bar widget class. Inherits Bar class. See class Bar for other methods.
HBar.new (screen, id, x, y, length)
create horizontal progress bar widget

Parameters:

  • screen Screen instance
  • id string widget id
  • x int horizontal position
  • y int vertical position
  • length int progress bar length

Returns:

    HBar a new horizontal progress bar widget

Class VBar

Vertical progress bar widget class. Inherits Bar class. See class Bar for other methods.
VBar.new (screen, id, x, y, length)
create vertical progress bar widget

Parameters:

  • screen Screen instance
  • id string widget id
  • x int horizontal position
  • y int vertical position
  • length int progress bar length

Returns:

  1. string LCDproc server response
  2. string error description

Class Icon

Icon widget class.
Icon.icons
list of available icons

Fields:

  • [BLOCK_FILLED]
  • [HEART_OPEN]
  • [HEART_FILLED]
  • [ARROW_UP]
  • [ARROW_DOWN]
  • [ARROW_LEFT]
  • [ARROW_RIGHT]
  • [CHECKBOX_OFF]
  • [CHECKBOX_ON]
  • [CHECKBOX_GRAY]
  • [SELECTOR_AT_LEFT]
  • [SELECTOR_AT_RIGHT]
  • [ELLIPSIS]
  • [STOP]
  • [PAUSE]
  • [PLAY]
  • [PLAYR]
  • [FF]
  • [FR]
  • [NEXT]
  • [PREV]
  • [REC]
Icon.new (screen, id, x, y, icon)
create new icon widget

Parameters:

  • screen Screen instance
  • id string widget id
  • x int horizontal position
  • y int vertical position
  • icon string icon name from list of available icons

Returns:

    Icon the new icon widget

See also:

Icon:update ()
update icon on the server

Returns:

  1. string LCDproc server response
  2. string error description
Icon:set_position (x, y)
set icon position

Parameters:

  • x int horizontal position
  • y int vertical position

Returns:

  1. string LCDproc server response
  2. string error description
Icon:set_icon (icon)
set icon name

Parameters:

  • icon string icon name from list of available icons

See also:

Class Scroller

A scroller widget class.
Scroller.new (screen, id, left, top, right, bottom, direction, speed, text)
create scroller widget

Parameters:

  • screen Screen screen instance
  • id string widget id
  • left int left side position
  • top int top side position
  • right int right side position
  • bottom int bottom side position
  • direction string scroll direction (h, v, m)
  • speed int scroll speed
  • text string text to scroll

Returns:

    Scroller the new scroller widget
Scroller:update ()
update scroller

Returns:

  1. string LCDproc server response
  2. string error description
Scroller:set_position (left, top, right, bottom)
set scroller position

Parameters:

  • left int left side position
  • top int top side position
  • right int right side position
  • bottom int bottom side position

Returns:

  1. string LCDproc server response
  2. string error description
Scroller:set_direction (direction)
set scroll direction

Parameters:

  • direction string scroll direction (h, v, m)

Returns:

  1. string LCDproc server response
  2. string error description
Scroller:set_speed (speed)
set scroll speed

Parameters:

  • speed int scroll speed

Returns:

  1. string LCDproc server response
  2. string error description
Scroller:set_text (text)
set text to scroll

Parameters:

  • text string a text to scroll

Returns:

  1. string LCDproc server response
  2. string error description

Class Frame

Frame widget class.
Frame.new (screen, id, left, top, right, bottom, width, height, direction, speed)
create frame widget

Parameters:

  • screen Screen instance
  • id string widget id
  • left int left side position
  • top int top side position
  • right int right side position
  • bottom int bottom side position
  • width int frame width
  • height int frame heigth
  • direction string scroll direction (h | v)
  • speed int scroll speed

Returns:

    Frame then new frame widget
Frame:update ()
update frame on the server

Returns:

  1. string LCDproc server response
  2. string error description
Frame:set_position (left, top, right, bottom)
set frame position

Parameters:

  • left int left side position
  • top int top side position
  • right int right side position
  • bottom int bottom side position

Returns:

  1. string LCDproc server response
  2. string error description
Frame:set_size (width, height)
set frame size

Parameters:

  • width int frame width
  • height int frame height

Returns:

  1. string LCDproc server response
  2. string error description
Frame:set_direction (direction)
set scroll direction

Parameters:

  • direction string scroll direction (h | v)

Returns:

  1. string LCDproc server response
  2. string error description
Frame:set_speed (speed)
set scroll speed

Parameters:

  • speed int scroll speed

Returns:

  1. string LCDproc server response
  2. string error description

Class Number

Big number widget class.
Number.new (screen, id, x, number)
create big number widget

Parameters:

  • screen Screen screen instance
  • id string widget id
  • x int horizontal position
  • number int displayed number (0-9, 10 is semicolon)

Returns:

    Number the new number widget
Number:update ()
update big number on the server

Returns:

  1. string LCDproc server response
  2. string error description
Number:set_position (x)
set big number position

Parameters:

  • x int horizontal position

Returns:

  1. string LCDproc server response
  2. string error description
Number:set_number (number)
set displayed number

Parameters:

  • number int displayed number (0-9, 10 is semicolon)

Returns:

  1. string LCDproc server response
  2. string error description
Number.widgets
widgets table

Fields:

  • string string widget
  • title title widget
  • hbar horizontal progress bar widget
  • vbar vertical progress bar widget
  • icon icon widget
  • scroller scroller widget
  • frame frame widget
  • number big number widget
generated by LDoc 1.4.6 Last updated 2020-05-09 12:37:17