How mikke89/rmlui works
RmlUi is an embeddable C++ HTML/CSS-like UI library for games and applications. The principal workflow is application setup and input, document loading, element/style processing and layout, then generation of renderable geometry for the host renderer. The map also preserves documented capabilities such as data binding, controls, animation, templates, sprites, debugging, and optional Lua/SVG extensions. Several feature paths are documented but their implementation was not sampled; those links are shown as documented rather than inferred from code.
Main entry points: Context.cpp UI Context · XMLParser.cpp Document Parser · Core.h Core API · Element.cpp Element DOM
Components 23
UI Runtime
- Core API
Include/RmlUi/Core/Core.h - UI Context
Source/Core/Context.cpp - UI Controls
Source/Core/Elements - Animation
Source/Core/ElementAnimation.cpp - Event System
Source/Core/EventDispatcher.cpp
Documents And Layout
- Document Parser
Source/Core/XMLParser.cpp - Element DOM
Source/Core/Element.cpp - Style System
Source/Core/StyleSheetParser.cpp - Layout Engine
Source/Core/Layout/LayoutEngine.cpp - Templates
Source/Core/Template.cpp - Sprite Sheets
Source/Core/Spritesheet.cpp
Rendering And Platform
- Render Manager
Source/Core/RenderManager.cpp - Render Interface
Include/RmlUi/Core/RenderInterface.h - Renderer Backend
Backends - Platform Backend
Backends
Fonts And Data
- Data Binding
Source/Core/DataModel.cpp - Font Interface
Include/RmlUi/Core/FontEngineInterface.h - Default Font Engine
Source/Core/FontEngineDefault/FontEngineInterfaceDefault.cpp
Extensions
- Visual Debugger
Source/Debugger - Lua Plugin
Source/Lua - SVG Plugin
Source/SVG
Other components
- Host Application
- Host Renderer
Connections 25
- Host Application → Core API: calls API
- Core API → UI Context: creates context
- Host Application → UI Context: sends input
- UI Context → Document Parser: loads documents
- Document Parser → Element DOM: builds elements
- Element DOM → Style System: applies styles
- Style System → Layout Engine: drives layout
- Layout Engine → UI Context: updates context
- Host Application → UI Context: updates and renders
- UI Context → Render Manager: generates geometry
- Render Manager → Render Interface: submits draws
Source/Core/RenderManager.cpp - Render Interface → Renderer Backend: implemented by
- Host Application → Host Renderer: draws output
- Host Application → Platform Backend: provides input
- UI Context → UI Controls: hosts controls
- UI Context → Animation: advances animations
- UI Context → Data Binding: synchronizes data
- Element DOM → Event System: dispatches events
- Document Parser → Templates: uses templates
- Style System → Sprite Sheets: uses sprites
- Core API → Font Interface: accepts font engine
Include/RmlUi/Core/Core.h - Font Interface → Default Font Engine: default implementation
Source/Core/FontEngineDefault/FontEngineInterfaceDefault.cpp - UI Context → Visual Debugger: debugged by
- Host Application → Lua Plugin: extends through plugin
- Document Parser → SVG Plugin: supports SVG plugin