Code Monkey home page Code Monkey logo

guilite's Introduction

Welcome to GUI-lite

Logo

The smallest header-only GUI library (4 KLOC) for all platforms.

Why GuiLite

Lightweight

  • ✂️Small: 4,000+ lines of C++ code, zero dependency, header-only(GuiLite.h)

  • ⚡Fast: High Rendering performance, even work on MCU

  • 👫🏻Compatible: Work smoothly with 3rd party frameworks(Qt/MFC/Winform/Cocoa/Web)

  • ⚙️️Hardware Minimum Requirements:

    Processor Disk/ROM space Memory
    24 MHZ 29 KB 9 KB

Cross platform

  • Supported OSes: iOS/macOS/WatchOS, Android, Linux, Windows, RTOS... or MCU without OS
  • Supported languages: C/C++, Swift, Java, Javascript, C#, Golang...
  • Supported 3rd party libraries: Qt, MFC, Winforms, CoCoa...

Hero features

  • ☁️Cloud + IoT Solution: master your IoT business all over the world
  • 🔣Multi-language, supports UTF-8;📀Playback Video
  • 🔨Toolkit for building font/image resources
  • 📐Layout GUI WYSIWYG
  • 📊Code Telemetry and Analysis in real time
  • 📦Supports 3D and Web
  • 🐋Run in docker with a single command: sudo docker run -it --privileged -v /dev:/dev-share idea4good/gui-lite:latest bash /run.sh

Easy to learn and support

Even a C beginner could master GUI-lite quickly. The source code only uses basic C++ features (class, virtual function). We chose C++ as it could make the code size significantly smaller and easier to read.

Demo wall

  • Zero dependency, 100% build pass & runnable
  • Click the demo you like, and run it on your hardware
  • Most of the demos have about 100 lines of UI code, the code repository is GuiLiteSamples

MCU platform



3D on STM32

Wave on STM32

Particle on STM32

Star on STM32

3D wave on STM32

Keyboard on STM32

Mario on STM32

3D circle on STM32

3D donut on STM32

Timer

Molecule move

Pendulum effect

IoT feature



Monitor IoT device on cloud

Code Telemetry & Analysis in real time

Track IoT device over the world

Multi-language, Design tool and video



Lattice Font

Freetype Font

Layout GUI

Render JPG file quickly

Play video with FFmpeg

Widgets & Controller



Emulate Windows UI

Scroll widget

How to use widgets

3D Nets on Windows/Linux

Transparent dialog

Swipe view

Cross platform



HostMonitor on Windows

HostMonitor on Mac

HostMonitor on Android

HostMonitor on Windows Mixed Reality

HostMonitor on Linux

3D on Web

3D on Web

HostMonitor on iPhone

How display work

Apple platform



3D on Apple Watch

Wave on Apple Watch

Particle on iPhone

📞Community Channel

Thanks for the help from the community, you all make GUI-lite better! And welcome to any new friend to join us.


開發群🔑:875721211

guilite's People

Contributors

0xflotus avatar blacamdk avatar epaga avatar firstbober avatar hhirsch avatar idea4good avatar iggy890 avatar iysheng avatar menee avatar neko-para avatar noshbar avatar phoebe-leong avatar quorafind avatar supakeen avatar yedyexyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

guilite's Issues

use custom title bar in window

Hi thank you for great project
I always looking for a good small gui library.
I'm just thinking about one thing... Is it possible to remove the default window title bar (frame) and create a new one for it (just like how we can do it in qt).

Waveform sample in QT widget

Hi,

I liked GuiLite project and the sample which you have showcased is awesome.
I'm a QT developer i have checked the samples and didn't found the waveform drawing in QT application.
Is waveform drawing is possible in QT widget?.
I have planned to use this toolkit for drawing audio waveform please suggest me, how we can use it in QT widget.

Thanks,
Sundaram

Use std::max and std::min instead of custom macros

Hello,

since this library uses C++, is there a specific reason not to use std::max and std::min, which IMHO are superior to defining custom macros:

#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))

Just a small suggestion I stumbled upon spontaneously :)

Make include guards unique

I find that include guards like “API_H” and “MSG_H” are too short for the safe reuse of your header files (when they belong to an application programming interface).

can you support the customized key board

Hi, 因为开发设备的需要,希望能够在我们这个 guilite中添加自定义按键的分发功能。
原先代码仅支持上下键和确认键,我似乎没有办法,把我获得的其他按键分发给指定的BUTTON。
比如我的UI 布局类似:
BUTTON 1
BUTTON 2
BUTTON 3

然后我按下1键,需要BUTTON 1执行动作。
用例里也没有看到列表框或者表格框一类的组件可以使用。
有什么建议吗?

GuiLite examples capturing users name and sending to external site

GuiliteExamples is capturing the users logged in name in the script sync_build.bat and sending to external site. Looks very malicious, because tehere is no reason to capture the user name and send it via curl.exe to an external site.

What called my attention is the inclusion of curl.exe in each sub directory. Why would you have to go to an external site to compile an example.

Users should also be very suspicious of exec on GuiLiteSamples root directory where an exec GuiLiteToolkit.exe is located whithout much (any) documentation.

Example for UWP?

Windows.UI.ViewManagement have official support of Compact Overlay (PIP) that won't disappear if you Win+D (Show Desktop)..

Would like to learn how to integrate it with Visual Studio UWP project. Normal/ Classic desktop app can't call the API to switch to PIP mode.

Windows.UI.ViewManagement compact Overlay 只能從 UWP project使用, Desktop App, Desktop Bridge, 和 Microsoft centennial (同名應該),都無法使用。

C++ 我沒啥經驗,求指導,和demo.

Linux/arm64/v8

Logged into a Toradex ARM device and tried pasting your docker command.
guilite-toradex-fail

In case one has trouble seeing the image.

verdin-imx8mp-06848973:~$ docker run -it --privileged -v /dev:/dev-share idea4good/gui-lite:latest bash /run.sh
Unable to find image 'idea4good/gui-lite:latest' locally
latest: Pulling from idea4good/gui-lite
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'.
verdin-imx8mp-06848973:~$

There are now quite a few Linux/arm64/v8 devices out there. You should probably build a container for them.

https://www.reddit.com/r/raspberry_pi/comments/gs6omd/raspberry_pi_os_for_arm64_finally_released/

Need source for the xWindow to build for Linux on other processors

Every one of the samples comes with an xWindow ELF binary.

image

I don't see the source or build instructions for this file. We are running a recent version of Ubuntu on a non-x86 processor and would like to do some better GuiLite experiments. Writing directly to the physical /dev/fb0 technically "works" but is officially unsupported and not promised to remain working. We also don't get a mouse that way. X11 is installed, but there is no desktop running.

mingw gcc 8.1 building error

[ 28%] Building CXX object core/CMakeFiles/core.dir/src/wave_ctrl.cpp.obj
D:\Users\Administrator\Downloads\GuiLite-master\core\src\wave_ctrl.cpp: In member function 'void c_wave_ctrl::refresh_wa
ve(unsigned char)':
D:\Users\Administrator\Downloads\GuiLite-master\core\src\wave_ctrl.cpp:136:49: error: cast from 'c_wave_ctrl*' to 'long
unsigned int' loses precision [-fpermissive]
(frame | (speed << 8) | (((unsigned long)this & 0xffff) << 16)));
^~~~
make[2]: *** [core\CMakeFiles\core.dir\build.make:147: core/CMakeFiles/core.dir/src/wave_ctrl.cpp.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:90: core/CMakeFiles/core.dir/all] Error 2

Incorrect clone function

There is several clone functions that actually does not clone the object. Like the one in button.h, it needs a *this parameter in the constructor.

xWindow on Linux

My operation system is Debian Linux 32 bit.
but your xWindow is 64 bit. How can I run my gui samples.

出视频教程

directUI 就是所有界面组件全部用画笔画出来,看了你的代码也是这样, core和gui 讲 display surface framebuffer上下文层次关系和绘图原理,讲事件循环机制怎么传递。讲具体一个示例项目应用从创建到使用的流程。。。已经花了一个星期看你的gui和core部分,代码简洁,风格优雅,非常棒的,就是一点注释都没有 好尴尬。。。很多很好的东西因为没有推广好而夭折,要知道有很多大神根本不屑于推广。。。希望这个开源项目能得到推广流传下去,我主攻嵌入式arm-linux方面的项目,底层无界面代码写的再好,可是没有ui给展示出来。。。qt太庞大,minigui技术支持不好。。。我曾经也想过用直接操作linux下的framebuffer来绘制ui,可是ui不是一两天就能搞好的,终于在逛今日头条的时候推送了guilite仅用5000行代码实现跨平台ui框架,甚是欢喜。。。已经沉溺于大神的代码中。。。

实践反馈

CPU使用过高,如果绘制股票行情图、雷达仪表等问题会很突出。中文字符乱码问题。缺少注意事项:比如必须添加一个字体否咋会崩溃。改变Helloxxx等实例窗口大小时会露出MFC的窗口。

Documentation?

I really want to use this since I can't use Qt or wxWidgets and this looks like it would solve my problems.
However, all I can find are some fairly complicated examples and images of code snippets with almost no context.

DRM

I can not find a DRM support documentation.
Can GuiLite use Direct Rendering Manager?

wrap text needed in draw_string_in_rect()

draw_string_in_rect() has align_type argument but does not have an in-built option to wrap (clip) text. Instead of allowing text to run out of the rectangle, it should be able to 'insert' a new line each time until the bottom of the rectangle and then also stop at the bottom of the rectangle

If an existing example / workaround exists, please advise. I see get_str_size() is available

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.