This commit is contained in:
huxi
2025-12-03 11:12:34 +08:00
parent c23ae4f24c
commit bc195654bf
8163 changed files with 3799544 additions and 92 deletions
@@ -0,0 +1,458 @@
--[[
--
-- DB数据表文件
--
-- 类似与C语言的宏定义,用于定义常量数据
--
-- 在windwos系统使用时直接调用,UI资源中LUA代码编译时会自动转为对应值
--
--]]
--[[
--
-- DB表table声明
--
--]]
DB = {}
--[[
-- lua数据类型名称
--]]
-- lua 空值:nil
DB.LUA_NONE = nil;
-- lua 布尔值:true
DB.LUA_TRUE = true;
-- lua 布尔值:false
DB.LUA_FALSE = false;
-- lua 数据类型:布尔型
DB.LUA_TBOOLEAN = "boolean";
-- lua 数据类型:数字
DB.LUA_TNUMBER = "number";
-- lua 数据类型:字符串
DB.LUA_TSTRING = "string";
-- lua 数据类型:表
DB.LUA_TTABLE = "table";
-- lua 数据类型:用户类型
DB.LUA_TUSERDATA = "userdata";
-- lua 数据类型:函数
DB.LUA_TFUNCTION = "function";
-- lua 数据类型:线程
DB.LUA_TTHREAD = "thread";
-- lua 数据类型:空值 / 无效值
DB.LUA_TNIL = "nil";
--[[
-- 页面切换方向
--]]
-- gui 页面从左边切入
DB.PAGE_SWITCH_LEFT = "left";
-- gui 页面从右边切入
DB.PAGE_SWITCH_RIGHT = "right";
-- gui 页面隐藏式切换
DB.PAGE_SWITCH_HIDE = "hide";
--[[
-- 列表滑动方向标志
--]]
-- gui 列表方向:水平列表
DB.SCROLL_DIRECTION_LR = 1;
-- gui 列表方向:垂直列表
DB.SCROLL_DIRECTION_UP = 2;
--[[
-- 音乐播放设备
--]]
-- music 音乐播放设备:手表
DB.MUSIC_PLAY_DEVICE_WATCH = 1;
-- music 音乐播放设备:手机
DB.MUSIC_PLAY_DEVICE_PHONE = 2;
-- music 音乐播放设备:耳机
DB.MUSIC_PLAY_DEVICE_EARPHONE = 3;
--[[
-- 音乐播放控制参数
--]]
--开始播放音乐
DB.MUSIC_PLAY_START = 1;
-- 播放指定音乐
DB.MUSIC_PLAY_INDEX = 2;
-- 暂停播放音乐
DB.MUSIC_PLAY_PAUSE = 3;
-- 停止播放音乐
DB.MUSIC_PLAY_STOP = 4;
-- 播放上一曲
DB.MUSIC_PLAY_LAST = 5;
-- 播放下一曲
DB.MUSIC_PLAY_NEXT = 6;
-- 删除音乐
DB.MUSIC_PLAY_DELETE = 7;
-- 通过info方法获取当前音乐名称
DB.MUSIC_GET_NAME_BY_INFO = true;
--[[
-- 音乐播放状态
--]]
-- music 音乐播放状态:正在播放
DB.MUSIC_PLAY_STATE_STARTING = 1;
-- music 音乐播放状态:停止播放
DB.MUSIC_PLAY_STATE_STOP = 0;
--[[
-- 音乐播放模式
--]]
-- music 音乐播放模式:列表顺序
DB.MUSIC_PLAY_MODE_FCYCLE_LIST = 0;
-- music 音乐播放模式:列表循环
DB.MUSIC_PLAY_MODE_FCYCLE_ALL = 1;
-- music 音乐播放模式:单曲循环
DB.MUSIC_PLAY_MODE_FCYCLE_ONE = 2;
-- music 音乐播放模式:随机播放
DB.MUSIC_PLAY_MODE_FCYCLE_RANDOM = 4;
-- 音乐列表文件类型是:文件夹
DB.DIR_TYPE_FORLDER = 0;
-- 音乐列表文件类型是:文件
DB.DIR_TYPE_FILE = 1;
--[[
-- 文本控件字符显示控制
--]]
-- 文本控件字体,获取宽度显示
DB.FONT_GET_WIDTH = 0x01;
-- 文本控件字体,像素显示
DB.FONT_SHOW_PIXEL = 0x02;
-- 文本控件字体,多行显示
DB.FONT_SHOW_MULTI_LINE = 0x04;
-- 文本控件字体,滚动显示
DB.FONT_SHOW_SCROLL = 0x08;
-- 文本控件字体,高亮滚动显示
DB.FONT_HIGHLIGHT_SCROLL = 0x10;
-- 文本控件字体,默认显示方式(像素显示)
DB.FONT_DEFAULT = DB.FONT_SHOW_PIXEL;
-- 文本编码格式:内码编码
DB.FONT_ENCODE_ANSI = 0x00;
-- 文本编码格式:unicode编码
DB.FONT_ENCODE_UNICODE = 0x01;
-- 文本编码格式:utf-8编码
DB.FONT_ENCODE_UTF8 = 0x02;
-- 文本大小端存储:大端
DB.FONT_ENDIAN_BIG = 0x00;
-- 文本大小端存储:小端
DB.FONT_ENDIAN_SMALL = 0x01;
--[[
-- 蓝牙 bt 库常量
--]]
-- gui 蓝牙:scan end
DB.HCI_EVENT_INQUIRY_COMPLETE = 0x01;
-- gui 蓝牙:connection
DB.HCI_EVENT_CONNECTION_COMPLETE = 0x03;
-- gui 蓝牙:disconnection
DB.HCI_EVENT_DISCONNECTION_COMPLETE = 0x05;
-- gui 蓝牙:pin
DB.HCI_EVENT_PIN_CODE_REQUEST = 0x16;
-- gui 蓝牙:
DB.HCI_EVENT_IO_CAPABILITY_REQUEST = 0x31;
-- gui 蓝牙:
DB.HCI_EVENT_USER_CONFIRMATION_REQUEST = 0x33;
-- gui 蓝牙:
DB.HCI_EVENT_USER_PASSKEY_REQUEST = 0x34;
-- gui 蓝牙:
DB.HCI_EVENT_USER_PRESSKEY_NOTIFICATION = 0x3B;
-- gui 蓝牙:
DB.HCI_EVENT_VENDOR_NO_RECONN_ADDR = 0xF8;
-- gui 蓝牙:
DB.HCI_EVENT_VENDOR_REMOTE_TEST = 0xFE;
-- gui 蓝牙:
DB.BTSTACK_EVENT_HCI_CONNECTIONS_DELETE = 0x6D;
-- gui 蓝牙:
DB.ERROR_CODE_SUCCESS = 0x00;
-- gui 蓝牙:
DB.ERROR_CODE_PAGE_TIMEOUT = 0x04;
-- gui 蓝牙:
DB.ERROR_CODE_AUTHENTICATION_FAILURE = 0x05;
-- gui 蓝牙:
DB.ERROR_CODE_PIN_OR_KEY_MISSING = 0x06;
-- gui 蓝牙:
DB.ERROR_CODE_CONNECTION_TIMEOUT = 0x08;
-- gui 蓝牙:
DB.ERROR_CODE_SYNCHRONOUS_CONNECTION_LIMIT_TO_A_DEVICE_EXCEEDED = 0x0A;
-- gui 蓝牙:
DB.ERROR_CODE_ACL_CONNECTION_ALREADY_EXISTS = 0x0B;
-- gui 蓝牙:
DB.ERROR_CODE_CONNECTION_REJECTED_DUE_TO_LIMITED_RESOURCES = 0x0D;
-- gui 蓝牙:
DB.ERROR_CODE_CONNECTION_REJECTED_DUE_TO_UNACCEPTABLE_BD_ADDR = 0x0F;
-- gui 蓝牙:
DB.ERROR_CODE_CONNECTION_ACCEPT_TIMEOUT_EXCEEDED = 0x10;
-- gui 蓝牙:
DB.ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION = 0x13;
-- gui 蓝牙:
DB.ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST = 0x16;
-- gui 蓝牙:
DB.CUSTOM_BB_AUTO_CANCEL_PAGE = 0xFD;
-- gui 蓝牙:
DB.BB_CANCEL_PAGE = 0xFE;
-- 获取蓝牙耳机连接状态
DB.BT_EMITTER_CONNECT_STATUS = 0x01;
-- 获取手机蓝牙连接状态
DB.BT_PHONE_CONNECT_STATUS = 0x02;
--[[
-- 设备 device 库常量
--]]
-- 获取下一个数据,从指定索引开始获取,直到最后一个数据
DB.DEVICE_GET_NEXT_DATA = 0x01;
-- 获取上一个数据,从指定索引开始获取,直到第一个数据
DB.DEVICE_GET_PREV_DATA = 0x02;
-- 获取所有数据,直接获取索要获取数据的全部内容,注意内存消耗!
DB.DEVICE_GET_ALL_DATA = 0x04;
-- device 获取数据:\n1. 获取指定索引的数据\n2. 为获取上/下一个数据设定索引位置。
DB.DEVICE_GET_IND_DATA = 0x08;
-- device 获取数据:获取存储的数据中的最大值
DB.DEVICE_GET_MAX_DATA = 0x10;
-- device 获取数据:获取存储的数据中的最小值
DB.DEVICE_GET_MIN_DATA = 0x20;
-- device 获取数据:获取存储的数据个数
DB.DEVICE_GET_DATA_NUM = 0x40;
--[[
-- 系统 sys 库常量
--]]
-- 创建定时器,选择创建 timer 实例
DB.SYS_TIMER_HANDLER = 0x01;
-- 创建定时器,选择创建 timeout 实例
DB.SYS_TIMEOUT_HANDLER = 0x02;
-- 创建联系人操作句柄
DB.SYS_OPERATE_CONTACTS = 0;
-- 创建通话记录操作句柄
DB.SYS_OPERATE_CALLLOG = 1;
-- 获取联系人/通话记录列表中元素数量
DB.SYS_VM_READ_LIST_COUNT = 0x01;
-- 获取指定所以的联系人/通话记录
DB.SYS_VM_READ_LIST_INDEX = 0x02;
-- 通过号码获取名称
DB.SYS_VM_READ_NAME_BY_NUMBER = 0x03;
-- 保存联系人/通话记录到列表中
DB.SYS_VM_SAVE_LIST_BOOK = 0x01;
-- 已选中的卡片数量
DB.CardSetNum = 0x00;
-- 屏幕亮度等级
DB.LightLevel = 0x01;
-- 屏幕熄屏时间
DB.DarkTime = 0x02;
-- 快捷键选项
DB.ShortcutKey = 0x03;
-- 上一次系统音量
DB.LastSysVol = 0x04;
-- 屏幕常亮使能
DB.LightAlwayEn = 0x05;
-- 屏幕常亮时间
DB.LightTime = 0x06;
-- 系统静音标志
DB.SysVoiceMute = 0x07;
-- 全天勿扰使能
DB.AllDayUndisturbEn = 0x08;
-- 定时勿扰使能
DB.TimeUndisturbEn = 0x09;
-- 定时勿扰起始时间(时)
DB.UndisturbStimeH = 0x0A;
-- 定时勿扰起始时间(分)
DB.UndisturbStimeM = 0x0B;
-- 定时勿扰结束时间(时)
DB.UndisturbEtimeH = 0x0C;
-- 定时勿扰结束时间(分)
DB.UndisturbEtimeM = 0x0D;
-- 训练自动识别使能
DB.TrainAutoEn = 0x0E;
-- 是否连接新手机
DB.ConnNewPhone = 0x0F;
-- 语言选择
DB.Language = 0x10;
-- 菜单风格
DB.MenuStyle = 0x11;
--[[
-- 闹钟相关
--]]
-- 周一打开
DB.SYS_ALARM_MONDAY_OPEN = 0x02;
-- 周一关闭
DB.SYS_ALARM_MONDAY_CLOSE = 0xfd;
-- 周二打开
DB.SYS_ALARM_TUESDAY_OPEN = 0x04;
-- 周二关闭
DB.SYS_ALARM_TUESDAY_CLOSE = 0xfb;
-- 周三打开
DB.SYS_ALARM_WEDNESDAY_OPEN = 0x08;
-- 周三关闭
DB.SYS_ALARM_WEDNESDAY_CLOSE = 0xf7;
-- 周四打开
DB.SYS_ALARM_THURSDAY_OPEN = 0x10;
-- 周四关闭
DB.SYS_ALARM_THURSDAY_CLOSE = 0xef;
-- 周五打开
DB.SYS_ALARM_FRIDAY_OPEN = 0x20;
-- 周五关闭
DB.SYS_ALARM_FRIDAY_CLOSE = 0xdf;
-- 周六打开
DB.SYS_ALARM_SATURDAY_OPEN = 0x40;
-- 周六关闭
DB.SYS_ALARM_SATURDAY_CLOSE = 0xbf;
-- 周日打开
DB.SYS_ALARM_SUNDAY_OPEN = 0x80;
-- 周日关闭
DB.SYS_ALARM_SUNDAY_CLOSE = 0x7f;
-- 最大闹钟数量
DB.SYS_ALARM_MAX_NUMBER = 5;
-- 设置闹钟开关
DB.SYS_ALARM_SET_ONOFF = 0x01;
-- 设置闹钟时间
DB.SYS_ALARM_SET_TIME = 0x02;
-- 设置闹钟模式
DB.SYS_ALARM_SET_MODE = 0x04;
-- 设置闹钟贪睡
DB.SYS_ALARM_SET_SNOOZE = 0x08;
-- 设置闹钟赞数关闭
DB.SYS_ALARM_SET_CLOSE = 0x10;
return DB
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,37 @@
{
"name":"杰理科技LUA API",
"version":"1.0.0",
"title":"LUA API说明",
"description":"手表项目API说明文档,这里是文档总介绍,目前先空缺,后续在apidoc.json中完善",
"header":{
"title":"文档说明",
"filename":"doc\\header.md"
},
"footer":{
"title":"文档结尾",
"filename":"doc\\footer.md"
},
"order":[
"gui",
"公共方法",
"布局控件",
"电量控件",
"图片控件",
"文本控件",
"时间控件",
"数字控件",
"表格控件",
"compass",
"multiprogress",
"progress",
"slider",
"watch",
"bt",
"bsp",
"spi",
"iic",
"sys",
"music",
"device"
]
}
@@ -0,0 +1,663 @@
--[[
注意! 注意! 注意!
这个文件仅用于生成 JLLua.json 文件,生成的 json 文件用于 ui 工具编辑 lua 代码时的自动补全
和信息提示。不是 lua 功能模块,禁止将本文件导入到 UI 工程内使用。
使用本文件生成 JLLua.json 文件方法:
1、在 std/gui.lua 中添加新方法后,按照之前有的注释添加 @notes。格式为
@notes
@tip:这里写方法说明
@demo:这里写方法使用示例
-- 具体方法函数必须紧接着块注释的后一行
2、在 UI编辑工具 中启动 lua模拟器,在模拟器中运行以下代码:
require("buildJson")
buildJson:main()
]]
-- 通过模拟器执行的绝对路径
local rootPath = "../../../UITools/lua/"
-- 文件路径表
local path_table = {
build_file = "buildJson.lua",
json_file = "JLLua.json",
db_file = "DB.lua",
lib_file = {
"module.lua",
"std/gui.lua",
"std/bsp.lua",
"std/bt.lua",
"std/music.lua",
"std/device.lua",
"std/utils.lua"
}
}
-- json关键字表
local json_keyword = {
mdo_s = "\t\t\"module\": \"",
typ_s = "\t\t\"type\": \"",
pri_s = "\t\t\"priority\": \"",
key_s = "\t\t\"key\": \"",
tip_s = "\t\t\"tip\": \"",
dem_s = "\t\t\"demo\": \"",
line_e = "\",\n",
block_e = "\"\n"
}
-- 忽略字符串头部的空白符
local function ltrim(str)
return (string.gsub(str, "^[ \t\n\r]*", ""))
end
-- 忽略字符串尾部的空白符
local function rtrim(str)
return (string.gsub(str, "[ \t\n\r]*$", ""))
end
-- 忽略字符串首尾的空白符
local function trim(str)
return (string.gsub(str, "^%s*(.-)%s*$", "%1"))
end
-- 转义双引号
local function escapeQM(str)
local s, n = string.gsub(str, "\"", "\\\"");
return s;
end
-- 写一行指定内容到文件里
local function fileWriteLine(file, line)
file:write(line)
end
-- 保存块结束到json文件
local function jsonFileSaveTableEnd(JsonFile)
if JsonFile then
JsonFile:write(",\n")
end
end
-- 保存table到json文件
local function saveTableToJsonFile(tab, JsonFile)
local line = "";
JsonFile:write("\t{\n")
line = json_keyword.mdo_s .. tab.json_module .. json_keyword.line_e;
fileWriteLine(JsonFile, line)
line = json_keyword.typ_s .. tab.json_type .. json_keyword.line_e;
fileWriteLine(JsonFile, line)
line = json_keyword.pri_s .. tab.json_priority .. json_keyword.line_e;
fileWriteLine(JsonFile, line)
line = json_keyword.key_s .. tab.json_key .. json_keyword.line_e;
fileWriteLine(JsonFile, line)
line = json_keyword.tip_s .. escapeQM(tab.json_tip) .. json_keyword.line_e;
fileWriteLine(JsonFile, line)
line = json_keyword.dem_s .. escapeQM(tab.json_demo) .. json_keyword.block_e;
fileWriteLine(JsonFile, line)
JsonFile:write("\t}")
end
-- 扫描关键字
local function scanKeyWord(keyWord_path, JsonFile)
local keyWordFile = io.open(keyWord_path, "r+");
local in_keyWord = false;
if keyWordFile then
for line in keyWordFile:lines() do
if string.sub(line, 1, -1) == "@keyWordEnd\r" then
-- 扫描到结束标志,扫描结束退出
return true;
end
if (in_keyWord and JsonFile) then
-- 开始标志被置位,同时有json则保存文件
JsonFile:write(line);
end
if (string.sub(line, 1, -1) == "@keyWordStart\r") then
-- 扫描到开始标志,标志置位
in_keyWord = true;
end
end
else
return nil;
end
end
-- 扫描DB表
local function scanDBFile(DBFile_path, JsonFile)
local DBFile = io.open(DBFile_path, "r+");
local previous_line = ""; -- 上一行
local json_value = {
json_module = "DB",
json_type = "value",
json_priority = "1",
json_key = "",
json_tip = "",
json_demo = ""
}
if (DBFile) then
-- 保存 DB table
json_value.json_key = "DB.";
json_value.json_tip = "DB 常量定义表";
json_value.json_demo = "DB.xxx";
saveTableToJsonFile(json_value, JsonFile);
jsonFileSaveTableEnd(JsonFile);
json_value.json_priority = "10";
for current_line in DBFile:lines() do
if (string.sub(current_line, 1, 3) == "DB.") then
-- 解析常量
--local s, e, key = string.find(current_line, "DB.(%u+%p%u+)%s*=");
local s, e, key = string.find(current_line, "DB.([%u+%p]*)%s*=");
if key then
-- 保存 key
--json_value.json_key = "DB."..key;
json_value.json_key = key;
end
local demo = string.sub(current_line, 1, -2);
json_value.json_demo = demo;
if (string.sub(previous_line, 1, 2) == "--") then
-- 解析注释
local tip = ltrim(string.sub(previous_line, 3, -2));
json_value.json_tip = tip;
end
saveTableToJsonFile(json_value, JsonFile);
jsonFileSaveTableEnd(JsonFile);
end
previous_line = current_line;
end
else
DBFile:close();
return nil;
end
DBFile:close();
end
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ 库文件扫描
local module_start = "\t\t\"module\": \""
local type_start = "\t\t\"type\": \""
local priority = "\t\t\"priority\": \""
local key_start = "\t\t\"key\": \""
local tip_start = "\t\t\"tip\": \""
local demo_start = "\t\t\"demo\": \""
local line_end = "\",\n"
local block_end = "\"\n"
-- 从指定传里找模块名
local function findTable(code)
if string.find(code, "local") then
-- 本地table不管
return nil
else
local s, e = string.find(code, "=")
if s and e then
local mod = string.sub(code, 1, s-2)
return mod
else
return nil
end
end
end
-- 从字符串里面找function关键字
local function findType(code)
if string.find(code, "local") then
-- 有local说明是本地函数,不管它
return nil
else
local s, e = string.find(code, "function")
if s and e then
return "function"
else
return findTable(code)
end
end
end
-- 从字符串中找到标识符
local function findKey(code, isfunc)
if string.find(code, "local") then
-- 有local说明是本地函数,不管它
return nil
else
if isfunc then
-- 如果是函数
local start = 0
if string.find(code, ":") then
-- 有冒号说明是模块内的函数
local s0, e0 = string.find(code, ":")
start = s0 + 1
else
-- 普通函数
local s0, e0 = string.find(code, "function")
start = e0 + 2
end
local s1, e1 = string.find(code, "%(")
local key = string.sub(code, start, s1-1)
return key
else
-- 否则是模块
local s0, e0 = string.find(code, "=")
local key = string.sub(code, 1, s0-2)
return key
end
end
end
-- 查找模块名
local function findModule(code, isfunc)
if string.find(code, "local") then
-- 有local说明是本地函数,不管它
return nil
else
if isfunc then
if string.find(code, ":") then
-- 函数找module
local s0, e0 = string.find(code, "function")
local s1, e1 = string.find(code, ":")
local mode = string.sub(code, e0 + 2, e1 - 1)
return mode
else
return " "
end
elseif string.find(code, "=") then
-- 模块本身
local s0, e0 = string.find(code, "=")
local mode = string.sub(code, 1, s0 - 2)
return mode
else
return " "
end
end
end
-- 保存标记块文件
local function saveNotes(json_file, code_file)
local modul, typ, key, tip, demo
local str
for line in code_file:lines() do
if (string.sub(line, 1, 2) == "]]") then
break
elseif (string.sub(line, 1, 5) == "@tip:") then
-- tip
tip = string.sub(line, 6, -2)
str = tip_start..tip..line_end
elseif (string.sub(line, 1, 6) == "@demo:") then
-- demo
demo = string.sub(line, 7, -2)
str = string.gsub(demo, "\"", "\\\"")
str = demo_start..str..line_end
else
str = nil
end
if str then
fileWriteLine(json_file, str)
end
-- print('note: '..line)
end
-- 接下来一行包含module, key, type信息
local code = code_file:read()
-- 有function的是函数
local typ = findType(code)
if typ then
str = type_start .. typ .. line_end
fileWriteLine(json_file, str)
end
local isfunc = false
if typ == "function" then
isfunc = true
end
local key = findKey(code, isfunc)
if key then
str = key_start .. key .. line_end
fileWriteLine(json_file, str)
end
local mode = findModule(code, isfunc)
if (mode) then
str = module_start .. mode .. line_end
fileWriteLine(json_file, str)
end
if mode == "gui" then
str = priority .. "5" .. block_end
else
str = priority .. "10" .. block_end
end
fileWriteLine(json_file, str)
--print('code: '..code)
return
end
-- 扫描库文件
local function scanLibFile(libFile_path, JsonFile)
local scanf = io.open(libFile_path);
if (not scanf) then
print("open file faild! --> dir: "..dir)
return nil
end
local note = false;
local line = scanf:read();
while line do
-- 如果当前行是注释标记
if (string.sub(line, 1, 6) == "@notes") then
note = true;
end
-- 进入标记块处理
if note then
JsonFile:write("\t{\n");
saveNotes(JsonFile, scanf);
JsonFile:write("\t},\n");
note = false;
end
-- 否则读取下一行
line = scanf:read();
end
end
-- 主函数
local function main(file_tab)
if not scanKeyWord(file_tab.build_file) then
print("can not find file: "..file_tab.build_file..", plsase check the file path!");
return;
end
local JsonFile = io.open(file_tab.json_file, "w+");
if not JsonFile then
print("creat file: "..file_tab.json_file.." faild!");
return;
end
-- 先创建文件头
JsonFile:write("[\n");
-- 保存关键字
scanKeyWord(file_tab.build_file, JsonFile)
-- 保存DB表
scanDBFile(file_tab.db_file, JsonFile)
-- 保存lib文件
for k, v in ipairs(file_tab.lib_file) do
scanLibFile(v, JsonFile)
end
-- 这里要做最后处理,删掉文件最后一行,追加成大括号“\t}”
local num = JsonFile:seek("end", -4)
-- 添加上结束大括号
fileWriteLine(JsonFile, "\t}")
-- 关闭文件
JsonFile:write("\n]");
JsonFile:close()
end
main(path_table)
-- 通过模拟器运行是建立模块
buildJson = {}
function buildJson:main()
path_table.build_file = rootPath .. path_table.build_file;
path_table.json_file = rootPath .. path_table.json_file;
path_table.db_file = rootPath .. path_table.db_file;
for k, v in ipairs(path_table.lib_file) do
path_table.lib_file[k] = rootPath .. path_table.lib_file[k];
end
main(path_table)
end
-- 使用模拟器执行时
return buildJson
-- 下面是关键字的 json 不能动 !!!!!!!
-- 下面内容不要动 !!!!!!!
-- 下面内容不要动 !!!!!!!
-- 下面内容不要动 !!!!!!!
-- 下面内容不要动 !!!!!!!
-- 下面内容不要动 !!!!!!!
--[[
@keyWordStart
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "do",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "else",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "elseif",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "end",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "false",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "for",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "function",
"tip": "Lua关键字",
"demo": "function name()\n ...\nend"
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "if",
"tip": "Lua关键字",
"demo": "if (a<10) then\n ...\nelse\n ...\nend"
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "in",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "local",
"tip": "Lua关键字,定义局部变量",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "nil",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "not",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "or",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "repeat",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "return",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "then",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "true",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "until",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "while",
"tip": "Lua关键字",
"demo": "while (true)\ndo\n print(\"...\")\nend"
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "goto",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "this",
"tip": "Lua关键字,一般不适用this",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "until",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "require",
"tip": "Lua关键字,一般不使用require导包",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "table",
"tip": "Lua关键字",
"demo": ""
},
@keyWordEnd
]]
@@ -0,0 +1,443 @@
#!/usr/bin/python 3.0
import json
import os
import re
json_block = {
"module": "模块名",
"type": "接口类型",
"priority": 0, # 优先级
"key": "关键字",
"tip": "提示信息",
"demo": "示例"
}
def ltrim(msg):
"""
忽略字符串头部的空白符,空白符包括空格,tab制表符等
:param msg: 准备去除头部空白符的字符串
:return: 忽略头部空白符后的字符串
"""
return msg.lstrip()
def rtrim(msg):
"""
忽略字符串尾部的空白符,空白符包括空格,tab制表符等
:param msg: 准备去除尾部空白符的字符串
:return: 已经去除尾部空白符的字符串
"""
return msg.rstrip()
def str_trim(msg):
"""
忽略字符串头部和尾部的空白符
:param msg: 待去除空白符的字符串
:return: 已经去除空白符的字符串
"""
return msg.strip()
def get_info_from_mark(text, start_mark, end_mark):
"""
根据标志获取信息,自动匹配最近的start_mark开始,到最近的end_mark结束。如果没有匹配到end_mark则返回空值
:param text: 文本内容
:param start_mark: 起始标志
:param end_mark: 结束标志
:return: 起止标志之间的内容列表
"""
text_list = text.split(start_mark)
block_list = []
for block in text_list:
block_list.append(block.split(end_mark)[0])
return block_list
def encode_str(msg):
"""
将字符串转码成json文件的字符串,自动把双引号等内容添加转义字符
:param msg: 待转码的字符串
:return: 完成转码的字符串
"""
tmp_str = json.dumps(msg, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
return eval(tmp_str)
def save_dict_to_json_file(dict, fp, first=False):
"""
保存字典到json文件
:param dict: 待保存的字典
:param fp: json文件句柄
:param first: 是否第一个json块
:return: None
"""
if not first:
fp.write(",\n") # 如果不是第一个json块,则先写入逗号在写入下一个json块
json.dump(dict, fp, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
# fp.write(",\n")
"""
软件逻辑:
1、扫描指定目录
2、打开第一个文件
3、根据标志获取指定字符串:get_info_from_mark
4、字符串掐头去尾:str_trim
5、编码字符串:encode_str
6、将json_block字典所有值赋值完毕
7、将字典保存到json文件
"""
def scan_files(directory, prefix=None, postfix=None):
"""
扫描指定目录下的文件,或者匹配指定后缀和前缀
:param directory: 待扫描路径
:param prefix: 指定前缀
:param postfix: 指定后缀
:return: 文件列表
"""
files_list = []
for root, sub_dirs, files in os.walk(directory):
for special_file in files:
if postfix:
if special_file.endswith(postfix):
files_list.append(os.path.join(root, special_file))
elif prefix:
if special_file.startswith(prefix):
files_list.append(os.path.join(root, special_file))
else:
files_list.append(os.path.join(root, special_file))
return files_list
first_block = True # json 第一个块标记
lua_keyWord = [{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "do",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "else",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "elseif",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "end",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "false",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "for",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "function",
"tip": "Lua关键字",
"demo": "function name()\n ...\nend"
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "if",
"tip": "Lua关键字",
"demo": "if (a<10) then\n ...\nelse\n ...\nend"
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "in",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "local",
"tip": "Lua关键字,定义局部变量",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "nil",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "not",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "or",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "repeat",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "return",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "then",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "true",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "until",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "while",
"tip": "Lua关键字",
"demo": "while (true)\ndo\n print(\"...\")\nend"
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "goto",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "this",
"tip": "Lua关键字,一般不适用this",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "until",
"tip": "Lua关键字",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "require",
"tip": "Lua关键字,一般不使用require导包",
"demo": ""
},
{
"module": "lua",
"type": "keyword",
"priority": 1,
"key": "table",
"tip": "Lua关键字",
"demo": ""
}]
def analysis_file(path, json_file):
"""
解析文件
:param json_file: json文件名称
:param path: 待解析文件
:return: None
"""
print(path)
module = re.compile(r'([^<>/\\\|:""\*\?]+)\.\w+$') # 使用正则表达式获取文件名
module_name = module.findall(path)
if module_name:
json_block["module"] = module_name[0]
json_block["type"] = "function" # 接口类型是函数
json_block["priority"] = 5 # 优先级 5
files = open(path, "r", encoding="utf-8") # 以只读方式打开lua源码文件
file = files.read() # 整个文件读入作为字符串
blocks = get_info_from_mark(file, "--[[", "]]") # 查找注释的文本块,返回文本块列表
for block in blocks:
block = block.strip() # 去掉首尾的空白符
start_str = block[0:4] # 截取前面四个字符
if start_str == "@api": # 如果前面四个字符是 @api 才说明是文档注释
# 先获取API名称
api_name = get_info_from_mark(block, "apiName ", "@")
if len(api_name) > 1:
api_name = str_trim(api_name[1])
else:
api_name = ""
if api_name:
json_block["key"] = encode_str(api_name) # 把API名称赋值给json_block字典
# 获取demo提示信息
demo_info = get_info_from_mark(block, "apiParamExample 示例:", "@")
if len(demo_info) > 1:
demo_info = str_trim(demo_info[1])
else:
demo_info = ""
if demo_info:
json_block["demo"] = encode_str(demo_info)
# 获取tip提示信息
tip_info = get_info_from_mark(block, "apiDescription ", "@")
if len(tip_info) > 1:
tip_info = str_trim(tip_info[1])
else:
tip_info = ""
if tip_info:
json_block["tip"] = encode_str(tip_info)
# 保存字典到json文件
global first_block
save_dict_to_json_file(json_block, json_file, first=first_block) # 保存字典到json文件
if first_block:
first_block = False
files.close() # 关闭当前的源码文件
def analysis_db_file(db_file, json_file):
"""
解析DB表文件
:param db_file: DB表文件
:param json_file: JSON文件
:return: None
"""
print(db_file)
db_data = open(db_file, "r", encoding="utf-8") # 以只读方式打开lua源码文件
db = db_data.read() # 整个文件读入作为字符串
blocks = get_info_from_mark(db, "--", ";") # 匹配注释符和分号
json_block["module"] = "DB"
json_block["priority"] = 3
json_block["type"] = "constant"
for block in blocks:
block = str_trim(block)
info = block.split("DB.") # 以DB.为标志对字符串切片
if len(info) > 1:
json_block["tip"] = info[0]
json_block["key"] = str_trim(info[1].split("=")[0])
json_block["demo"] = block
save_dict_to_json_file(json_block, json_file)
def main(root_path, db_file, json_file):
"""
主函数
:param root_path: 跟目录
:param db_file: DB表文件
:param json_file: 输出的json文件
:return: None
"""
path_list = scan_files(root_path, postfix=".lua") # 扫描目录下所有.lua文件
json_fp = open(json_file, "w+")
json_fp.write("[\n") # 写入json的中括号头"["
for i in range(len(path_list)):
path = path_list[i]
analysis_file(path, json_fp) # 逐个解析文件,并把它保存到json文件
# 解析DB表文件
analysis_db_file(db_file, json_fp)
# 保存lua关键字
for keyword in lua_keyWord:
save_dict_to_json_file(keyword, json_fp, first=first_block)
json_fp.write("\n]") # 写入json的中括号尾"]"
json_fp.close() # 关闭json文件
if __name__ == "__main__":
# test_path = r"F:\杰理项目文件\FPGA\br28_watch\tools\br28_download_watch\UI工程\UITools\lua\std"
obj_path = os.getcwd() + r"/std"
tmp_file = os.getcwd() + r"/temp.json"
db_file = os.getcwd() + r"/DB.lua"
main(obj_path, db_file, tmp_file)
# 将文件编码转换为utf-8
json_file = os.getcwd() + r"/JLLua.json" # 输出的json文件
print(json_file)
fp = open(json_file, "w", encoding="UTF-8")
for row in open(tmp_file, "r"):
fp.write(row)
fp.close()
os.remove(tmp_file) # 删除过度文件
@@ -0,0 +1,2 @@
# 写在开头
文档开头说明内容
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,288 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
<font-face units-per-em="1200" ascent="960" descent="-240" />
<missing-glyph horiz-adv-x="500" />
<glyph horiz-adv-x="0" />
<glyph horiz-adv-x="400" />
<glyph unicode=" " />
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xa0;" />
<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
<glyph unicode="&#x2000;" horiz-adv-x="650" />
<glyph unicode="&#x2001;" horiz-adv-x="1300" />
<glyph unicode="&#x2002;" horiz-adv-x="650" />
<glyph unicode="&#x2003;" horiz-adv-x="1300" />
<glyph unicode="&#x2004;" horiz-adv-x="433" />
<glyph unicode="&#x2005;" horiz-adv-x="325" />
<glyph unicode="&#x2006;" horiz-adv-x="216" />
<glyph unicode="&#x2007;" horiz-adv-x="216" />
<glyph unicode="&#x2008;" horiz-adv-x="162" />
<glyph unicode="&#x2009;" horiz-adv-x="260" />
<glyph unicode="&#x200a;" horiz-adv-x="72" />
<glyph unicode="&#x202f;" horiz-adv-x="260" />
<glyph unicode="&#x205f;" horiz-adv-x="325" />
<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 106 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,520 @@
/**
* apidoc main css file
*/
/**
* Define colors
*/
:root {
--primary: #0088cc;
--white: #fff;
--light-gray: #ccc;
--main-gray: #777;
--dark-gray: #2d2d2d;
--hover-gray: #666;
--meth-get: green;
--meth-put: #e5c500;
--meth-post: #4070ec;
--meth-delete: #ed0039;
--red: #dc3545;
}
.color-primary {
color: var(--primary);
}
.bg-primary {
background-color: var(--primary);
}
.bg-red {
color: var(--white);
background-color: var(--red);
}
.border-danger {
border: 1px solid var(--red);
}
/** for some reason the iOS safari style is applied on date inputs */
input[type="date"] {
line-height: 1.4 !important;
}
/* ------------------------------------------------------------------------------------------
* Content
* ------------------------------------------------------------------------------------------ */
@font-face {
font-family: 'Glyphicons Halflings';
src: url('./glyphicons-halflings-regular.eot');
src: url('./glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
url('./glyphicons-halflings-regular.woff') format('woff'),
url('./glyphicons-halflings-regular.ttf') format('truetype'),
url('./glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
body {
font-family: "Source Sans Pro", sans-serif;
}
a:focus {
background-color: var(--primary);
}
#content {
margin-top: 10px;
margin-left: 20%;
padding-left: 10px;
}
p {
font-size: 130%;
color: var(--main-gray);
}
section {
padding: 30px 0;
}
article {
border-top: 1px solid var(--light-gray);
padding: 14px 0 30px 0;
}
table {
border-collapse: collapse;
width: 100%;
margin: 0 0 20px 0;
}
th {
background-color: var(--main-gray);
color: var(--white);
text-align: left;
padding: 5px 8px;
border: 1px solid var(--main-gray);
}
td {
padding: 5px;
border: 1px solid var(--main-gray);
}
td.code {
font-family: "Source Code Pro", monospace;
font-weight: 600;
}
.label {
float: right;
margin-top: 4px;
user-select: none;
}
.label.optional {
background-color: grey;
}
.label.required {
background-color: var(--red);
}
.default-value,
.type-size {
font-style: italic;
font-size: 95%;
}
.open-left {
right: 0;
left: auto;
}
.invisible {
visibility: hidden;
}
.input-group-addon.sample-request-select {
padding: 0 6px;
}
.input-group-addon.sample-request-select select {
width: auto;
height: 32px;
}
.sample-request-input-Boolean-container {
width: 40px;
height: 34px;
background: var(--white);
border: 1px solid var(--light-gray);
}
.sample-request-input-Boolean-container > div {
margin-top: 7px;
text-align: center;
}
.sample-request-input-Boolean-container > div input {
margin: 0;
}
/* ------------------------------------------------------------------------------------------
* Request method (HTTP verb)
* ------------------------------------------------------------------------------------------ */
.method {
font-weight: 600;
font-size: 15px;
display: inline-block;
margin: 0 0 5px 0;
padding: 4px 5px;
border-radius: 6px;
text-transform: uppercase;
background-color: var(--main-gray);
color: var(--white);
}
.meth-get {
background-color: var(--meth-get);
}
.meth-put {
background-color: var(--meth-put);
}
.meth-post {
background-color: var(--meth-post);
}
.meth-delete {
background-color: var(--meth-delete);
}
/* ------------------------------------------------------------------------------------------
* Sidenav
* ------------------------------------------------------------------------------------------ */
.sidenav {
color: var(--white);
width: 20%;
position: fixed;
top: 50px;
left: 0;
bottom: 0;
overflow-x: hidden;
overflow-y: auto;
background-color: var(--dark-gray);
}
.sidenav > li > a {
color: var(--white);
display: block;
padding: 8px 13px;
}
/* non active sidenav link are highlighted on hover */
.sidenav > li:not(.active) > a:hover {
background-color: var(--hover-gray);
}
.sidenav > li.nav-header {
margin-top: 8px;
margin-bottom: 8px;
}
.sidenav > li.nav-header > a {
padding: 5px 15px;
font-weight: 700;
font-size: 16px;
background-color: var(--main-gray);
}
.sidenav > li.active > a {
position: relative;
background-color: var(--primary);
color: var(--white);
}
/**
* TODO: commented out for the moment
.sidenav > li.has-modifications a {
border-right: 4px solid var(--main-gray);
}
.nav-list-item :not(.is-new) {
border-left: 4px solid var(--main-gray);
}
.sidenav > li.is-new a {
border-left: 4px solid var(--primary);
}
*/
/* ------------------------------------------------------------------------------------------
* Side nav search
* ------------------------------------------------------------------------------------------ */
.sidenav-search {
width: 20%;
left: 0px;
position: fixed;
padding: 16px 20px 10px 20px;
background-color: var(--dark-gray);
}
.sidenav-search .search {
height: 26px;
}
.search-reset {
position: absolute;
display: block;
cursor: pointer;
width: 20px;
height: 20px;
text-align: center;
right: 28px;
top: 17px;
background-color: #fff;
}
/* ------------------------------------------------------------------------------------------
* Compare
* ------------------------------------------------------------------------------------------ */
ins {
background: #60d060;
text-decoration: none;
color: #000000;
}
del {
background: #f05050;
color: #000000;
}
.label-ins {
background-color: #60d060;
}
.label-del {
background-color: #f05050;
text-decoration: line-through;
}
pre.ins {
background-color: #60d060;
}
pre.del {
background-color: #f05050;
text-decoration: line-through;
}
table.ins th,
table.ins td {
background-color: #60d060;
}
table.del th,
table.del td {
background-color: #f05050;
text-decoration: line-through;
}
tr.ins td {
background-color: #60d060;
}
tr.del td {
background-color: #f05050;
text-decoration: line-through;
}
/* ------------------------------------------------------------------------------------------
* Spinner
* ------------------------------------------------------------------------------------------ */
#loader {
position: absolute;
width: 100%;
}
#loader p {
padding-top: 80px;
margin-left: -4px;
}
.spinner {
margin: 200px auto;
width: 60px;
height: 60px;
position: relative;
}
.container1 > div, .container2 > div, .container3 > div {
width: 14px;
height: 14px;
background-color: #0088cc;
border-radius: 100%;
position: absolute;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out;
animation: bouncedelay 1.2s infinite ease-in-out;
/* Prevent first frame from flickering when animation starts */
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.spinner .spinner-container {
position: absolute;
width: 100%;
height: 100%;
}
.container2 {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
}
.container3 {
-webkit-transform: rotateZ(90deg);
transform: rotateZ(90deg);
}
.circle1 { top: 0; left: 0; }
.circle2 { top: 0; right: 0; }
.circle3 { right: 0; bottom: 0; }
.circle4 { left: 0; bottom: 0; }
.container2 .circle1 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.container3 .circle1 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}
.container1 .circle2 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.container2 .circle2 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
.container3 .circle2 {
-webkit-animation-delay: -0.7s;
animation-delay: -0.7s;
}
.container1 .circle3 {
-webkit-animation-delay: -0.6s;
animation-delay: -0.6s;
}
.container2 .circle3 {
-webkit-animation-delay: -0.5s;
animation-delay: -0.5s;
}
.container3 .circle3 {
-webkit-animation-delay: -0.4s;
animation-delay: -0.4s;
}
.container1 .circle4 {
-webkit-animation-delay: -0.3s;
animation-delay: -0.3s;
}
.container2 .circle4 {
-webkit-animation-delay: -0.2s;
animation-delay: -0.2s;
}
.container3 .circle4 {
-webkit-animation-delay: -0.1s;
animation-delay: -0.1s;
}
@-webkit-keyframes bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0.0) }
40% { -webkit-transform: scale(1.0) }
}
@keyframes bouncedelay {
0%, 80%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
} 40% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}
/* ------------------------------------------------------------------------------------------
* Tabs
* ------------------------------------------------------------------------------------------ */
ul.nav-tabs {
margin: 0;
}
p.deprecated span{
color: var(--red);
font-weight: bold;
text-decoration: underline;
}
/**
* Footer
*/
#generator {
padding: 10px 0;
}
/* ------------------------------------------------------------------------------------------
* Print
* ------------------------------------------------------------------------------------------ */
@media print {
#sidenav,
#version,
#versions,
section .version,
section .versions {
display: none;
}
#content {
margin-left: 0;
}
a {
text-decoration: none;
color: inherit;
}
a:after {
content: " [" attr(href) "] ";
}
p {
color: #000000
}
pre {
background-color: #ffffff;
color: #000000;
padding: 10px;
border: #808080 1px solid;
border-radius: 6px;
position: relative;
margin: 10px 0 20px 0;
}
} /* /@media print */
@@ -0,0 +1,122 @@
/**
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
* Based on https://github.com/chriskempson/tomorrow-theme
* @author Rose Pritchard
*/
code[class*="language-"],
pre[class*="language-"] {
color: #000000;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #2d2d2d;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999;
}
.token.punctuation {
color: #ccc;
}
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: #e2777a;
}
.token.function-name {
color: #6196cc;
}
.token.boolean,
.token.number,
.token.function {
color: #f08d49;
}
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: #f8c555;
}
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: #cc99cd;
}
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
color: #7ec699;
}
.token.operator,
.token.entity,
.token.url {
color: #67cdcc;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.inserted {
color: green;
}
@@ -0,0 +1,2 @@
# 写在结尾
文档结束内容说明
@@ -0,0 +1,930 @@
- [BR28 lua_ui开发](#br28-lua_ui开发)
- [1. ui控件增加lua属性](#1-ui控件增加lua属性)
- [1.1. ui工具中增加luascript属性(以layout为例)](#11-ui工具中增加luascript属性以layout为例)
- [1.1.1. 控件模板添加luascript属性](#111-控件模板添加luascript属性)
- [1.1.2. 升级ui工程源文件](#112-升级ui工程源文件)
- [1.2. BR28 SDK的对应控件添加lua属性(以layout为例)](#12-br28-sdk的对应控件添加lua属性以layout为例)
- [1.2.1. lua属性结构定义](#121-lua属性结构定义)
- [1.2.2. layout结构添加lua属性](#122-layout结构添加lua属性)
- [1.2.2.1. 在控件初始化函数添加 lua onload 代码的调用](#1221-在控件初始化函数添加-lua-onload-代码的调用)
- [1.2.2.2. 在控件 ontouch 事件回调函数添加 touch 事件的响应代码执行](#1222-在控件-ontouch-事件回调函数添加-touch-事件的响应代码执行)
- [2. 使用lua脚本开发APP](#2-使用lua脚本开发app)
- [2.1. lua数据类型](#21-lua数据类型)
- [2.2. 常用的lua语法](#22-常用的lua语法)
- [2.3. br28 lua库](#23-br28-lua库)
- [3. 扩展lua库](#3-扩展lua库)
- [3.1 SDK添加lua扩展接口和库代码](#31-sdk添加lua扩展接口和库代码)
- [3.1.1 常用的lua CAPI](#311-常用的lua-capi)
- [3.1.2 br28 SDK用C语言添加一个lua库](#312-br28-sdk用c语言添加一个lua库)
- [3.1.3 br28 lua库结构](#313-br28-lua库结构)
- [3.1.4 br28 gui库结构](#314-br28-gui库结构)
- [3.2 模拟器添加lua扩展模拟接口](#32-模拟器添加lua扩展模拟接口)
- [4. 使用lua模拟UI效果](#4-使用lua模拟ui效果)
- [4.1 创建button控件](#41-创建button控件)
- [4.2 编辑lua代码](#42-编辑lua代码)
- [4.3 启动模拟器](#43-启动模拟器)
- [4.4 小机运行验证](#44-小机运行验证)
- [5 现有的lua接口](#5-现有的lua接口)
- [5.1 GUI 库](#51-gui-库)
- [5.1.1 函数接口介绍模板](#511-函数接口介绍模板)
- [5.1.1 获取控件对象](#511-获取控件对象)
- [5.1.2 页面切换](#512-页面切换)
- [5.1.3 返回上一页](#513-返回上一页)
- [5.1.4 检查上一层页面](#514-检查上一层页面)
# BR28 lua_ui开发
## 1. ui控件增加lua属性
&nbsp;&nbsp;&nbsp;&nbsp;br28 SDK的UI控件可添加使用脚本语言lua开发的方法,控件中添加lua属性后即可通过ui工具作为IDE进行lua脚本开发,实现在windows系统中开发br28项目APP的目的。<br>
&nbsp;&nbsp;&nbsp;&nbsp;注意:ui工具和SDK对应的控件属性要一致,如果SDK中对控件添加lua脚本调用,UI工具中未添加lua脚本属性,或者反之。则执行时可能出现不可预测的后果。
## 1.1. ui工具中增加luascript属性(以layout为例)
如果要在已有工程中添加lua属性,则需按照下面方法:
1. 在控件模板中添加luascript属性描述;
2. 使用源文件升级工具将已有的工程源文件进行升级;
3. 重启ui编辑工具进行lua编程开发。
### 1.1.1. 控件模板添加luascript属性
UI工程目录下有控件模板文件control.json,路径为:
> 基本控件:
>
> UI工程/UITools/control/control.json
>
> 自定义控件:
>
> UI工程/UITools/control/ex/xxx.json
使用文本编辑工具打开json文件,找到layout控件定义部分,在**action属性后面**添加luascript属性描述。内容如下:
```json
{
"-name": "luascript",
"-type": "luascript",
"caption": "Lua脚本",
"luascript": [{
"event": "ONLOAD",
"type": 0,
"code": ""
},{
"event": "UNLOAD",
"type": 1,
"code": ""
},{
"event": "TOUCH_DOWN",
"type": 2,
"code": ""
},{
"event": "TOUCH_MOVE",
"type": 3,
"code": ""
},{
"event": "TOUCH_R_MOVE",
"type": 4,
"code": ""
},{
"event": "TOUCH_L_MOVE",
"type": 5,
"code": ""
},{
"event": "TOUCH_D_MOVE",
"type": 6,
"code": ""
},{
"event": "TOUCH_U_MOVE",
"type": 7,
"code": ""
},{
"event": "TOUCH_HOLD",
"type": 8,
"code": ""
},{
"event": "TOUCH_UP",
"type": 9,
"code": ""
}]
}
```
### 1.1.2. 升级ui工程源文件
在“UI工程”目录的路径下找到升级工具文件:
> UI工程/UITools/UI工程源文件升级工具.exe
双击运行该程序得如下界面:
<div align=center>
<img src="./image/upgradTools.png">
</div>
根据图中序号进行操作:
1. 选择控件模板文件;
> 这里选择刚刚修改的“UI工程/UITools/control/control.json”文件
2. 选择待升级的ui工程源文件;
> br28的UI工程“模式界面”源文件为:“UI工程\ui_240x240_watch\模式界面\project\BT_Watch.json”
3. 选择升级后输出的文件路径及名称;
> 一般将待转换的源文件备份后直接使用源文件命名,升级的源文件使用备份文件。升级完成后即可直接使用升级后的文件。
4. 点击转换升级,等待进度条完成。
> 等待“转换进度”的进度条完成即可。注意br23工程文件升级br28的话,需将“ImageType”选项选中。
至此完成对UI工程源文件的升级,根据模板,升级工具会自动将UI工程源文件中对应控件添加lua属性。此时打开“UI绘图工具”属性栏部分会增加“lua脚本”按钮,点击即弹出lua脚本编辑窗口,UI工具中lua属性添加完成。
<div align=center>
<img src="./image/lua_edit.png">
</div>
## 1.2. BR28 SDK的对应控件添加lua属性(以layout为例)
### 1.2.1. lua属性结构定义
在BR28 SDK的UI库的头文件“contol.h”中定义lua结构为:
```c
// lua事件类型
enum luascript_event_type {
LUA_EVENT_ONLOAD = 0,
LUA_EVENT_UNLOAD,
LUA_EVENT_TOUCH_DOWN,
LUA_EVENT_TOUCH_MOVE,
LUA_EVENT_TOUCH_R_MOVE,
LUA_EVENT_TOUCH_L_MOVE,
LUA_EVENT_TOUCH_D_MOVE,
LUA_EVENT_TOUCH_U_MOVE,
LUA_EVENT_TOUCH_HOLD,
LUA_EVENT_TOUCH_UP,
};
// lua属性结构
struct luascript_code {
u16 type;
u16 argc;
char argv[0];
};
// ui资源结构
struct element_luascript {
u16 num;
u16 nop; //FFFF
struct luascript_code code[0];
};
struct element_luascript_t {
u16 num;
u16 nop; //FFFF
struct luascript_code *code[10];
};
```
其中,**枚举变量“luascript_event_type”定义的lua事件类型与上述控件模板中添加的“luascript属性”对应**,枚举值为luasctipt属性的“type”属性。
### 1.2.2. layout结构添加lua属性
在layout控件的结构体内添加lua属性,注意与UI工具中添加的顺序一致。结构体代码为:
```c
struct layout_info {
struct ui_ctrl_info_head head;
struct element_event_action *action;
// lua属性
struct element_luascript_t *lua;
union ui_control_info *ctrl;
};
```
> 注意:action 结构为UI工具中“事件属性”对应的属性,我们在UI工具中控件的 lua 属性添加到事件之后,因此这里的结构要将 lua 结构添加到 action 之后。
在 layout.h 头文件中的 layout 结构添加 lua 属性指针,代码为:
```c
struct layout {
struct element elm; //must be first
u8 hide: 1;
u8 inited: 1;
u8 release: 6;
// u8 css_num:5;
// u32 css[2];
u8 page;
struct element_luascript_t *lua;
struct layout *layout;
const struct layout_info *info;
const struct element_event_handler *handler;
};
```
在 layout.c 中添加对 lua 代码的获取与调用:
#### 1.2.2.1. 在控件初始化函数添加 lua onload 代码的调用
&nbsp;&nbsp;&nbsp;&nbsp;onload 代码我们放在控件初始化时,即 change 事件的 ON_CHANGE_INIT 中调用,那么我们需要在控件新创建时记录下相关的lua信息,然后再到对于事件中添加 lua 代码读取和执行的内容。
1. 找到控件“初始化”或“创建新控件”函数,layout控件的初始化函数为
```c
int layout_init(struct layout *layout, struct layout_info *__info,
struct element *parent, bool init);
```
2. 记录 lua 相关信息
```c
struct layout_info *info = (struct layout_info *)ui_core_load_widget_info(__info, -1);
layout->info = __info;
/* 记录控件所在页面和lua代码信息 */
layout->page = info->head.page;
layout->lua = info->lua;
```
3. 在控件 onchange 回调中添加 lua onload 和 unload 代码获取和执行
```c
static int layout_onchange(void *_layout, enum element_change_event event, void *arg)
{
struct layout *layout = (struct layout *)_layout;
int lua_running = 0; /* lua代码执行标志 */
struct luascript_code *lua_code = NULL; /* lua 代码结构 */
struct element_luascript_t *elm_lua = NULL; /* 控件中 lua 代码属性 */
if (layout->release) {
if (event == ON_CHANGE_RELEASE_PROBE) {
ui_core_release_child_probe(&layout->elm);
return false;
}
if (event == ON_CHANGE_RELEASE) {
if (ENABLE_LUA_VIRTUAL_MACHINE) {
/* 在 ON_CHANGE_ERELEASE 事件中执行lua unload代码 */
elm_lua = (struct element_luascript_t *)ui_core_load_lua(layout->page, layout->lua); /* 从UI资源中读取lua源码 */
if (luascript_code_find(elm_lua, LUA_EVENT_UNLOAD, &lua_code)) {
/* 搜索unload代码并执行 */
lua_running = run_lua_string(lua_code->argc, &lua_code->argv);
}
ui_core_free_lua(elm_lua); /* 释放lua源码占用的资源 */
}
if (layout->handler && layout->handler->onchange) {
layout->handler->onchange(layout, event, arg);
}
ui_core_remove_element(&layout->elm);
ui_core_free(layout);
return true;
}
}
if (!layout->inited) {
return false;
}
if (ENABLE_LUA_VIRTUAL_MACHINE) {
if (event == ON_CHANGE_INIT || event == ON_CHANGE_UPDATE_ITEM) {
/* 在 ON_CHANGE_INIT 事件中执行onload代码 */
elm_lua = (struct element_luascript_t *)ui_core_load_lua(layout->page, layout->lua);
if (luascript_code_find(elm_lua, LUA_EVENT_ONLOAD, &lua_code)) {
lua_running = run_lua_string(lua_code->argc, &lua_code->argv);
}
ui_core_free_lua(elm_lua);
}
/* 默认不 return */
if (lua_running) {
return true;
}
}
if (layout->handler && layout->handler->onchange) {
if (layout->handler->onchange(layout, event, arg)) {
return true;
}
}
switch (event) {
case ON_CHANGE_HIGHLIGHT:
layout_highlight(layout, (int)arg);
break;
case ON_CHANGE_SHOW_POST:
custom_draw_callback(layout, arg);
// 先预留,后续自定义绘图可能要在这里实现
break;
default:
break;
}
return true;
}
```
4. 需注意的几个函数接口含义
```c
// 加载lua代码
// 该函数会在指定的UI页资源中加载lua代码并自动申请控件存储,将内存指针返回
elm_lua = (struct element_luascript_t *)br28_load_lua(info->head.page, info->lua);
```
```c
// 搜索lua代码块
// 该函数会在 elm_lua 指针的内存中搜索指定事件“LUA_EVENT_ONLOAD” 的代码,并将其指针赋值给 lua_code,如果成功找到则返回true,否则返回false
luascript_code_find(elm_lua, LUA_EVENT_ONLOAD, &lua_code)
```
```c
// 执行lua代码,其中参数argc为源码字符串长度,参数argv为源码字符串指针
lua_running = run_lua_string(lua_code->argc, &lua_code->argv);
```
```c
// 释放elm_lua内存
ui_core_free_lua(elm_lua);
```
#### 1.2.2.2. 在控件 ontouch 事件回调函数添加 touch 事件的响应代码执行
ontouch事件处理函数如下,根据br28 ui资源的存放机制,在调用该代码之前需要主动加载lua代码,而后再执行。
```c
static int layout_ontouch(void *_layout, struct element_touch_event *e)
{
struct layout *layout = (struct layout *)_layout;
int lua_code = 0;
struct element_luascript_t *elm_lua = NULL;
if (!layout->inited) {
return false;
}
if (ENABLE_LUA_VIRTUAL_MACHINE) {
// 加载 lua 源码资源
elm_lua = (struct element_luascript_t *)ui_core_load_lua(layout->page, layout->lua);
// 执行 touch 对于事件源码,该函数定义在 control.h 中
lua_code = lua_touch_event_run(elm_lua, e);
ui_core_free_lua(elm_lua);
if (lua_code) {
return true;
}
}
if (layout->handler && layout->handler->ontouch) {
if (layout->handler->ontouch(layout, e)) {
return true;
}
}
return false;
}
```
注意:由于lua回调可能会调用自身资源,因此在执行onload部分代码时,应当先让控件初始化完成再执行onload代码。同样在控件使用release释放自身资源之前执行lua unload部分代码
## 2. 使用lua脚本开发APP
&nbsp;&nbsp;&nbsp;&nbsp;通过章节一已经完成在ui源文件和SDK中添加lua脚本属性,接下来使用新版UI工具运用lua脚本开发APP,同时例用lua模拟器在windows系统下完成预调试。在模拟器运行无误后再将编译的UI资源文件下载到项目的flash中,在小机中完成最终测试。
### 2.1. lua数据类型
&nbsp;&nbsp;&nbsp;&nbsp;lua 是一种无类型的解释语言,其变量无需像C语言一样声明变量类型,在变量初始化时解释器会自动确定该变量的类型。
|编号|数据类型|描述|
|:-----:|:-----:|:-----|
|1|nil|用于区分值与某些数据或没有(nil)数据|
|2|boolean|包括 true 和 false 作为值,通常用于条件检查|
|3|number|表示实数(双精度浮点)数字|
|4|string|表示字符数组|
|5|function|表示用C或者lua编写的方法(函数)|
|6|userdata|表示任意C语言数据|
|7|thread|表示独立的执行线程,它用于实现协同程序|
|8|table|表示普通数组,符号表,集合,记录,图形,树等,并实现关联数组。它可以保存任何值(除了nil)|
> 注意:
>
> table table)是 lua 中一种功能强大的数据结构,可以用它创建不同的数据类型,如:数组、字典等
> * Lua table 使用关联型数组,你可以用任意类型的值来作数组的索引,但这个值不能是 nil。
> * Lua table 是不固定大小的,你可以根据自己需要进行扩容。
> * Lua也是通过table来解决模块(module)、包(package)和对象(Object)的。 例如string.format表示使用"format"来索引table string。
>
> ```lua
> -- 简单的 table
> mytable = {}
> print("mytable 的类型是 ",type(mytable))
>
> mytable[1]= "Lua"
> mytable["wow"] = "修改前"
> print("mytable 索引为 1 的元素是 ", mytable[1])
> print("mytable 索引为 wow 的元素是 ", mytable["wow"])
>
> -- alternatetable和mytable的是指同一个 tabl
> alternatetable = mytable
>
> print("alternatetable 索引为 1 的元素是 ", alternatetable[1])
> print("mytable 索引为 wow 的元素是 ", alternatetable["wow"])
> alternatetable["wow"] = "修改后"
>
> print("mytable 索引为 wow 的元素是 ", mytable["wow"])
>
> -- 释放变量
> alternatetable = nil
> print("alternatetable 是 ", alternatetable)
>
> -- mytable 仍然可以访问
> print("mytable 索引为 wow 的元素是 ", mytable["wow"])
>
> mytable = nil
> print("mytable 是 ", mytable)
> ```
>
### 2.2. 常用的lua语法
1. 条件语句
```lua
-- 条件语句
if (0) then
-- 布尔表达式0为true时执行该语句块
elseif (1) then
-- 布尔表达式1为true时执行该语句块
else
-- 布尔表达式0和1均为false时执行该语句块
end
```
2. 循环语句
```lua
-- while 循环语句
while (condition) do
-- statements
end
-- statements(循环体语句) 可以是一条或多条语句,condition(条件) 可以是任意表达式,在 condition(条件) 为 true 时执行循环体语句。
```
```lua
-- for 循环语句
--[[
Lua 编程语言中 for 语句有两大类:
1、数值 for 循环
2、泛型 for 循环
]]
-- 1. 数值 for 循环
for var=exp1,exp2,exp3 do
<>
end
-- var 从 exp1 变化到 exp2,每次变化以 exp3 为步长递增 var,并执行一次 "执行体"。exp3 是可选的,如果不指定,默认为1。且for的三个表达式在循环开始前一次性求值,以后不再进行求值。比如上面的f(x)只会在循环开始前执行一次,其结果用在后面的循环中。
for i=10, 1, -1 do
print(i)
end
-- 2. 泛型 for 循环
-- 泛型 for 循环通过一个迭代器函数来遍历所有值,类似 java 中的 foreach 语句。
a = {"one", "two", "three"}
for i, v in ipairs(a) do
-- 整数索引,此时table与数组一样,可通过a[1]来访问 “one”
print(i, v)
end
b = {name="xiaoming", age=15, class=1}
for k, v in pairs(b) do
-- 键-值 结构
print(k, v)
end
```
```lua
repeat
-- statements
until(condition)
-- 循环条件判断语句(condition)在循环体末尾部分,所以在条件进行判断前循环体都会执行一次。如果条件判断语句(condition)为 false,循环会重新开始执行,直到条件判断语句(condition)为 true 才会停止执行。(类似于C语言的 do...while 循环)
a = 5
repeat
print(a)
a = a + 1
until(a>10)
```
3. 循环控制语句
```lua
-- break 语句
-- break 语句插入在循环体中,用于退出当前循环或语句,并开始脚本执行紧接着的语句。如果使用循环嵌套,break语句将停止最内层循环的执行,并开始执行的外层的循环语句。
a = 10
--[ while 循环 --]
while( a < 20 ) do
print("a 的值为:", a)
a=a+1
if( a > 15) then
--[ 使用 break 语句终止循环 --]
break
end
end
```
```lua
-- goto 语句
-- goto 语句允许将控制流程无条件地转到被标记的语句处。
local a = 1
::label:: print("--- goto label ---")
a = a+1
if a < 3 then
goto label -- a 小于 3 的时候跳转到标签 label
end
```
4. 函数定义
lua 函数定义格式如下:
optional_function_scope function function_name( argument1, argument2, argument3..., argumentn)
function_body
return result_params_comma_separated
end
解析:
* optional_function_scope: 该参数是可选的制定函数是全局函数还是局部函数,未设置该参数默认为全局函数,如果你需要设置函数为局部函数需要使用关键字 local。
* function_name: 指定函数名称。
* argument1, argument2, argument3..., argumentn: 函数参数,多个参数以逗号隔开,函数也可以不带参数。
* function_body: 函数体,函数中需要执行的代码语句块。
* result_params_comma_separated: 函数返回值,Lua语言函数可以返回多个值,每个值以逗号隔开。
示例:
```lua
--[ 普通函数:返回两个数的最大值 ]
function max(a, b)
if (a > b) then
result = a
else
result = b
end
return result
end
--[ 函数作为参数:求两数和,并打印最大值 ]
function add(a, b, func)
result = a + b
print("the max number is: "..tostring(func(a, b)))
return result
end
sum = add(2, 5, max)
-- [ 多个返回值:求数组中最大值及其索引 ]
function maximum (a)
local mi = 1 -- 最大值索引
local m = a[mi] -- 最大值
for i,val in ipairs(a) do
if val > m then
mi = i
m = val
end
end
return m, mi
end
max_num, max_ind = maximum({8, 2, 3, 15, 7, 1})
-- [ 可变参函数:求一组整数的和 ]
function add(...)
local s = 0
-- 通过 select("#", ...) 获取可变参数的数量
print("arg number: "..tostring(select("#", ...)))
-- {...} 表示一个由所有变长参数构成的数组
for i, v in ipairs{...} do
s = s + v
end
return s
end
```
5. 模块和包
Lua 的模块是由变量、函数等已知元素组成的 table,因此创建一个模块很简单,就是创建一个 table,然后把需要导出的常量、函数放入其中,最后返回这个 table 就行。以下为创建自定义模块 module.lua,文件代码格式如下:
```lua
-- 文件名为 module.lua
-- 定义一个名为 module 的模块
module = {}
-- 定义一个常量
module.constant = "这是一个常量"
-- 定义一个函数
function module.func1()
io.write("这是一个公有函数!\n")
end
local function func2()
print("这是一个私有函数!")
end
function module.func3()
func2()
end
return module
```
### 2.3. br28 lua库
|名称|描述|例如|
|:-----:|:-----|:-----|
|gui|gui 的各种控件接口|控件显示、隐藏、高亮等|
|bt|蓝牙相关控制接口|蓝牙开关、搜索、连接等|
|music|音乐相关控制接口|音乐开关、音量控制等|
|bsp|核心资源接口|gpio、定时器、事件注册等|
|device|传感器控制接口|心率、计步传感器等|
## 3. 扩展lua库
### 3.1 SDK添加lua扩展接口和库代码
&nbsp;&nbsp;&nbsp;&nbsp;lua代码和SDK C代码之间交互通过lua虚拟机的虚拟栈实现,lua虚拟栈与普通栈一样具有先进后出的特点,C代码可以通过索引获取lua栈中的元素。lua栈的索引可以为正数或负数,正数索引“1”永远表示栈底,从栈底到栈顶依次递增。负数索引“-1”永远表示栈顶,从栈顶到栈底依次递减。
<div align=center>
<img src="./image/stack.png">
</div>
&nbsp;&nbsp;&nbsp;&nbsp;lua的全局变量存放在一个称为全局变量表的数据结构中,lua的全局表可以想象成一个map哈希表结构,比如lua代码有一个变量:name=”hello world”,全局变量表中存放了name和“hello world”的对应关系,可以通过name在全局中找到对应的“hello world”。
<div align=center>
<img src="./image/stack_go.png">
</div>
1. C把name放到堆栈(栈顶),方便lua获取;
2. Lua从堆栈(栈顶)获取到name的值,获取后栈顶变为空;
3. Lua去全局表中查找name对应的字符串;
4. 全局表返回对应的字符串“hello world”;
5. Lua再次把“hello world”放到堆栈(栈顶);
6. C从堆栈(栈顶)获取name的值“hello world”。
#### 3.1.1 常用的lua CAPI
1. 常用lua虚拟栈数据操作(lua和C交互接口)
|数据类型|出栈|入栈|类型判断|
|:-----:|:-----|:-----|:-----|
|整形|lua_tointer(L, index)|lua_pushinterger(L, num)|lua_isinterger(L, index)|
|字符串|lua_tostring(L, index)|lua_pushstring(L, num)|lua_isstring(L, index)|
|布尔值|lua_toboolean(L, index)|lua_pushboolean(L, num)|lua_isboolean(L, index)|
|浮点数|lua_tounmber(L, index)|lua_pushnumber(L, num)|lua_isnumber(L, index)|
#### 3.1.2 br28 SDK用C语言添加一个lua库
br28 lua库代码在SDK中的路径为:
> apps/watch/ui/lua_ui/
其中核心文件主要有三个,分别为 lua_module.c, lua_module.h, lua_main.lua
* lua_module.clua解释器初始化,库加载和lua源码执行接口;
* lua_module.h:各模块声明和lua库全局变量定义;
* lua_main.luagui库的核心lua程序,创建gui库,并继承C实现的ui库,同时创建控件实例时负责调用接口加载对于控件类型的方法。
下面以utils库为例,演示实现添加一个lua库的过程
1. 新建文件 lua_utils.c和头文件lua_utils.h。头文件lua_utils.h暂时为空,在 lua_utils.c 文件中添加以下内容:
```c
// lua_utils.h
#ifndef __LUA_UTILS_H__
#define __LUA_UTILS_H__
#endif
// lua_utils.c
#include "lua/lauxlib.h"
#include "lua/lualib.h"
#include "lua_module.h"
#include "lua_utils.h"
static int utils_help(lua_State *L)
{
printf(">>> lua help!\n");
return 0;
}
// utils module
const luaL_Reg utils_method[] = {
{"help", utils_help},
{NULL, NULL} // 必须以null结尾
};
// 注册utils模块
LUALIB_API int luaopen_utils(lua_State *L)
{
luaL_newlib(L, utils_method);
return 1;
}
```
2. 在 lua_module.h 中添加 utils 库注册接口定义
```c
// lua_module.h
// utils模块
#define LUA_UTILSNAME "utils"
LUALIB_API int (luaopen_utils)(lua_State *L);
```
3. 在 lua_module.c 中的库列表中添加 utils 库的注册
```c
const luaL_Reg loadedlibs[] = {
// 内部基本库,修改会影响使用
{"_G", luaopen_base},
{LUA_STRLIBNAME, luaopen_string},
// 添加用户自定义库
{LUA_UTILSNAME, luaopen_utils }, // utils
// 必须以NULL结尾
{NULL, NULL}
};
```
以上,便完成在lua上添加一个utils库,并在库中实现了“help”方法。启动lua解释器后,便可通过命令来调用 help 方法:
> utils:help()
#### 3.1.3 br28 lua库结构
<div align=center>
<img src="./image/lua_module.png">
</div>
#### 3.1.4 br28 gui库结构
<div align=center>
<img src="./image/gui_module.png">
</div>
### 3.2 模拟器添加lua扩展模拟接口
&nbsp;&nbsp;&nbsp;&nbsp;与SDK添加lua库不同,模拟器使用的lua库为通过lua源码将lua模拟器提供的ui控件操作方法进行再封装,封装成与SDK中lua库名称、参数、效果一致的方法,以此来实现模拟器模拟小机上运行效果。
## 4. 使用lua模拟UI效果
&nbsp;&nbsp;&nbsp;&nbsp;下面以button控件高亮和非高亮状态切换为例演示在ui工具中开发APP并使用lua模拟器模拟在br28机器上运行效果的流程。
### 4.1 创建button控件
&nbsp;&nbsp;&nbsp;&nbsp; 在ui工具中新建一个页面,页面中分别添加一个图层,一个布局,在布局内添加一个按钮控件。如下图:
<div align=center>
<img src="./image/new_button.png">
</div>
&nbsp;&nbsp;&nbsp;&nbsp; 创建button高亮属性,这里将高亮时背景颜色设置为黄色
<div align=center>
<img src="./image/button_highlight.png">
</div>
### 4.2 编辑lua代码
&nbsp;&nbsp;&nbsp;&nbsp; 在属性栏最下端有“lua脚本”按钮,单击它弹出lua脚本编辑窗口。lua脚本按事件类型调用对应代码,根据控件响应的事件种类不同,提供的事件类型选项也不同,例如“数字”控件只有ONLOAD和UNLOAD事件,不响应touch事件。
事件 | 备注
---|---
ONLOAD | 控件加载,控件初始化后会调用这里的脚本,一些控件的全局变量可在这里声明。
UNLOAD | 控件释放,控件的资源释放前会调用该脚本,全局变量等控件自己使用的资源可在这里释放。
TOUCH_DOWN | touch down事件,控件被按下时调用。
TOUCH_MOVE | touch move事件,控件内滑动时(不管方向)调用。
TOUCH_R_MOVE | touch move right事件,控件内右滑时调用。
TOUCH_L_MOVE | touch move left事件,控件内左滑时调用。
TOUCH_D_MOVE | touch move down事件,控件内下滑时调用。
TOUCH_U_MOVE | touch move up事件,控件内上滑时调用。
TOUCH_HOLD | touch hold事件,控件长按时被调用。
TOUCH_UP | touch up事件,控件被松开时调用。
&nbsp;&nbsp;&nbsp;&nbsp; 这里只演示按钮的高亮和非高亮状态切换,在lua脚本编辑窗口的onload和touch_up事件选项内分别添加如下代码:
1. 在ONLOAD事件中声明highlight标志变量
```lua
-- ONLOAD event
print('button onload')
highlight = false
```
2. 在TOUCH_UP中添加高亮切换逻辑
```lua
button = gui:getComponentByName('BaseForm_792')
if (highlight) then
button:noHighLight()
highlight = false
else
button:highLight()
highlight = true
end
print('button highlight state: '..tostring(highlight))
button = nil
```
3. 完成后点击“确定”保存lua脚本
<div align=center>
<img src="./image/touch_up_lua_code.png">
</div>
### 4.3 启动模拟器
保存工程后打开模拟器,即可对以上添加的脚本响应进行仿真模拟,测试是否达到所需的效果。
1. 打开模拟器
<div align=center>
<img src="./image/save_and_open.png">
</div>
1. 在工程目录下双击选择工程源文件,并启动模拟器
<div align=center>
<img src="./image/moni.png">
</div>
1. 运行后弹出模拟器窗口,在模拟器窗口中可模拟ui在小机中的动作及响应。若响应效果不如预期,则根据控制台打印debug。
<div align=center>
<img src="./image/touch.png">
</div>
注意:需特别留意 [ ERROR ] 的打印,系统将参数检查等内容在做在虚拟机中,如果参数类型错误等会打印相应的 [ ERROR ] 信息。小机运行时不检查参数类型,因此如果参数类型错误等会导致小机获取到的参数为空,从而不能正常运行出结果。
### 4.4 小机运行验证
通过4.3在lua模拟器中验证完成所需功能后,将UI资源保存编译,然后下载到小机上进行最终验证。
1. 打开UI资源生成工具,一般目录为:
> UI工程\ui_240x240_watch\模式界面\step2-打开UI资源生成工具.bat
2. 点击“生成资源文件”,将UI源文件编译成UI资源;
3. 通过tools目录下的“download.bat”脚本将资源文件下载到小机;
4. 运行验证。
## 5 现有的lua接口
所有ui控件相关操作均通过 gui:getComponentByName("BUTTON_1") 这种方法获取,其中参数为UI工具中控件的唯一名称“ID号”;获取实例后系统会自动根据不同的控件类型加载对应控件的方法。其中公共方法所有控件均可使用,Text 方法只可用于文本控件,image 方法只可用于图片控件等。如果图片控件调用文本控件的方法,则系统会提示调用nil值。
### 5.1 GUI 库
#### 5.1.1 函数接口介绍模板
1. 名称:
2. 功能:
3. 参数:
1.
4. 返回值:
1.
5. 异常情况:
1.
6. 示例:
```lua
```
#### 5.1.1 获取控件对象
1. 名称:obj = gui:getComponentByName(ename)
2. 功能:通过控件名称创建该控件的对象
3. 参数:
1. ename 编辑器中控件的名称
4. 返回值:
1. obj 控件对象
5. 异常情况:
1. 控件类型未知时,返回值obj为空
6. 示例:
```lua
-- 文本控件名称 TEST_TEXT,获取该文本控件对象,并设置该文本控件显示"hello"
test_text = gui:getComponentByName("TEST_TEXT")
test_text:setText("hello")
```
#### 5.1.2 页面切换
1. 名称:gui:switchPageByName(ename, mode, record)
2. 功能:以指定方式跳转到指定页面,并选择是否记录跳转路径
3. 参数:
1. ename: 目标页面名称
1. "PAGE_x" 第x页的页面名称
2. mode:切换方式,
1. "left" 目标页面从左边滑入
2. "right" 目标页面从右边滑入
3. "hide" 直接刷入目标页面,无切换效果
3. record: 跳转记录标记
1. true 记录跳转路径
2. false 不记录跳转路径
4. 返回值:
1.
5. 异常时:
1. 跳转记录最多8层,如果跳转路径记录已满,则清除最前面的记录,后面继续追加当前记录。这将导致过多层级跳转后不能回到最开始记录的页面。
6. 示例:
```lua
-- 从当前页跳转到 PAGE_1,左边滑入,记录路径,PAGE_1中可用backToPreviousPage方法回到当前页面
gui:switchPageByName("PAGE_1", "left")
-- 从当前页跳转到 PAGE_3,直接刷入目标页,不记录路径
gui:switchPageByName("PAGE_3", "hide", false)
```
#### 5.1.3 返回上一页
1. 名称:gui:backToPreviousPage(mode)
2. 功能:返回记录中的上一层页面
3. 参数:
1. mode 切换模式
1. "left" 上一层页面从左边滑入
2. "right" 上一层页面从右边滑入
3. "hide" 直接刷入上一层页面,无切换效果
4. 返回值:
1.
5. 异常情况:
1. 无上一层页面可返回时,返回滑动列表中的第一个页面
6. 示例:
```lua
-- 返回上一层页面,上一层页面从右边滑入
gui:backToPreviousPage("right")
```
#### 5.1.4 检查上一层页面
1. 名称:bool = gui:checkPreViousPage(ename)
2. 功能:检查页面跳转记录中的上一个页面是否为指定页面
3. 参数:
1. ename 页面的名称“PAGE_x”
4. 返回值:
1. bool 是否为指定页面
1. true 是指定页面
2. false 不是指定页面
5. 异常情况:
1.
6. 示例:
```lua
-- 如果上一个页面是PAGE_3,则跳转到PAGE_5,否则跳转到PAGE_7
if (gui:checkPreviousPage("PAGE_3")) then
gui:switchPageByName("PAGE_5", "hide")
else
gui:switchPageByName("PAGE_7", "hide")
end
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,927 @@
<!DOCTYPE html>
<html>
<head>
<title>LUA API说明</title>
<meta name="description" content="手表项目API说明文档,这里是文档总介绍,目前先空缺,后续在apidoc.json中完善">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="assets/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="assets/prism.css" rel="stylesheet" />
<link href="assets/main.css" rel="stylesheet" media="screen, print">
<link href="assets/favicon.ico" rel="icon" type="image/x-icon">
<link href="assets/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="assets/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
<link href="assets/favicon-16x16.png"rel="icon" type="image/png" sizes="16x16">
</head>
<body class="container-fluid">
<!-- SIDENAV -->
<script id="template-sidenav" type="text/x-handlebars-template">
<nav id="scrollingNav">
<div class="sidenav-search">
<input class="form-control search" data-action='filter-search' type="text" placeholder="{{__ "Filter..."}}">
<span class="search-reset">x</span>
</div>
<ul class="sidenav nav nav-list list">
{{#each nav}}
{{#if title}}
{{#if isHeader}}
{{#if isFixed}}
<li class="nav-fixed nav-header navbar-btn nav-list-item" data-group="{{group}}"><a href="#api-{{group}}" data-name="show-api-{{group}}" class="show-api api-{{group}}-init">{{underscoreToSpace title}}</a></li>
{{else}}
<li class="nav-header nav-list-item" data-group="{{group}}"><a href="#api-{{group}}" data-group="show-api-{{group}}" class="show-group api-{{group}}-init">{{underscoreToSpace title}}</a></li>
{{/if}}
{{else}}
<li class="{{#if hidden}}hide {{/if}}" data-group="{{group}}" data-name="{{name}}" data-version="{{version}}">
<a href="#api-{{group}}-{{name}}" title="{{url}}" data-group="show-api-{{group}}" data-name="show-api-{{group}}-{{name}}" class="nav-list-item show-api api-{{group}}-{{name}}-init">{{title}}<div class="nav-list-url-item hide">{{url}}</div></a>
</li>
{{/if}}
{{/if}}
{{/each}}
</ul>
</nav>
</script>
<!-- PROJECT -->
<script id="template-project" type="text/x-handlebars-template">
<div class="pull-left">
<h1>{{name}}</h1>
{{#if description}}<h2>{{{nl2br description}}}</h2>{{/if}}
</div>
<div class="pull-right">
{{#if template.withCompare}}
<div class="btn-group">
<button id="version" class="btn btn-lg btn-default dropdown-toggle" data-toggle="dropdown">
<strong>{{version}}</strong>&nbsp;<span class="caret"></span>
</button>
<ul id="versions" class="dropdown-menu open-left">
<li><a id="compareAllWithPredecessor" href="#">{{__ "Compare all with predecessor"}}</a></li>
<li class="divider"></li>
<li class="disabled"><a href="#">{{__ "show up to version:"}}</a></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
</ul>
</div>
{{else}}
<div id="version" class="well well-sm">
<strong>{{version}}</strong>
</div>
{{/if}}
</div>
<div class="clearfix"></div>
</script>
<script id="template-header" type="text/x-handlebars-template">
{{#if content}}
<div id="api-_header" class="show-api-article show-api-_-article">{{{content}}}</div>
{{/if}}
</script>
<script id="template-footer" type="text/x-handlebars-template">
{{#if content}}
<div id="api-_footer" class="show-api-article show-api-_-article">{{{content}}}</div>
{{/if}}
</script>
<script id="template-generator" type="text/x-handlebars-template">
{{#if template.withGenerator}}
{{#if generator}}
<div>
<p class="text-muted">
{{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}}
</p>
</div>
{{/if}}
{{/if}}
</script>
<script id="template-sections" type="text/x-handlebars-template">
<section id="api-{{group}}" class="show-api-group show-api-{{group}}-group {{#if aloneDisplay}} hide{{/if}}">
<h1 class="color-primary font-weight-bold">{{underscoreToSpace title}}</h1>
{{#if description}}
<p>{{{nl2br description}}}</p>
{{/if}}
{{#each articles}}
<div id="api-{{group}}-{{name}}" class="show-api-article show-api-{{group}}-article show-api-{{group}}-{{name}}-article {{#if aloneDisplay}} hide{{/if}}">
{{{article}}}
</div>
{{/each}}
</section>
</script>
<script id="template-article" type="text/x-handlebars-template">
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}">
<div class="pull-left">
<h1><span class="color-primary">{{underscoreToSpace article.groupTitle}}</span>{{#if article.title}} <span class="text-muted">|</span> {{article.title}}{{/if}}</h1>
</div>
{{#if template.withCompare}}
<div class="pull-right">
<div class="btn-group">
<button class="version btn btn-default dropdown-toggle" data-toggle="dropdown">
<strong>{{article.version}}</strong>&nbsp;<span class="caret"></span>
</button>
<ul class="versions dropdown-menu open-left">
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
</ul>
</div>
</div>
{{/if}}
<div class="clearfix"></div>
{{#if article.author}}<h4 class="muted">Authored by: {{article.author}}</h4>{{/if}}
{{#if article.deprecated}}
<p class="deprecated"><span>{{__ "DEPRECATED"}}</span>
{{{markdown article.deprecated.content}}}
</p>
{{/if}}
{{#if article.description}}
<p>{{{nl2br article.description}}}</p>
{{/if}}
<span class="method meth-{{toLowerCase article.type}}">{{article.type}}</span>
<pre data-type="{{toLowerCase article.type}}"><code class="language-http">{{article.url}}</code></pre>
{{#if article.permission}}
<p>
{{__ "Permission:"}}
{{#each article.permission}}
{{name}}
{{#if title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{title}}" data-content="{{nl2br description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{/if}}
{{/each}}
</p>
{{/if}}
{{!-- CODE EXAMPLES IN TABS --}}
{{#ifCond article.examples.length '>' 0}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each article.examples}}
<li{{#ifCond @index '==' 0}} class="active"{{/ifCond}}>
<a href="#examples-{{../id}}-{{@index}}" role="tab" data-toggle="tab">{{title}}</a>
</li>
{{/each}}
</ul>
<div class="tab-content">
{{#each article.examples}}
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="examples-{{../id}}-{{@index}}">
<pre data-type="{{type}}"><code class="language-{{type}}">{{content}}</code></pre>
</div>
{{/each}}
</div>
{{/ifCond}}
{{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}}
{{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
{{subTemplate "article-query-block" params=article.query _hasType=_hasTypeInParameterFields section="query"}}
{{subTemplate "article-body-block" params=article.body _hasType=_hasTypeInParameterFields section="body"}}
{{subTemplate "article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}}
{{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
{{subTemplate "article-sample-request" article=article id=id}}
</article>
</script>
<script id="template-article-query-block" type="text/x-handlebars-template">
{{#if article.query}}
<h2>{{__ "Query Parameter(s)"}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#unless this.Type compare=null}}
<th style="width: 10%">{{__ "Type"}}</th>
{{/unless}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each params}}
<tr>
<td class="code">{{this.field}}&nbsp;&nbsp;
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
</td>
{{#unless this.Type compare=null}}
<td class="code">{{this.type}}</td>
{{/unless}}
<td>{{{nl2br this.description}}}
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
{{#each allowedValues}}
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
{{/each}}
</p>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/if}}
</script>
<script id="template-article-body-block" type="text/x-handlebars-template">
{{#if article.body}}
<h2>{{__ "Request Body"}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#unless this.Type compare=null}}
<th style="width: 10%">{{__ "Type"}}</th>
{{/unless}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each params}}
<tr>
<td class="code">{{this.field}}&nbsp;&nbsp;
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
<span class="label required">{{__ "required"}}</span>
{{/if}}
</td>
{{#unless this.Type compare=null}}
<td class="code">{{this.type}}</td>
{{/unless}}
<td>
{{{nl2br this.description}}}
{{#if defaultValue}}
<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>
{{/if}}
{{#if size}}
<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>
{{/if}}
{{#if allowedValues}}
<p class="type-size">{{__ "Allowed values:"}}
{{#each allowedValues}}
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
{{/each}}
</p>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/if}}
</script>
<script id="template-article-param-block" type="text/x-handlebars-template">
{{#if params}}
{{#each params.fields}}
<h2>{{__ @key}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each this}}
<tr>
<td class="code">{{{splitFill field "." "&nbsp;&nbsp;"}}}
{{#if optional}}
<span class="label optional">{{__ "optional"}}</span>
{{else}}
<span class="label required">{{__ "required"}}</span>
{{/if}}</td>
{{#if ../../_hasType}}
<td class="code">
{{{type}}}
</td>
{{/if}}
<td>
{{{nl2br description}}}
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
{{#each allowedValues}}
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
{{/each}}
</p>
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{/each}}
{{#ifCond params.examples.length '>' 0}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each params.examples}}
<li{{#ifCond @index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../section}}-examples-{{../id}}-{{@index}}" role="tab" data-toggle="tab">{{title}}</a>
</li>
{{/each}}
</ul>
<div class="tab-content">
{{#each params.examples}}
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="{{../section}}-examples-{{../id}}-{{@index}}">
<pre data-type="{{type}}"><code class="language-{{type}}">{{reformat content type}}</code></pre>
</div>
{{/each}}
</div>
{{/ifCond}}
{{/if}}
</script>
<script id="template-article-sample-request" type="text/x-handlebars-template">
{{#if article.sampleRequest}}
<div class="well">
<h3>{{__ "Send a Sample Request"}}</h3>
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-md-3 control-label" for="{{../id}}-sample-request-url">URL</label>
<div class="input-group">
<span class="input-group-addon">{{__ "url"}}</span>
<input id="{{../id}}-sample-request-url" type="url" class="form-control sample-request-url" value="{{article.sampleRequest.0.url}}" />
</div>
</div>
{{#if article.header}}
{{#if article.header.fields}}
<h3>{{__ "Headers"}}</h3>
{{#each article.header.fields}}
<div class="{{../id}}-sample-request-header-fields">
{{#each this}}
<div class="form-group">
<label class="col-md-3 control-label" for="sample-request-header-field-{{field}}">{{field}}</label>
<div class="input-group">
<span class="input-group-addon">{{{type}}}</span>
<input type="text" id="sample-request-header-field-{{field}}"
class="form-control sample-request-input"
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
data-family="header"
data-name="{{field}}"
data-group="{{@../index}}">
</div>
</div>
{{/each}}
</div>
{{/each}}
{{/if}}
{{/if}}
{{#if article.parameter}}
{{#if article.parameter.fields}}
<h3>{{__ "Parameters"}}</h3>
{{#each article.parameter.fields}}
<div class="col-md-3">
<select name="{{../id}}-sample-header-content-type" class="{{../id}}-sample-request-param-select sample-header-content-type sample-header-content-type-switch">
<option value="auto" selected>ajax-auto</option>
<option value="json" >json</option>
<option value="form-data" >form-data</option>
</select>
</div>
<div class="{{../id}}-sample-request-param-body {{../id}}-sample-header-content-type-body hide">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">json</div>
<textarea id="sample-request-body-json" class="form-control sample-request-body" data-sample-request-body-group="sample-request-param-{{@./index}}" rows="6" style="OVERFLOW: visible" {{#if optional}}data-sample-request-param-optional="true"{{/if}}></textarea>
</div>
</div>
</div>
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
{{#each this}}
<div class="form-group">
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
<div class="input-group">
<div class="input-group-addon">{{{type}}}</div>
{{#if allowedValues}}
<div class="input-group-addon sample-request-select">
<select class="form-control" data-name="{{field}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
<option value="" class="empty">&lt;{{__ "No value"}}&gt;</option>
{{#each allowedValues}}
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
{{/each}}
</select>
</div>
<input class="invisible">
{{else}}
<div class="sample-request-input-{{type}}-container"><div>
<input id="sample-request-param-field-{{field}}"
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-param"
type="{{setInputType type}}"
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
data-name="{{field}}"
data-family="query"
data-group="{{@../index}}"
{{#if optional}}data-optional="true"{{/if}}>
</div></div>
{{/if}}
</div>
</div>
{{/each}}
</div>
{{/each}}
{{/if}}
{{/if}}
{{#if article.query}}
<h3>{{__ "Query Parameters"}}</h3>
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
{{#each article.query}}
<div class="form-group">
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}{{#if optional}} ({{__ "optional"}}){{/if}}</label>
<div class="input-group col-md-6">
<div class="input-group-addon">{{{type}}}</div>
{{#if allowedValues}}
<div class="input-group-addon sample-request-select">
<select class="form-control" data-name="{{field}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
<option value="" class="empty">&lt;{{__ "No value"}}&gt;</option>
{{#each allowedValues}}
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
{{/each}}
</select>
</div>
<input class="invisible">
{{else}}
<div class="sample-request-input-{{type}}-container"><div>
<input id="sample-request-param-field-{{field}}"
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
type="{{setInputType type}}"
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
data-name="{{field}}"
data-family="query"
data-group="{{@../index}}"
{{#if optional}}data-optional="true"{{/if}}>
</div></div>
{{/if}}
</div>
</div>
{{/each}}
</div>
{{/if}}
{{#if article.body}}
<h3>{{__ "Body"}}</h3>
<div class="col-md-3">
<label for="body-content-type-{{this.id}}">{{__ "Content-Type"}}</label>
<select id="body-content-type-{{this.id}}" data-id="{{this.id}}" class="sample-request-content-type-switch form-control">
<option value="body-json" selected>json</option>
<option value="body-form-data">form-data</option>
</select>
</div>
<div class="col-md-9" id="sample-request-body-json-input-{{this.id}}">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">json</div>
<textarea class="form-control sample-request-input" rows="6"
data-family="body-json"
data-name={{"body"}}
data-content-type="json"
{{#if optional}}data-optional="true"{{/if}}>{{body2json article.body}}</textarea>
</div>
</div>
</div>
<div hidden class="col-md-9" id="sample-request-body-form-input-{{this.id}}">
{{#each article.body}}
<div class="form-group">
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
<div class="input-group">
<div class="input-group-addon">{{{type}}}</div>
{{#if allowedValues}}
<div class="input-group-addon sample-request-select">
<select class="form-control" data-name="{{field}}" data-family="body" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
<option value="" class="empty">&lt;{{__ "No value"}}&gt;</option>
{{#each allowedValues}}
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
{{/each}}
</select>
</div>
<input class="invisible">
{{else}}
<div class="sample-request-input-{{type}}-container"><div>
<input id="sample-request-param-field-{{field}}"
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
type="{{setInputType type}}"
value="{{#ifCond type '!==' 'Boolean'}}{{#if defaultValue}}{{ defaultValue }}{{/if}}{{/ifCond}}"
{{#if checked}}checked{{/if}}
placeholder="{{field}}"
data-family="body"
data-name="{{field}}"
data-content-type="form"
{{#if optional}}data-optional="true"{{/if}}>
</div></div>
{{/if}}
</div>
</div>
{{/each}}
</div>
{{/if}}
<div class="form-group">
<div class="controls pull-right">
<button class="btn btn-primary bg-primary sample-request-send" data-type="{{article.type}}">{{__ "Send"}}</button>
<button class="btn btn-danger bg-red sample-request-clear" data-type="{{article.type}}">{{__ "Reset"}}</button>
</div>
</div>
<div class="form-group sample-request-response" hidden>
<h3>
{{__ "Response"}}
<button class="btn btn-default btn-xs pull-right sample-request-clear">X</button>
</h3>
<pre data-type="json"><code class="language-json sample-request-response-json"></code></pre>
</div>
</fieldset>
</form>
</div>
{{/if}}
</script>
<script id="template-compare-article" type="text/x-handlebars-template">
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}">
<div class="pull-left">
<h1>{{underscoreToSpace article.groupTitle}} | {{{showDiff article.title compare.title}}}</h1>
</div>
<div class="pull-right">
<div class="btn-group">
<button class="btn btn-success" disabled>
<strong>{{article.version}}</strong> {{__ "compared to"}}
</button>
<button class="version btn btn-danger dropdown-toggle" data-toggle="dropdown">
<strong>{{compare.version}}</strong>&nbsp;<span class="caret"></span>
</button>
<ul class="versions dropdown-menu open-left">
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
<li class="divider"></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
</ul>
</div>
</div>
<div class="clearfix"></div>
{{#if article.description}}
<p>{{{showDiff article.description compare.description "nl2br"}}}</p>
{{else}}
{{#if compare.description}}
<p>{{{showDiff "" compare.description "nl2br"}}}</p>
{{/if}}
{{/if}}
<span class="method meth-{{toLowerCase compare.type}}">{{compare.type}}</span>
<pre data-type="{{toLowerCase article.type}}" class="language-html">{{{showDiff article.url compare.url}}}</pre>
{{subTemplate "article-compare-permission" article=article compare=compare}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each_compare_title article.examples compare.examples}}
{{#if typeSame}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#compare-examples-{{../../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
</li>
{{/if}}
{{#if typeIns}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
</li>
{{/if}}
{{#if typeDel}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
</li>
{{/if}}
{{/each_compare_title}}
</ul>
<div class="tab-content">
{{#each_compare_title article.examples compare.examples}}
{{#if typeSame}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</pre>
</div>
{{/if}}
{{#if typeIns}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{source.content}}}</pre>
</div>
{{/if}}
{{#if typeDel}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
<pre data-type="{{compare.type}}" class="language-{{source.type}}">{{{compare.content}}}</pre>
</div>
{{/if}}
{{/each_compare_title}}
</div>
{{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
{{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields section="success"}}
{{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
{{subTemplate "article-sample-request" article=article id=id}}
</article>
</script>
<script id="template-article-compare-permission" type="text/x-handlebars-template">
<p>
{{__ "Permission:"}}
{{#each_compare_list_field article.permission compare.permission field="name"}}
{{#if source}}
{{#if typeSame}}
{{source.name}}
{{#if source.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeIns}}
<ins>{{source.name}}</ins>
{{#if source.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeDel}}
<del>{{source.name}}</del>
{{#if source.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{else}}
{{#if typeSame}}
{{compare.name}}
{{#if compare.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeIns}}
<ins>{{compare.name}}</ins>
{{#if compare.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{#if typeDel}}
<del>{{compare.name}}</del>
{{#if compare.title}}
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
</button>
{{#unless _last}}, {{/unless}}
{{/if}}
{{/if}}
{{/if}}
{{/each_compare_list_field}}
</p>
</script>
<script id="template-article-compare-param-block" type="text/x-handlebars-template">
{{#if source}}
{{#each_compare_keys source.fields compare.fields}}
{{#if typeSame}}
<h2>{{__ source.key}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../_hasType}}
</table>
{{/if}}
{{#if typeIns}}
<h2><ins>{{__ source.key}}</ins></h2>
<table class="ins">
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../_hasType}}
</table>
{{/if}}
{{#if typeDel}}
<h2><del>{{__ compare.key}}</del></h2>
<table class="del">
<thead>
<tr>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../_hasType}}
</table>
{{/if}}
{{/each_compare_keys}}
{{#if source.examples}}
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
{{#each_compare_title source.examples compare.examples}}
{{#if typeSame}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
</li>
{{/if}}
{{#if typeIns}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
</li>
{{/if}}
{{#if typeDel}}
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
</li>
{{/if}}
{{/each_compare_title}}
</ul>
<div class="tab-content">
{{#each_compare_title source.examples compare.examples}}
{{#if typeSame}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</pre>
</div>
{{/if}}
{{#if typeIns}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
<pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
</div>
{{/if}}
{{#if typeDel}}
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
<pre data-type="{{compare.type}}"><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
</div>
{{/if}}
{{/each_compare_title}}
</div>
{{/if}}
{{/if}}
</script>
<script id="template-article-compare-param-block-body" type="text/x-handlebars-template">
<tbody>
{{#each_compare_field source compare}}
{{#if typeSame}}
<tr>
<td class="code">
{{{splitFill source.field "." "&nbsp;&nbsp;"}}}
{{#if source.optional}}
{{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span>
{{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span>
{{/if}}
{{else}}
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
{{/if}}
</td>
{{#if source.type}}
{{#if compare.type}}
<td>{{{showDiff source.type compare.type}}}</td>
{{else}}
<td>{{{source.type}}}</td>
{{/if}}
{{else}}
{{#if compare.type}}
<td>{{{compare.type}}}</td>
{{else}}
{{#if ../../../../_hasType}}<td></td>{{/if}}
{{/if}}
{{/if}}
<td>
{{{showDiff source.description compare.description "nl2br"}}}
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{showDiff source.defaultValue compare.defaultValue}}}</code><p>{{/if}}
</td>
</tr>
{{/if}}
{{#if typeIns}}
<tr class="ins">
<td class="code">
{{{splitFill source.field "." "&nbsp;&nbsp;"}}}
{{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}}
</td>
{{#if source.type}}
<td>{{{source.type}}}</td>
{{else}}
{{{typRowTd}}}
{{/if}}
<td>
{{{nl2br source.description}}}
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{source.defaultValue}}}</code><p>{{/if}}
</td>
</tr>
{{/if}}
{{#if typeDel}}
<tr class="del">
<td class="code">
{{{splitFill compare.field "." "&nbsp;&nbsp;"}}}
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
</td>
{{#if compare.type}}
<td>{{{compare.type}}}</td>
{{else}}
{{{typRowTd}}}
{{/if}}
<td>
{{{nl2br compare.description}}}
{{#if compare.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{compare.defaultValue}}}</code><p>{{/if}}
</td>
</tr>
{{/if}}
{{/each_compare_field}}
</tbody>
</script>
<div class="container-fluid">
<div class="row">
<div id="sidenav" class="span2"></div>
<div id="content">
<div id="project"></div>
<div id="header"></div>
<div id="sections"></div>
<div id="footer"></div>
<div id="generator"></div>
</div>
</div>
</div>
<div id="loader">
<div class="spinner">
<div class="spinner-container container1">
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
</div>
<div class="spinner-container container2">
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
</div>
<div class="spinner-container container3">
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
</div>
<p>Loading...</p>
</div>
</div>
<script src="assets/main.bundle.js"></script>
</body>
</html>
@@ -0,0 +1,186 @@
--[[
-- 引入log库,包含各类debug信息的打印方法
-- 注意!log方法仅用于库内部使用,开发APP时禁止使用log方法。
-- 注意!log方法仅用于库内部使用,开发APP时禁止使用log方法。
-- 注意!log方法仅用于库内部使用,开发APP时禁止使用log方法。
--]]
require('log')
--[[
-- 引入DB表
--]]
require("DB")
--[[
-- 引入gui具体控件方法
--]]
require('std/obj/Battery')
require('std/obj/Button')
require('std/obj/Compass')
require('std/obj/Grid')
require('std/obj/Image')
require('std/obj/Layout')
require('std/obj/Multiprogress')
require('std/obj/Number')
require('std/obj/obj')
require('std/obj/Progress')
require('std/obj/Slider')
require('std/obj/Text')
require('std/obj/Time')
require('std/obj/Watch')
--[[
-- 引入模拟器库
--]]
require('std/gui')
require('std/bsp')
require('std/sys')
require('std/bt')
require('std/music')
require('std/device')
--[[
-- 引入用户自定义方法
--]]
require('module')
init = {}
-- 主工程id号
init.mainProjectId = 0
-- 启动页面
init.startPage = "PAGE_4"
-- 主页面
init.mainPage = "PAGE_0"
-- 初始化的滑动页面列表
init.slideList = {
"PAGE_0", -- 表盘页面
"PAGE_7", -- 列表菜单界面
"PAGE_1", -- 运动状态界面
"PAGE_66" -- 天气界面
}
--[[
-- 系统定时器回调
-- 启动时会自动启动该定时器
-- 用于模拟器“系统时间”更新和闹钟扫描
--]]
local function system_timer_callback(time)
-- 更新系统时间
log:updateTime(sys.time, true)
-- 检测闹钟
for k, v in ipairs(sys.alarm) do
if v and (v.sw == 1) then
-- 计算当前系统日期的星期
local w = log:zeller(time)
-- 计算当前星期对应的mode
local w_open = 0x01 << (w + 1)
-- 如果闹钟的mode与当前星期一致,则判断时间是否相同
if (w_open & v.mode) then
if (v.hour == sys.time.hour) and (v.minute == sys.time.minute) then
sys:runHandler("dev_event", "alarm", 0)
end
end
end
end
end
--[[
-- 全工程模拟时的启动代码
-- 由这段代码指定启动页面和主页面切换,模拟设备启动过程
--]]
function init:start(args)
print("start run project id: "..tostring(args.projid))
-- 如果运行的工程是模式界面工程
if (args.projid == self.mainProjectId) then
-- 显示启动界面
ui:switchPageByName(self.startPage, 0)
-- 适当延时,模拟设备启动过程
utils:sleep(2000)
-- 切换到主界面
gui:switchPageByName(self.mainPage, "hide", false)
-- 初始化页面滑动功能
-- slide:initPage()
-- 把滑动页面列表添加到内置滑动列表
-- 添加完成后,内置页面切换变成:
-- PAGE_0 --> init.slideList[1] --> init.slideList[2] --> ... --> PAGE_0
-- for k, v in ipairs(init.slideList) do
-- slide:insertNextPageByName(v)
-- end
end
-- 清空模拟器上的事件列表
local event_type = {"none"}
sim_system:setSystemEventList(event_type)
--[[
-- 注册系统事件回调函数回调方法
-- 回调方法在这里注册,后续只需注册回调函数即可
-- 模拟系统事件时,会触发这个回调去调对应的回调函数
--]]
sim_system:bindSystemEvent(function (key, value)
if (not log:checkArgType("system event type", 1, key, "string")) then
return
end
sys:runHandler(key, value)
end)
sys.system_event_callback_register = true
--[[
-- 注册系统定时器
--]]
local sys_time = os.date("%Y%m%d%H%M%S")
local year = string.sub(sys_time, 1, 4)
sys.time.year = tonumber(year)
local month = string.sub(sys_time, 5, 6)
sys.time.month = tonumber(month)
local day = string.sub(sys_time, 7, 8)
sys.time.day = tonumber(day)
local hour = string.sub(sys_time, 9, 10)
sys.time.hour = tonumber(hour)
local minute = string.sub(sys_time, 11, 12)
sys.time.minute = tonumber(minute)
local second = string.sub(sys_time, 13, 14)
sys.time.second = tonumber(second)
sys.timeInit = true
sys.timer = utils:createTimer(1000, system_timer_callback, sys.time)
end
return init
@@ -0,0 +1,209 @@
--[[
--
-- lua 打印方法库
--
-- 注意,本库仅用于模拟器内部库开发,包含颜色和特殊标记打印
--
-- 用于区分库打印和开发者自己使用print的打印。
--
--]]
log = {}
-- 打印红色字体 错误信息
function log:e(msg)
utils:log("[ ERROR ]: "..msg, 'red')
end
-- 打印蓝色字体 警报信息
function log:w(msg)
utils:log("[ WARNING ]: "..msg, 'blue')
end
-- 打印灰色字体 调试信息
function log:d(msg)
utils:log("[ DEBUG ]: "..msg, 'gray')
end
-- 打印黑色字体 提示信息
function log:i(msg)
utils:log("[ INFO ]: "..msg, 'black')
end
-- 指定颜色打印
function log:c(...)
local arg = {...}
local arg_num = #arg
if (arg_num == 2) then
utils:log(arg[1], arg[2])
else
utils:log(arg[1], "gray")
end
end
-- 参数类型检查
function log:checkArgType(func, arg_index, arg, ...)
local type_right = false
local type_str = "\""
local arg_type = {...}
if #arg_type >= 1 then
for k, v in ipairs(arg_type) do
if (type(arg) == v) then
type_right = true
end
type_str = type_str .. v .. "\", \""
end
else
utils:log("ERROR: not arg type to check!", "red")
return false
end
-- 如果参数类型错误,给出提示
if not type_right then
if (type(arg_index) == "string") then
utils:log("[Parameter error] function \""..func.."\" parameter \""..arg_index.."\" type err!", "red")
else
utils:log("[Parameter error] function \""..func.."\" "..tostring(arg_index).."th parameter type err!", "red")
end
type_str = string.sub(type_str, 1, -4)
utils:log("This parameter type must be: "..type_str, "orange")
end
return type_right
end
-- 检查某个参数的值是否在指定范围内
function log:checkValue(arg, arg_tab)
local val_index = 0
local type_str = "\""
for k, v in ipairs(arg_tab) do
if (arg == v) then
val_index = k
return true, val_index, arg_tab[val_index]
end
type_str = type_str .. v .. "\", \""
end
type_str = string.sub(type_str, 1, -4)
utils:log("parameter \""..tostring(arg).."\" error!", "red")
utils:log("This parameter type must be: "..type_str, "orange")
return false, nil, nil
end
-- 驻函数,当声明空函数还未实现时,用此作为标记提示
function log:emptyFunction(functionName)
utils:log("function \""..functionName.."\" is empty function", "green")
end
-- 时间刷新
function log:updateTime(self_tab, update)
-- 秒计数
if update then
self_tab.second = self_tab.second + 1
end
if (self_tab.second > 59) then
self_tab.second = 0
self_tab.minute = self_tab.minute + 1
end
-- 分钟
if (self_tab.minute > 59) then
self_tab.minute = 0
self_tab.hour = self_tab.hour + 1
end
-- 小时
if (self_tab.hour > 23) then
self_tab.hour = 0
self_tab.day = self_tab.day + 1
end
-- 日期
if ((self_tab.month == 1) or
(self_tab.month == 3) or
(self_tab.month == 5) or
(self_tab.month == 7) or
(self_tab.month == 8) or
(self_tab.month == 10) or
(self_tab.month == 12)) then
-- 大月31天
if (self_tab.day >= 31) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
elseif ((self_tab.month == 4) or
(self_tab.month == 6) or
(self_tab.month == 9) or
(self_tab.month == 11)) then
-- 小月30天
if (self_tab.day >= 30) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
else
-- 二月
if (((not (self_tab.year % 4)) and (self_tab.year % 100)) or
(not (self_tab.year % 400))) then
-- 闰年29天
if (self_tab.day >= 29) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
else
-- 平年28天
if (self_tab.day >= 28) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
end
end
if (self_tab.month >= 12) then
self_tab.year = self_tab.year + 1
end
for k, v in pairs(sys.time) do
print(k, v)
end
end
-- 泰勒公式,根据日期计算星期
function log:zeller(date)
local y = date.year % 100
local c = date.year / 100
local m = date.month
local d = date.day
if (m == 1) or (m == 2) then
y = y - 1
m = m + 12
end
-- 泰勒公式
local w = y + y / 4 + c / 4 - 2 * c + 13 * (m + 1) / 5 + d - 1
-- 确保余数为正
while (w < 0) do
w = w + 7
end
-- 向下取整,去除小数
w = math.floor(w % 7)
return w
end
return log
Binary file not shown.
@@ -0,0 +1,23 @@
-- 文件名为 module.lua
-- 定义一个名为 module 的模块
module = {}
-- 定义一个常量
module.constant = "这是一个常量"
-- 定义一个函数
function module.func1()
print("test")
return 5
end
-- 定义一个私有函数
local function func2()
print("这是一个私有函数!")
end
function module.func3()
func2()
end
return module
@@ -0,0 +1,890 @@
--[[
-- bsp 芯片外设库
@apiDefine BspGroup bsp
--]]
bsp = {}
-- 打印错误信息
local function log_e(func, msg)
log:e('function " '..func..'", '..msg)
end
-- 打印警告信息
local function log_w(func, msg)
log:w('function " '..func..'", '..msg)
end
-- 打印调试信息
local function gpio_log(func, msg)
local log_msg = "GPIO simulation : function \" "..func.."\", "..msg
log:d(log_msg)
end
-- 打印参数参考
local function log_refer(msg)
log:i('>> please refer to : '..msg)
end
--[[
-- gpio 库
@apiDefine gpioGroup gpio
]]
Gpio = {}
--[[
@api {SET} gpio:setOutput() gpio输出模式
@apiName setOutput()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象的工作模式为输出模式,此时不能读取GPIO的输入电平。
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:setOutput() -- PA5设置为输出模式
gpio:outputHigh() -- PA5输出高电平
@apiSuccessExample {number} 成功响应:
PA5 可以控制输出高/低电平
@apiErrorExample {number} 失败响应:
PA5 不可控制输出高/低电平
]]
function Gpio:setOutput(mode)
gpio_log("setOutput", self._name..' --> setOutput')
end
--[[
@api {SET} gpio:outputHigh() gpio输出高
@apiName outputHigh()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象输出高电平
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:outputHigh() -- PA5设置输出高电平
@apiSuccessExample {number} 成功响应:
PA5 可以检测到高电平
@apiErrorExample {number} 失败响应:
PA5 检测到非高电平
]]
function Gpio:outputHigh()
gpio_log("outputHigh", self._name..' --> outputHigh')
end
--[[
@api {SET} gpio:outputLow() gpio输出低
@apiName outputLow()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象输出低电平
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:outputLow() -- PA5设置输出低电平
@apiSuccessExample {number} 成功响应:
PA5 可以检测到低电平
@apiErrorExample {number} 失败响应:
PA5 检测到非低电平
]]
function Gpio:outputLow()
gpio_log("outputLow", self._name..' --> outputLow')
end
--[[
@api {GET} gpio:setInput() gpio输入模式
@apiName setInput()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象为输入模式
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:setInput() -- PA5设置为输入模式
@apiSuccessExample {number} 成功响应:
PA5 可以正确读取输入电平
@apiErrorExample {number} 失败响应:
PA5 读取到PA5电平错误
]]
function Gpio:setInput()
gpio_log("setInput", self._name..' --> setInput')
end
--[[
@api {GET} gpio:read() gpio读取
@apiName read()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 读取指定GPIO对象的输入电平
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:read() -- PA5设置为输入模式
@apiSuccess (返回值) {number} 1 读取到高电平
@apiSuccess (返回值) {number} 0 读取到低电平
@apiSuccessExample {number} 成功响应:
PA5 读取的电平值与输入一致
@apiErrorExample {number} 失败响应:
PA5 读取的电平值与输入不一致
]]
function Gpio:read()
gpio_log("read", self._name..' --> read')
return true
end
--[[
@api {SET} gpio:setPullUp(onoff) gpio上拉
@apiName setPullUp(onoff)
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象的上拉电阻开关
@apiParam {number{0, 1}} onoff GPIO的上拉电阻开关标志
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:setPullUp(1) -- PA5上拉电阻打开
gpio:setPullUp(0) -- PA5上拉电阻关闭
@apiSuccessExample {number} 成功响应:
PA5 上拉电阻成功打开或关闭
@apiErrorExample {number} 失败响应:
PA5 上拉电阻无法打开或关闭
]]
function Gpio:setPullUp(onoff)
if (not log:checkArgType('setPullUp', 1, onoff, 'number')) then
return
end
gpio_log("setPullUp", self._name..' --> setPullUp: '..tostring(onoff))
end
--[[
@api {SET} gpio:setPullDown(onoff) gpio下拉
@apiName setPullDown()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象的下拉电阻开关
@apiParam {number{0, 1}} onoff GPIO的下拉电阻开关标志
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:setPullDown(1) -- PA5下拉电阻打开
gpio:setPullDown(0) -- PA5下拉电阻关闭
@apiSuccessExample {number} 成功响应:
PA5 下拉电阻成功打开或关闭
@apiErrorExample {number} 失败响应:
PA5 下拉电阻无法打开或关闭
]]
function Gpio:setPullDown(onoff)
if (not log:checkArgType('setPullDown', 1, onoff, 'number')) then
return
end
gpio_log("setPullDown", self._name..' --> setPullDown: '..tostring(onoff))
end
--[[
@api {SET} gpio:setDie() gpio die控制
@apiName setDie()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 设置指定GPIO对象的die功能
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
gpio:setDie()
@apiSuccessExample {number} 成功响应:
PA5 die功能正常
@apiErrorExample {number} 失败响应:
PA5 die功能异常
]]
function Gpio:setDie()
gpio_log("setDie", self._name..' --> setDie')
end
--[[
@api {GET} gpio=bsp:getGpioCOntrol(grop,prot) gpio对象
@apiName getGpioControl()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 创建指定gpio为操作对象
@apiParam {string{A-G}} grop gpio组,不同芯片范围可能略有不同
@apiParam {number{0-15}} prot gpio号,如果一组IO全部引出,则IO号为0到15,具体看封装
@apiParamExample 示例:
gpio = bsp:getGpioControl("A", 5) -- 创建PA5为操作对象
@apiSuccessExample {number} 成功响应:
gpio控制方法可以正常调用
PA5 可以被正确控制
@apiErrorExample {number} 失败响应:
gpio控制方法调用出现 call nil等错误
PA5 不能被正确控制
]]
function bsp:getGpioControl(grop, port)
-- 参数类型检查
if (not log:checkArgType('getGpioControl', 1, grop, 'string')) then
return nil
end
if (not log:checkArgType('getGpioControl', 2, port, 'number')) then
return nil
end
-- 参数范围判断
if (grop < 'A' or grop > 'G') then
log_e('getGpioControl', 'arg 1 error, must between A to G')
log_refer('\'A\', \'B\', \'C\', etc')
return nil
end
if (port > 15) then
log_e('getGpioControl', 'arg 2 must not greater then 16')
return nil
end
-- 产生实例
local self = {}
gpio = (string.byte(grop) - string.byte('A')) * 16 + port
if (port < 10) then
name = 'IO_PORT'..grop..'_0'..port
else
name = 'IO_PORT'..grop..'_'..port
end
print('create GPIO simulation : '..name..', '..gpio)
self._gpio = gpio
self._name = name
setmetatable(self, {__index = Gpio})
return self
end
--[[
-- iic 库
@apiDefine iicGroup iic
]]
iic = {}
--[[
@api {SET} iic:setBaud(baud) iic波特率
@apiName setBaud()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 设置IIC设备的波特率
@apiParam {number} baud 设置的iic通信波特率
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:setBaud(300000) -- 设置波特率为300K
@apiSuccessExample {number} 成功响应:
iic0 通信波特率被设置为300K
@apiErrorExample {number} 失败响应:
iic0 通信波特率不等于300K
]]
function iic:setBaud(baud)
if not log:checkArgType("setBaud", 1, baud, "number") then
return
end
log:d("setBaud, iic:"..tostring(self.iic)..", baud:"..tostring(baud))
end
--[[
@api {SET} iic:start() iic开始
@apiName start()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 开始IIC通信
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:start()
@apiSuccessExample {number} 成功响应:
@apiErrorExample {number} 失败响应:
]]
function iic:start()
log:d("start, iic:"..tostring(self.iic))
end
--[[
@api {SET} iic:stop() iic停止
@apiName stop()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 停止IIC通信
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:stop() -- 停止iic通信
@apiSuccessExample {number} 成功响应:
@apiErrorExample {number} 失败响应:
]]
function iic:stop()
log:d("stop, iic:"..tostring(self.iic))
end
--[[
@api {SET} iic:setByte(dat) iic发送
@apiName sendByte()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription IIC发送一个字节
@apiParam {number} dat 待发送的一个字节数据
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:sendByte(0xfc) -- 发送0xfc
@apiSuccessExample {number} 成功响应:
IIC输出0xfc
@apiErrorExample {number} 失败响应:
IIC无输出,或输出不等于0xfc的值
]]
function iic:sendByte(byte)
if not log:checkArgType("sendByte", 1, byte, "number") then
return
end
self.pnd = true
self.endpnd = true
log:d("sendByte, iic:"..tostring(self.iic)..", dat:"..tostring(byte))
end
--[[
@api {GET} iic:readByte() iic读数据
@apiName readByte()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription IIC读取一个字节数据
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
byte = iic0:readByte() -- IIC0读取一个字节
print(byte) -- 打印读取到的数据
@apiSuccessExample {number} 成功响应:
读取到预期值
@apiErrorExample {number} 失败响应:
读取到值与预期不符
]]
function iic:readByte()
log:d("readByte, iic:"..tostring(self.iic))
self.pnd = true
self.endpnd = true
return 0x0f
end
--[[
@api {SET} iic:setIe(enable) iic设置IE
@apiName setIe()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 设置IIC的IE功能
@apiParam {boolean{true, false}} enable IE功能使能控制
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:setIe(true) -- 打开IE功能
@apiSuccessExample {number} 成功响应:
IE功能成功打开或关闭
@apiErrorExample {number} 失败响应:
IE功能操作无效
]]
function iic:setIe(enable)
if not log:checkArgType("setIe", 1, enable, "boolean") then
return
end
log:d("setIe, iic:"..tostring(self.iic)..", en:"..tostring(enable))
end
--[[
@api {GET} iic:getPnd() iic中断
@apiName getPnd()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 获取IIC中断标志
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
pnd = iic0:getPnd() -- 读取中断标志
print(pnd)
@apiSuccessExample {number} 成功响应:
获取到中断标志
@apiErrorExample {number} 失败响应:
获取到错误中断标志
]]
function iic:getPnd()
log:d("getPnd, iic:"..tostring(self.iic)..", pnd:"..tostring(self.pnd))
return self.pnd
end
--[[
@api {SET} iic:clrPnd() iic清除中断
@apiName clrPnd()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 清除IIC的中断标志
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:clrPnd() -- 清除中断标志
@apiSuccessExample {number} 成功响应:
成功清除中断标志
@apiErrorExample {number} 失败响应:
中断标志清除失败,数据收发异常
]]
function iic:clrPnd()
log:d("clrPnd, iic:"..tostring(self.iic))
self.pnd = false
end
--[[
@api {SET} iic:setEndIe(enable) iic end ie
@apiName setEndIe()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 设置IIC的end ie功能
@apiParam {boolean{true, false}} enable end ie功能使能控制
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:setEndIe(true) -- 打开 end ie功能
@apiSuccessExample {number} 成功响应:
END IE功能成功打开或关闭
@apiErrorExample {number} 失败响应:
END IE功能控制无效
]]
function iic:setEndIe(enable)
if not log:checkArgType("setEndIe", 1, enable, "boolean") then
return
end
log:d("setEndIe, iic:"..tostring(self.iic)..", en:"..tostring(enable))
end
--[[
@api {GET} iic:getEndPnd() iic end pnd
@apiName getEndPnd()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 获取IIC的end中断标志
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
endpnd = iic0:getEndPnd() -- 获取end pnd
@apiSuccessExample {number} 成功响应:
END PND成功获取
@apiErrorExample {number} 失败响应:
END PND获取失败,数据收发异常
]]
function iic:getEndPnd()
log:d("getEndPnd, iic:"..tostring(self.iic))
return self.endpnd
end
--[[
@api {SET} iic:clrEndPnd() iic clr end pnd
@apiName clrEndPnd()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 清空IIC的end pnd
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:clrEndPnd() -- 清空end pnd
@apiSuccessExample {number} 成功响应:
END PND成功清除
@apiErrorExample {number} 失败响应:
END PND清除失败,数据收发异常
]]
function iic:clrEndPnd()
log:d("clrEndPnd, iic:"..tostring(self.iic))
self.endpnd = false
end
--[[
@api {SET} iic:close() iic关闭
@apiName close()
@apiGroup iicGroup
@apiVersion 1.0.0
@apiDescription 关闭IIC设备
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
iic0:close() -- 关闭IIC0
@apiSuccessExample {number} 成功响应:
IIC 成功关闭
@apiErrorExample {number} 失败响应:
IIC 关闭失败,对应IO被占用
]]
function iic:close()
log:d("close, iic:"..tostring(self.iic))
end
--[[
@api {GET} iic=bsp:getIICControl(dev) iic对象
@apiName getIICControl()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 创建IIC对象
@apiParam {number{DB.IIC0, DB.IIC1, DB.IIC2}} dev 选择要获取的IIC设备
@apiParamExample 示例:
iic0 = bsp:getIICControl(DB.IIC0) -- 创建IIC0对象
@apiSuccessExample {number} 成功响应:
成功获取IIC实例
@apiErrorExample {number} 失败响应:
获取IIC实例失败,返回对象为nil,访问IIC方法提示“访问nil方法”
]]
function bsp:getIICControl(dev)
local self = {}
self.iic = dev
self.pnd = true
self.endpnd = true
log:i("Simulate the creation of iic"..tostring(dev).." equipment. Please test the actual functions in the equipment")
setmetatable(self, {__index = iic})
return self
end
--[[
-- spi 库
@apiDefine SpiGroup spi
]]
spi = {}
--[[
@api {SET} spi:setBaud(baud) spi波特率
@apiName setBaud()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription 设置SPI驱动波特率
@apiParam {number} baud 设置的SPI通信波特率
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
spi0:setBaud(500000)
@apiSuccessExample {number} 成功响应:
SPI 波特率成功设置为500K
@apiErrorExample {number} 失败响应:
SPI 波特率设置无效,或波特率与设置不一致
]]
function spi:setBaud(baud)
if (not log:checkArgType("spi setBaud", 1, baud, "number")) then
return
end
log:d("setBaud, spi:"..tostring(self.spi)..", baud:"..tostring(baud))
self.baud = baud
end
--[[
@api {SET} spi:setIe(enable) spi设置IE
@apiName setIe()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription 设置SPI的IE功能
@apiParam {boolean{true,false}} enable SPI的IE功能使能控制
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
spi0:setIe(true) -- 打开IE功能
@apiSuccessExample {number} 成功响应:
SPI IE功能成功打开或关闭
@apiErrorExample {number} 失败响应:
SPI IE功能控制无效
]]
function spi:setIe(enable)
if (not log:checkArgType("spi setIe", 1, enable, "boolean")) then
return
end
log:d("setIe, spi:"..tostring(self.spi)..", ie:"..tostring(enable))
self.ie = enable
end
--[[
@api {GET} pnd=spi:getPnd() spi中断
@apiName getPnd()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription 获取SPI中断标志
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
pnd = spi0:getPnd()
@apiSuccessExample {number} 成功响应:
SPI PND获取正确
@apiErrorExample {number} 失败响应:
SPI PND获取错误
]]
function spi:getPnd()
log:d("getPnd, spi:"..tostring(self.spi))
return self.pnd
end
--[[
@api {GET} spi:clrPnd() spi清除中断
@apiName clrPnd()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription 清除spi的中断标志
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
spi0:clrPnd()
@apiSuccessExample {number} 成功响应:
SPI PND成功清除
@apiErrorExample {number} 失败响应:
SPI PND清除失败,数据通信异常
]]
function spi:clrPnd()
log:d("clrPnd, spi:"..tostring(self.spi))
self.pnd = false
end
--[[
@api {GET} spi:setBitMode(mode) spi bit模式
@apiName setBitMode()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription 设置SPI的工作模式
@apiParam {number{0,1,2,3}} mode SPI的工作模式
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
spi0:setBitMode(0) -- 全双工模式
@apiSuccessExample {number} 成功响应:
SPI 工作模式与设置一致
@apiErrorExample {number} 失败响应:
SPI 工作模式设置无效,或与设置模式不一致
]]
function spi:setBitMode(mode)
if not log:checkArgType("spi setBitMode", 1, mode, "number") then
return
end
local mode_tab = {0, 1, 2, 3}
local correct, index, value = log:checkValue(mode, mode_tab)
if not correct then
return
end
log:d("setBitMode, spi:"..tostring(self.spi)..", mode:"..tostring(mode))
self.bitMode = mode
end
--[[
@api {GET} spi:sendByte(dat) spi写数据
@apiName sendByte()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription SPI发送一个字节
@apiParam {number} dat 待发送的一个字节数据
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
spi0:sendByte(0x0e) -- 发送0x0e
@apiSuccessExample {number} 成功响应:
SPI 成功发送0x0e
@apiErrorExample {number} 失败响应:
SPI 发送无响应,或者发送值不等于0x0e
]]
function spi:sendByte(byte)
if not log:checkArgType("spi sendByte", 1, byte, "number") then
return
end
self.pnd = true
log:d("sendByte, spi:"..tostring(self.spi)..", byte:"..tostring(byte))
end
--[[
@api {GET} dat=spi:readByte() spi读数据
@apiName readByte()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription SPI读取一个字节数据
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
dat = spi0:readByte() -- SPI0读取一个字节
print(dat) -- 打印读取到的数据
@apiSuccessExample {number} 成功响应:
SPI成功读取到预期值
@apiErrorExample {number} 失败响应:
SPI读取到非预期值
]]
function spi:readByte()
local byte = 0x0f
log:d("readByte, spi:"..tostring(self.spi)..", byte:"..tostring(byte))
return byte
end
--[[
@api {GET} spi:close() spi关闭
@apiName close()
@apiGroup SpiGroup
@apiVersion 1.0.0
@apiDescription 关闭SPI设备
@apiParamExample 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
spi0:close() -- 关闭spi0
@apiSuccessExample {number} 成功响应:
SPI成功关闭,释放IO占用
@apiErrorExample {number} 失败响应:
SPI关闭失败,占用对应IO,影响IO其它功能
]]
function spi:close()
log:d("close, spi:"..tostring(self.spi))
end
--[[
@api {GET} spi=bsp:getSPIControl(dev) spi对象
@apiName getSPIControl()
@apiGroup BspGroup
@apiVersion 1.0.0
@apiDescription 创建SPI对象
@apiParam {number{DB.SPI0, DB.SPI1, DB.SPI2}} dev 选择要获取的SPI设备
@apiParamExample {lua} 示例:
spi0 = bsp:getSPIControl(DB.SPI0) -- 创建SPI0对象
@apiSuccessExample {number} 成功响应:
成功获取SPI实例
@apiErrorExample {number} 失败响应:
获取SPI实例失败,返回对象为nil
]]
function bsp:getSPIControl(dev)
local self = {}
self.spi = dev
self.pnd = true
self.endpnd = true
log:i("Simulate the creation of spi"..tostring(dev).." equipment. Please test the actual functions in the equipment")
setmetatable(self, {__index = spi})
return self
end
return bsp
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,554 @@
--[[
@apiDefine DeviceGroup device
--]]
--[[
@notes
@tip:设备库,各种传感器的操作接口
@demo:step_number = device:getStepNumber()\n log:d(step_num)
]]
device = {}
device._level = 0
device._time = 0
device._step = 0
device._km = 0
device._dstep = 0
device._dkm = 0
function log_e(func, msg)
log:e('function " '..func..'", '..msg)
end
function log_w(func, msg)
log:w('function " '..func..'", '..msg)
end
function log_refer(msg)
log:i('>> please refer to : '..msg)
end
function log_dev(func, msg)
log:d('< DEVICE simulation > : ' .. func .. msg)
end
local function get_next_data(data, data_len, index)
index = index + 1
if (index > data_len) then
index = data_len
return nil, index
end
return data[index], index
end
local function get_prev_data(data, data_len, index)
index = index - 1
if (index < 1) then
index = 1
return nil, index
end
return data[index], index
end
local function get_all_data(data, data_len)
return data
end
local function get_index_data(data, data_len, index)
if (index > data_len) or (index < 1) then
return nil, index
end
return data[index], index
end
local function get_max_data(data)
local dat = data[1]
local index = 1
for k, v in ipairs(data) do
if (v > dat) then
dat = v
index = k
end
end
return dat, index
end
local function get_min_data(data)
local dat = data[1]
local index = 1
for k, v in ipairs(data) do
if (v < dat) then
dat = v
index = k
end
end
return dat, index
end
local function get_data_number(data, data_len)
local len = #data
if (len ~= data_len) then
data_len = len
end
return len
end
-- 步数模拟
local sim_step = {}
sim_step.index = 0
sim_step.data = {932, 1435, 3217, 4582, 2531, 3712, 990, 7392}
sim_step.data_num = #sim_step.data
--[[
@api {GET} setp_num=device:getStepNumber() 获取步数
@apiName getStepNumber()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取实时运动步数
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
--[[
@notes
@tip:获取实时运动步数
@demo:step_num = device:getStepNumber()
]]
function device:getStepNumber(...)
local arg = {...}
local arg_num = #arg
local data = 0
local index = 0
if (arg_num == 0) then
-- 没有参数,返回最后一个
return sim_step.data[sim_step.data_num], sim_step.data_num
elseif (arg_num == 1) then
-- 只有一个参数,检查参数是否在规定范围内
local arg_val = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}
if (not log:checkValue(arg[1], arg_val)) then
return
end
if (arg[1] == DB.DEVICE_GET_NEXT_DATA) then
data, index = get_next_data(sim_step.data, sim_step.data_num, sim_step.index)
elseif (arg[1] == DB.DEVICE_GET_PREV_DATA) then
data, index = get_prev_data(sim_step.data, sim_step.data_num, sim_step.index)
elseif (arg[1] == DB.DEVICE_GET_ALL_DATA) then
return sim_step.data
elseif (arg[1] == DB.DEVICE_GET_MAX_DATA) then
data, index = get_max_data(sim_step.data)
elseif (arg[1] == DB.DEVICE_GET_MIN_DATA) then
data, index = get_min_data(sim_step.data)
elseif (arg[1] == DB.DEVICE_GET_DATA_NUM) then
sim_step.data_num = #sim_step.data
return sim_step.data_num
end
elseif (arg_num == 2) then
if (arg[1] ~= DB.DEVICE_GET_IND_DATA) then
log_e("getHeartRate", "arg 1 must be DB.DEVICE_GET_IND_DATA")
return
end
if (arg[2] < 0) or (arg[2] > sim_step.data_num) then
log:w("index limit exceeded")
end
sim_step.index = arg[2] + 1
data, index = get_index_data(sim_step.data, sim_step.data_num, sim_step.index)
end
sim_step.index = index
self._step = data
return data, index
end
--[[
@api {GET} sport_info=device:getSportInfo() 运动信息
@apiName getSportInfo()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取运动信息
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function device:getSportInfo()
log:emptyFunction("getSportInfo")
end
--[[
@api {GET} device:setSportStatus() 设置运动状态
@apiName setSportStatus()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 设置运动状态
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function device:setSportStatus()
log:emptyFunction("setSportStatus")
end
local sim_heart = {}
sim_heart.index = 0
sim_heart.data = {65, 72, 83, 96, 76, 72, 67, 91, 85, 70}
sim_heart.data_num = #sim_heart.data
--[[
@api {GET} heart=device:getHeartRate() 获取实时心率
@apiName getHeartRate()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取实时心率
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
--[[
@notes
@tip:获取实时心率
@demo:heart = device:getHeartRate()
]]
function device:getHeartRate(...)
local arg = {...}
local arg_num = #arg
local data = 0
local index = 0
if (arg_num == 0) then
-- 没有参数,返回最后一个
return sim_heart.data[sim_heart.data_num], sim_heart.data_num
elseif (arg_num == 1) then
-- 只有一个参数,检查参数是否在规定范围内
local arg_val = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}
if (not log:checkValue(arg[1], arg_val)) then
return
end
if (arg[1] == DB.DEVICE_GET_NEXT_DATA) then
data, index = get_next_data(sim_heart.data, sim_heart.data_num, sim_heart.index)
elseif (arg[1] == DB.DEVICE_GET_PREV_DATA) then
data, index = get_prev_data(sim_heart.data, sim_heart.data_num, sim_heart.index)
elseif (arg[1] == DB.DEVICE_GET_ALL_DATA) then
return sim_heart.data
elseif (arg[1] == DB.DEVICE_GET_MAX_DATA) then
data, index = get_max_data(sim_heart.data)
elseif (arg[1] == DB.DEVICE_GET_MIN_DATA) then
data, index = get_min_data(sim_heart.data)
elseif (arg[1] == DB.DEVICE_GET_DATA_NUM) then
sim_heart.data_num = #sim_heart.data
return sim_heart.data_num
end
elseif (arg_num == 2) then
if (arg[1] ~= DB.DEVICE_GET_IND_DATA) then
log_e("getHeartRate", "arg 1 must be DB.DEVICE_GET_IND_DATA")
return
end
if (arg[2] < 0) or (arg[2] > sim_heart.data_num) then
log:w("index limit exceeded")
end
sim_heart.index = arg[2] + 1
data, index = get_index_data(sim_heart.data, sim_heart.data_num, sim_heart.index)
end
sim_heart.index = index
return data, index
end
--[[
@api {GET} rest_heart=device:getRestingHeartRate() 获取静息心率
@apiName getRestingHeartRate()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取静息心率
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
--[[
@notes
@tip:获取静息心率
@demo:heart = device:getRestingHeartRate()
]]
function device:getRestingHeartRate()
local number = math.random(60, 120) -- 生成1K-1W的随机数
log:d('create random resting heart rate --> '..number)
return number
end
--[[
@api {GET} oxy=device:getBloodOxygen() 血氧浓度
@apiName getBloodOxygen()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取血氧浓度
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
--[[
@notes
@tip:获取血氧浓度
@demo:oxygen = device:getBloodOxygen()
]]
function device:getBloodOxygen()
-- math.randomseed(tostring(os.time()):reverse():sub(1, 7))
local number = math.random(80, 100) -- 生成随机数
log:d('< DEVICE simulation > : create random blood oxygen --> '..number)
return number
end
local sim_pres = {}
sim_pres.index = 0
sim_pres.data = {990, 995, 992, 996, 993, 1000, 998, 996, 994}
sim_pres.data_num = #sim_pres.data
--[[
@api {GET} pressure=device:getPressure() 大气压强
@apiName getPressure()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取大气压强
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
--[[
@notes
@tip:获取大气压强
@demo:oxygen = device:getPressure()
]]
function device:getPressure(...)
local arg = {...}
local arg_num = #arg
local data = 0
local index = 0
if (arg_num == 0) then
-- 没有参数,返回最后一个
return sim_pres.data[sim_pres.data_num], sim_pres.data_num
elseif (arg_num == 1) then
-- 只有一个参数,检查参数是否在规定范围内
local arg_val = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}
if (not log:checkValue(arg[1], arg_val)) then
return
end
if (arg[1] == DB.DEVICE_GET_NEXT_DATA) then
data, index = get_next_data(sim_pres.data, sim_pres.data_num, sim_pres.index)
elseif (arg[1] == DB.DEVICE_GET_PREV_DATA) then
data, index = get_prev_data(sim_pres.data, sim_pres.data_num, sim_pres.index)
elseif (arg[1] == DB.DEVICE_GET_ALL_DATA) then
return sim_pres.data
elseif (arg[1] == DB.DEVICE_GET_MAX_DATA) then
data, index = get_max_data(sim_pres.data)
elseif (arg[1] == DB.DEVICE_GET_MIN_DATA) then
data, index = get_min_data(sim_pres.data)
elseif (arg[1] == DB.DEVICE_GET_DATA_NUM) then
sim_pres.data_num = #sim_pres.data
return sim_pres.data_num
end
elseif (arg_num == 2) then
if (arg[1] ~= DB.DEVICE_GET_IND_DATA) then
log_e("getHeartRate", "arg 1 must be DB.DEVICE_GET_IND_DATA")
return
end
if (arg[2] < 0) or (arg[2] > sim_pres.data_num) then
log:w("index limit exceeded")
end
sim_pres.index = arg[2] + 1
data, index = get_index_data(sim_pres.data, sim_pres.data_num, sim_pres.index)
end
sim_pres.index = index
return data, index
end
local sim_alti = {}
sim_alti.index = 0
sim_alti.data = {6, 7, 9, 3, 2, 5, 10, 5, 3, 2}
sim_alti.data_num = #sim_alti.data
--[[
@api {GET} altitude=device:getAltitude() 获取海拔高度
@apiName getAltitude()
@apiGroup DeviceGroup
@apiVersion 1.0.0
@apiDescription 获取海拔高度
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
--[[
@notes
@tip:获取海拔高度
@demo:oxygen = device:getAltitude()
]]
function device:getAltitude(...)
local arg = {...}
local arg_num = #arg
local data = 0
local index = 0
if (arg_num == 0) then
-- 没有参数,返回最后一个
return sim_alti.data[sim_alti.data_num], sim_alti.data_num
elseif (arg_num == 1) then
-- 只有一个参数,检查参数是否在规定范围内
local arg_val = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}
if (not log:checkValue(arg[1], arg_val)) then
return
end
if (arg[1] == DB.DEVICE_GET_NEXT_DATA) then
data, index = get_next_data(sim_alti.data, sim_alti.data_num, sim_alti.index)
elseif (arg[1] == DB.DEVICE_GET_PREV_DATA) then
data, index = get_prev_data(sim_alti.data, sim_alti.data_num, sim_alti.index)
elseif (arg[1] == DB.DEVICE_GET_ALL_DATA) then
return sim_alti.data
elseif (arg[1] == DB.DEVICE_GET_MAX_DATA) then
data, index = get_max_data(sim_alti.data)
elseif (arg[1] == DB.DEVICE_GET_MIN_DATA) then
data, index = get_min_data(sim_alti.data)
elseif (arg[1] == DB.DEVICE_GET_DATA_NUM) then
sim_alti.data_num = #sim_alti.data
return sim_alti.data_num
end
elseif (arg_num == 2) then
if (arg[1] ~= DB.DEVICE_GET_IND_DATA) then
log_e("getHeartRate", "arg 1 must be DB.DEVICE_GET_IND_DATA")
return
end
if (arg[2] < 0) or (arg[2] > sim_alti.data_num) then
log:w("index limit exceeded")
end
sim_alti.index = arg[2] + 1
data, index = get_index_data(sim_alti.data, sim_alti.data_num, sim_alti.index)
end
sim_alti.index = index
return data, index
end
return device
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,290 @@
--[[
@apiDefine MusicGroup music
--]]
music = {}
-- 默认播放模式
music.play_mode = DB.MUSIC_PLAY_MODE_FCYCLE_ONE;
-- 默认播放设备
music.play_device = DB.MUSIC_PLAY_DEVICE_WATCH;
-- 默认播放状态
music.play_status = DB.MUSIC_PLAY_STATE_STOP;
-- 模拟音乐路径
music.music_path = nil;
-- 模拟文件簇号
music.music_sclust = 1;
-- 模拟音乐列表
local simulationMusicList = {
"刘德华 - 奉陪到底",
"王靖雯不胖 - 善变",
"Camila Cabello - Don't Go Yet",
"韩小欠 - 一开始说陪你到老的人现在他还在吗(DJheap九天版)",
"来一碗老于 - 解药",
"The Kid LAROI、Justin BieBer - Stay(Explicit)",
"我是土豆 - 云压雨",
"房东的猫 - New Boy",
"IN-K、王忻辰、苏星婕 - 落日与晚风"
}
music.music_list = simulationMusicList;
music.music_number = #music.music_list;
--[[
@api {SET} music:controlMusicPlay(cmd,[sclust]) 音乐播放控制
@apiName controlMusicPlay()
@apiGroup MusicGroup
@apiVersion 1.0.0
@apiDescription 控制音乐播放、暂停、上一曲、下一曲等
@apiParam (命令参数) {number} DB.MUSIC_PLAY_START 开始播放音乐
@apiParam (命令参数) {number} DB.MUSIC_PLAY_STOP 暂停播放音乐
@apiParam (命令参数) {number} DB.MUSIC_PLAY_LAST 播放上一曲
@apiParam (命令参数) {number} DB.MUSIC_PLAY_NEXT 播放下一曲
@apiParam (命令参数) {number} DB.MUSIC_PLAY_INDEX 播放指定音乐
@apiParam (可选参数) {number} [sclust] 音乐文件簇,仅MUSIC_PLAY_INDEX命令下必须传入,其它命令无需此参数。这个参数可以通过获取音乐列表获取
@apiParamExample 示例:
-- 开始播放音乐
music:controlMusicPlay(DB.MUSIC_PLAY_START)
-- 暂停播放音乐
music:controlMusicPlay(DB.MUSIC_PLAY_STOP)
music:controlMusicPlay(DB.MUSIC_PLAY_LAST) -- 播放上一曲
music:controlMusicPlay(DB.MUSIC_PLAY_NEXT) -- 播放下一曲
-- 播放指定音乐,sclust为指定音乐的文件簇
music:controlMusicPlay(DB.MUSIC_PLAY_INDEX, sclust)
@apiSuccessExample {number} 成功响应:
成功控制音乐播放
@apiErrorExample {number} 失败响应:
音乐播放控制异常
]]
function music:controlMusicPlay(cmd, index)
if (cmd == DB.MUSIC_PLAY_START) then
self.play_status = DB.MUSIC_PLAY_STATE_STARTING;
elseif (cmd == DB.MUSIC_PLAY_INDEX) then
if (index < 1) or (index > self.music_number) then
log:e("error music index: "..tostring(index))
return
end
self.music_sclust = index
elseif (cmd == DB.MUSIC_PLAY_PAUSE) then
self.play_status = DB.MUSIC_PLAY_STATE_STOP;
elseif (cmd == DB.MUSIC_PLAY_STOP) then
self.play_status = DB.MUSIC_PLAY_STATE_STOP;
elseif (cmd == DB.MUSIC_PLAY_LAST) then
self.play_status = DB.MUSIC_PLAY_STATE_STARTING;
if (self.play_mode == DB.MUSIC_PLAY_MODE_FCYCLE_RANDOM) then
self.music_sclust = math.random(1, self.music_number);
else
self.music_sclust = self.music_sclust - 1
if (self.music_sclust < 1) then
self.music_sclust = self.music_number;
end
end
elseif (cmd == DB.MUSIC_PLAY_NEXT) then
self.play_status = DB.MUSIC_PLAY_STATE_STARTING;
if (self.play_mode == DB.MUSIC_PLAY_MODE_FCYCLE_RANDOM) then
self.music_sclust = math.random(1, self.music_number);
else
self.music_sclust = self.music_sclust + 1
if (self.music_sclust > self.music_number) then
self.music_sclust = 1;
end
end
elseif (cmd == DB.MUSIC_PLAY_DELETE) then
log:i("Sorry, we can't delete music yet");
end
log:d("controlMusicPlay, cmd: "..tostring(self.play_mode)..", music index: "..tostring(self.play_status))
sys:runHandler("music_status", "status", self.play_status);
end
--[[
@api {GET} music_list=music:loadMusicList(start,end) 加载音乐列表
@apiName loadMusicList()
@apiGroup MusicGroup
@apiVersion 1.0.0
@apiDescription 扫描SD卡中的MP3文件,并生成文件列表table
@apiParam {number} start 需要获取的音乐列表开始索引
@apiParam {number} end 需要获取的音乐列表结束索引
@apiParamExample 示例:
music_list = music:loadMusicList(1, 5) -- 扫描第1个开始,到第5个结束的MPA文件
music_num = #music_list -- 计算获取到的MP3文件数量
for i=1, music_num do
print(music_list[i].name) -- 逐个打印音乐名称
end
@apiSuccess (返回值) {table{name,len,sclust,dir_type,fn}} music_list 获取到的音乐列表
@apiSuccess (music_list) {string} name 文件名称
@apiSuccess (music_list) {number} len 文件名长度
@apiSuccess (music_list) {number} sclust 件簇号
@apiSuccess (music_list) {number{0,1}} dir_type 文件类型,文件或文件夹
@apiSuccess (music_list) {number{0,1}} fn 长文件名或短文件名
@apiSuccessExample {number} 成功响应:
成功获取音乐列表
@apiErrorExample {number} 失败响应:
API返回nil
]]
function music:loadMusicList()
local music_list = {}
if (self.music_path) then
-- 如果有指定路径,扫描路径中的文件模拟
else
-- 否则用模拟音乐列表作为列表返回
local music_table = simulationMusicList;
local music_number = #music_table;
for i = 1, music_number do
local music = {};
music.name = music_table[i];
music.len = #music_table[i];
music.sclust = i;
music.dir_type = DB.DIR_TYPE_FILE;
music.fn = 0;
table.insert(music_list, music);
end
end
return music_list;
end
--[[
@api {SET} music:freeMusicList(music_list) 释放音乐列表
@apiName freeMusicList()
@apiGroup MusicGroup
@apiVersion 1.0.0
@apiDescription 释放从loadMusicList获取到的音乐列表
@apiParam {table} music_list 从loadMusicList方法获取到的音乐列表
@apiParamExample 示例:
music_list = music:loadMusicList(1, 5) -- 扫描第1个开始,到第5个结束的MPA文件
music_num = #music_list -- 计算获取到的MP3文件数量
for i=1, music_num do
print(music_list[i].name) -- 逐个打印音乐名称
end
music:freeMusicList(music_list) -- 释放music_list
@apiSuccessExample {number} 成功响应:
music_list.name内存被成功释放
@apiErrorExample {number} 失败响应:
music_list.name内存未被成功释放,最后可能导致内存溢出
]]
function music:freeMusicList(music_table)
local music_number = #music_table;
if music_number > 1 then
for i = 1, music_number do
-- for k, v in pairs(music_table[i]) do
log:d("free music name: " .. music_table[i].name)
-- end
end
else
for k, v in pairs(music_table[1]) do
log:d("free music name: " .. music_table[1].name)
end
end
end
--[[
@api {GET} name,dev,mode,status=music:getMusicPlayInfo([only_get_name]) 获取播放器信息
@apiName getMusicPlayInfo()
@apiGroup MusicGroup
@apiVersion 1.0.0
@apiDescription 获取播放器信息,如音乐名称、播放设备、播放模式、播放状态等
@apiParam (可选参数) {number{DB.MUSIC_GET_NAME_BY_INFO}} [only_get_name] 仅获取歌曲名称,可以节省lua内部压栈操作,缩短操作时间
@apiParamExample 示例:
-- 一次获取所有播放信息
music_name, play_dev, play_mode, play_status = music:getMusicPlayInfo()
-- 仅获取歌曲名称
music_name = music:getMusicPlayInfo(DB.MUSIC_GET_NAME_BY_INFO)
@apiSuccessExample {number} 成功响应:
成功获取所需信息
@apiErrorExample {number} 失败响应:
获取到信息为nil
]]
function music:getMusicPlayInfo(get_cur_name)
if (get_cur_name == DB.MUSIC_GET_NAME_BY_INFO) then
return self.music_list[self.music_sclust]
end
return self.music_list[self.music_sclust], self.play_device, self.play_mode, play_status
end
--[[
@api {SET} music:setMusicPlayInfo(mode,device) 设置播放信息
@apiName setMusicPlayInfo()
@apiGroup MusicGroup
@apiVersion 1.0.0
@apiDescription 设置播放器设备、模式等
@apiParam {number{nil,DB.MUSIC_PLAY_MODE_FCYCLE_ONE,DB.MUSIC_PLAY_MODE_FCYCLE_ALL,DB.MUSIC_PLAY_MODE_FCYCLE_RANDOM}} mode 播放模式
@apiParam {number{nil,DB.MUSIC_PLAY_DEVICE_PHONE,DB.MUSIC_PLAY_DEVICE_WATCH,DB.MUSIC_PLAY_DEVICE_EARPHONE}} device 播放设备
@apiParamExample 示例:
-- 同时设置播放手表音乐和循环播放模式
music:setMusicPlayInfo(DB.MUSIC_PLAY_MODE_FCYCLE_ONE, DB.MUSIC_PLAY_DEVICE_WATCH)
-- 仅设置播放手机音乐
music:setMusicPlayInfo(nil, DB.MUSIC_PLAY_DEVICE_PHONE)
-- 仅设置列表循环模式播放
music:setMusicPlayInfo(DB.MUSIC_PLAY_MODE_FCYCLE_ALL, nil)
@apiSuccessExample {number} 成功响应:
音乐播放设置正常
@apiErrorExample {number} 失败响应:
音乐播放设置异常
]]
function music:setMusicPlayInfo(music_mode, music_device)
self.play_mode = music_mode;
self.play_device = music_device;
end
return music
@@ -0,0 +1,116 @@
--[[
-- 电池控件方法
@apiDefine BatGroup 电量控件
--]]
Battery = {}
--[[
@api {SET} val=obj:getBatteryValue() 电池电量
@apiName getBatteryValue()
@apiGroup BatGroup
@apiVersion 1.0.0
@apiDescription 获取电池控件中显示的电量
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Battery:getBatteryValue()
local index = self.obj:getImageIndex(0)
local number = self.obj:getImageNumber(0)
local power = (index / number) * 100
log:d('ename: [ '..self._ename..' ] getBatteryValue: ' .. tostring(power))
return math.floor(power)
end
--[[
@api {SET} charging=obj:batteryIsCharging() 充电状态
@apiName batteryIsCharging()
@apiGroup BatGroup
@apiVersion 1.0.0
@apiDescription 获取电池充电状态
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Battery:batteryIsCharging()
local is_charging = self._highlight
print('ename: [ '..self._ename..' ] batteryIsCharging: ' .. tostring(is_charging))
return is_charging
end
--[[
@api {SET} obj:setBatteryLevel(percent,charging) 设置电量
@apiName setBatteryLevel()
@apiGroup BatGroup
@apiVersion 1.0.0
@apiDescription 设置电池控件电量百分比和充电状态
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Battery:setBatteryLevel(...)
local arg = {...}
local arg_num = #arg
local level = arg[1]
local is_charging = arg[2]
local redraw = true
if (not log:checkArgType("setBatteryLevel", 1, level, "number")) then
return
end
if (not log:checkArgType("setBatteryLevel", 2, is_charging, "boolean")) then
return
end
if (arg_num == 3) then
if (not log:checkArgType("setBatteryLevel", 3, arg[3], "boolean")) then
return
end
redraw = arg[3]
end
log:d('ename: [ '..self._ename..' ] setBatteryLevel: ' .. level .. ', ' .. tostring(is_charging))
if (not redraw) then
return
end
if is_charging then
-- 如果正在充电,表示显示高亮状态
self.obj:showImageByIndex(1, 0)
self._highlight = true
else
-- 否则为普通状态,看总图片跟百分比计算显示那一张图片
local img_num = self.obj:getImageNumber(0)-- 普通图片有几张
--print(img_num)
local set_lev = level / (100 / img_num) -- 计算电量等级
--print(math.floor(set_lev))
self.obj:showImageByIndex(0, math.floor(set_lev))
self._highlight = false
end
end
return Battery
@@ -0,0 +1,7 @@
--[[
-- 按钮控件方法
@apiDefine ButGroup 按钮控件
--]]
Button = {}
return Button
@@ -0,0 +1,116 @@
--[[
-- 指南针控件方法
@apiDefine CompassGroup compass
--]]
Compass = {}
Compass.bk_angle = 0
Compass.indicator_angle = 0
--[[
@api {SET} obj:setCompassAngle(bk_angle,indicator_angle) 设置指南针
@apiName setCompassAngle()
@apiGroup CompassGroup
@apiVersion 1.0.0
@apiDescription 设置指南针背景和指针角度
@apiParam {number{0 - 360}} bk_angle 背景图角度
@apiParam {number{0 - 360}} indicator_angle 指针角度
@apiParamExample 示例:
compass = gui:getComponentByName("COMPASS_TEST")
compass:setCompassAngle(30, 0)
@apiSuccessExample {number} 成功响应:
指针和背景图被旋转到指定角度
@apiErrorExample {number} 失败响应:
指针和背景图旋转角度错误
]]
function Compass:setCompassAngle(...)
local arg = {...}
local arg_num = #arg
if (arg_num ~= 2) and (arg_num ~= 3) then
-- 参数不是两个或三个
log_e("setCompassAngle", "arg number err!")
return
end
if (not log:checkArgType("setCompassAngle", 1, arg[1], "number")) or (arg[1] < 0) or (arg[1] > 360 )then
log:e("backgrand angle must between 0 to 360")
return
end
if (not log:checkArgType("setCompassAngle", 2, arg[2], "number")) or (arg[2] < 0) or (arg[2] > 360 )then
log:e("indicator angle must between 0 to 360")
return
end
if (arg_num == 3) then
if (not log:checkArgType("setCompassAngle", 3, arg[3], "boolean")) then
return
end
if (arg[3] == false) then
return
end
end
self.bk_angle = arg[1]
self.indicator_angle = arg[2]
local sub_ctrl = self.obj:getSubControls()
for k, v in ipairs(sub_ctrl) do
local ename = v:getControlEname()
local caption = v:getControlCaption()
local ctl_obj = ui:getComponentByName(ename)
-- print(ename, caption, ctl_obj)
if (caption == "compass_bkimg") then
local rx = ctl_obj:getAttrNumberByIndex(0)
local ry = ctl_obj:getAttrNumberByIndex(1)
local w = ctl_obj:getComponentParent():getWidth()
local h = ctl_obj:getComponentParent():getHeight()
-- print(rx, ry, w, h)
-- print("set bkimg angle: "..tostring(self.bk_angle))
ctl_obj:setRotateByPos(self.bk_angle, rx, ry, w/2, h/2)
end
if (caption == "compass_indicator") then
local rx = ctl_obj:getAttrNumberByIndex(0)
local ry = ctl_obj:getAttrNumberByIndex(1)
local w = ctl_obj:getComponentParent():getWidth()
local h = ctl_obj:getComponentParent():getHeight()
-- print(rx, ry)
-- print("set indicator angle: "..tostring(self.indicator_angle))
ctl_obj:setRotateByPos(self.indicator_angle, rx, ry, w/2, h/2)
end
end
end
--[[
@api {SET} bk_angle,indicator_angle=obj:getCompassAngle() 获取指南针角度
@apiName getCompassAngle()
@apiGroup CompassGroup
@apiVersion 1.0.0
@apiDescription 获取指南针背景和指针角度
@apiParamExample 示例:
obj = gui:getComponentByName("COMPASS_TEST")
bk_angle,indicator_angle = obj:getCompassAngle()
@apiSuccessExample {number} 成功响应:
成功获取指针和背景图角度
@apiErrorExample {number} 失败响应:
获取角度与实际不同
]]
function Compass:getCompassAngle()
local bk_angle = self.bk_angle
local indicator_angle = self.indicator_angle
return bk_angle, indicator_angle
end
return Compass
@@ -0,0 +1,578 @@
--[[
-- 表格控件方法
@apiDefine GridGroup 表格控件
--]]
Grid = {}
-- 动态列表标志,将静态列表初始化为动态列表后,该标志会被置为true
Grid.dynamic = false
--[[
@api {SET} obj:initGridDynamic(row,col[,redraw]) 动态列表
@apiName initGridDynamic()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 将静态列表初始化为动态列表,当需要用列表显示的内容较多时,可以考虑使用动态列表的方式实现,但需注意,动态列表效率不如静态列表
@apiParam {number} row 动态列表行数
@apiParam {number} col 动态列表列数
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:initGridDynamic(3, 1, false) -- 将静态列表初始化为3行1列的动态列表,且不立即刷新
@apiSuccessExample {number} 成功响应:
静态列表成功被初始化为动态列表
@apiErrorExample {number} 失败响应:
静态列表未被设置未圆弧列表显示
]]
function Grid:initGridDynamic(...)
local arg = {...}
local arg_num = #arg
local row = 0
local col = 0
local redraw = true
if (not log:checkArgType("initGridDynamic", 1, arg[1], "number")) then
return
end
if (not log:checkArgType("initGridDynamic", 2, arg[2], "number")) then
return
end
if (arg_num == 2) then
row = arg[1]
col = arg[2]
elseif (arg_num == 3) then
row = arg[1]
col = arg[2]
if (not log:checkArgType("initGridDynamic", 3, arg[3], "boolean")) then
return
end
redraw = arg[3]
else
log:e("function \"initGridDynamic\" arg number must be 2 or 3")
return
end
log:d('initGridDynamic: [ '..self._ename..' ], type: '..self._type .. ", init ( "..tostring(row) .. " x " .. tostring(col).." ), ".."redraw: "..tostring(redraw))
local sub_ctrl_num = self.obj:getSubControlsNumber()
log:d("base sub controls number is "..tostring(sub_ctrl_num))
if (sub_ctrl_num <= 0) or (row <= 0) then
log:w("base sub controls or arg \"row\" must be > 0")
end
self.obj:initDynamicItem()
if (self._type == "VerticalList") then
-- 垂直列表
row = row - sub_ctrl_num
col = 0 --col - 1
elseif (self._type == "HorizontalList") then
-- 水平列表
row = 0 --row - 1
col = col - sub_ctrl_num
elseif (self._type == "NewGrid") then
-- 表格控件
sub = self.obj:getDynamicInitItem()
row = row - sub.row
col = col - sub.col
end
print(self._type, row, col)
self.obj:appendDynamicItem(row, col)
-- 注册上下滑动事件
self.obj:bindDynamicVerticalEvent(function(row, col)
print(">>>>>>>>>>>>>> v Grid".. row.." "..col)
self.obj:hide()
self.obj:show()
end)
--[[
if (sub_ctrl_num < row) then
for i = sub_ctrl_num, row - 1, 1 do
-- 初始化比原本控件少,把最后一个子控件拷贝到末尾
-- print("copy: "..tostring(i))
self.obj:copySubControlItemByIndex(sub_ctrl_num - 1)
end
elseif (sub_ctrl_num > row) then
while (true) do
sub_ctrl_num = self.obj:getSubControlsNumber()
if (sub_ctrl_num > row) then
-- 初始化比原本控件多,删除row到sub_ctrl_num的子控件
-- print("remove: "..tostring(sub_ctrl_num))
self.obj:removeSubControlItemByIndex(sub_ctrl_num - 1)
else
break
end
end
end
]]
self.dynamic = true
end
--[[
@api {SET} obj:addGridDynamic(row,col[,redraw]) 添加列表项
@apiName addGridDynamic()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 动态列表末尾添加项数。注意,仅当列表转为动态列表后接口才生效
@apiParam {number} row 添加的行数
@apiParam {number} col 添加的列数
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:initGridDynamic(0, 0, false) -- 初始化为动态列表
vlist:addGridDynamic(3, 0, true) -- 添加3行0列项,立即刷新
@apiSuccessExample {number} 成功响应:
动态列表项数增加
@apiErrorExample {number} 失败响应:
动态列表项数未增加,或者显示异常
]]
function Grid:addGridDynamic(...)
local arg = {...}
local arg_num = #arg
if (not self.dynamicGrid) then
-- 如果没有初始化成动态列表
log:e("dynamic grid controls not init")
return
end
local row = 0
local col = 0
local redraw = true
if (not log:checkArgType("addGridDynamic", 1, arg[1], "number")) then
return
end
if (not log:checkArgType("addGridDynamic", 2, arg[2], "number")) then
return
end
if (arg_num == 2) then
row = arg[1]
col = arg[2]
elseif (arg_num == 3) then
row = arg[1]
col = arg[2]
redraw = arg[3]
if (not log:checkArgType("addGridDynamic", 3, arg[3], "boolean")) then
return
end
else
-- 限制参数只能是两个或者三个
log:e("function \"addGridDynamic\" arg number must be 2 or 3")
return
end
log:d('addGridDynamic: [ '..self._ename..' ], type: '..self._type .. ", add ( "..tostring(row) .. " x " .. tostring(col).." ), ".."redraw: "..tostring(redraw))
self.obj:appendDynamicItem(row, col)
--[[
local sub_ctrl_num = self.obj:getSubControlsNumber()
log:d("base sub controls number is "..tostring(sub_ctrl_num))
if (sub_ctrl_num <= 0) or (row < 0) then
log:e("base sub controls or arg \"row\" must be > 0")
return
end
for i = sub_ctrl_num, sub_ctrl_num + row - 1, 1 do
print("add: "..tostring(i))
self.obj:copySubControlItemByIndex(sub_ctrl_num - 1)
end
]]
end
--[[
@api {SET} obj:delGridDynamic(row,col[,redraw]) 删除列表项
@apiName delGridDynamic()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 删除动态列表的项数,从列表末尾开始删除,删除后,列表能上下滑动的项数减少
@apiParam {number} row 需要删除的行数
@apiParam {number} col 需要删除的列数
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:initGridDynamic(5, 1, true) -- 初始化为动态列表
vlist:delGridDynamic(3, 0, true) -- 删除3行
@apiSuccessExample {number} 成功响应:
列表项数减少
@apiErrorExample {number} 失败响应:
列表项数未减少,或者显示异常
]]
function Grid:delGridDynamic(...)
local arg = {...}
local arg_num = #arg
if (not self.dynamicGrid) then
-- 如果没有初始化成动态列表
log:e("dynamic grid controls not init")
return
end
local row = 0
local col = 0
local redraw = true
if (not log:checkArgType("delGridDynamic", 1, arg[1], "number")) then
return
end
if (not log:checkArgType("delGridDynamic", 2, arg[2], "number")) then
return
end
if (arg_num == 2) then
row = arg[1]
col = arg[2]
elseif (arg_num == 3) then
row = arg[1]
col = arg[2]
redraw = arg[3]
if (not log:checkArgType("delGridDynamic", 3, arg[3], "boolean")) then
return
end
else
-- 限制参数只能是两个或者三个
log:e("function \"delGridDynamic\" arg number must be 2 or 3")
return
end
log:d('delGridDynamic: [ '..self._ename..' ], type: '..self._type .. ", del ( "..tostring(row) .. " x " .. tostring(col).." ), ".."redraw: "..tostring(redraw))
self.obj:removeDynamicItem(row, col)
--[[
local base_sub_num = self.obj:getSubControlsNumber()
if (base_sub_num <= 0) then
log:e("base sub controls number has <= 0")
return
end
for i = base_sub_num - 1, base_sub_num - row, -1 do
if (i < 0) then
break
end
log:d("delete sub: ".. tostring(i))
self.obj:removeSubControlItemByIndex(i)
end
base_sub_num = self.obj:getSubControlsNumber()
if (base_sub_num <= 0) then
log:w("base sub controls number will be < 0")
end
]]
end
--[[
@api {GET} item=obj:getGridCurItem() 获取当前刷新项
@apiName getGridCurItem()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 获取动态列表当前刷新项的序号,用于动态列表子项内容刷新时,确定需显示的内容
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:initGridDynamic(5, 1, true)
cur_item = vlist:getGridCurItem() -- 获取当前刷新项,仅动态列表有效
@apiSuccessExample {number} 成功响应:
获取到正确的当前刷新项值
@apiErrorExample {number} 失败响应:
获取到值为 -1
]]
function Grid:getGridCurItem()
local current_item = -1
-- 动态列表才有这个项
if (self.dynamic) then
current_item = self.obj:getMiddleScrollAreaItemID()
else
log:e("dynamic grid controls not init")
end
return current_item
end
--[[
@api {SET} obj:setHighLightItem(item[,redraw]) 设置高亮项
@apiName setHighLightItem()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 设置动态列表高亮项
@apiParam {number} item 需高亮的项
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:setHighLightItem(5) -- 设置第五项为高亮,立即刷新
@apiSuccessExample {number} 成功响应:
对应项显示高亮状态
@apiErrorExample {number} 失败响应:
设置高亮状态无响应
]]
function Grid:setHighLightItem(item, redraw)
-- 检查参数类型
if (not log:checkArgType("setHighLightItem", 1, item, "number")) then
return
end
if (not log:checkArgType("setHighLightItem", 2, redraw, "nil", "boolean")) then
return
end
local sub_num = self.obj:getSubControlsNumber()
if (item < 1) or (item >= sub_num) then
log_e("setGridDynamicHiIndex", "arg must between 1 to "..tostring(sub_num))
return
end
if (self.dynamic) then
-- 动态列表
self.obj:setMiddleScrollAreaItemID(item)
else
-- 静态列表
end
end
--[[
@api {GET} item=obj:getHighLightItem() 获取高亮项
@apiName getHighLightItem()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 获取动态列表高亮项
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
highlight_item = vlist:getHighLightItem()
@apiSuccessExample {number} 成功响应:
返回值与当前高亮状态的项一致
@apiErrorExample {number} 失败响应:
返回值与当前高亮状态项不一致,或者返回 -1
]]
function Grid:getHighLightItem()
local highlight_item = 0
if (self.dynamic) then
highlight_item = self.obj:getMiddleScrollAreaItemID()
else
end
return highlight_item
end
--[[
@api {GET} item=obj:getTouchItem() 获取触摸项
@apiName getTouchItem()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 获取列表控件被触摸项
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
touch_item = vlist:getTouchItem()
@apiSuccessExample {number} 成功响应:
返回值与touch项一致
@apiErrorExample {number} 失败响应:
返回值与touch项不一致
]]
function Grid:getTouchItem()
local touch_item = 0
log:d("getTouchItem: "..tostring(touch_item))
return touch_item
end
--[[
@api {SET} obj:setScrollarea(left,top,right,bottom) 设置滑动区域
@apiName setScrollArea()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 设置列表控件的滑动区域。注意,此方法仅在设备端有效,模拟器端不生效
@apiParam {number} left 滑动区域相对于父控件的X左边
@apiParam {number} top 滑动区域相对于父控件的Y左边
@apiParam {number} right 滑动区域宽度
@apiParam {number} bottom 滑动区域高度
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:setScrollArea(0, 0, 10000, 10000) -- 设置全屏区域滑动,10000相对于全屏像素
@apiSuccessExample {number} 成功响应:
列表控件在指定区域内滑动
@apiErrorExample {number} 失败响应:
列表控件可以滑出指定区域外
]]
function Grid:setScrollArea(left, top, right, bottom)
-- 参数类型检查
if (not log:checkArgType("setScrollArea", 1, left, "number")) then
return
end
if (not log:checkArgType("setScrollArea", 2, top, "number")) then
return
end
if (not log:checkArgType("setScrollArea", 3, right, "number")) then
return
end
if (not log:checkArgType("setScrollArea", 4, bottom, "number")) then
return
end
log:d("setScrollArea: ("..tostring(left)..", "..tostring(top)..", "..tostring(right)..", "..tostring(bottom)..")")
end
--[[
@api {SET} obj:setSliderDir(dir) 设置滑动方向
@apiName setSliderDir()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 设置列表控件的滑动方向,此方法仅在设备端有效,模拟器不生效
@apiParam {number{DB.SCROLL_DIRECTION_LR, DB.SCROLL_DIRECTION_UP}} dir 滑动方向
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:setSliderDir(DB.SCROLL_DIRECTION_UP) -- 设置垂直列表仅上下滑动
@apiSuccessExample {number} 成功响应:
列表控件仅可在设置方向上滑动
@apiErrorExample {number} 失败响应:
列表控件可在设置方向之外滑动
]]
function Grid:setSliderDir(dir)
-- 参数类型检查
if (not log:checkArgType("setSliderDir", 1, dir, "number")) then
return
end
log:d("setSliderDir, dir:"..tostring(dir))
end
--[[
@api {SET} obj:setItemNumber(number) 静态列表项数
@apiName setItemNumber()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 设置静态列表项数,当UI编辑工具设计的静态列表项数较多,而实际需显示较少时使用此方法
@apiParam {number} number 静态列表的目标项数,目标项数必须小于设计的列表项数
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:setItemNumber(15) -- 设置静态列表项数为15项
@apiSuccessExample {number} 成功响应:
列表控件项数被设置为指定项数
@apiErrorExample {number} 失败响应:
列表控件项数无变化
]]
function Grid:setItemNumber(number)
-- 参数类型检查
if (not log:checkArgType("setItemNumber", 1, number, "number")) then
return
end
-- 要设置的子控件数量不能小于0
if (number < 0) then
log_e("setItemNumber", "arg number must be > 0")
return
elseif (number == 0) then
log_w("setItemNumber", "grid sub item will be 0")
end
-- 获取子控件数量
local base_sub_num = self.obj:getSubControlsNumber()
-- 如果设置的item数量大于子控件数量,则退出
if (number > base_sub_num) then
log:w("set item number: "..tostring(number).." bigger then base item number: "..tostring(base_sub_num))
return
end
-- 从最后一个子控件开始,移除超过设置数量的子控件
log:d("set static grid item number: "..tostring(number))
for i = base_sub_num - 1, number, -1 do
-- print("remove: "..tostring(i))
self.obj:removeSubControlItemByIndex(i)
end
end
--[[
@api {SET} obj:setGridToRotate(rotate) 圆弧列表
@apiName setGridToRotate()
@apiGroup GridGroup
@apiVersion 1.0.0
@apiDescription 设置列表控件为圆弧列表
@apiParam {boolean{true, false}} [rotate] 圆弧设置开关,缺省时设置为圆弧列表
@apiParamExample 示例:
vlist = gui:getComponentByName("VLIST_TEST") -- 创建垂直列表实例
vlist:setGridToRotate(true) -- 设置为圆弧列表
@apiSuccessExample {number} 成功响应:
垂直列表变为圆弧列表形式显示
@apiErrorExample {number} 失败响应:
垂直列表未显示为圆弧列表,或者显示异常
]]
function Grid:setGridToRotate(rotate)
-- 参数类型检查
if (not log:checkArgType("setGridToRotate", 1, rotate, "number")) then
return
end
-- 参数省略或传入true,则将垂直列表设置为圆弧列表
if (rotate == nil) or rotate then
local rotate_size = 30 -- 弯曲大小,大于0向右弯曲,小于0向左弯曲
self.obj:setScrollListRotateSize(rotate_size)
log:d("set v list rotate")
end
end
return Grid
@@ -0,0 +1,178 @@
--[[
-- 图片控件方法
@apiDefine PicGroup 图片控件
--]]
Image = {}
--[[
@api {SET} obj:showImageByIndex(index) 显示图片
@apiName showImageByIndex()
@apiGroup PicGroup
@apiVersion 1.0.0
@apiDescription 显示图片控件列表中第index张图片
@apiParam {number} index 图片索引号
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
pic = gui:getComponentByName("PIC_TEST")
pic:showImageByIndex(1)
@apiSuccessExample {number} 成功响应:
成功显示指定索引图片
@apiErrorExample {number} 失败响应:
显示非索引指定图片
]]
function Image:showImageByIndex(...)
local arg = {...}
local arg_num = #arg
local index = arg[1]
local redraw = true
if (not log:checkArgType("showImageByIndex", 1, index, "number")) then
return
end
if (arg_num == 2) then
if (not log:checkArgType("showImageByIndex", 2, arg[2], "boolean")) then
return
end
redraw = arg[2]
end
local img_num = 0
if (self._highlight) then
-- 判断传入参数是否会大于图片数量
img_num = self.obj:getImageNumber(1)
if (index >= img_num) then
log_e('showImageByIndex', 'index max is: '..tostring(img_num-1))
return
end
-- 切换图片
log:d('ename: [ '..self._ename..' ] show highLight image index: ' .. tostring(index))
self.obj:showImageByIndex(1, index)
else
img_num = self.obj:getImageNumber(0)
if (index >= img_num) then
log_e('showImageByIndex', 'index max is: '..tostring(img_num-1))
return
end
log:d('ename: [ '..self._ename..' ] show normal image index: ' .. tostring(index))
self.obj:showImageByIndex(0, index)
end
self._item = index
end
--[[
@api {SET} index=obj:getImageIndex() 获取图片
@apiName getIMageIndex()
@apiGroup PicGroup
@apiVersion 1.0.0
@apiDescription 获取图片控件当前显示的图片索引
@apiParamExample 示例:
pic = gui:getComponentByName("PIC_TEST")
index = pic:getImageIndex()
@apiSuccessExample {number} 成功响应:
获取正在显示的图片索引与该图片实际索引相同
@apiErrorExample {number} 失败响应:
获取正在显示的图片索引与该图片实际索引不符
]]
function Image:getImageIndex()
local index = 0
if (self._highlight) then
index = self.obj:getImageIndex(1)
log:d('ename: [ '..self._ename..' ] get highLight image index: ' .. tostring(index))
else
index = self.obj:getImageIndex(0)
log:d('ename: [ '..self._ename..' ] get normal image index: ' .. tostring(index))
end
return index
end
--[[
@api {SET} number=obj:getNormalNumber() 获取普通图片数量
@apiName getNormalNumber()
@apiGroup PicGroup
@apiVersion 1.0.0
@apiDescription 获取图片控件的普通图片数量
@apiParamExample 示例:
pic = gui:getComponentByName("PIC_TEST")
pic_number = pic:getNormalNumber()
@apiSuccessExample {number} 成功响应:
成功获取普通图片数量
@apiErrorExample {number} 失败响应:
获取图片数量错误
]]
function Image:getNormalNumber()
local number = self.obj:getImageNumber(0)
log:d('ename: [ '..self._ename..' ] getHighLightNumber: ' .. tostring(number))
return number
end
--[[
@api {SET} number=obj:getHighLightNumber() 获取高亮图片数量
@apiName getHighLightNumber()
@apiGroup PicGroup
@apiVersion 1.0.0
@apiDescription 获取图片控件中高亮图片列表的图片数量
@apiParamExample 示例:
pic = gui:getComponentByName("PIC_TEST")
highLight_number = pic:getHighLightNumber()
@apiSuccessExample {number} 成功响应:
成功获取高亮图片数量
@apiErrorExample {number} 失败响应:
获取高亮图片数量错误
]]
function Image:getHighLightNumber()
local number = self.obj:getImageNumber(1)
log:d('ename: [ '..self._ename..' ] getHighLightNumber: ' .. tostring(number))
return number
end
--[[
@api {SET} obj:setDrawImage(filename) 绘制图片
@apiName setDrawImage()
@apiGroup PicGroup
@apiVersion 1.0.0
@apiDescription 自定义图片控件显示指定图片
@apiParam {string} filename 图片路径
@apiParamExample 示例:
pic = gui:getComponentByName("PIC_TEST")
pic:setDrawImage("C:test.png")
@apiSuccessExample {number} 成功响应:
成功显示指定图片
@apiErrorExample {number} 失败响应:
未成功显示指定图片
]]
function Image:setDrawImage(fileName)
self.obj:setBackgroundImage(fileName)
end
return Image
@@ -0,0 +1,419 @@
--[[
-- 布局控件方法
@apiDefine LayGroup 布局控件
--]]
Layout = {}
--[[
@api {SET} obj:drawSpot(spot) 画点
@apiName drawSpot()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 在布局控件上画点
@apiParam {table} spot 点table
@apiParam (spot) {number} x X坐标
@apiParam (spot) {number} y Y坐标
@apiParam (spot) {number} size 点半径
@apiParam (spot) {number} color 点颜色
@apiParamExample 示例:
local spot = {}
spot.x = 10
spot.y = 10
spot.size = 3
spot.color = "red"
lay = gui:getComponentByName("LAY_TEST")
lay:drawSpot(spot)
@apiSuccessExample {number} 成功响应:
在布局上成功画点
@apiErrorExample {number} 失败响应:
布局上未成功画点
]]
function Layout:drawSpot(object)
if (not log:checkArgType("drawSpot", 1, object, "table")) then
return
end
if (not log:checkArgType("drawSpot", "x", object.x, "number")) then
return
end
if (not log:checkArgType("drawSpot", "y", object.y, "number")) then
return
end
if (not log:checkArgType("drawSpot", "size", object.size, "number")) then
return
end
if (not log:checkArgType("drawSpot", "color", object.color, "number", "string")) then
return
end
log:d('draw spot: '..'('..object.x..','..object.y..')'..', size = '..object.size..', color = '..object.color)
self.obj:drawPoint(object)
end
--[[
@api {SET} obj:drawLine(line) 画线
@apiName drawLine()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 在布局控件上画线
@apiParam {table} line 线table
@apiParam (line) {number} x1 起始X坐标
@apiParam (line) {number} y1 起始Y坐标
@apiParam (line) {number} x2 终止X坐标
@apiParam (line) {number} y2 终止Y坐标
@apiParam (line) {number} size 大小
@apiParam (line) {number} color 颜色
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
local line = {}
line.x1 = 0
line.y1 = 0
line.x2 = 50
line.y2 = 50
line.size = 3
line.color = "green"
lay:drawLine(line)
@apiSuccessExample {number} 成功响应:
布局上成功绘制指定线段
@apiErrorExample {number} 失败响应:
指定布局上未绘制线段
]]
function Layout:drawLine(object)
if (not log:checkArgType("drawLine", 1, object, "table")) then
return
end
if (not log:checkArgType("drawLine", "x1", object.x1, "number")) then
return
end
if (not log:checkArgType("drawLine", "y1", object.y1, "number")) then
return
end
if (not log:checkArgType("drawLine", "x2", object.x2, "number")) then
return
end
if (not log:checkArgType("drawLine", "y2", object.y2, "number")) then
return
end
if (not log:checkArgType("drawLine", "size", object.size, "number")) then
return
end
if (not log:checkArgType("drawLine", "color", object.color, "number", "string")) then
return
end
log:d('draw line: start ('..object.x1..', '..object.y1..'), end ('..object.x2..', '..object.y2..'), size = '..object.size..', color = '..object.color)
self.obj:drawLine(object)
end
--[[
@api {SET} obj:drawRect(rect) 画矩形
@apiName drawRect()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 在布局控件上画矩形
@apiParam {table} rect 矩形table
@apiParam (rect) {number} x 起始X坐标
@apiParam (rect) {number} y 起始Y坐标
@apiParam (rect) {number} w 矩形宽度
@apiParam (rect) {number} h 矩形高度
@apiParam (rect) {number} size 大小
@apiParam (rect) {number} color 颜色
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
local rect = {}
rect.x = 10
rect.y = 10
rect.w = 20
rect.h = 20
rect.size = 1
rect.color = "blue"
lay:drawRect(rect)
@apiSuccessExample {number} 成功响应:
在布局上成功画矩形
@apiErrorExample {number} 失败响应:
布局上未成功画矩形
]]
function Layout:drawRect(object)
if (not log:checkArgType("drawRect", 1, object, "table")) then
return
end
if (not log:checkArgType("drawRect", "x", object.x, "number")) then
return
end
if (not log:checkArgType("drawRect", "y", object.y, "number")) then
return
end
if (not log:checkArgType("drawRect", "w", object.w, "number")) then
return
end
if (not log:checkArgType("drawRect", "h", object.h, "number")) then
return
end
if (not log:checkArgType("drawRect", "size", object.size, "number")) then
return
end
if (not log:checkArgType("drawRect", "color", object.color, "number", "string")) then
return
end
log:d('draw rect: (x = '..object.x..', y = '..object.y..', w = '..object.w..', h = '..object.h..'), size = '..object.size..', color = '..object.color)
self.obj:drawRect(object)
end
--[[
@api {SET} obj:drawCircle(circle) 画圆
@apiName drawCircle()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 在布局控件上画圆
@apiParam {table} circle 源table
@apiParam (circle) {number} x 圆心X坐标
@apiParam (circle) {number} y 圆心Y坐标
@apiParam (circle) {number} r 圆半径
@apiParam (circle) {number} size 大小
@apiParam (circle) {number} color 颜色
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
local circle = {}
circle.x = 50
circle.y = 50
circle.r = 20
circle.size = 2
circle.color = "red"
lay:drawCircle(circle)
@apiSuccessExample {number} 成功响应:
在布局上成功画圆
@apiErrorExample {number} 失败响应:
未在布局上成功画圆
]]
function Layout:drawCircle(object)
if (not log:checkArgType("drawRect", 1, object, "table")) then
return
end
if (not log:checkArgType("drawRect", "x", object.x, "number")) then
return
end
if (not log:checkArgType("drawRect", "y", object.y, "number")) then
return
end
if (not log:checkArgType("drawRect", "r", object.r, "number")) then
return
end
if (not log:checkArgType("drawRect", "size", object.size, "number")) then
return
end
if (not log:checkArgType("drawRect", "color", object.color, "number", "string")) then
return
end
log:d('draw circle: ('..object.x..', '..object.y..', r = '..object.r..'), size = '..object.size..', color = '..object.color)
self.obj:drawCircle(object)
end
--[[
@api {SET} obj:clearDraw(tab) 清空绘图
@apiName clearDraw()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 清空在布局控件上的绘图
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
lay:clearDraw()
@apiSuccessExample {number} 成功响应:
布局上的自定义绘图被清理
@apiErrorExample {number} 失败响应:
布局上的自定义绘图未被清理
]]
function Layout:clearDraw()
log:d('clear draw by control: '..self._ename..', type: '..self._type)
self.obj:clearDraw()
end
--[[
@api {SET} obj:setMovable(move) 布局移动
@apiName setMovable()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 设置控件为可移动
@apiParam {boolean{true, false}} move 移动使能标志
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
lay:setMovable(true)
@apiSuccessExample {number} 成功响应:
布局可以滑动
@apiErrorExample {number} 失败响应:
布局不能滑动
]]
function Layout:setMovable(move)
self.movable = true
if (move ~= nil) then
self.movable = move
end
self.obj:setMovable(self.movable)
end
--[[
@api {SET} obj:starMenuInit() 满天星布局
@apiName starMenuInit()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 初始化为满天星布局
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
lay:starMenuInit()
@apiSuccessExample {number} 成功响应:
满天星功能生效
@apiErrorExample {number} 失败响应:
满天星功能不生效
]]
function Layout:starMenuInit()
if not self.movable then
log_e("starMenuInit", "The layout can't move, please \"setMovable\" first")
return
end
local layer = self.obj:getComponentParent(); --父控件图层
local dw = layer:getWidth() / 2;
local dh = layer:getHeight() / 2;
local dl = (dw + dh) / 2; --计算最远距离
local ctrls = self.obj:getSubControls();
local count = #ctrls;
-- 初始设置各个图片的大小
for i=1, count do
local ctrl = ctrls[i];
--计算控件的中心点坐标
cx = ctrl:getX() + ctrl:getWidth() / 2;
cy = ctrl:getY() + ctrl:getHeight() / 2;
--控件相对于layer的距离
dst = math.sqrt(((cx-dw) * (cx-dw)) + ((cy-dh) * (cy-dh)))
local bl = 1 - (dst / dl); --缩放比例
if bl <= 0.0001 then
bl = 0.1
end
if bl >= 1.0 then
bl = 1;
end
ctrl:setBackgroundScale(bl)
end
-- 注册滑动回调
self.obj:bindMovable(function(x, y)
for i=1, count do
local ctrl = ctrls[i];
--计算控件的中心点坐标
cx = ctrl:getX() + ctrl:getWidth() / 2;
cy = ctrl:getY() + ctrl:getHeight() / 2;
--控件相对于layer的距离
cx = cx + x;
cy = cy + y;
dst = math.sqrt(((cx-dw) * (cx-dw)) + ((cy-dh) * (cy-dh)))
local bl = 1 - (dst / dl); --缩放比例
if bl <= 0.0001 then
bl = 0.1
end
if bl >= 1.0 then
bl = 1;
end
ctrl:setBackgroundScale(bl)
end
end)
log:d("starMenuInit")
end
--[[
@api {SET} obj:starMenuFree() 释放满天星
@apiName starMenuFree()
@apiGroup LayGroup
@apiVersion 1.0.0
@apiDescription 释放满天星布局
@apiParamExample 示例:
lay = gui:getComponentByName("LAY_TEST")
lay:starMenuFree()
@apiSuccessExample {number} 成功响应:
释放满天星资源,满天星功能失效
@apiErrorExample {number} 失败响应:
满天星功能不失效
]]
function Layout:starMenuFree()
if (self.movable) then
self.movable = false
self.obj:setMovable(self.movable)
end
log:d("starMenuFree")
end
return Layout
@@ -0,0 +1,385 @@
--[[
-- 多重圆弧控件方法
@apiDefine MulproGroup multiprogress
--]]
Multiprogress = {}
Multiprogress.fp = 0 -- first percent
Multiprogress.sp = 0 -- second percent
Multiprogress.tp = 0 -- third percent
--[[
@api {SET} obj:setFirstPercent(percent[,redraw]) 第一圆弧百分比
@apiName setFirstPercent()
@apiGroup MulproGroup
@apiVersion 1.0.0
@apiDescription 设置多重圆弧控件第一圆弧的百分比
@apiParam {number{0 - 100}} percent 圆弧高亮的百分比
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
mul_progress = gui:getComponentByName("MULTIPROGRESS_TEST")
mul_progress:setFirstPercent(50) -- 第一个圆弧绘制50%
@apiSuccessExample {number} 成功响应:
第一个圆弧绘制50%
@apiErrorExample {number} 失败响应:
第一个圆弧未绘制,或者绘制百分比与指定不同
]]
function Multiprogress:setFirstPercent(percent, redraw)
-- 参数类型为数值
if (not log:checkArgType("setFirstPercent", 1, percent, "number")) then
return
end
-- 参数范围 0-100
if (percent < 0) or (percent > 100) then
log_e("setFirstPercent", "arg must between 0 to 100")
return
end
-- 获取progressbar_highlight控件
local pro_sub = {}
local sub_ctrl = self.obj:getSubControls()
for k, v in ipairs(sub_ctrl) do
local caption = v:getControlCaption()
if (string.find(caption, "multiprogressbar_highlight")) then
local ename = v:getControlEname()
pro_sub = ui:getComponentByName(ename)
end
end
-- 如果没有获取到子控件
if (not pro_sub) then
log_e("setProgressPercent", "not find sub controls \"progressbar_highlight\"")
return
end
-- 圆环个数
local round_num = pro_sub:getAttrNumberByIndex(0)
-- 圆心坐标
local x = pro_sub:getAttrNumberByIndex(1)
local y = pro_sub:getAttrNumberByIndex(2)
-- 圆环个数至少1个,大小圆半径
local big_r = 0
local small_r = 0
if (round_num >= 1) then
big_r = pro_sub:getAttrNumberByIndex(3)
small_r = pro_sub:getAttrNumberByIndex(4)
else
log_e("setFirstPercent", "round number is: "..tostring(round_num))
return
end
-- 起始、终止角度
local start_angle = pro_sub:getAttrNumberByIndex(9)
local end_angle = pro_sub:getAttrNumberByIndex(10)
print(round_num, x, y, small_r, big_r, start_angle, end_angle, percent)
-- 配置圆环信息
local arc = {}
arc.x = x
arc.y = x--y
arc.size = big_r - small_r
arc.r = small_r + math.ceil(arc.size / 2)
arc.start = start_angle
arc.span = math.ceil((end_angle - start_angle) / 100 * percent)
arc.color = "deepskyblue"
arc.pencap = "round"
-- for k, v in pairs(arc) do
-- print(k, v)
-- end
-- 画圆环
self.obj:clearDraw()
if (self.secondArc) then
self.obj:drawArc(self.secondArc)
end
if (self.thirdArc) then
self.obj:drawArc(self.thirdArc)
end
self.obj:drawArc(arc)
self.firstArc = arc
self.fp = percent
end
--[[
@api {SET} obj:setSecondPercent(percent[,redraw]) 第二圆弧百分比
@apiName setSecondPercent()
@apiGroup MulproGroup
@apiVersion 1.0.0
@apiDescription 设置多重圆弧第二圆弧百分比
@apiParam {number{0 - 100}} percent 圆弧高亮的百分比
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
mul_progress = gui:getComponentByName("MULTIPROGRESS_TEST")
mul_progress:setSecondPercent(30) -- 第二个圆弧绘制30%
@apiSuccessExample {number} 成功响应:
第二个圆弧成功绘制30%
@apiErrorExample {number} 失败响应:
第一个圆弧未绘制,或者绘制百分比与指定不同
]]
function Multiprogress:setSecondPercent(percent, redraw)
-- 参数类型为数值
if (not log:checkArgType("setSecondPercent", 1, percent, "number")) then
return
end
-- 参数范围 0-100
if (percent < 0) or (percent > 100) then
log_e("setSecondPercent", "arg must between 0 to 100")
return
end
-- 获取progressbar_highlight控件
local pro_sub = {}
local sub_ctrl = self.obj:getSubControls()
for k, v in ipairs(sub_ctrl) do
local caption = v:getControlCaption()
if (string.find(caption, "multiprogressbar_highlight")) then
local ename = v:getControlEname()
pro_sub = ui:getComponentByName(ename)
end
end
-- 如果没有获取到子控件
if (not pro_sub) then
log_e("setProgressPercent", "not find sub controls \"progressbar_highlight\"")
return
end
-- 圆环个数
local round_num = pro_sub:getAttrNumberByIndex(0)
-- 圆心坐标
local x = pro_sub:getAttrNumberByIndex(1)
local y = pro_sub:getAttrNumberByIndex(2)
-- 圆环个数至少1个,大小圆半径
local big_r = 0
local small_r = 0
if (round_num >= 2) then
big_r = pro_sub:getAttrNumberByIndex(5)
small_r = pro_sub:getAttrNumberByIndex(6)
else
log_e("setSecondPercent", "round number is: "..tostring(round_num))
return
end
-- 起始、终止角度
local start_angle = pro_sub:getAttrNumberByIndex(9)
local end_angle = pro_sub:getAttrNumberByIndex(10)
print(round_num, x, y, small_r, big_r, start_angle, end_angle, percent)
-- 配置圆环信息
local arc = {}
arc.x = x
arc.y = x--y
arc.size = big_r - small_r
arc.r = small_r + math.ceil(arc.size / 2)
arc.start = start_angle
arc.span = math.ceil((end_angle - start_angle) / 100 * percent)
arc.color = "springgreen"
arc.pencap = "round"
for k, v in pairs(arc) do
print(k, v)
end
-- 画圆环
self.obj:clearDraw()
if (self.firstArc) then
self.obj:drawArc(self.firstArc)
end
if (self.thirdArc) then
self.obj:drawArc(self.thirdArc)
end
self.obj:drawArc(arc)
self.secondArc = arc
self.sp = percent
end
--[[
@api {SET} obj:setThirdPercent(percent[,redraw]) 第三圆弧百分比
@apiName setThirdPercent()
@apiGroup MulproGroup
@apiVersion 1.0.0
@apiDescription 设置第三圆弧的百分比
@apiParam {number{0 - 100}} percent 圆弧高亮的百分比
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
mul_progress = gui:getComponentByName("MULTIPROGRESS_TEST")
mul_progress:setThirdPercent(10) -- 第三个圆弧绘制10%
@apiSuccessExample {number} 成功响应:
第三个圆弧成功绘制10%
@apiErrorExample {number} 失败响应:
第三个圆弧未绘制,或者绘制百分比与指定不同
]]
function Multiprogress:setThirdPercent(percent, redraw)
-- 参数类型为数值
if (not log:checkArgType("setThirdPercent", 1, percent, "number")) then
return
end
-- 参数范围 0-100
if (percent < 0) or (percent > 100) then
log_e("setThirdPercent", "arg must between 0 to 100")
return
end
-- 获取progressbar_highlight控件
local pro_sub = {}
local sub_ctrl = self.obj:getSubControls()
for k, v in ipairs(sub_ctrl) do
local caption = v:getControlCaption()
if (string.find(caption, "multiprogressbar_highlight")) then
local ename = v:getControlEname()
pro_sub = ui:getComponentByName(ename)
end
end
-- 如果没有获取到子控件
if (not pro_sub) then
log_e("setProgressPercent", "not find sub controls \"progressbar_highlight\"")
return
end
-- 圆环个数
local round_num = pro_sub:getAttrNumberByIndex(0)
-- 圆心坐标
local x = pro_sub:getAttrNumberByIndex(1)
local y = pro_sub:getAttrNumberByIndex(2)
-- 圆环个数至少1个,大小圆半径
local big_r = 0
local small_r = 0
if (round_num >= 3) then
big_r = pro_sub:getAttrNumberByIndex(7)
small_r = pro_sub:getAttrNumberByIndex(8)
else
log_e("setThirdPercent", "round number is: "..tostring(round_num))
return
end
-- 起始、终止角度
local start_angle = pro_sub:getAttrNumberByIndex(9)
local end_angle = pro_sub:getAttrNumberByIndex(10)
print(round_num, x, y, small_r, big_r, start_angle, end_angle, percent)
-- 配置圆环信息
local arc = {}
arc.x = x
arc.y = x--y
arc.size = big_r - small_r
arc.r = small_r + math.ceil(arc.size / 2)
arc.start = start_angle
arc.span = math.ceil((end_angle - start_angle) / 100 * percent)
arc.color = "deeppink"
arc.pencap = "round"
-- for k, v in pairs(arc) do
-- print(k, v)
-- end
-- 画圆环
self.obj:clearDraw()
if (self.firstArc) then
self.obj:drawArc(self.firstArc)
end
if (self.secondArc) then
self.obj:drawArc(self.secondArc)
end
self.obj:drawArc(arc)
self.thirdArc = arc
self.tp = percent
end
--[[
@api {GET} percent=obj:getFirstPercent() 获取第一圆弧百分比
@apiName getFirstPercent()
@apiGroup MulproGroup
@apiVersion 1.0.0
@apiDescription 获取多重圆弧的第一圆弧百分比
@apiParamExample 示例:
mul_progress = gui:getComponentByName("MULTIPROGRESS_TEST")
first_percent = mul_progress:getFirstPercent()
@apiSuccessExample {number} 成功响应:
获取到百分比与第一个圆弧绘制的百分比一致
@apiErrorExample {number} 失败响应:
获取到百分比与第一个圆弧绘制的百分比不一致
]]
function Multiprogress:getFirstPercent()
return self.fp
end
--[[
@api {GET} percent=obj:getSecondPercent() 获取第二圆弧百分比
@apiName getSecondPercent()
@apiGroup MulproGroup
@apiVersion 1.0.0
@apiDescription 获取多重圆弧的第二圆弧百分比
@apiParamExample 示例:
mul_progress = gui:getComponentByName("MULTIPROGRESS_TEST")
second_percent = mul_progress:getSecondPercent()
@apiSuccessExample {number} 成功响应:
获取到百分比与第二个圆弧绘制的百分比一致
@apiErrorExample {number} 失败响应:
获取到百分比与第二个圆弧绘制的百分比不一致
]]
function Multiprogress:getSecondPercent()
return self.sp
end
--[[
@api {GET} percent=obj:getThirdPercent() 获取第三进度条百分比
@apiName getThirdPercent()
@apiGroup MulproGroup
@apiVersion 1.0.0
@apiDescription 获取多重进度条第三进度条百分比
@apiParamExample 示例:
mul_progress = gui:getComponentByName("MULTIPROGRESS_TEST")
third_percent = mul_progress:getThirdPercent()
@apiSuccessExample {number} 成功响应:
获取到百分比与第三个圆弧绘制的百分比一致
@apiErrorExample {number} 失败响应:
获取到百分比与第三个圆弧绘制的百分比不一致
]]
function Multiprogress:getThirdPercent()
return self.tp
end
return Multiprogress
@@ -0,0 +1,265 @@
--[[
-- 数字控件方法
@apiDefine NumberGroup 数字控件
--]]
Number = {}
-- 拆分整数的每一位
local function get_split_inter(num, cnt)
if not num or not cnt then
return nil
end
local tb = {} -- 存放拆分的数字
local temp_num = num
repeat
table.insert(tb, num % 10)
num = math.floor(num / 10)
until(num == 0)
local tmp = {}
local tb_index = 1
local tb_number = #tb
-- tb倒序,并在高位补0
for i = cnt, 1, -1 do
if tb_index <= tb_number then
tmp[i] = tb[tb_index]
tb_index = tb_index + 1
else
tmp[i] = 0
end
end
return tmp
end
--[[
@api {SET} obj:setNumber(num1,num2,redraw) 设置数字
@apiName setNumber()
@apiGroup NumberGroup
@apiVersion 1.0.0
@apiDescription 设置数字控件显示数字
@apiParam (显示单个数字) {number} num1 待显示数字
@apiParam (显示单个数字) {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParam (显示两个数字) {number} num1 待显示的左边数字
@apiParam (显示两个数字) {number} num2 待显示的右边数字
@apiParam (显示两个数字) {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
--api_Param (显示字符串) {string} str 待显示字符串
--api_Param (显示字符串) {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
test_number = gui:getComponentByName("NUMBER_TEST")
-- 显示单个数字,立即刷新
test_number:setNumber(10)
-- 显示两个数字,不立即刷新
test_number:setnumber(20, 32, false)
@apiSuccessExample {number} 成功响应:
数字控件显示指定数值
@apiErrorExample {number} 失败响应:
数字控件未显示指定数值
]]
function Number:setNumber(...)
local arg = {...}
local arg_num = #arg
if (not log:checkArgType("setNumber", 1, arg[1], "number", "string")) then
return
end
local num1 = 0
local num2 = 0
local str = ""
local redraw = true
-- 解析参数
if (arg_num < 1) or (arg_num > 3) then
log_e("setNumber", "arg number err")
return
end
-- 获取图片列表中图片的数量
local img1_list_num = self.obj:getImageNumber(0)
local img2_list_num = self.obj:getImageNumber(1)
local img3_list_num = self.obj:getImageNumber(2)
-- 判断是否用图片显示
local show_image = false
if (img1_list_num > 0) then
show_image = true
end
num1 = arg[1]
-- 如果传入字符串
if (type(num1) == "string") then
if (arg_num == 2) then
str = num1
redraw = arg[2]
else
str = num1
end
-- 如果用图片显示
if (show_image) then
-- 字符串长度
local str_len = #str
local str_img = {}
-- 解析字符串
for i = 1, str_len, 1 do
local val = string.sub(str, i, i)
local pic = 0
local idx = tonumber(val)
if not idx then
if val == " " then
pic = 2
idx = 0
else
pic = 1
idx = 0
end
end
local pic_idx = {}
pic_idx.pic = pic
pic_idx.idx = idx
table.insert(str_img, pic_idx)
end
self.obj:setTextByImageList(str_img)
else
self.obj.setText(str)
end
log:d("setNumber", "string: "..tostring(str)..", redraw: "..tostring(redraw))
return
end
if (arg_num == 2) then
num2 = arg[2]
if (type(num2) == "boolean") then
redraw = num2
num2 = nil
arg_num = 1
end
elseif (arg_num == 3) then
num2 = arg[2]
redraw = arg[3]
end
-- 数据格式,后面根据格式配置显示内容
local data_format = self.obj:getAttrTextByIndex(1)
local show_format = {} -- 显示格式
local pre_c = ""
local right = false
for i = 1, #data_format do
-- 字符迭代
local c = string.sub(data_format, i, i)
local num = tonumber(c)
if (num and num ~= 0) then
-- 如果是数字,且不等于0
if (right) then
show_format.right_number = num
else
show_format.left_number = num
right = true
end
end
if (c == "%") and (i ~= 1) then
-- 保存间隔符
show_format.spacer = pre_c
end
pre_c = c -- 记录上一个字符,如果传入两个数字时要用来判断间隔符
end
if not show_format.left_number or (show_format.left_number == 0) then
-- 默认4位
show_format.left_number = 4
end
-- 显示配置
if (show_image) then
local num1_tab = get_split_inter(num1, show_format.left_number)
local num2_tab = {}
-- if (arg_num == 1) then
if not num2 then
num2_tab = nil
else
num2_tab = get_split_inter(num2, show_format.right_number)
end
local pic_img = {}
for k, v in ipairs(num1_tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(pic_img, tb)
end
if num2_tab then
local cm = {}
cm.pic = 1
cm.idx = 0
table.insert(pic_img, cm)
for k, v in ipairs(num2_tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(pic_img, tb)
end
end
self.obj:setTextByImageList(pic_img)
else
if (arg_num == 1) then
self.obj:setNumber(num1)
elseif (arg_num == 2) then
local msg = tostring(num1) .. tostring(show_format.spacer) .. tostring(num2)
self.obj:setText(msg)
end
end
log:d("setNumber", "num1: "..tostring(num1)..", num2: "..tostring(num2)..", redraw: "..tostring(redraw))
end
--[[
@api {GET} num=obj:getNumber() 获取数字
@apiName getNumber()
@apiGroup NumberGroup
@apiVersion 1.0.0
@apiDescription 获取数字控件正在显示的数字
@apiParamExample 示例:
test_number = gui:getComponentByName("NUMBER_TEST")
number = test_number:getNumber()
@apiSuccessExample {number} 成功响应:
获取到数字控件显示的数值
@apiErrorExample {number} 失败响应:
获取到数值为 nil
]]
function Number:getNumber()
local num = self.obj:getNumber()
log:d('ename: [ '..self._ename..' ] getNumber: ' .. num)
return math.floor(num)
end
return Number
@@ -0,0 +1,116 @@
--[[
-- 圆弧控件方法
@apiDefine ProGroup progress
--]]
Progress = {}
Progress.percent = 0
--[[
@api {SET} obj:setProgressPercent(percent[,redraw]) 圆弧进度条
@apiName setProgressPercent()
@apiGroup ProGroup
@apiVersion 1.0.0
@apiDescription 设置圆弧进度条百分比
@apiParam {number{0 - 100}} percent 圆弧高亮的百分比
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
progress = gui:getComponentByName("TEST_PROGRESS")
progress:setProgressPercent(50)
@apiSuccessExample {number} 成功响应:
圆弧绘制50%的高亮部分
@apiErrorExample {number} 失败响应:
圆弧未绘制高亮,或者高亮百分比与设置不同
]]
function Progress:setProgressPercent(percent)
-- 参数类型为数值
if (not log:checkArgType("setProgressPercent", 1, percent, "number")) then
return
end
-- 参数范围 0-100
if (percent < 0) or (percent > 100) then
log_e("setProgressPercent", "arg must between 0 to 100")
return
end
-- 获取progressbar_highlight控件
local pro_sub = {}
local sub_ctrl = self.obj:getSubControls()
for k, v in ipairs(sub_ctrl) do
local caption = v:getControlCaption()
if (string.find(caption, "progressbar_highlight")) then
local ename = v:getControlEname()
pro_sub = ui:getComponentByName(ename)
end
end
-- 如果没有获取到子控件
if (not pro_sub) then
log_e("setProgressPercent", "not find sub controls \"progressbar_highlight\"")
return
end
-- 圆心坐标
local x = pro_sub:getAttrNumberByIndex(0)
local y = pro_sub:getAttrNumberByIndex(1)
-- 大小圆半径
local big_r = pro_sub:getAttrNumberByIndex(2)
local small_r = pro_sub:getAttrNumberByIndex(3)
-- 起始、终止角度
local start_angle = pro_sub:getAttrNumberByIndex(4)
local end_angle = pro_sub:getAttrNumberByIndex(5)
print(x, y, small_r, big_r, start_angle, end_angle)
-- 配置圆环信息
local arc = {}
arc.x = x
arc.y = y
arc.size = big_r - small_r
arc.r = small_r + math.ceil(arc.size / 2)
arc.start = start_angle
arc.span = math.ceil((end_angle - start_angle) / 100 * percent)
arc.color = "magenta"
arc.pencap = "round"
-- for k, v in pairs(arc) do
-- print(k, v)
-- end
-- 画圆环
self.obj:clearDraw()
self.obj:drawArc(arc)
-- 获取控件的圆心、半径、圆环大小和起始、结束角度
self.percent = percent
end
--[[
@api {GET} percent=obj:getProgressPercent() 获取圆弧百分比
@apiName getProgressPercent()
@apiGroup ProGroup
@apiVersion 1.0.0
@apiDescription 获取一重圆弧进度条百分比
@apiParamExample 示例:
progress = gui:getComponentByName("TEST_PROGRESS")
percent = progress:getProgressPercent()
@apiSuccessExample {number} 成功响应:
准确获取圆弧高亮部分的百分比
@apiErrorExample {number} 失败响应:
获取圆弧高亮部分的百分比错误或失败
]]
function Progress:getProgressPercent()
return self.percent
end
return Progress
@@ -0,0 +1,278 @@
--[[
-- 进度条控件方法
@apiDefine SliderGroup slider
--]]
Slider = {}
Slider.min = 0
Slider.max = 100
Slider.step = 1
Slider.movable = false
--[[
@dd
api {SET} obj:setSliderAttribute(tab) 设置进度条属性
@apiName setSliderAttribute()
@apiGroup SliderGroup
@apiVersion 1.0.0
@apiDescription 设置进度条控件属性
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Slider:setSliderAttribute(min, max, step, redraw)
if (not log:checkArgType("setSliderAttribute", 1, min, "number")) then
return
end
if (not log:checkArgType("setSliderAttribute", 2, max, "number")) then
return
end
if (not log:checkArgType("setSliderAttribute", 3, step, "number")) then
return
end
if (redraw ~= nil) then
if (not log:checkArgType("setSliderAttribute", 4, redraw, "boolean")) then
return
end
else
redraw = true
end
self.min = min
self.max = max
self.step = step
log:d("set slider attribute: "..tostring(min)..", "..tostring(max)..", "..tostring(step)..", redraw: "..tostring(redraw))
end
--[[
@dd
api {SET} obj:getSliderAttribute(tab) 获取进度条属性
@apiName getSliderAttribute()
@apiGroup SliderGroup
@apiVersion 1.0.0
@apiDescription 获取进度条控件属性
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Slider:getSliderAttribute()
return self.min, self.max, self.step
end
--[[
@api {SET} obj:setSliderPercent(percent[,redraw]) 设置进度条百分比
@apiName setSliderPercent()
@apiGroup SliderGroup
@apiVersion 1.0.0
@apiDescription 设置进度条控件百分比
@apiParam {number} percent 进度条百分比
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
slider = gui:getComponentByName("SLIDER_TEST")
slider:setSliderPercent(65)
@apiSuccessExample {number} 成功响应:
进度条控件准确显示指定的百分比
@apiErrorExample {number} 失败响应:
进度条控件显示的百分比与指定不同
]]
function Slider:setSliderPercent(percent, redraw)
-- 参数类型检查
if (not log:checkArgType("setSliderPercent", 1, percent, "number")) then
return
end
if (redraw ~= nil) then
if (not log:checkArgType("setSliderPercent", 2, redraw, "boolean")) then
return
end
else
redraw = true
end
-- 参数范围检查
if (percent < self.min) or (percent > self.max) then
log_e("setSliderPercent", "\"percent\" must between "..tostring(self.min) .." to "..tostring(self.max))
return
end
-- 获取子控件列表
local sub_ctrl = self.obj:getSubControls()
local sub_table = {}
for k, v in ipairs(sub_ctrl) do
local ename = v:getControlEname()
local caption = v:getControlCaption()
local ctl_obj = ui:getComponentByName(ename)
sub_table[caption] = ctl_obj
end
if (self._type == "vslider") then
local slider_h = sub_table["vslider_pic"]:getHeight()
local half_pic_h = math.ceil(slider_h / 100 * percent)
local parent_h = self.obj:getHeight() - slider_h
local slider_y = math.floor(parent_h / 100 * percent)
sub_table["vslider_left_pic"]:setHeight(slider_y + half_pic_h)
sub_table["vslider_pic"]:setY(slider_y)
else
local slider_w = sub_table["slider_pic"]:getWidth()
local half_pic_w = math.ceil(slider_w / 100 * percent)
local parent_w = self.obj:getWidth() - slider_w
local slider_x = math.floor(parent_w / 100 * percent)
sub_table["left_pic"]:setWidth(slider_x + half_pic_w)
sub_table["slider_pic"]:setX(slider_x)
end
end
--[[
@api {GET} obj:getSliderPercent() 获取进度条百分比
@apiName getSliderPercent()
@apiGroup SliderGroup
@apiVersion 1.0.0
@apiDescription 获取进度条控件百分比
@apiParamExample 示例:
slider = gui:getComponentByName("SLIDER_TEST")
percent = slider"getSliderPercent()
@apiSuccessExample {number} 成功响应:
准确获取进度条控件显示的百分比
@apiErrorExample {number} 失败响应:
获取进度条控件显示的百分比失败或错误
]]
function Slider:getSliderPercent()
local sub_ctrl = self.obj:getSubControls()
local sub_table = {}
local percent = 0
-- 获取子控件列表
for k, v in ipairs(sub_ctrl) do
local ename = v:getControlEname()
local caption = v:getControlCaption()
local ctl_obj = ui:getComponentByName(ename)
sub_table[caption] = ctl_obj
end
if (self._type == "vslider") then
local slider_pic = sub_table["vslider_pic"]
local slider_h = slider_pic:getHeight()
percent = math.ceil(slider_pic:getY() / (self.obj:getHeight() - slider_h) * 100)
else
local slider_pic = sub_table["slider_pic"]
local slider_w = slider_pic:getWidth()
percent = math.ceil(slider_pic:getX() / (self.obj:getWidth() - slider_w) * 100)
end
return percent
end
--[[
@api {SET} obj:setSliderMove(move) 进度条控件移动
@apiName setSliderMove()
@apiGroup SliderGroup
@apiVersion 1.0.0
@apiDescription 使能进度条控件滑动
@apiParam {boolean{true, false}} move 可滑动标志
@apiParamExample 示例:
slider = gui:getComponentByName("SLIDER_TEST")
slider:setSliderMove(true) -- 进度条滑块可以滑动
@apiSuccessExample {number} 成功响应:
进度条控件滑块可以滑动
@apiErrorExample {number} 失败响应:
进度条控件滑块不能滑动
]]
function Slider:setSliderMove(move)
if move == nil then
local move = true
end
if (not log:checkArgType("setSliderMove", 1, move, "boolean")) then
return
end
local sub_ctrl = self.obj:getSubControls()
local sub_table = {}
-- 获取子控件列表
for k, v in ipairs(sub_ctrl) do
local ename = v:getControlEname()
local caption = v:getControlCaption()
local ctl_obj = ui:getComponentByName(ename)
sub_table[caption] = ctl_obj
-- print(ename, caption)
end
-- 设置可移动
if (self._type == "vslider") then
sub_table["vslider_pic"]:setMovableRange(move)
sub_table["vslider_pic"]:bindMovable(function(x, y)
sub_table["vslider_left_pic"]:setHeight(y)
end)
else
sub_table["slider_pic"]:setMovableRange(move)
sub_table["slider_pic"]:bindMovable(function(x, y)
sub_table["left_pic"]:setWidth(x)
end)
end
self.movable = move
log:d("set slider control movable: "..tostring(move))
end
--[[
@api {GET} obj:getSliderMove() 获取进度条移动属性
@apiName getSliderMove()
@apiGroup SliderGroup
@apiVersion 1.0.0
@apiDescription 获取进度条控件可移动状态
@apiParamExample 示例:
slider = gui:getComponentByName("SLIDER_TEST")
if not slider:getSliderMove() then
slider:setSliderMove(true)
end
@apiSuccessExample {number} 成功响应:
准确获取进度条滑块滑动状态
@apiErrorExample {number} 失败响应:
获取进度条滑块滑动状态错误
]]
function Slider:getSliderMove()
return self.movable
end
return Slider
@@ -0,0 +1,386 @@
--[[
-- 文本控件方法
@apiDefine TextGroup 文本控件
--]]
Text = {}
Text.index = 0
--[[
@api {SET} obj:setText(str,redraw,encode,scroll,endian,strlen) 设置文本
@apiName setText()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiPermission 文本控件
@apiDescription 设置文本控件显示指定文字
@apiParam (设置内码) {string} str 待显示字符串
@apiParam (设置内码) {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParam (内码和长度) {string} str 待显示字符串
@apiParam (内码和长度) {number} strlen 待显示字符串的长度
@apiParam (内码和长度) {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParam (指定编码) {string} str 待显示的字符串
@apiParam (指定编码) {boolean{true,false}} [redraw] 是否立即刷新
@apiParam (指定编码) {number{DB.FONT_ENCODE_ANSI, DB.FONT_ENCODE_UNICODE, DB.FONT_ENCODE_UTF8}} [encode] 字符串编码格式
@apiParam (指定编码) {number} [scroll] 显示模式
@apiParam (指定编码) {number{DB.FONT_ENDIAN_BIG, DB.FONT_ENDIAN_SMALL}} [endian] 编码大/小端控制
@apiParam (指定编码) {number} [strlen] 字符串长度
@apiParamExample 示例:
-- 设置文本控件显示内码
text = gui:getComponentByName("TEXT_TEST") -- 获取文本控件实例,参数为文本控件名称
text:setText("hello") -- 设置文本控件显示字符串“hello”,会立即刷新并显示
-- 设置文本控件显示内码,并控制不立即刷新
text = gui:getComponentByName("TEXT_TEST") -- 获取文本控件实例,参数为文本控件名称
text:setText("hello", false) -- 设置文本控件显示字符串“hello”,不立即刷新并显示
@apiSuccessExample {number} 成功响应:
文本控件成功显示指定字符串
@apiErrorExample {number} 失败响应:
文本控件显示指定字符串乱码或无显示
]]
function Text:setText(...)
-- 参数
local arg = {...}
local arg_num = #arg
-- 字符串
local text = ""
-- redraw 标志
local redraw = true
-- 编码
local encode = 0
-- 滚动
local scroll = 0
-- 大小端
local endian = 0
-- 字符串长度
local strlen = -1
-- 参数数量检查
if (arg_num < 1) or (arg_num > 6) then
log_e("setText", "arg number err!")
return
end
-- 第一个参数类型检查,必须是字符串
if (not log:checkArgType("setText", 1, arg[1], "string")) then
return
end
text = arg[1]
-- 有两个参数,可能第二个参数是redraw或strlen
if (arg_num == 2) then
if (not log:checkArgType("setText", 2, arg[2], "boolean", "number")) then
return
end
if (type(arg[2]) == "boolean") then
redraw = arg[2]
elseif (type(arg[2]) == "number") then
strlen = arg[2]
end
end
-- 三个参数,可能(string, strlen, redraw)或(string, redraw, encode)
if (arg_num == 3) then
if (type(arg[3]) == "boolean") then
redraw = arg[3]
strlen = arg[2]
elseif (type(arg[3]) == "number") then
encode = arg[3]
redraw = arg[2]
end
end
-- 四个参数,可能(string, redraw, encode, scroll)
if (arg_num >= 4) then
text = arg[1]
redraw = arg[2]
encode = arg[3]
scroll = arg[4]
endian = arg[5]
strlen = arg[6]
end
-- 如果有指定字符串长度,那么对字符串进行剪切
if (strlen ~= -1) and (strlen ~= nil) then
if (strlen > #text) then
-- 指定的字符串长度大于字符串本身长度
log_e("setText", "\""..text.."\" length is: "..tostring(#text)..", less then set text length: "..tostring(strlen))
return
end
-- 剪切字符串
text = string.sub(text, 1, strlen)
end
local msg = tostring(text)..", redraw: "..tostring(redraw)..", encode: "..tostring(encode)..", scroll: "..tostring(scroll)..", endian: "..tostring(endian)..", strlen: "..tostring(strlen)
log:d('ename: [ '..self._ename..' ] setText: ' .. msg)
self.obj:setText(text)
-- 滚动效果
if (scroll == 0x08) then
log:d("create scroll timer...")
local offset = 0
utils:createTimer(100, function()
offset = offset - 10;
self.obj:setTextOffset(offset)
end);
end
end
--[[
@api {GET} string=obj:getText() 获取文本
@apiName getText()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 获取文本控件显示的文本内容
@apiParamExample 示例:
text = gui:getComponentByName("TEXT_TEST") -- 获取文本控件实例,参数为文本控件名称
str = text:getText()
@apiSuccessExample {number} 成功响应:
准确获取文本控件显示的内容
@apiErrorExample {number} 失败响应:
获取文本控件显示的内容错误
]]
function Text:getText()
local text = self.obj:getText()
log:d('ename: [ '..self._ename..' ] getText: ' .. text)
return text
end
--[[
@ddapi
{SET} obj:setUtf8Text(string,strlen,scroll,redraw) UTF-8显示
@apiName setUtf8Text()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 设置文本控件显示UTF-8编码的字符串
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Text:setUtf8Text(...)
self:setText(...)
end
--[[
@ddapi
{SET} obj:setUnicodeText(string) unicode显示
@apiName setUnicodeText()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 设置控件显示unicode编码的文本
@apiParamExample 示例:
暂空
@apiSuccessExample {number} 成功响应:
暂空
@apiErrorExample {number} 失败响应:
暂空
]]
function Text:setUnicodeText(...)
self:setText(...)
end
--[[
@api {SET} obj:showTextByIndex(index,redraw) 显示文本
@apiName showTextByIndex()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 设置文本控件显示文本列表指定索引的文本
@apiParam {number} index 待显示文本在文字列表中的索引
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
text = gui:getComponentByName("TEXT_TEST")
text:showTextByIndex(3)
@apiSuccessExample {number} 成功响应:
文本控件显示指定文本
@apiErrorExample {number} 失败响应:
文本控件未显示指定文本
]]
function Text:showTextByIndex(index, redraw)
if (not log:checkArgType("showTextByIndex", 1, index, "number")) then
return
end
log:d('ename: [ '..self._ename..' ] showTextByIndex: ' .. tostring(index)..", redraw: "..tostring(redraw))
if (redraw == false) then
return
end
self.obj:showTextFontByIndex(index)
self.index = index
end
--[[
@api {SET} obj:showMultitextByIndex(tab,num[,redraw]) 多行文本
@apiName showMultiTextByIndex()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 设置文本控件显示多行文本
@apiParam {table} tab 多个文本的索引列表
@apiParam {number} num 需显示的所有文本数量
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
text = gui:getComponentByName("TEXT_TEST")
local text_list = {1, 2, 3}
text:showMultiTextByIndex(text_list, 3) -- 显示文本列表第1、2、3共3个文本拼接
@apiSuccessExample {number} 成功响应:
文本控件显示指定文本拼接内容
@apiErrorExample {number} 失败响应:
文本控件未显示指定文本拼接内容
]]
function Text:showMultiTextByIndex(text_list, number, redraw)
if (not log:checkArgType("showMultiTextByIndex", 1, text_list, "table")) then
return
end
if (not log:checkArgType("showMultiTextByIndex", 2, number, "number")) then
return
end
if (not log:checkArgType("showMultiTextByIndex", 3, redraw, "nil", "boolean")) then
return
end
-- if (redraw == false) then
-- return
-- end
log:d("showMultiTextByIndex, number:"..tostring(number)..", list:")
for k, v in ipairs(text_list) do
print(k, v)
end
local week = {}
for k, v in ipairs(text_list) do
week[k] = {}
week[k].font = 0
week[k].idx = v
end
--[[
for k, v in ipairs(week) do
print(k, v)
for i, j in pairs(v) do
print(i, j)
end
end
]]
self.obj:setTextByTextFontList(week)
end
--[[
@api {GET} index=obj:getTextIndex() 获取文本索引
@apiName getTextIndex()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 获取文本控件当前显示的文本索引
@apiParamExample 示例:
text = gui:getComponentByName("TEXT_TEST")
ind = text:getTextIndex()
@apiSuccessExample {number} 成功响应:
获取到正确的文本索引
@apiErrorExample {number} 失败响应:
获取到文本索引错误或失败
]]
function Text:getTextIndex()
-- local index = self.index
local index = self.obj:getTextFontIndex()
log:d('ename: [ '..self._ename..' ] getTextIndex: ' .. index)
return index
end
--[[
@dd
api {GET} format=obj:getTextFormat() 文本格式
@apiName getTextFormat()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 获取文本控件的文本格式
@apiParamExample 示例:
text = gui:getComponentByName("TEXT_TEST")
format = text:getTextFormat()
@apiSuccessExample {number} 成功响应:
获取到正确的文本控件编码格式
@apiErrorExample {number} 失败响应:
获取到文本控件编码格式错误
]]
function Text:getTextFormat()
local forma = self.obj:getTextType()
log:d('ename: [ '..self._ename..' ] getTextFormat: ' .. forma)
return forma
end
--[[
@api {GET} number=obj:getTextNumber() 文本数量
@apiName getTextNumber()
@apiGroup TextGroup
@apiVersion 1.0.0
@apiDescription 获取文本控件的文本数量
@apiParamExample 示例:
text = gui:getComponentByName("TEXT_TEST")
text_num = text:getTextNumber()
@apiSuccessExample {number} 成功响应:
获取到正确的文本列表中文本数量
@apiErrorExample {number} 失败响应:
获取到文本列表中文本数量错误
]]
function Text:getTextNumber()
local number = self.obj:getTextFontNumber()
log:d('ename: [ '..self._ename..' ] getTextNumber: ' .. number)
return number
end
return Text
@@ -0,0 +1,405 @@
--[[
-- 时间控件方法
@apiDefine TimeGroup 时间控件
--]]
Time = {}
Time.year = 0
Time.month = 0
Time.day = 0
Time.hour = 0
Time.minute = 0
Time.second = 0
Time.timer_run = false
-- 拆分整数的每一位
local function get_split_inter(num)
if not num then
return nil
end
local tb = {} -- 存放拆分的数字
repeat
table.insert(tb, num % 10)
num = math.floor(num / 10)
until(num == 0)
-- 把table倒序
local tmp = {}
for i = 1, #tb do
local key = #tb
tmp[i] = table.remove(tb)
end
return tmp
end
--[[
-- 时间控件回调
-- 用于创建定时器,当时间控件选择自动计时时会用于自动走时
--]]
local function timeCountUpCallback(self_tab)
log:updateTime(self_tab, false)
-- 秒计数
--[[
-- self_tab.second = self_tab.second + 1
if (self_tab.second >= 60) then
self_tab.second = 0
self_tab.minute = self_tab.minute + 1
end
-- 分钟
if (self_tab.minute >= 60) then
self_tab.minute = 0
self_tab.hour = self_tab.hour + 1
end
-- 小时
if (self_tab.hour >= 24) then
self_tab.hour = 0
self_tab.day = self_tab.day + 1
end
-- 日期
if ((self_tab.month == 1) or
(self_tab.month == 3) or
(self_tab.month == 5) or
(self_tab.month == 7) or
(self_tab.month == 8) or
(self_tab.month == 10) or
(self_tab.month == 12)) then
-- 大月31天
if (self_tab.day >= 31) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
elseif ((self_tab.month == 4) or
(self_tab.month == 6) or
(self_tab.month == 9) or
(self_tab.month == 11)) then
-- 小月30天
if (self_tab.day >= 30) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
else
-- 二月
if (((not (self_tab.year % 4)) and (self_tab.year % 100)) or
(not (self_tab.year % 400))) then
-- 闰年29天
if (self_tab.day >= 29) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
else
-- 平年28天
if (self_tab.day >= 28) then
self_tab.day =0
self_tab.month = self_tab.month + 1
end
end
end
if (self_tab.month >= 12) then
self_tab.year = self_tab.year + 1
end
]]
local time_form = self_tab.obj:getAttrTextByIndex(1)
if (self_tab.show_image) then
local image_list = {}
for i=1, string.len(time_form) do
local c = string.sub(time_form, i, i)
if (c == "Y") then
local tab = get_split_inter(self_tab.year)
for k, v in ipairs(tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(image_list, tb)
end
elseif (c == "M") then
local tab = get_split_inter(self_tab.month)
for k, v in ipairs(tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(image_list, tb)
end
elseif (c == "D") then
local tab = get_split_inter(self_tab.day)
for k, v in ipairs(tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(image_list, tb)
end
elseif (c == "h") then
local tab = get_split_inter(self_tab.hour)
for k, v in ipairs(tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(image_list, tb)
end
elseif (c == "m") then
local tab = get_split_inter(self_tab.minute)
for k, v in ipairs(tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(image_list, tb)
end
elseif (c == "s") then
local tab = get_split_inter(self_tab.second)
for k, v in ipairs(tab) do
local tb = {}
tb.pic = 0
tb.idx = v
table.insert(image_list, tb)
end
elseif (c == "/") then
local tb = {}
tb.pic = 1
tb.idx = 0
table.insert(image_list, tb)
elseif (c == ":") then
local tb = {}
tb.pic = 1
tb.idx = 1
table.insert(image_list, tb)
end
end
self_tab.obj:setTextByImageList(image_list)
else
-- 格式
local form = self_tab.obj:getAttrTextByIndex(1)
local dat_time = ""
for i=1, string.len(form) do
local c = string.sub(form, i, i)
if (c == "Y") then
dat_time = dat_time .. string.format('%04d', self_tab.year)
elseif (c == "M") then
dat_time = dat_time .. string.format('%02d', self_tab.month)
elseif (c == "D") then
dat_time = dat_time .. string.format('%02d', self_tab.day)
elseif (c == "h") then
dat_time = dat_time .. string.format('%02d', self_tab.hour)
elseif (c == "m") then
dat_time = dat_time .. string.format('%02d', self_tab.minute)
elseif (c == "s") then
dat_time = dat_time .. string.format('%02d', self_tab.second)
else
dat_time = dat_time .. tostring(c)
end
end
-- 显示ascii字符串
self_tab.obj:showCaption(dat_time)
end
end
--[[
@api {SET} obj:setUIData(year,month,day,redraw) 设置UI日期
@apiName setUIdata()
@apiGroup TimeGroup
@apiVersion 1.0.0
@apiDescription 设置时间控件显示日期
@apiParam {number} year 设置的年份
@apiParam {number} month 设置的月份
@apiParam {number} day 设置的日份
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
tim = gui:getComponentByName("TIME_TEST")
tim:setUIData(2021, 12, 31, true) -- 设置显示日期为 2021-12-31
@apiSuccessExample {number} 成功响应:
时间控件显示设置的时间
@apiErrorExample {number} 失败响应:
时间控件未显示设置的时间
]]
function Time:setUIData(year, month, day, redraw)
-- 参数类型检查
if (not log:checkArgType("setUIData", 1, year, "number")) then
return
end
if (not log:checkArgType("setUIData", 2, month, "number")) then
return
end
if (not log:checkArgType("setUIData", 3, day, "number")) then
return
end
if (not log:checkArgType("setUIData", 4, redraw, "nil", "boolean")) then
return
end
-- 月份限制,最小1月,最大12月
local month_range = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
if (not log:checkValue(month, month_range)) then
return
end
-- 天数限制,最小1日,最大31日
local day_range = {}
for i = 1, 31 do
day_range[i] = i
end
if (not log:checkValue(day, day_range)) then
return
end
-- 记录设置日期
self.year = year
self.month = month
self.day = day
self.show_image = false
-- 如果redraw的话就刷新控件日期
if redraw then
-- 计算图片列表有多少图片
local img1_list_num = self.obj:getImageNumber(0)
local img2_list_num = self.obj:getImageNumber(1)
if (img1_list_num > 0) then
self.show_image = true
end
timeCountUpCallback(self)
end
end
--[[
@api {SET} obj:setUITime(hour,minute,second,redraw) 设置UI时间
@apiName setUITime()
@apiGroup TimeGroup
@apiVersion 1.0.0
@apiDescription 设置时间控件显示时间
@apiParam {number} hour 设置的小时
@apiParam {number} minute 设置的分钟
@apiParam {number} second 设置的秒钟
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
tim = gui:getComponentByName("TIME_TEST")
tim:setUITime(19, 23, 12) -- 设置显示时间为 19:23:12
@apiSuccessExample {number} 成功响应:
时间控件成功显示设置时间
@apiErrorExample {number} 失败响应:
时间控件未显示设置的时间
]]
function Time:setUITime(hour, minute, second, redraw)
-- 参数类型检查
if (not log:checkArgType("setUITime", 1, hour, "number")) then
return
end
if (not log:checkArgType("setUITime", 2, minute, "number")) then
return
end
if (not log:checkArgType("setUITime", 3, second, "number")) then
return
end
if (not log:checkArgType("setUITime", 4, redraw, "nil", "boolean")) then
return
end
-- 小时限制,0-23
local hour_range = {}
for i = 1, 24 do
hour_range[i] = i - 1
end
if (not log:checkValue(hour, hour_range)) then
return
end
local minute_range = {}
local second_range = {}
for i = 1, 60 do
minute_range[i] = i - 1
second_range[i] = i - 1
end
-- 分钟限制,0-59
if (not log:checkValue(minute, minute_range)) then
return
end
-- 秒钟限制,0-59
if (not log:checkValue(second, second_range)) then
return
end
-- 记录设置的时间
self.hour = hour
self.minute = minute
self.second = second
print(hour, minute, second, redraw)
-- 如果redraw的话就刷新控件时间
if (redraw or redraw == nil) then
-- 计算图片列表有多少图片
local img1_list_num = self.obj:getImageNumber(0)
local img2_list_num = self.obj:getImageNumber(1)
if (img1_list_num > 0) then
self.show_image = true
end
timeCountUpCallback(self)
end
end
--[[
@api {GET} year,month,day=obj:getUIData() 获取UI日期
@apiName getUIData()
@apiGroup TimeGroup
@apiVersion 1.0.0
@apiDescription 获取时间控件显示的日期
@apiParamExample 示例:
tim = gui:getComponentByName("TIME_TEST")
Y, M, D = tim:getUIData()
@apiSuccessExample {number} 成功响应:
获取到正确的时间控件日期
@apiErrorExample {number} 失败响应:
获取到时间控件显示的日期错误
]]
function Time:getUIData()
return self.year, self.month, self.day
end
--[[
@api {GET} hour,minute,second=obj:getUITime() 获取UI时间
@apiName getUITime()
@apiGroup TimeGroup
@apiVersion 1.0.0
@apiDescription 获取时间控件显示的时间
@apiParamExample 示例:
tim = gui:getComponentByName("TIME_TEST")
h, m, s = tim:getUITime()
@apiSuccessExample {number} 成功响应:
获取到正确的时间控件时间
@apiErrorExample {number} 失败响应:
获取到时间控件显示的时间错误
]]
function Time:getUITime()
return self.hour, self.minute, self.second
end
return Time
@@ -0,0 +1,152 @@
--[[
-- 表盘控件方法
@apiDefine WatchGroup watch
--]]
Watch = {}
Watch.hour = 0
Watch.minute = 0
Watch.second = 0
--[[
@api {SET} obj:setWatchTime(hour,minute,second[,redraw]) 设置表盘时间
@apiName setWatchTime()
@apiGroup WatchGroup
@apiVersion 1.0.0
@apiDescription 设置表盘控件时间
@apiParam {number} hour 时
@apiParam {number} minute 分
@apiParam {number} second 秒
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
watch = gui:getComponentByName("WATCH_TEST")
watch:setWatchTime(13, 23, 25) -- 设置表盘显示时间 13:23:25
@apiSuccessExample {number} 成功响应:
表盘正确显示指定时间
@apiErrorExample {number} 失败响应:
表盘显示时间错误
]]
function Watch:setWatchTime(hour, min, sec, redraw)
-- 参数类型检查
if (not log:checkArgType("setWatchTime", 1, hour, "number")) then
return
end
if (not log:checkArgType("setWatchTime", 2, min, "number")) then
return
end
if (not log:checkArgType("setWatchTime", 3, sec, "number")) then
return
end
if (not log:checkArgType("setWatchTime", 4, redraw, "nil", "boolean")) then
return
end
-- 小时限制,0-23
local hour_range = {}
for i = 1, 24 do
hour_range[i] = i - 1
end
if (not log:checkValue(hour, hour_range)) then
return
end
local minute_range = {}
local second_range = {}
for i = 1, 60 do
minute_range[i] = i - 1
second_range[i] = i - 1
end
-- 分钟限制,0-59
if (not log:checkValue(min, minute_range)) then
return
end
-- 秒钟限制,0-59
if (not log:checkValue(sec, second_range)) then
return
end
-- 记录设置的时间
self.hour = hour
self.minute = min
self.second = sec
-- 计算每个指针对应的角度
local angle_step = 6 -- 每小格6度
local angle_hour = 30 -- 每大格30度
local sec_angle = sec * angle_step
local min_angle = min * angle_step
local hour_angle = hour * angle_hour
-- 时针除了自身小时对应度数,分钟每走一分钟,时针应该增加2度
hour_angle = hour_angle + (min / 2)
-- 刷新指针
local sub_ctrl = self.obj:getSubControls()
for k, v in ipairs(sub_ctrl) do
local ename = v:getControlEname()
local caption = v:getControlCaption()
local ctl_obj = ui:getComponentByName(ename)
-- print(v:getControlEname())
-- print(v:getControlCaption())
if (caption == "watch_sec") then
local rx = ctl_obj:getAttrNumberByIndex(0)
local ry = ctl_obj:getAttrNumberByIndex(1)
local w = ctl_obj:getComponentParent():getWidth()
local h = ctl_obj:getComponentParent():getHeight()
-- print(rx, ry)
ctl_obj:setRotateByPos(sec_angle, rx, ry, w/2, h/2)
end
if (caption == "watch_min") then
local rx = ctl_obj:getAttrNumberByIndex(0)
local ry = ctl_obj:getAttrNumberByIndex(1)
local w = ctl_obj:getComponentParent():getWidth()
local h = ctl_obj:getComponentParent():getHeight()
-- print(rx, ry)
ctl_obj:setRotateByPos(min_angle, rx, ry, w/2, h/2)
end
if (caption == "watch_hour") then
local rx = ctl_obj:getAttrNumberByIndex(0)
local ry = ctl_obj:getAttrNumberByIndex(1)
local w = ctl_obj:getComponentParent():getWidth()
local h = ctl_obj:getComponentParent():getHeight()
-- print(rx, ry)
ctl_obj:setRotateByPos(hour_angle, rx, ry, w/2, h/2)
end
end
end
--[[
@api {GET} hour,minute,second=obj:getWatchTime() 获取表盘时间
@apiName getWatchTime()
@apiGroup WatchGroup
@apiVersion 1.0.0
@apiDescription 获取表盘控件的时间
@apiParamExample 示例:
watch = gui:getComponentByName("WATCH_TEST")
hour, minute, second = watch:getWatchTime()
@apiSuccessExample {number} 成功响应:
获取到正确的表盘时间
@apiErrorExample {number} 失败响应:
获取到错误的表盘显示时间
]]
function Watch:getWatchTime(...)
return self.hour, self.minute, self.second
end
return Watch
@@ -0,0 +1,691 @@
--[[
-- 所有控件公共方法
@apiDefine ObjGroup 公共方法
--]]
obj = {}
-- 检查参数类型
local function check_type(func, arg, num, typ)
return log:checkArgType(func, num, arg, typ)
end
--[[
@api {SET} obj:show(redraw) 显示控件
@apiName show()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 显示控件
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:show()
@apiSuccessExample {number} 成功响应:
控件由隐藏状态转为显示状态
@apiErrorExample {number} 失败响应:
控件未由隐藏状态转为显示状态
]]
function obj:show(redraw)
log:d('show control: [ '..self._ename..' ], type: '..self._type..", redraw: "..tostring(redraw))
if (not redraw) and (redraw ~= nil) then
-- 如果传入false,说明不刷新
return
end
self.obj:show()
end
--[[
@api {SET} obj:hide(redraw) 隐藏控件
@apiName hide()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 隐藏控件
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:hide()
@apiSuccessExample {number} 成功响应:
控件由显示状态转为隐藏状态
@apiErrorExample {number} 失败响应:
控件未由显示状态转为隐藏状态
]]
function obj:hide(redraw)
log:d('hide control: [ '..self._ename..' ], type: '..self._type..", redraw: "..tostring(redraw))
if (not redraw) and (redraw ~= nil) then
-- 如果传入false,说明不刷新
return
end
self.obj:hide()
end
--[[
@api {GET} obj:isHide() 是否隐藏
@apiName isHide()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件隐藏状态
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
if (obj:isHide()) then
obj:show()
else
obj:hide()
@apiSuccessExample {number} 成功响应:
控件在隐藏状态返回true,控件在显示状态返回false
@apiErrorExample {number} 失败响应:
返回值与控件状态不一致
]]
function obj:isHide()
return self.obj:isHide()
end
--[[
@api {SET} obj:highLight(redraw) 高亮控件
@apiName highLight()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 设置控件显示高亮属性
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:highLight()
@apiSuccessExample {number} 成功响应:
控件由普通状态转为高亮状态
@apiErrorExample {number} 失败响应:
控件未由普通状态转为高亮状态
]]
function obj:highLight(redraw)
print('highLight control: [ '..self._ename..' ], type: '..self._type)
if not redraw then
return
end
if (self._type == 'ImageList') then
print('ename: [ '..self._ename..' ] highLight: '..self._item)
self.obj:showImageByIndex(1, self._item)
else
self.obj:setCss(1)
end
self._highlight = true
end
--[[
@api {SET} obj:noHighLight(redraw) 取消高亮
@apiName noHighLight()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 取消控件高亮
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:noHighLight()
@apiSuccessExample {number} 成功响应:
控件由高亮状态转为普通状态
@apiErrorExample {number} 失败响应:
控件未由高亮状态转为普通状态
]]
function obj:noHighLight(redraw)
print('noHighLight control: [ '..self._ename..' ], type: '..self._type)
if not redraw then
return
end
if (self._type == 'ImageList') then
print('ename: [ '..self._ename..' ] noHighLight: '..self._item)
self.obj:showImageByIndex(0, self._item)
else
self.obj:setCss(0)
end
self._highlight = false
end
--[[
@api {GET} obj:isHighLight() 高亮状态
@apiName isHighLight()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件高亮状态
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
if (obj:isHighLight()) then
obj:noHighLight()
else
obj:highLight()
@apiSuccessExample {number} 成功响应:
控件高亮状态返回true,控件非高亮状态返回false
@apiErrorExample {number} 失败响应:
返回值与控件是否高亮状态不一致
]]
function obj:isHighLight()
return self._highlight
end
--[[
@api {SET} obj:redrawSelf() 刷新控件
@apiName redrawSelf()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 刷新控件自身
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:redrawSelf()
@apiSuccessExample {number} 成功响应:
控件刷新自身
@apiErrorExample {number} 失败响应:
控件未刷新自身
]]
function obj:redrawSelf()
local parent = self.obj:getComponentParent()
parent:hide()
parent:show()
end
--[[
@notes
@tip:绑定 touch down 事件回调
@demo:obj:bindTouchDown(function () print("touch down event") end)
]]
function obj:bindTouchDown(func)
if (not check_type('bindTouchDown', func, 1, 'function')) then
return
end
print('bindTouchDown control: [ '..self._ename..' ], type: '..self._type)
self.obj:bindTouchDown(func)
end
--[[
@notes
@tip:主动触发 touch down 回调
@demo:obj:touchDown()
]]
function obj:touchDown()
print('ename: [ '..self._ename..' ], touchDown')
self.obj:touchDown()
end
--[[
@notes
@tip:绑定 touch up 事件回调
@demo:obj:bindTouchUp(function () print("touch up event") end)
]]
function obj:bindTouchUp(func)
if (not check_type('bindTouchUp', func, 1, 'function')) then
return
end
print('bindTouchUp control: [ '..self._ename..' ], type: '..self._type)
self.obj:bindTouchUp(func)
end
--[[
@notes
@tip:主动触发 touch up 回调
@demo:obj:touchUp()
]]
function obj:touchUp()
print('ename: [ '..self._ename..' ], touchUp')
self.obj:touchUp()
end
--[[
@notes
@tip:绑定 touch up move 事件回调
@demo:obj:bindTouchUMove(function () print("touch up move event") end)
]]
function obj:bindTouchUMove(func)
if (not check_type('bindTouchUMove', func, 1, 'function')) then
return
end
print('bindTouchUMove control: [ '..self._ename..' ], type: '..self._type)
self.obj:bindTouchUMove(func)
end
--[[
@notes
@tip:主动触发 touch up move 回调
@demo:obj:touchUMove()
]]
function obj:touchUMove()
print('ename: [ '..self._ename..' ], touchUMove')
self.obj:touchUMove()
end
--[[
@notes
@tip:绑定 touch down move 事件回调
@demo:obj:bindTouchDMove(function () print("touch down move event") end)
]]
function obj:bindTouchDMove(func)
if (not check_type('bindTouchDMove', func, 1, 'function')) then
return
end
print('bindTouchDMove control: [ '..self._ename..' ], type: '..self._type)
self.obj:bindTouchDMove(func)
end
--[[
@notes
@tip:主动触发 touch down move 回调
@demo:obj:touchDMove()
]]
function obj:touchDMove()
print('ename: [ '..self._ename..' ], touchDMove')
self.obj:touchDMove()
end
--[[
@notes
@tip:绑定 touch left move 事件回调
@demo:obj:bindTouchLMove(function () print("touch left move event") end)
]]
function obj:bindTouchLMove(func)
if (not check_type('bindTouchLMove', func, 1, 'function')) then
return
end
print('bindTouchLMove control: [ '..self._ename..' ], type: '..self._type)
self.obj:bindTouchLMove(func)
end
--[[
@notes
@tip:主动触发 touch left move 回调
@demo:obj:touchLMove()
]]
function obj:touchLMove()
print('ename: [ '..self._ename..' ], touchLMove')
self.obj:touchLMove()
end
--[[
@notes
@tip:绑定 touch right move 事件回调
@demo:obj:bindTouchRMove(function () print("touch right move event") end)
]]
function obj:bindTouchRMove(func)
if (not check_type('bindTouchRMove', func, 1, 'function')) then
return
end
print('bindTouchRMove control: [ '..self._ename..' ], type: '..self._type)
self.obj:bindTouchRMove(func)
end
--[[
@notes
@tip:主动触发 touch right move 回调
@demo:obj:touchRMove()
]]
function obj:touchRMove()
print('ename: [ '..self._ename..' ], touchRMove')
self.obj:touchRMove()
end
--[[
@api {SET} obj:setRect(x,y,w,h) 设置控件属性
@apiName setRect()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 设置控件显示的矩形区域
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:setRect(0, 0, 30, 30)
@apiSuccessExample {number} 成功响应:
控件被移动到指定区域显示
@apiErrorExample {number} 失败响应:
控件未显示在指定区域
]]
function obj:setRect(x, y, w, h)
-- 数据类型判断,x, y, w, h 都应该为number
if (not check_type('setRect', x, 1, 'number')) then
return
end
if (not check_type('setRect', y, 2, 'number')) then
return
end
if (not check_type('setRect', w, 3, 'number')) then
return
end
if (not check_type('setRect', h, 4, 'number')) then
return
end
print('ename: [ '..self._ename..' ], setRect('..x..', '..y..', '..w..', '..h..')')
self.obj:setRect(x, y, w, h)
end
--[[
@api {SET} obj:setX(x) 设置X坐标
@apiName setX()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 设置控件的X坐标
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:setX(20)
@apiSuccessExample {number} 成功响应:
控件X坐标移动到指定位置
@apiErrorExample {number} 失败响应:
控件X坐标位置未改变
]]
function obj:setX(x)
if (not check_type('setX', x, 1, 'number')) then
return
end
print('ename: [ '..self._ename..' ], setX: '..x)
self.obj:setX(x)
end
--[[
@api {SET} obj:setY(y) 设置Y坐标
@apiName setY()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 设置控件的Y坐标
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:setY(10)
@apiSuccessExample {number} 成功响应:
控件Y左边移动到指定位置
@apiErrorExample {number} 失败响应:
控件Y坐标位置未改变
]]
function obj:setY(y)
if (not check_type('setY', y, 1, 'number')) then
return
end
print('ename: [ '..self._ename..' ], setY: '..y)
self.obj:setY(y)
end
--[[
@api {SET} obj:setWidth(w) 设置宽度
@apiName setWidth()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 设置控件的宽度
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:setWidth(25)
@apiSuccessExample {number} 成功响应:
控件宽度显示为设置宽度
@apiErrorExample {number} 失败响应:
控件宽度没有显示设置宽度
]]
function obj:setWidth(w)
if (not check_type('setWidth', w, 1, 'number')) then
return
end
print('ename: [ '..self._ename..' ], setWidth: '..w)
self.obj:setWidth(w)
end
--[[
@api {SET} obj:setHeight(h) 设置高度
@apiName setHeight()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 设置控件的高度
@apiParam {boolean{true, false}} [redraw] 是否立即刷新,缺省时立即刷新
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj:setHeight(30)
@apiSuccessExample {number} 成功响应:
控件高度显示为设置高度
@apiErrorExample {number} 失败响应:
控件高度没有显示设置高度
]]
function obj:setHeight(h)
if (not check_type('setHeight', h, 1, 'number')) then
return
end
print('ename: [ '..self._ename..' ], setHeight: '..h)
self.obj:setHeight(h)
end
--[[
@api {GET} rect=obj:getRect() 获取矩形
@apiName getRect()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件矩形区域,包含起始X,Y坐标,宽度和高度
@apiParam (返回值) {table} rect 控件的矩形属性
@apiParam (rect) {number} x 控件的X坐标
@apiParam (rect) {number} y 控件的y坐标
@apiParam (rect) {number} width 控件的宽度
@apiParam (rect) {number} height 控件的高度
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
obj_rect = obj:getRect()
@apiSuccessExample {number} 成功响应:
成功获取控件的矩形区域属性
@apiErrorExample {number} 失败响应:
获取到控件的矩形区域错误或失败
]]
function obj:getRect()
local tab = self.obj:getRect()
print('ename: [ '..self._ename..' ], getRect: x'.. tab.x ..', '.. tab.y ..', '.. tab.width ..', '.. tab.height)
return tab
end
--[[
@api {GET} x=obj:getX() 获取X坐标
@apiName getX()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件的X坐标值
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
x = obj:getX()
@apiSuccessExample {number} 成功响应:
成功获取控件的X坐标
@apiErrorExample {number} 失败响应:
获取控件的X坐标错误或失败
]]
function obj:getX()
local n = self.obj:getX()
print('ename: [ '..self._ename..' ], getX: '..n)
return n
end
--[[
@api {GET} y=obj:getY() 获取Y坐标
@apiName getY()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件的Y坐标值
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
y = obj:getY()
@apiSuccessExample {number} 成功响应:
成功获取控件的Y坐标
@apiErrorExample {number} 失败响应:
获取控件的Y坐标错误或失败
]]
function obj:getY()
local n = self.obj:getY()
print('ename: [ '..self._ename..' ], getY: '..n)
return n
end
--[[
@api {GET} w=obj:getWidth() 获取宽度
@apiName getWidth()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件的宽度
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
w = obj:getWidth()
@apiSuccessExample {number} 成功响应:
成功获取控件的宽度
@apiErrorExample {number} 失败响应:
获取控件的宽度错误或失败
]]
function obj:getWidth()
local n = self.obj:getWidth()
print('ename: [ '..self._ename..' ], getWidth: '..n)
return n
end
--[[
@api {GET} h=obj:getHeight() 获取高度
@apiName getHeight()
@apiGroup ObjGroup
@apiVersion 1.0.0
@apiDescription 获取控件的高度
@apiParamExample 示例:
obj = gui:getComponentByName("TEST_CONTROL")
h = obj:getHeight()
@apiSuccessExample {number} 成功响应:
成功获取控件的高度
@apiErrorExample {number} 失败响应:
获取控件的高度错误或失败
]]
function obj:getHeight()
local n = self.obj:getHeight()
print('ename: [ '..self._ename..' ], getHeight: '..n)
return n
end
--[[
function obj:setBackgroundColor(color)
if (not check_type('setBackgroundColor', color, 1, 'string')) then
return
end
print('ename: [ '..self._ename..' ], setBackgroundColor: '..color)
self.obj:setBackgroundColor(color)
end
]]
return obj
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,45 @@
--[[
lua导入
]]
--[[
@notes
@tip:utils库 help
@demo:utils:help()\n utils:version()\n utils:print(table)
]]
utils = {}
--[[
@notes
@tip:
@demo:utils:help()
]]
function utils:help()
print("print help func")
end
--[[
@notes
@tip:lua解释器版本
@demo:utils:version()
]]
function utils:version()
print("lua version 5.3.6")
end
--[[
@notes
@tip:table等
@demo:utils:print(arg)
]]
function utils:print()
print('utils module print')
end
return utils
@@ -0,0 +1,2 @@
apidoc -i std -o doc
pause