Module lcdproc.screen
A LCDproc screen module.
Info:
- Copyright: denpamusic 2020
- License: MIT
- Author: denpamusic
Class Screen
Class Screen
LCDproc Screen class.
- Screen.new (server, id)
-
create LCDproc screen
Parameters:
- server LCDproc LCDproc server instance
- id string screen id
Returns:
- Screen:set_name (name)
-
set screen name
Parameters:
- name string screen name to set
Returns:
- Screen:set_size (width, height)
-
set screen size
Parameters:
- width int screen width
- height int screen height
Returns:
- Screen:set_priority (priority)
-
set screen priority
Parameters:
- priority string screen priority
Returns:
- Screen:set_heartbeat (heartbeat)
-
set screen heartbeat state
Parameters:
- heartbeat string screen heartbeat state
Returns:
- Screen:set_backlight (backlight)
-
set screen backlight state
Parameters:
- backlight string screen backlight state
Returns:
- Screen:set_duration (duration)
-
set display duration
Parameters:
- duration int display screen for this amount of seconds in rotation
Returns:
- Screen:set_timeout (timeout)
-
set display timeout
Parameters:
- timeout int display screen for this amount of seconds
Returns:
- Screen:set_cursor (cursor, x, y)
-
set cursor state
Parameters:
- cursor string new cursor state
- x int cursor horizontal position
- y int cursor vertical position
Returns:
- Screen:add_string (id, x, y, text)
-
add string widget to the screen
Parameters:
Returns:
-
widgets.String
the new string widget
- Screen:add_title (id, text)
-
add title widget to the screen
Parameters:
Returns:
-
widgets.Title
the new title widget
- Screen:add_hbar (id, x, y, length)
-
add horizontal progress bar to the screen
Parameters:
- id string widget id
- x int horizontal position
- y int vertical position
- length int progress bar length
Returns:
-
widgets.HBar
the new horizontal progress bar widget
- Screen:add_vbar (id, x, y, length)
-
add vertical progress bar to the screen
Parameters:
- id string widget id
- x int horizontal position
- y int vertical position
- length int progress bar length
Returns:
-
widgets.VBar
the new vertical progress bar widget
- Screen:add_icon (id, x, y, icon)
-
add icon to the screen
Parameters:
Returns:
-
widgets.Icon
the new icon widget
- Screen:add_scroller (id, left, top, right, bottom, direction, speed, text)
-
add scroller to the screen
Parameters:
- 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 scroller text
Returns:
-
widgets.Scroller
the new scroller widget
- Screen:add_frame (id, left, top, right, bottom, width, height, direction, speed)
-
add frame widget to the screen
Parameters:
- 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 height
- direction string scroll direction (h, v)
- speed int scroll speed
Returns:
-
widgets.Frame
the new frame widget
- Screen:add_number (id, x, number)
-
add number widget to the screen
Parameters:
- id string widget id
- x int horizontal position
- number int (0-9, 10 is semicolon)
Returns:
-
widgets.Number
the new number widget
- Screen:del_widget (id)
-
remove widget from the screen
Parameters:
- id widget id