🇺🇸 English | 🇧🇷 Português (Brasil)
Visual UI editor for RmlUi, built with C++17, RmlUi, FreeType, GLFW, and OpenGL 3.3 Core for Windows and Linux.
RmlUI Studio uses RmlUi itself both to render the user's document and to draw the editor's own interface on top of a cross-platform OpenGL 3.3 Core + GLFW backend for Windows and Linux:
- Canvas Context (
CanvasContext): Renders the user's.rml/.rcssdocument into an offscreen GPU texture (OpenGL FBO), enabling zoom, pan, direct element selection (real RmlUi DOM hit-testing), visual manipulation, and live interaction. - Editor Context (
EditorContext): Renders the entire studio interface (panels, layer tree, property inspector, and toolbar) directly to the backbuffer via RmlUi, with no ImGui dependency.
- Node Tree (
RmlNode): Represents RmlUi elements (div,button,input,span,img,progress) with properties for:- Geometry & Layout: position, dimensions, Flexbox (
display: flex,flex-direction,justify-content,align-items,flex-wrap,gap,padding), sizing modes (Fixed,Hug,Fill), anchors/constraints, and visual Layout Grids (columns, rows, or uniform grid). - Appearance & Typography: background color, borders,
border-radius, opacity, text color/size/weight/alignment, and:hoverstates. - Assets: image support (
<img>) with paths resolved relative to the project base directory.
- Geometry & Layout: position, dimensions, Flexbox (
- Live Import & Synchronization:
- Imports existing
.rmland.rcssfiles directly through the RmlUi DOM (ImportRmlFile,ImportRcssAndSync). - Applies
.rmland.rcsscode edits in real time on the canvas (ApplyRmlStringAndSync,ApplyRcssStringAndSync), with RCSS sanitization for RmlUi compatibility (SanitizeRcssForRmlUi). - Exports the project back to
.rml,.rcss, and assets (GenerateRmlAndRcss,ExportToPath).
- Imports existing
src/gl_renderer.h/.cpp: Cross-platform OpenGL 3.3 Core 2D renderer responsible for displaying the canvas texture and drawing selection overlays, dashed outlines, and visual guides.src/platform_utils.h/.cpp: Cross-platform OS utilities (native file open/save dialogs on Windows and Linux viazenity/kdialog, clipboard via GLFW).src/studio_icons.h/.cpp: Generates premultiplied 32×32 RGBA vector icons directly in code, dynamically tinted by RmlUi viaimage-color.
CMakeLists.txt— CMake configuration (C++17, static FreeType, static RmlUi Core, GLFW, OpenGL 3.3, andRmlUIStudioexecutable).src/main.cpp— Cross-platform GLFW window initialization, OpenGL 3.3 Core context, and main loop.src/rml_doc.h/.cpp— Document model, nodes, constraints, and.rml/.rcssimport/export.src/rml_engine.h/.cpp— RmlUi integration (Canvas and Editor contexts, DOM,stb_image, and OpenGL 3.3 offscreen rendering).src/gl_renderer.h/.cpp— OpenGL 3.3 2D renderer and texture management.src/platform_utils.h/.cpp— Cross-platform file dialogs and clipboard helpers.src/studio_ui.h/.cpp— Studio UI logic, canvas interaction, panels, and inspector.src/studio_icons.h/.cpp— Code-generated vector icons.third_party/RmlUi/— RmlUi library (static subproject + GL3/GLFW backends).third_party/freetype/— FreeType library (static font engine for RmlUi).third_party/stb/—stb_image.hfor cross-platform image decoding.
- CMake 3.20 or higher
- C++17 compiler (MSVC on Windows; GCC 9+ or Clang 10+ on Linux)
- OpenGL 3.3 compatible drivers
- Linux additional packages: X11/Wayland dev headers for GLFW (or
libglfw3-dev), andzenityorkdialogat runtime for native file dialogs.
git clone --recursive https://github.com/CifraS2/RmlUI-Studio
cd RmlUI-Studio
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -jThis project uses the following libraries and APIs:
-
RmlUi — The RmlUi Team & Contributors
- Copyright (c) 2008–2014 CodePoint Ltd, Shift Technology Ltd, and contributors
- Copyright (c) 2019–2026 The RmlUi Team, and contributors
- HTML/CSS-like UI engine used for both the canvas and the editor UI (
third_party/RmlUi/). - License: MIT (
third_party/RmlUi/LICENSE.txt).
-
FreeType 2 — The FreeType Project
- Font rasterization engine used by RmlUi (
third_party/freetype/). - License: FreeType License (FTL) or GPLv2 (
third_party/freetype/LICENSE.TXT; used under FTL).
- Font rasterization engine used by RmlUi (
-
GLFW — Camilla Löwy & Contributors
- Cross-platform library for window creation, OpenGL context management, input handling, and clipboard.
- License: zlib/libpng.
-
stb_image — Sean Barrett
- Single-header public domain image decoding library (
third_party/stb/stb_image.h). - License: MIT / Public Domain.
- Single-header public domain image decoding library (
-
OpenGL 3.3 Core & Platform APIs
- Cross-platform OpenGL 3.3 Core graphics API.
- Windows: Win32 API (
comdlg32,dwmapi,user32,shell32) for native file dialogs and window integration. - Linux: X11/Wayland and
zenity/kdialogfor native file dialogs.
