specific graphics element types rather than graphics_element

This commit is contained in:
Mikayla
2024-09-25 21:21:12 +00:00
parent 741dd2467f
commit a4a59d4a3d
18 changed files with 100 additions and 100 deletions

View File

@@ -81,29 +81,29 @@ local tool_ctl = {
importing_legacy = false,
jumped_to_color = false,
view_cfg = nil, ---@type graphics_element
color_cfg = nil, ---@type graphics_element
color_next = nil, ---@type graphics_element
color_apply = nil, ---@type graphics_element
settings_apply = nil, ---@type graphics_element
view_cfg = nil, ---@type PushButton
color_cfg = nil, ---@type PushButton
color_next = nil, ---@type PushButton
color_apply = nil, ---@type PushButton
settings_apply = nil, ---@type PushButton
gen_summary = nil, ---@type function
show_current_cfg = nil, ---@type function
load_legacy = nil, ---@type function
show_auth_key = nil, ---@type function
show_key_btn = nil, ---@type graphics_element
auth_key_textbox = nil, ---@type graphics_element
show_key_btn = nil, ---@type PushButton
auth_key_textbox = nil, ---@type TextBox
auth_key_value = "",
sv_connect = nil, ---@type function
sv_conn_button = nil, ---@type graphics_element
sv_conn_status = nil, ---@type graphics_element
sv_conn_detail = nil, ---@type graphics_element
sv_skip = nil, ---@type graphics_element
sv_next = nil, ---@type graphics_element
sv_conn_button = nil, ---@type PushButton
sv_conn_status = nil, ---@type TextBox
sv_conn_detail = nil, ---@type TextBox
sv_skip = nil, ---@type PushButton
sv_next = nil, ---@type PushButton
apply_mon = nil, ---@type graphics_element
apply_mon = nil, ---@type PushButton
update_mon_reqs = nil, ---@type function
gen_mon_list = function () end,
@@ -622,7 +622,7 @@ local function config_view(display)
local mon_desc = TextBox{parent=mon_c_3,x=1,y=1,height=4,text=""}
local mon_unit_l, mon_unit = nil, nil ---@type graphics_element, graphics_element
local mon_unit_l, mon_unit = nil, nil ---@type TextBox, NumberField
local mon_warn = TextBox{parent=mon_c_3,x=1,y=11,height=2,text="",fg_bg=cpair(colors.red,colors.lightGray)}

View File

@@ -34,10 +34,10 @@ local engine = {
ui_ready = false,
fp_ready = false,
ui = {
front_panel = nil, ---@type graphics_element|nil
main_display = nil, ---@type graphics_element|nil
flow_display = nil, ---@type graphics_element|nil
unit_displays = {} ---@type (graphics_element|nil)[]
front_panel = nil, ---@type DisplayBox|nil
main_display = nil, ---@type DisplayBox|nil
flow_display = nil, ---@type DisplayBox|nil
unit_displays = {} ---@type (DisplayBox|nil)[]
},
disable_flow_view = false
}

View File

@@ -18,7 +18,7 @@ local ALIGN = core.ALIGN
local cpair = core.cpair
-- create a pocket list entry
---@param parent graphics_element parent
---@param parent ListBox parent
---@param id integer PKT session ID
local function init(parent, id)
local s_hi_box = style.fp_theme.highlight_box

View File

@@ -37,7 +37,7 @@ local function init(main)
ping.register(facility.ps, "sv_ping", ping.update)
datetime.register(facility.ps, "date_time", datetime.set_value)
---@type graphics_element, graphics_element, graphics_element, graphics_element
---@type Div, Div, Div, Div
local uo_1, uo_2, uo_3, uo_4
local cnc_y_start = 3

View File

@@ -8,17 +8,17 @@ local util = require("scada-common.util")
local pgi = {}
local data = {
pkt_list = nil, ---@type nil|graphics_element
pkt_list = nil, ---@type ListBox|nil
pkt_entry = nil, ---@type function
-- session entries
s_entries = {
pkt = {} ---@type graphics_element[]
pkt = {} ---@type Div[]
}
}
-- link list boxes
---@param pkt_list graphics_element pocket list element
---@param pkt_entry function pocket entry constructor
---@param pkt_list ListBox pocket list element
---@param pkt_entry fun(parent: ListBox, id: integer) : Div pocket entry constructor
function pgi.link_elements(pkt_list, pkt_entry)
data.pkt_list = pkt_list
data.pkt_entry = pkt_entry