nuklear

所属分类:单片机开发
开发工具:C/C++
文件大小:2106KB
下载次数:19
上传日期:2016-05-06 18:59:48
上 传 者linuxempire
说明:  小型的GUI开发库,用纯c语言开发,所有代码都写在一个头文件里,没有依赖库
(This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default renderbackend or OS window and input handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as output. So instead of providing a layered library that tries to abstract over a number of platform and render backends it only focuses on the actual UI.)

文件列表:
nuklear (0, 2016-05-04)
nuklear\.travis.yml (452, 2016-05-01)
nuklear\demo (0, 2016-05-01)
nuklear\demo\allegro5 (0, 2016-05-01)
nuklear\demo\allegro5\Makefile (548, 2016-04-29)
nuklear\demo\allegro5\main.c (6116, 2016-05-01)
nuklear\demo\allegro5\nuklear_allegro.h (11777, 2016-05-01)
nuklear\demo\calculator.c (2382, 2016-04-29)
nuklear\demo\d3d11 (0, 2016-05-02)
nuklear\demo\d3d11\build.bat (641, 2016-04-29)
nuklear\demo\d3d11\demo.exe (257024, 2016-04-30)
nuklear\demo\d3d11\main.c (10457, 2016-05-02)
nuklear\demo\d3d11\main.obj (431679, 2016-04-30)
nuklear\demo\d3d11\nuklear_d3d11.h (21309, 2016-05-02)
nuklear\demo\d3d11\nuklear_d3d11.hlsl (667, 2016-04-29)
nuklear\demo\d3d11\nuklear_d3d11_pixel_shader.h (5735, 2016-04-30)
nuklear\demo\d3d11\nuklear_d3d11_vertex_shader.h (11617, 2016-04-30)
nuklear\demo\gdi (0, 2016-05-02)
nuklear\demo\gdi\build.bat (235, 2016-04-29)
nuklear\demo\gdi\demo.exe (184320, 2016-04-30)
nuklear\demo\gdi\main.c (4865, 2016-05-02)
nuklear\demo\gdi\main.obj (301980, 2016-04-30)
nuklear\demo\gdi\nuklear_gdi.h (21888, 2016-05-02)
nuklear\demo\gdip (0, 2016-05-02)
nuklear\demo\gdip\build.bat (198, 2016-04-29)
nuklear\demo\gdip\demo.exe (185856, 2016-04-30)
nuklear\demo\gdip\main.c (4854, 2016-05-02)
nuklear\demo\gdip\main.obj (303437, 2016-04-30)
nuklear\demo\gdip\nuklear_gdip.h (29964, 2016-05-02)
nuklear\demo\glfw_opengl2 (0, 2016-05-01)
nuklear\demo\glfw_opengl2\Makefile (449, 2016-05-01)
nuklear\demo\glfw_opengl2\main.c (6218, 2016-05-01)
nuklear\demo\glfw_opengl2\nuklear_glfw_gl2.h (11748, 2016-05-01)
nuklear\demo\glfw_opengl3 (0, 2016-05-05)
nuklear\demo\glfw_opengl3\Makefile (472, 2016-05-01)
nuklear\demo\glfw_opengl3\main.c (6713, 2016-05-05)
nuklear\demo\glfw_opengl3\nuklear_glfw_gl3.h (15637, 2016-05-01)
... ...

[![Build Status](https://travis-ci.org/vurtun/nuklear.svg)](https://travis-ci.org/vurtun/nuklear) # Nuklear This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default renderbackend or OS window and input handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as output. So instead of providing a layered library that tries to abstract over a number of platform and render backends it only focuses on the actual UI. ## Features - Immediate mode graphical user interface toolkit - Single header library - Written in C89 (ANSI C) - Small codebase (~15kLOC) - Focus on portability, efficiency and simplicity - No dependencies (not even the standard library if not wanted) - Fully skinnable and customizable - Low memory footprint with total memory control if needed or wanted - UTF-8 support - No global or hidden state - Customizable library modules (you can compile and use only what you need) - Optional font baker and vertex buffer output ## Building This library is self contained in one single header file and can be used either in header only mode or in implementation mode. The header only mode is used by default when included and allows including this header in other headers and does not contain the actual implementation. The implementation mode requires to define the preprocessor macro `NK_IMPLEMENTATION` in *one* .c/.cpp file before `#include`ing this file, e.g.: ```c #define NK_IMPLEMENTATION #include "nuklear.h" ``` ## Gallery ![screenshot](https://cloud.githubusercontent.com/assets/8057201/11761525/ae06f0ca-a0c6-11e5-819d-5610b25f6ef4.gif) ![screen](https://cloud.githubusercontent.com/assets/8057201/13538240/acd96876-e249-11e5-9547-5ac0b19667a0.png) ![screen2](https://cloud.githubusercontent.com/assets/8057201/13538243/b04acd4c-e249-11e5-8fd2-ad7744a5b446.png) ![node](https://cloud.githubusercontent.com/assets/8057201/9976995/e81ac04a-5ef7-11e5-872b-acd54fbeee03.gif) ![skinning](https://cloud.githubusercontent.com/assets/8057201/14152357/25df939e-f6b3-11e5-8587-b19e863e0d1b.png) ![gamepad](https://cloud.githubusercontent.com/assets/8057201/14902576/339926a8-0d9c-11e6-9fee-a8b73af04473.png) ## Example ```c /* init gui state */ struct nk_context ctx; nk_init_fixed(&ctx, calloc(1, MAX_MEMORY), MAX_MEMORY, &font); enum {EASY, HARD}; int op = EASY; float value = 0.6f; int i = 20; struct nk_panel layout; nk_begin(&ctx, &layout, "Show", nk_rect(50, 50, 220, 220), NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_CLOSABLE); { /* fixed widget pixel width */ nk_layout_row_static(&ctx, 30, 80, 1); if (nk_button_text(&ctx, "button", NK_BUTTON_DEFAULT)) { /* event handling */ } /* fixed widget window ratio width */ nk_layout_row_dynamic(&ctx, 30, 2); if (nk_option(&ctx, "easy", op == EASY)) op = EASY; if (nk_option(&ctx, "hard", op == HARD)) op = HARD; /* custom widget pixel width */ nk_layout_row_begin(&ctx, NK_STATIC, 30, 2); { nk_layout_row_push(&ctx, 50); nk_label(&ctx, "Volume:", NK_TEXT_LEFT); nk_layout_row_push(&ctx, 110); nk_slider_float(&ctx, 0, &value, 1.0f, 0.1f); } nk_layout_row_end(&ctx); } nk_end(ctx); ``` ![example](https://cloud.githubusercontent.com/assets/8057201/10187***1/584ecd68-675c-11e5-897c-822ef534a876.png) ## CREDITS: Developed by Micha Mettke and every direct or indirect contributor to the GitHub. Embeds `stb_texedit`, `stb_truetype` and `stb_rectpack` by Sean Barret (public domain) Embeds `ProggyClean.ttf` font by Tristan Grimmer (MIT license). Big thank you to Omar Cornut (ocornut@github) for his [imgui](https://github.com/ocornut/imgui) library and giving me the inspiration for this library, Casey Muratori for handmade hero and his original immediate mode graphical user interface idea and Sean Barret for his amazing single header [libraries](https://github.com/nothings/stb) which restored my faith in libraries and brought me to create some of my own. ## LICENSE: This software is dual-licensed to the public domain and under the following license: you are granted a perpetual, irrevocable license to copy, modify, publish and distribute this file as you see fit.

近期下载者

相关文件


收藏者