GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • GUI

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — nuklear Alternatives - C++ GUI | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

nuklear

A single-header ANSI C immediate mode cross-platform GUI library

Immediate-Mode-UI logo
immediate-mode-ui.github.io    Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
8.9
Stable
Activity
8.2
Declining
Stars 11,535
Watchers 129
Forks 700
Last Commit 3 days ago

Programming language: C
License: GNU General Public License v3.0 or later
Tags: GUI    
Latest version: v4.13.3

nuklear alternatives and similar libraries

Based on the "GUI" category.
Alternatively, view nuklear alternatives based on common mentions on social networks and blogs.

  • imgui

    9.9 9.7 L1 nuklear VS imgui
    Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
    ocornut logo
  • Modern C++ Programming

    9.3 6.6 nuklear VS Modern C++ Programming
    Modern C++ Programming Course (C++03/11/14/17/20/23/26)
    federico-busato logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • webview

    9.2 4.7 nuklear VS webview
    Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).
    webview logo
  • xmake

    9.0 9.8 nuklear VS xmake
    🔥 A cross-platform build utility based on Lua
    xmake-io logo
  • libui

    8.9 0.0 nuklear VS libui
    Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
    andlabs logo
  • FTXUI

    8.8 9.1 nuklear VS FTXUI
    Features: - Functional style. Inspired by [1] and React - Simple and elegant syntax (in my opinion). - Support for UTF8 and fullwidth chars (→ 测试). - No dependencies. - Cross platform. Linux/mac (main target), Windows (experimental thanks to contributors), - WebAssembly. - Keyboard & mouse navigation. Operating systems: - linux emscripten - linux gcc - linux clang - windows msvc - mac clang
    ArthurSonzogni logo
  • wxWidgets

    8.8 9.9 L1 nuklear VS wxWidgets
    Cross-Platform C++ GUI Library
    wxWidgets logo
  • Duilib

    8.7 0.0 nuklear VS Duilib
    GUI
    duilib logo
  • Stacer

    8.7 3.4 nuklear VS Stacer
    Linux System Optimizer and Monitoring - https://oguzhaninan.github.io/Stacer-Web
    oguzhaninan logo
  • NanoGUI

    8.0 0.0 nuklear VS NanoGUI
    Minimalistic GUI library for OpenGL
    wjakob logo
  • RmlUi

    7.8 8.7 nuklear VS RmlUi
    RmlUi - The HTML/CSS User Interface library evolved
    mikke89 logo
  • Elements C++ GUI library

    7.5 9.4 nuklear VS Elements C++ GUI library
    Elements C++ GUI library
    cycfi logo
  • SixtyFPS

    7.3 9.9 nuklear VS SixtyFPS
    DISCONTINUED. Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript. [Moved to: https://github.com/slint-ui/slint]
    sixtyfpsui logo
  • Yue

    7.3 6.6 nuklear VS Yue
    A library for creating native cross-platform GUI apps
    yue logo
  • GacUI

    7.2 9.9 L1 nuklear VS GacUI
    Native C++ UI library, cross-platform, MVVM and data binding, XML description, multi-language, core/renderer cross-process separation, etc
    vczh-libraries logo
  • Turbo Vision

    7.2 7.6 nuklear VS Turbo Vision
    A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
    magiblot logo
  • nana

    7.1 0.0 L1 nuklear VS nana
    a modern C++ GUI library
    cnjinhao logo
  • Sciter

    7.1 0.0 nuklear VS Sciter
    Sciter: the Embeddable HTML/CSS/JS engine for modern UI development
    sciter-sdk logo
  • FLTK

    6.9 9.6 nuklear VS FLTK
    FLTK - Fast Light Tool Kit - https://github.com/fltk/fltk - cross platform GUI development
    fltk logo
  • GTK+

    6.6 9.9 L3 nuklear VS GTK+
    Read-only mirror of https://gitlab.gnome.org/GNOME/gtk
    GNOME logo
  • libRocket

    5.9 0.0 L2 nuklear VS libRocket
    libRocket - The HTML/CSS User Interface library
    libRocket logo
  • PDCurses

    5.7 2.4 L3 nuklear VS PDCurses
    A curses library for environments that don't fit the termcap/terminfo model.
    wmcbrine logo
  • copperspice

    5.7 8.5 nuklear VS copperspice
    Set of cross platform C++ libraries (Core, Gui, Network, Multimedia, SQL, Vulkan, etc)
    copperspice logo
  • SOUI

    5.5 2.1 nuklear VS SOUI
    SOUI是目前为数不多的轻量级可快速开发window桌面程序开源DirectUI库.其前身为Duiengine,更早期则是源自于金山卫士开源版本UI库Bkwin.经过多年持续更新方得此库
    SOUI2 logo
  • MyGUI

    5.4 9.7 L2 nuklear VS MyGUI
    Fast, flexible and simple GUI.
    MyGUI logo
  • xtd

    5.3 9.9 nuklear VS xtd
    Free open-source modern C++20/23 framework to create console (CLI), forms (GUI like WinForms) and unit test (xUnit) applications and libraries on Windows, macOS, Linux, iOS, Android, FreeBSD, Haiku, and SerenityOS.
    gammasoft71 logo
  • FINAL CUT

    5.3 8.5 nuklear VS FINAL CUT
    A Modern C++ Text-Based Widget Toolkit (TUI)
    gansm logo
  • saucer

    4.9 7.7 nuklear VS saucer
    🛸 A modern, cross-platform C++ webview library
    saucer logo
  • cuda-api-wrappers

    4.9 4.7 nuklear VS cuda-api-wrappers
    Thin C++-flavored header-only wrappers for core CUDA APIs: Runtime, Driver, NVRTC, NVTX.
    eyalroz logo
  • MeshLib

    4.9 9.9 nuklear VS MeshLib
    3D geometry processing SDK: fast mesh boolean, mesh repair, decimation, remeshing, offset, point cloud triangulation and ICP registration. C++ with Python, C#, C and JavaScript bindings.
    MeshInspector logo
  • CEGUI

    4.7 - nuklear VS CEGUI
    Flexible, cross-platform GUI library.
  • neoGFX

    4.1 9.6 nuklear VS neoGFX
    Cross-platform GPU-oriented C++ application/game framework
    i42output logo
  • CTPG

    3.8 3.9 nuklear VS CTPG
    Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time.
    peter-winter logo
  • Brisk

    3.5 8.3 nuklear VS Brisk
    Cross-platform C++20 GUI framework featuring MVVM architecture, reactive capabilities, and scalable, accelerated GPU rendering.
    brisklib logo
  • Refureku

    3.1 0.0 nuklear VS Refureku
    Cross-platform C++17 Runtime Reflection Library
    jsoysouvanh logo
  • eventbus

    3.1 4.7 nuklear VS eventbus
    A simple, header only event bus library written in modern C++17.
    ptsouchlos logo
  • gtkmm

    3.0 7.8 nuklear VS gtkmm
    Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm
    GNOME logo
  • ncurses

    2.6 7.6 nuklear VS ncurses
    snapshots of ncurses - see https://invisible-island.net/personal/git-exports.html (no pull requests are accepted)
    ThomasDickey logo
  • Vaca

    2.6 3.8 nuklear VS Vaca
    C++ Win32 wrapper to develop GUI apps
    dacap logo
  • newt

    2.1 3.1 nuklear VS newt
    Mirror of https://gitlab.com/newt-ui/newt
    mlichvar logo
  • Clip Library

    2.0 6.3 L3 nuklear VS Clip Library
    Cross-platform C++ library to copy/paste clipboard content
    aseprite logo
  • sling

    1.8 3.8 nuklear VS sling
    Lightweight C++ Signals and Slots implementation
    adrg logo
  • Ultra App Kit

    1.5 9.6 nuklear VS Ultra App Kit
    Documentation contents for Leadwerks Game Engine 5
    Leadwerks logo
  • NeoQCP

    1.5 9.7 nuklear VS NeoQCP
    A modernized fork of QCustomPlot: Qt6-only, QRhi rendering, Meson build, zero-copy plotting
    SciQLop logo
  • fox-toolkit

    1.4 0.0 nuklear VS fox-toolkit
    DISCONTINUED. Unofficial Zenotech specific mirror of fox-toolkit; please refer to upstream site for latest version
    zenotech logo
  • QCustomPlot

    1.4 - nuklear VS QCustomPlot
    Qt plotting widget without further dependencies. [GPLv3]
  • genetic

    1.4 1.9 nuklear VS genetic
    A performant and flexible genetic algorithm implemented in C++20/23.
    ptsouchlos logo
  • Omnirefl

    1.3 8.7 nuklear VS Omnirefl
    Seamless C++ reflection for a focused feature set, without macros or UB (before C++26).
    sergio-eld logo
  • static_string

    1.3 2.7 nuklear VS static_string
    Experimental compile-time string manipulation C++17 library
    ChristianPanov logo
  • MiniOAuth2

    1.3 5.9 nuklear VS MiniOAuth2
    A lightweight, header-only C++20 library for OAuth 2.0 Authorization Code Flow with PKCE . built for Crow, usable anywhere.
    Mhr1375 logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of nuklear or a related project?

Add another 'GUI' Library

Popular Comparisons

  • nuklear
    vs
    imgui
  • nuklear
    vs
    libui
  • nuklear
    vs
    NanoGUI
  • nuklear
    vs
    GTK+
  • nuklear
    vs
    webview

README

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 render backend or OS window/input handling but instead provides a highly modular, library-based approach, with 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 focuses only on the actual UI.

Features

  • Immediate-mode graphical user interface toolkit
  • Single-header library
  • Written in C89 (ANSI C)
  • Small codebase (~18kLOC)
  • 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 control of memory usage if needed / 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
  • Documentation

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 defining the preprocessor macro NK_IMPLEMENTATION in one .c/.cpp file before #includeing this file, e.g.:

#define NK_IMPLEMENTATION
#include "nuklear.h"

IMPORTANT: Every time you include "nuklear.h" you have to define the same optional flags. This is very important; not doing it either leads to compiler errors, or even worse, stack corruptions.

Gallery

screenshot screen screen2 node skinning gamepad

Example

/* init gui state */
struct nk_context ctx;
nk_init_fixed(&ctx, calloc(1, MAX_MEMORY), MAX_MEMORY, &font);

enum {EASY, HARD};
static int op = EASY;
static float value = 0.6f;
static int i =  20;

if (nk_begin(&ctx, "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_label(&ctx, "button")) {
        /* event handling */
    }

    /* fixed widget window ratio width */
    nk_layout_row_dynamic(&ctx, 30, 2);
    if (nk_option_label(&ctx, "easy", op == EASY)) op = EASY;
    if (nk_option_label(&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

Bindings

There are a number of nuklear bindings for different languages created by other authors. I cannot attest for their quality since I am not necessarily proficient in any of these languages. Furthermore there are no guarantee that all bindings will always be kept up to date:

  • Java by Guillaume Legris
  • D by Mateusz Muszyński
  • Golang by [email protected]
  • Rust by [email protected]
  • Chicken by [email protected]
  • Nim by [email protected]
  • Lua
    • LÖVE-Nuklear by Kevin Harrison
    • MoonNuklear by Stefano Trettel
  • Python
    • pyNuklear by William Emerison Six (ctypes-based wrapper)
    • pynk by [email protected] (cffi binding)
  • CSharp/.NET by [email protected]
  • V by Nicolas Sauzede

Credits

Developed by Micha Mettke and every direct or indirect contributor to the GitHub.

Embeds stb_texedit, stb_truetype and stb_rectpack by Sean Barrett (public domain) Embeds ProggyClean.ttf font by Tristan Grimmer (MIT license).

Big thank you to Omar Cornut (ocornut@github) for his 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 Barrett for his amazing single-header libraries which restored my faith in libraries and brought me to create some of my own. Finally Apoorva Joshi for his single-header file packer.

License

------------------------------------------------------------------------------
This software is available under 2 licenses -- choose whichever you prefer.
------------------------------------------------------------------------------
ALTERNATIVE A - MIT License
Copyright (c) 2017 Micha Mettke
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------
ALTERNATIVE B - Public Domain (www.unlicense.org)
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----------------------------------------------------------------------------

Reviewers guide

When reviewing pull request there are common things a reviewer should keep in mind.

Reviewing changes to src/* and nuklear.h:

  • Ensure C89 compatibility.
  • The code should work for several backends to an acceptable degree.
  • Check no other parts of nuklear.h are related to the PR and thus nothing is missing.
  • Recommend simple optimizations.
    • Pass small structs by value instead of by pointer.
    • Use local buffers over heap allocation when possible.
  • Check that the coding style is consistent with code around it.
    • Variable/function name casing.
    • Indentation.
    • Curly bracket ({}) placement.
  • Ensure that the contributor has bumped the appropriate version in clib.json and added their changes to the CHANGELOG.
  • Have at least one other person review the changes before merging.

Reviewing changes to demo/*, example/* and other files in the repo:

  • Focus on getting working code merged.
    • We want to make it easy for people to get started with Nuklear, and any demo and example improvements helps in this regard.
  • Use of newer C features, or even other languages is not discouraged.
    • If another language is used, ensure that the build process is easy to figure out.
  • Messy or less efficient code can be merged so long as these outliers are pointed out and easy to find.
  • Version shouldn't be bumped for these changes.
  • Changes that improves code to be more inline with nuklear.h are ofc always welcome.


*Note that all licence references and agreements mentioned in the nuklear README section above are relevant to that project's source code only.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.