The HorusUI library allows you to quickly develop GUIs for your applications by leveraging the ease of use provided by immediate mode GUI concepts.

HUI Logo

Immediate Mode Graphical User Interface for Tools

HUI

OVERVIEW

The HorusUI library allows you to quickly develop GUIs for your applications by leveraging the ease of use provided by immediate mode GUI concepts. No need to design your GUI layout and writing many lines of boilerplate GUI preparation, imgui takes care of layouting and making sure every widget you add to the system has an unique ID, gets drawn and responds to events. Ideally you should be familiar with https://en.wikipedia.org/wiki/Immediate_Mode_GUI. There are other imgui libs out there, dear-imgui which is more like a debug GUI and Nuklear which resembles HorusUI. HorusUI was specifically designed to create game editor tools or similar types of applications.

NOTE: The library is still work in progress, changes will occur until stabilization

For direct support: [email protected]

If you want to help with the development, donations are welcomed:

Donations on Patreon:
Patreon

Donations on PayPal:
PayPal

QUICK SAMPLE (C++)

HUI

    auto huiCtx = hui::createContext(hui::GraphicsApi::OpenGL);
    auto wnd = hui::createWindow("Sample", 1000, 800);
    hui::setWindow(wnd);
    auto theme = hui::loadTheme("../themes/default.theme");
    hui::setTheme(theme);

    auto largeFnt = hui::getFont(theme, "title");

    while (true)
    {
        hui::processEvents();
        hui::setWindow(hui::getMainWindow());
        hui::beginWindow(hui::getMainWindow());

        // user drawing code
        glClearColor(0, .3, .2, 1);
        glClear(GL_COLOR_BUFFER_BIT);

	// horus ui
        hui::beginFrame();
        hui::Rect panelRect = { 50, 50, 350, 500 };
        hui::beginContainer(panelRect);
        hui::WidgetElementInfo elemInfo;
        hui::getThemeWidgetElementInfo(hui::WidgetElementId::PopupBody, hui::WidgetStateType::Normal, elemInfo);
        hui::setBackColor(hui::Color::white);
        hui::drawBorderedImage(elemInfo.image, elemInfo.border, panelRect);
        hui::pushPadding(15);
        hui::gap(15);
        hui::labelCustomFont("Information", largeFnt);
        hui::button("Activate shields");
        static bool chk1, chk2, chk3;
        hui::beginTwoColumns();
        chk1 = hui::check("Option 1", chk1);
        chk2 = hui::check("Option 2", chk2);
        hui::nextColumn();
        chk3 = hui::check("Option 3", chk3);
        hui::pushTint(hui::Color::cyan);
        hui::button("Browse...");
        hui::popTint();
        hui::endColumns();
        static float val;
        hui::sliderFloat(0, 100, val);
        static char txt[2000];
        hui::textInput(txt, 2000, hui::TextInputValueMode::Any, "Write something here");
        hui::space();

        static f32 scrollPos = 0;
        hui::beginScrollView(200, scrollPos);
        hui::multilineLabel("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur?", hui::HAlignType::Left);
        hui::line();
        hui::button("I AGREE");
        scrollPos = hui::endScrollView();

        if (hui::button("Exit"))
            hui::quitApplication();

        hui::popPadding();
        hui::endContainer();
        hui::endFrame();
        hui::endWindow();
        hui::presentWindow(hui::getMainWindow());

        if (hui::wantsToQuit() || hui::mustQuit())
            break;
    }

    hui::shutdown();

PREREQUISITES

Windows: Microsoft Visual Studio 2017

Linux: g++

GTK3 dev, needed for the nativefiledialog lib, use: sudo apt-get install libgtk-3-dev

GLU/GLUT dev, needed by GLEW, use: sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev

BUILDING

Windows:

  • Execute: generate.bat
  • Open and compile: build_vs2017/horus.sln
  • Run generated files from ./bin folder

Linux:

  • Execute: sh ./generate.sh to generate makefiles
  • Execute: sh ./build.sh to compile and generate the lib and executables for the examples
  • Run generated files from the ./bin folder

FEATURES

  • Immediate mode GUI, imgui (no state kept per widget, user provides the state)
  • Docking OS native windows and tab panes system
  • UTF8 text support
  • It can redraw the UI only when needed, useful for non-gaming applications where continuous rendering not needed
  • DPI aware, scaling of the whole UI elements, useful for high DPI screens
  • Fully customizable through themes specified in a JSON file with 9-cell resizable elements and PNG images
  • Widgets can have multiple full styles in the same theme (example: different button shapes/skins)
  • Dynamic font atlas for unlimited unicode glyphs and font sizes
  • Widgets: text input (with hint text), tooltip, box, popup, messagebox, progress, button, icon button, dropdown, menu, context menu, tab, panel, radio, check, slider, toolbar etc.
  • MegaWidgets: color picker, XYZ/XY editor, object reference editor (with dragdrop support)
  • Widgets color tinting override
  • Virtual list view support (huge number of items)
  • Automatic vertical layouting of widgets (no need to position them by hand)
  • Multi-column layout with custom sizes (preferred, fill, max size, percentage based or pixel based)
  • Padding (left-right) and vertical spacing for widgets
  • Native Open/Save/Pick folder dialogs API
  • Inter-widget drag and drop
  • OS file/text drag and drop
  • Currently using OpenGL and SDL as backends for rendering and window/input
  • Customizable render/input backends
  • Custom user widgets API
  • 2D primitive drawing, lines, polylines, hermite splines, elipses, rectangles, with thickness
  • User viewport widget (rendering your scene/document view with the current rendering API)
  • Custom mouse cursor API
  • Clipboard API
  • Single header API
  • C-like API

ROADMAP

  • Undo/Redo system
  • Keyboard shortcuts system
  • OSX proper support
  • Vulkan rendering backend
  • Better unicode input (show IME suggestion box for Chinese etc.)
  • DPI theme elements based on current UI scale, choose the proper element bitmap size
  • Multiline text input editor with highlighting, advanced text operations
  • Hyperlink widget
  • Rich text widget (multi-font family, style and size, multi-color, insert images and hyperlinks)
  • Customizable Object Inspector
  • Customizable Node Editor
Comments
  • reconfigure build for clarity, add perf debug for timing info

    reconfigure build for clarity, add perf debug for timing info

    Decided to use the UI for an editor and restructured the build system a bit. It's ok to close the request If it's not helpful. I'll be adding a dx11 layer example tomorrow and I'll push that too when done.

  • Linking with SFML fails on linux

    Linking with SFML fails on linux

    Linking custom_render_and_input fails on linux. This is what we get:

    /usr/bin/x86_64-linux-gnu-ld: ../3rdparty/sfml/linux/lib/libsfml-window-s.a(JoystickManager.cpp.o): relocation R_X86_64_32S against symbol `_ZNSbIjSt11char_traitsIjESaIjEE4_Rep20_S_empty_rep_storageE' can not be used when making a PIE object; recompile with -fPIC

    Fix it.

  • Scrollbars never get released

    Scrollbars never get released

    Steps to reproduce the issue:

    • run without_docking
    • press the left mouse button on the scrollbar in order to drag it
    • release the left mouse button and see how it continues to act as if it is pressed

    Expected behavior:

    • scrolling should stop once the left mouse button is released
  • DPI Awareness for fonts

    DPI Awareness for fonts

    Two windows might live on different displays, so the fonts need to have dynamic pixel perfect scaling. No SDF fonts used for now, try to generate fonts for all current displays, if they differ in size/DPI. Try also SDF gen tho, if it's fast enough to gen now.

  • DX11 support

    DX11 support

    DX11 requires every window to have it's own swap chain. #10 may not the right place for it. We could convert windows to handles (unsigned int) and store windows in the context along side driver specific info like the swapchains that could also use this handle to lookup the swapchain of that window. In sdl2_input_provider.h we could also replace the sdlOpenGLCtx with a struct that would contain all the driver specific info and pass that off to the driver to allow specific info like this to be stored/managed. Reusing makecurrent would be able to handle setting the swapchain correctly for both drivers this way as well. You can assign this one to me if you like since I'm already working that out. Right now it's working but only for the main window and I added a global disable for detaching windows atm. We could also just allow a Window struct to store specific data like this and forget a handle, the driver would know it's data stored in the window itself. I would rather go that route. Any thoughts?

FlatUI is a immediate mode C++ GUI library for games and graphical applications.

FlatUI is a immediate mode C++ GUI library for games and graphical applications. Go to our landing page to browse our documentation.

Dec 23, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

Jan 8, 2023
raygui is a simple and easy-to-use immediate-mode-gui library.
raygui is a simple and easy-to-use immediate-mode-gui library.

raygui is a simple and easy-to-use immediate-mode-gui library.

Dec 30, 2022
A single-header ANSI C immediate mode cross-platform GUI library
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Dec 24, 2022
This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui.

cimgui This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui. All imgui.h functions are programm

Jul 5, 2021
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

Dec 3, 2022
A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.
A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.

SlimApp A minimalist(*) and platform-agnostic application layer for writing graphical applications. Available as either a single header file or a dire

Dec 18, 2022
ImTui: Immediate Mode Text-based User Interface C++ Library
ImTui: Immediate Mode Text-based User Interface C++ Library

ImTui is an immediate mode text-based user interface library. Supports 256 ANSI colors and mouse/keyboard input.

Jan 1, 2023
A tiny, portable, immediate-mode UI library written in ANSI C
A tiny, portable, immediate-mode UI library written in ANSI C

A tiny, portable, immediate-mode UI library written in ANSI C Features Tiny: around 1100 sloc of ANSI C Works within a fixed-sized memory region: no a

Jan 6, 2023
This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain
This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain

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 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.

Jan 8, 2023
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

ImGuizmo Latest stable tagged version is 1.83. Current master version is 1.84 WIP. What started with the gizmo is now a collection of dear imgui widge

Dec 27, 2022
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Jan 2, 2023
Examples, tutorials and applications for the LVGL embedded GUI library
Examples, tutorials and applications for the LVGL embedded GUI library

Examples, tutorials and applications for the LVGL embedded GUI library

Nov 11, 2022
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Jan 4, 2023
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

About wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls. wxWidgets allows y

Jan 7, 2023
A simple C++ ImGui loader base you can use for all your projects that need a login / register page.
A simple C++ ImGui loader base you can use for all your projects that need a login / register page.

C++ Loader Base ??️ What is this? ⚡ This is a very simple base I made for projects that require a login / register page that use ImGui. ??️ Screenshot

Dec 18, 2022
HoI4 Modding Tool That Does It All! Now with a QT based GUI, all your work wil be easier!

Kadaif - HoI4 Modding Tool Kadaif is a cross-platform tool meant to help you make mods for Hearts of Iron IV. With VSCode and all it's extensions, man

Dec 14, 2022
Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS.
Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

?? Available Translations: ???? ???? ???? ???? ???? ???? ???? ???? . View these docs in other languages at electron/i18n. The Electron framework lets

Jan 3, 2023
Elements C++ GUI library
Elements C++ GUI library

Elements C++ GUI library Introduction Elements is a lightweight, fine-grained, resolution independent, modular GUI library. Elements is designed with

Dec 30, 2022