updated type hints for remaining graphics_element generic types

This commit is contained in:
Mikayla
2024-09-26 21:23:50 +00:00
parent ec1fc13ae7
commit 17e53fdba2
38 changed files with 54 additions and 52 deletions

View File

@@ -42,7 +42,7 @@ local hzd_fg_bg = cpair(colors.white, colors.gray)
local dis_colors = cpair(colors.white, colors.lightGray)
-- new unit control page view
---@param root graphics_element parent
---@param root Container parent
local function new_view(root)
local db = iocontrol.get_db()
@@ -63,7 +63,7 @@ local function new_view(root)
local btn_fg_bg = cpair(colors.green, colors.black)
local btn_active = cpair(colors.white, colors.black)
local page_div = nil ---@type nil|graphics_element
local page_div = nil ---@type Div|nil
-- set sidebar to display unit-specific fields based on a specified unit
local function set_sidebar()
@@ -83,7 +83,7 @@ local function new_view(root)
local function load()
page_div = Div{parent=main,y=2,width=main.get_width()}
local panes = {}
local panes = {} ---@type Div[]
local active_unit = 1

View File

@@ -22,7 +22,7 @@ local cpair = core.cpair
local APP_ID = pocket.APP_ID
-- create diagnostic app pages
---@param root graphics_element parent
---@param root Container parent
local function create_pages(root)
local db = iocontrol.get_db()

View File

@@ -13,7 +13,7 @@ local TextBox = require("graphics.elements.TextBox")
local APP_ID = pocket.APP_ID
-- create placeholder app page
---@param root graphics_element parent
---@param root Container parent
local function create_pages(root)
local db = iocontrol.get_db()

View File

@@ -36,7 +36,7 @@ local APP_ID = pocket.APP_ID
-- local text_fg = style.text_fg
-- new system guide view
---@param root graphics_element parent
---@param root Container parent
local function new_view(root)
local db = iocontrol.get_db()
@@ -58,7 +58,7 @@ local function new_view(root)
app.set_sidebar({{ label = " # ", tall = true, color = core.cpair(colors.black, colors.green), callback = function () db.nav.open_app(APP_ID.ROOT) end }})
local page_div = nil ---@type nil|graphics_element
local page_div = nil ---@type Div|nil
-- load the app (create the elements)
local function load()
@@ -88,7 +88,7 @@ local function new_view(root)
local fps = Div{parent=page_div,x=2,width=p_width}
local gls = Div{parent=page_div,x=2,width=p_width}
local lnk = Div{parent=page_div,x=2,width=p_width}
local panes = { home, search, use, uis, fps, gls, lnk }
local panes = { home, search, use, uis, fps, gls, lnk } ---@type Div[]
local doc_map = {} ---@type { [string]: function }
local search_db = {} ---@type [ string, string, string, function ][]

View File

@@ -18,7 +18,7 @@ local APP_ID = pocket.APP_ID
local LINK_STATE = iocontrol.LINK_STATE
-- create the connecting to SV & API page
---@param root graphics_element parent
---@param root Container parent
local function create_pages(root)
local db = iocontrol.get_db()

View File

@@ -25,7 +25,7 @@ local cpair = core.cpair
local APP_ID = pocket.APP_ID
-- create system app pages
---@param root graphics_element parent
---@param root Container parent
local function create_pages(root)
local db = iocontrol.get_db()

View File

@@ -47,7 +47,7 @@ local emc_ind_s = {
}
-- new unit page view
---@param root graphics_element parent
---@param root Container parent
local function new_view(root)
local db = iocontrol.get_db()
@@ -69,7 +69,7 @@ local function new_view(root)
local btn_active = cpair(colors.white, colors.black)
local nav_links = {}
local page_div = nil ---@type nil|graphics_element
local page_div = nil ---@type Div|nil
-- set sidebar to display unit-specific fields based on a specified unit
local function set_sidebar(id)
@@ -99,7 +99,7 @@ local function new_view(root)
local function load()
page_div = Div{parent=main,y=2,width=main.get_width()}
local panes = {}
local panes = {} ---@type Div[]
local active_unit = 1