refactor folders

This commit is contained in:
idea4good
2019-11-12 11:01:27 +08:00
parent 7edf0cb046
commit 3effb084e2
100 changed files with 5393 additions and 89 deletions
+4424
View File
File diff suppressed because it is too large Load Diff
+900
View File
File diff suppressed because it is too large Load Diff
+20 -20
View File
@@ -1,5 +1,5 @@
<p align="center">
<img src="doc/GuiLiteCube.gif" alt="Image" width="320" height="304"/>
<img src="documents/GuiLiteCube.gif" alt="Image" width="320" height="304"/>
</p>
# GuiLite - The smallest GUI library
@@ -14,7 +14,7 @@
***
## Introduction
GuiLite is the smallest GUI library with 5000 lines of code, could run on **all platforms**(e.g, iOS/macOS/WathOS, Android, Linux, Windows, Docker and MCU without OS), and work with **many languages**(e.g. Swift, Java, Javascript, C#, Golang).
- ✂️Small: 5,000 lines of C++ code, could be merged into 1 header & 1 source file(GuiLite.h/GuiLite.cpp) - Easy to [build & port](doc/HowToBuild.md)
- ✂️Small: 5,000 lines of C++ code, could be merged into 1 header & 1 source file(GuiLite.h/GuiLite.cpp) - Easy to [build & port](documents/HowToBuild.md)
- ⚡Fast: Render GUI within one invoking, independent of any OS and any third party library - Make GUI run quickly and smoothly
- 💉Inject: Run inside Qt/MFC/Winform/Cocoa/Web - Keep Qt/MFC code reusable, and speed it up by local GuiLite-optimization
- ⚙️Hardware Minimum Requirment:
@@ -28,36 +28,36 @@ Run GuiLite both on MCU and Apple Watch:
| MCU | Apple Watch |
| --- | --- |
| ![Hello3D](doc/Hello3D.gif) | ![iWatch.hello3D](doc/iWatch.hello3D.gif) |
| ![MCU](doc/HelloWave.gif) | ![iWatch.helloWave](doc/iWatch.helloWave.gif) |
| ![Hello3D](documents/Hello3D.gif) | ![iWatch.hello3D](documents/iWatch.hello3D.gif) |
| ![MCU](documents/HelloWave.gif) | ![iWatch.helloWave](documents/iWatch.helloWave.gif) |
## ✨Features
### ⚔️Cross platform
| ARM Linux | STM32 Without OS |
| --- | --- |
| ![ARM Linux](doc/Linux.gif) | ![MCU](doc/HelloParticle.gif) ![MCU](doc/HelloWave.gif) |
| ![ARM Linux](documents/Linux.gif) | ![MCU](documents/HelloParticle.gif) ![MCU](documents/HelloWave.gif) |
| Windows Mixed Reality | Android |
| --- | --- |
| ![Win MR](doc/WinMR.gif) | ![Android](doc/Android.gif) |
| ![Win MR](documents/WinMR.gif) | ![Android](documents/Android.gif) |
| macOS | iOS & Aplle Watch |
| --- | --- |
| ![macOS](doc/Mac.gif) | ![iOS.hostMonitor](doc/iOS.gif) ![iOS.particle](doc/iOS.particle.gif) ![iWatch.helloWave](doc/iWatch.helloWave.gif) |
| ![macOS](documents/Mac.gif) | ![iOS.hostMonitor](documents/iOS.gif) ![iOS.particle](documents/iOS.particle.gif) ![iWatch.helloWave](documents/iWatch.helloWave.gif) |
***
### 🔍GuiLite previewer(WYSIWYG extension for GuiLite)
[GuiLite Previewer](https://github.com/idea4good/GuiLitePreviewer) is a Visual Studio Code extension, could extract GUI information from C++ code and preview GUI at preview page(What you see is what you get)
![GuiLitePreviewer](doc/Previewer.gif)
![GuiLitePreviewer](documents/Previewer.gif)
***
### 😎Gorgeous UI
![HostMonitor](doc/HostMonitor.gif)![HelloNets-pc](doc/HelloNets-pc.gif)
![HostMonitor](documents/HostMonitor.gif)![HelloNets-pc](documents/HelloNets-pc.gif)
***
### 🔣Multi-language:
![unicode](doc/unicode.jpg)
![unicode](documents/unicode.jpg)
***
### 🌐IoT Solution & 📊Code Telemetry
- Report build activities to cloud:<br>![BuildInfo](doc/BuildInfo.png)
- Sync running data to cloud:<br>![DataOnCloud](doc/data_on_cloud.png)
- Report build activities to cloud:<br>![BuildInfo](documents/BuildInfo.png)
- Sync running data to cloud:<br>![DataOnCloud](documents/data_on_cloud.png)
- ⚠️To stop telemetry, remove script files(e,g: sync_build.bat .sync.sh .sync_build.sh)
***
### 🐋Support Docker
@@ -65,7 +65,7 @@ We build GuiLite demo as docker image, you can update/deploy/run the latest GuiL
- `sudo docker run -it --privileged -v /dev:/dev-share idea4good/gui-lite:latest bash /run.sh`
***
## 📦3D
- ![GuiLiteGraphic](doc/GuiLite3D.gif) ![Hello3D](doc/Hello3D.gif)
- ![GuiLiteGraphic](documents/GuiLite3D.gif) ![Hello3D](documents/Hello3D.gif)
- Run GuiLite Samples[(HelloParticle, HelloWave)](https://github.com/idea4good/GuiLiteSamples) on Web and 3D scenario, [source code here](https://github.com/idea4good/GuiLiteWeb/blob/master/CubeEx/main.js)
- Run GuiLite-Sample-Hello3D on MCU and Windows/Linux/Qt platform
***
@@ -96,15 +96,15 @@ GuiLite is the smallest and simplest GUI library.
2. Only use basic C++ feature(class, virtual function), no complex syntax
3. All rendering base on draw_pixel, no algorithm
4. Full documents and small live demos for reference
- [Design specification](doc/HowToWork.md)
- [How to build & port?](doc/HowToBuild.md)
- [How to Layout widgets?](doc/HowLayoutWork.md)
- [Design specification](documents/HowToWork.md)
- [How to build & port?](documents/HowToBuild.md)
- [How to Layout widgets?](documents/HowLayoutWork.md)
- [How to build unicode font/bitmap resource?](https://github.com/idea4good/GuiLiteToolkit)
- [How to switch theme?](https://github.com/idea4good/GuiLiteSamples/blob/master/HostMonitor/UIcode/source/resource/resource.cpp)
- [How to dispatch messages?](doc/HowMessageWork.md)
- [UML chart of GuiLite core](doc/UML.md)
- [How to dispatch messages?](documents/HowMessageWork.md)
- [UML chart of GuiLite core](documents/UML.md)
- How GuiLite multi-layers work?
- ![GuiLiteGraphic](doc/GuiLiteGraphic.gif)
- ![GuiLiteGraphic](documents/GuiLiteGraphic.gif)
- [Full video](https://www.youtube.com/watch?v=QzZJnU5KmDQ)
- [Tutorial Source code](https://github.com/idea4good/GuiLiteWeb/blob/master/Graphic/main.js)
@@ -127,4 +127,4 @@ GuiLite is the smallest and simplest GUI library.
## 📞Community Channel
Thanks for the help from community, you guys make GuiLite better! And welcome new friend to join us.
- [**@Twitter**](https://twitter.com/idea4good)
- QQ code: [<img src="doc/qq.group.jpg">](https://jq.qq.com/?_wv=1027&k=5EO8D9i)
- QQ code: [<img src="documents/qq.group.jpg">](https://jq.qq.com/?_wv=1027&k=5EO8D9i)
+20 -20
View File
@@ -1,5 +1,5 @@
<p align="center">
<img src="doc/GuiLiteCube.gif" alt="Image" width="320" height="304"/>
<img src="documents/GuiLiteCube.gif" alt="Image" width="320" height="304"/>
</p>
# GuiLite(超轻量UI框架)- 最小的GUI库
@@ -13,7 +13,7 @@
***
## GuiLite是什么鬼?
GuiLite是5千行的图形界面库,可以运行在**所有平台**(例如:iOS/macOS/WathOSAndroidLinuxARM/x86-64),Windows(包含VR),Docker和MCU)上;也可以与**多种语言**(例如: Swift, Java, Javascript, C#, Golang)协同工作。
- ✂️轻量: 5千行C++代码,可合并在:1个头文件(GuiLite.h)1个实现文件(GuiLite.cpp)中 - 轻松[编译/移植](doc/HowToBuild.md)
- ✂️轻量: 5千行C++代码,可合并在:1个头文件(GuiLite.h)1个实现文件(GuiLite.cpp)中 - 轻松[编译/移植](documents/HowToBuild.md)
- ⚡超快: 一次调用就可以完成图形渲染,与操作系统及第三方库无关 - 程序更快速,UI更流畅
- 💉可注入: 可注入在Qt/MFC/Winform/Cocoa/Web程序中运行 - 充分利用现有Qt/MFC代码,局部GuiLite优化,亦可显著提升效率
- ⚙️️最低硬件要求:
@@ -27,43 +27,43 @@ GuiLite程序,可以同时运行在单片机和苹果“手表”上:
| MCU | Apple Watch |
| --- | --- |
| ![Hello3D](doc/Hello3D.gif) | ![iWatch.hello3D](doc/iWatch.hello3D.gif) |
| ![MCU](doc/HelloWave.gif) | ![iWatch.helloWave](doc/iWatch.helloWave.gif) |
| ![Hello3D](documents/Hello3D.gif) | ![iWatch.hello3D](documents/iWatch.hello3D.gif) |
| ![MCU](documents/HelloWave.gif) | ![iWatch.helloWave](documents/iWatch.helloWave.gif) |
## ✨功能介绍
### ⚔️卓越的跨平台能力
| ARM Linux | STM32 Without OS |
| --- | --- |
| ![ARM Linux](doc/Linux.gif) | ![MCU](doc/HelloParticle.gif) ![MCU](doc/HelloWave.gif) |
| ![ARM Linux](documents/Linux.gif) | ![MCU](documents/HelloParticle.gif) ![MCU](documents/HelloWave.gif) |
| Windows Mixed Reality | Android |
| --- | --- |
| ![Win MR](doc/WinMR.gif) | ![Android](doc/Android.gif) |
| ![Win MR](documents/WinMR.gif) | ![Android](documents/Android.gif) |
| macOS | iOS & Apple Watch |
| --- | --- |
| ![macOS](doc/Mac.gif) | ![iOS.hostMonitor](doc/iOS.gif) ![iOS.particle](doc/iOS.particle.gif) ![iWatch.helloWave](doc/iWatch.helloWave.gif) |
| ![macOS](documents/Mac.gif) | ![iOS.hostMonitor](documents/iOS.gif) ![iOS.particle](documents/iOS.particle.gif) ![iWatch.helloWave](documents/iWatch.helloWave.gif) |
***
### 🔍GuiLite Previewer(所见即所得的GuiLite开发插件)
[GuiLite Previewer](https://github.com/idea4good/GuiLitePreviewer)是一个Visual Studio Code插件,它可以自动提取源代码的GUI布局信息,并实时显示在“预览”页面上(所见即所得)
![GuiLitePreviewer](doc/Previewer.gif)
![GuiLitePreviewer](documents/Previewer.gif)
***
### 😎浮夸的UI效果
![HostMonitor](doc/HostMonitor.gif)![HelloNets-pc](doc/HelloNets-pc.gif)
![HostMonitor](documents/HostMonitor.gif)![HelloNets-pc](documents/HelloNets-pc.gif)
***
### 🔣万国语(unicode)
![unicode](doc/unicode.jpg)
![unicode](documents/unicode.jpg)
***
### 🌐IoT(物联网)和📊数据分析
- 上报“编译/运行”情况至“云端”:<br>![BuildInfo](doc/BuildInfo.png)
- 同步“运行数据”至“云端”:<br>![DataOnCloud](doc/data_on_cloud.png)
- 上报“编译/运行”情况至“云端”:<br>![BuildInfo](documents/BuildInfo.png)
- 同步“运行数据”至“云端”:<br>![DataOnCloud](documents/data_on_cloud.png)
***
### 🐋支持Docker
我们把GuiLite demo做成了Docker映像,只需一行命令,就可以将最新的GuiLite demo升级/部署/运行在你的设备上了。
- `sudo docker run -it --privileged -v /dev:/dev-share idea4good/gui-lite:latest bash /run.sh`
***
## 📦3D
- ![GuiLiteGraphic](doc/GuiLite3D.gif) ![Hello3D](doc/Hello3D.gif)
- ![GuiLiteGraphic](documents/GuiLite3D.gif) ![Hello3D](documents/Hello3D.gif)
- GuiLite实例[(HelloParticle, HelloWave)](https://github.com/idea4good/GuiLiteSamples)运行在Web及3D环境,[代码在这里](https://github.com/idea4good/GuiLiteWeb/blob/master/CubeEx/main.js)
- 在单片机上也能运行3D效果(具体参看GuiLiteSamples:Hello3D
***
@@ -94,15 +94,15 @@ GuiLite是最简单,易学的GUI库。
2. 只使用C++的基本特性(类和虚函数),不涉及复杂语法
3. 图形绘制以描点为基础,不使用任何算法
4. 设计简单,配有丰富的文档和实例程序;遇到问题,可以在QQ群获得帮助
- [软件设计说明](doc/HowToWork-cn.md)
- [如何编译和移植?](doc/HowToBuild.md)
- [如何布局UI?](doc/HowLayoutWork.md)
- [软件设计说明](documents/HowToWork-cn.md)
- [如何编译和移植?](documents/HowToBuild.md)
- [如何布局UI?](documents/HowLayoutWork.md)
- [如何制作多种文字/位图资源?](https://github.com/idea4good/GuiLiteToolkit)
- [如何“换肤”?](https://github.com/idea4good/GuiLiteSamples/blob/master/HostMonitor/UIcode/source/resource/resource.cpp)
- [如何传递消息?](doc/HowMessageWork.md)
- [核心UML示意图](doc/UML.md)
- [如何传递消息?](documents/HowMessageWork.md)
- [核心UML示意图](documents/UML.md)
- GuiLite滑动,及多层叠加原理
- ![GuiLiteGraphic](doc/GuiLiteGraphic.gif)
- ![GuiLiteGraphic](documents/GuiLiteGraphic.gif)
- [完整视频](https://v.youku.com/v_show/id_XNDI4ODE1ODcwOA)
- [Source code](https://github.com/idea4good/GuiLiteWeb/blob/master/Graphic/main.js)
@@ -123,4 +123,4 @@ GuiLite是最简单,易学的GUI库。
[中国码云链接](https://gitee.com/idea4good/GuiLite)
## 📞社区交流
- 感谢开发者群的所有同学,是你们塑造了今天的GuiLite!也欢迎新的大神/小白加入我们。<br>[<img src="doc/qq.group.jpg">](https://jq.qq.com/?_wv=1027&k=5EO8D9i)
- 感谢开发者群的所有同学,是你们塑造了今天的GuiLite!也欢迎新的大神/小白加入我们。<br>[<img src="documents/qq.group.jpg">](https://jq.qq.com/?_wv=1027&k=5EO8D9i)

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Before

Width:  |  Height:  |  Size: 1005 KiB

After

Width:  |  Height:  |  Size: 1005 KiB

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Before

Width:  |  Height:  |  Size: 918 KiB

After

Width:  |  Height:  |  Size: 918 KiB

Before

Width:  |  Height:  |  Size: 956 KiB

After

Width:  |  Height:  |  Size: 956 KiB

Before

Width:  |  Height:  |  Size: 875 KiB

After

Width:  |  Height:  |  Size: 875 KiB

Before

Width:  |  Height:  |  Size: 360 KiB

After

Width:  |  Height:  |  Size: 360 KiB

Before

Width:  |  Height:  |  Size: 917 KiB

After

Width:  |  Height:  |  Size: 917 KiB

Before

Width:  |  Height:  |  Size: 243 KiB

After

Width:  |  Height:  |  Size: 243 KiB

Before

Width:  |  Height:  |  Size: 926 KiB

After

Width:  |  Height:  |  Size: 926 KiB

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Before

Width:  |  Height:  |  Size: 972 KiB

After

Width:  |  Height:  |  Size: 972 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 999 KiB

After

Width:  |  Height:  |  Size: 999 KiB

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 506 KiB

Before

Width:  |  Height:  |  Size: 502 KiB

After

Width:  |  Height:  |  Size: 502 KiB

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File
View File
+8 -42
View File
@@ -1,15 +1,8 @@
./.sync.sh 1h1cpp
echo "Merge GuiLite source code into: 1 hearder & 1 source file"
echo ""
echo "Choose 1: Build for Linux"
echo "Choose 2: Build for Windows"
echo "Choose 3: Build for None OS or any OS"
echo "Choose 4: exit"
echo "Flatten source code into: GuiLite.h/GuiLite.cpp"
read -p "Please input:[1-3]:" input
# build GuiLite.h
# build GuiLiteRaw.h
cd core_include
cat api.h cmd_target.h rect.h resource.h theme.h surface.h display.h word.h bitmap.h wnd.h audio.h > core.h
mv core.h ../
@@ -22,40 +15,13 @@ cd ..
cat core.h widgets.h > GuiLiteRaw.h
rm core.h widgets.h
# build GuiLite-xxx.cpp
cppFileName="GuiLite-win.cpp"
# build GuiLiteRaw.cpp
cd core
cat *.cpp > core.cpp
mv core.cpp ../
cd adapter
while :
do
case $input in
1)
echo "Choose 1"
cat *linux*.cpp > adapter.cpp
cppFileName="GuiLite-linux.cpp"
break
;;
2)
echo "Choose 2"
cat *win*.cpp > adapter.cpp
break
;;
3)
echo "Choose 3"
cat *unknow*.cpp > adapter.cpp
cppFileName="GuiLite-unknow.cpp"
break
;;
*)
rm ../../GuiLiteRaw.h ../../core.cpp
exit 0
;;
esac
done
cat *.cpp > adapter.cpp
mv adapter.cpp ../../
cd ../../widgets
@@ -74,13 +40,13 @@ sed -i '1s/^/#include "GuiLite.h" /' GuiLiteNoInclude.cpp
# Delete empty lines or blank lines
sed '/^$/d' GuiLiteRaw.h > GuiLite.h
sed '/^$/d' GuiLiteNoInclude.cpp > $cppFileName
sed '/^$/d' GuiLiteNoInclude.cpp > GuiLite.cpp
# Verify
gcc -c $cppFileName
gcc -c GuiLite.cpp
# clean
rm GuiLiteRaw.h GuiLiteRaw.cpp GuiLiteNoInclude.cpp
echo "Done!"
echo "You could find GuiLite.h/$cppFileName in this folder"
echo "You could find GuiLite.h/GuiLite.cpp in this folder"

Some files were not shown because too many files have changed in this diff Show More