- Notifications
You must be signed in to change notification settings - Fork0
zlgopen/awtk-widget-code-edit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
基于scintilla 实现的代码编辑控件。
- 获取 awtk 并编译
git clone https://github.com/zlgopen/awtk.gitcd awtk; scons; cd -
- 生成示例代码的资源
python scripts/update_res.py all
也可以使用 Designer 打开项目,之后点击 “打包” 按钮进行生成;如果资源发生修改,则需要重新生成资源。
如果 PIL 没有安装,执行上述脚本可能会出现如下错误:
Traceback (most recentcall last):...ModuleNotFoundError: No module named 'PIL'
请用 pip 安装:
pip install Pillow
- 编译
Usage: scons SHARED[true|false] IDL_DEF[true|false] LCD[800_480|...]Example:sconsscons SHARED=falsescons IDL_DEF=falsescons LCD=480_272scons SHARED=false IDL_DEF=false LCD=480_272
参数 SHARED 是可选的,用于指定是否编译生成动态库,缺省为true。参数 IDL_DEF 是可选的,用于指定编译前是否重新生成idl.json和def文件,缺省为true。参数 LCD 是可选的,用于指定示例程序运行时的LCD尺寸,格式为“height_width”。
注意:编译前先确定SConstruct 文件中的 awtk_root 为 awtk 所在目录,否则会编译失败。
- 运行
./bin/demo
- 基本用法
<code_editname="code"x="10"y="10"w="-20"h="-108"code_theme="stylers"filename="data/test.c"> <scroll_bar_dname="vbar"x="right"y="0"w="14"h="100%"value="0"/> </code_edit>
About
code editor for awtk
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published