RmlUi - The HTML/CSS User Interface library evolved

Related tags

GUI RmlUi
Overview

RmlUi - The HTML/CSS User Interface Library Evolved

RmlUi

RmlUi - now with added boosters taking control of the rocket, targeting your games and applications.


Chat on Gitter Build Build status Build Status

RmlUi is the C++ user interface package based on the HTML and CSS standards, designed as a complete solution for any project's interface needs. It is a fork of the libRocket project, introducing new features, bug fixes, and performance improvements.

RmlUi uses the time-tested open standards XHTML1 and CSS2 while borrowing features from HTML5 and CSS3, and extends them with features suited towards real-time applications. Because of this, you don't have to learn a whole new proprietary technology like other libraries in this space. Please have a look at the supported RCSS properties and RML elements.

Documentation is located at https://mikke89.github.io/RmlUiDoc/

Note: RmlUi 4.0 currently in development is a restructuring of RmlUi 3.x. This includes changes to the namespaces, plugins, and include headers. Take a look at the changelog for a summary of changes and an upgrade guide.

Features

  • Cross platform architecture: Windows, macOS, Linux, iOS, etc.
  • Dynamic layout system.
  • Full animation and transform support.
  • Efficient application-wide styling, with a custom-built templating engine.
  • Fully featured control set: buttons, sliders, drop-downs, etc.
  • Runtime visual debugging suite.

Extensible

  • Abstracted interfaces for plugging in to any game engine.
  • Decorator engine allowing custom application-specific effects that can be applied to any element.
  • Generic event system that binds seamlessly into existing projects.
  • Easily integrated and extensible with Lua scripting.

Controllable

  • The user controls their own update loop, calling into RmlUi as desired.
  • The library strictly runs as a result of calls to its API, never in the background.
  • Input handling and rendering is performed by the user.
  • The library generates vertices, indices, and textures for the user to render how they like.
  • File handling and the font engine can optionally be fully replaced by the user.

Integrating RmlUi

Here are the general steps to integrate the library into a C++ application, have a look at the documentation for details.

  1. Build RmlUi using CMake and your favorite compiler, or fetch the Windows library binaries.
  2. Link it up to your application.
  3. Implement the abstract system interface and render interface.
  4. Initialize RmlUi with the interfaces, create a context, provide font files, and load a document.
  5. Call into the context's update and render methods in a loop, and submit input events.
  6. Compile and run!

Several samples demonstrate everything from basic integration to more complex use of the library, feel free to have a look for inspiration.

Dependencies

In addition, a C++14 compatible compiler is required.

Example: Basic document

In this example a document is created using a templated window. The template is optional but can aid in achieving a consistent look by sharing it between multiple documents.

Document

hello_world.rml

<rml>
<head>
	<title>Hello world</title>
	<link type="text/template" href="window.rml" />
	<style>
		body
		{
			width: 200px;
			height: 100px;
			margin: auto;
		}
	</style>
</head>
<body template="window">
	Hello world!
</body>
</rml>

Window template

window.rml

<template name="window" content="content">
<head>
	<link type="text/rcss" href="rml.rcss"/>
	<link type="text/rcss" href="window.rcss"/>
</head>
<body>
	<div id="title_header">RmlUi</div>
	<div id="content"/>
</body>
</template>

No styles are defined internally, thus rml.rcss can be included for styling the standard elements.

Style sheet

window.rcss

body
{
	font-family: Delicious;
	font-weight: normal;
	font-style: normal;
	font-size: 15px;
	color: #6f42c1;
	background: #f6f8fa;
	text-align: center;
	padding: 2em 3em;
	border: 2px #ccc;
}

#title_header
{
	color: #9a42c5;
	font-size: 1.5em;
	font-weight: bold;
	padding-bottom: 1em;
}

Rendered output

Hello world document

Gallery

Game interface Game interface from the 'invader' sample

Game menu Game menu

Form controls Form controls from the 'demo' sample

Sandbox Sandbox from the 'demo' sample, try it yourself!

Transition
Transitions on mouse hover (entirely in RCSS)

Transform
Animated transforms (entirely in RCSS)

Lottie animation
Vector animations with the Lottie plugin

See the full gallery for more screenshots and videos of the library in action.

License

RmlUi is published under the MIT license. The library includes third-party source code and assets with their own licenses, as detailed below.

RmlUi source code and assets

MIT License

Copyright (c) 2008-2014 CodePoint Ltd, Shift Technology Ltd, and contributors
Copyright (c) 2019-2021 The RmlUi Team, and contributors

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.

Third-party source code included in RmlUi Core

See Include/RmlUi/Core/Containers/LICENSE.txt - all MIT licensed.

Third-party font assets included in RmlUi Debugger

See Source/Debugger/LICENSE.txt - SIL Open Font License.

Additional sample assets (in Samples/)

See

Libraries included with the test suite (in Tests/Dependencies/)

See Tests/Dependencies/LICENSE.txt.

Additional test suite assets (in Tests/Data/VisualTests/)

See Tests/Data/VisualTests/LICENSE.txt.

Comments
  • Proposal for replacing decorator syntax, add sprite sheet support

    Proposal for replacing decorator syntax, add sprite sheet support

    While the work on increasing performance is well underway with great results already, there are some ideas that could improve it further but break some existing things, and possibly reduce some of the generality of the library.

    Specifically, strings are passed and copied everywhere around in the code and need to be looked up in hash tables quite a lot. Especially for properties, events, and possibly pseudoclasses. What I propose instead is to use simple numeric IDs, one specific for each property. Everything would become much simpler then if we disallow custom property names (such as those used by decorators) and events.

    But of course, we're not getting rid of decorators! Instead, I think we can improve them.

    I think it is kind of awkward currently to have to specify the exact subrectangle in a texture right inside the decorator declaration. Instead, I propose first that we enable somehow to define a spritesheet with all subrectangles defining a given sprite in one place. Then we introduce a new property, either decorator or background-image (as in css) which specifies a decorator by combining possibly multiple sprite names from the spritesheet, and comma-separated for multiple decorators.

    E.g. something like this:

    @spritesheet(invader-theme) {
       src: invader-theme.png;
       invader-left: 10px 40px 30px 10px;
       ...
    }
    button.invader {
     decorator: tiled-horizontal(invader-left, invader-center, invader-right), image(button-bg);
    }
    

    One of the nice things is that we could then easily replace the whole spritesheet (1) to change to a different theme, or more importantly, (2) to specify a higher resolution image when the dp unit changes so that the textures are crisp at say 1dp==2px.

    Thoughts?

    enhancement performance 
    opened by mikke89 62
  • Moving towards a 3.0 release of RmlUi

    Moving towards a 3.0 release of RmlUi

    I feel like we have a considerable amount of features in the develop branch now, and it's time we merge it with master soon for an official 3.0 release.

    The obvious major thing missing is documentation of all the new features, and we probably need to go through all the existing documentation as a lot of details have been changed. The changelog is quite exstensive, and should serve as a good starting point.

    If there is something you feel should be done before the release of RmlUi 3.0, then let's discuss it here. Also if you find or know of any larger bugs or stability issues, it would be nice to have these resolved before the release.

    opened by mikke89 32
  • RFC: new font provider interface

    RFC: new font provider interface

    The major difference between stock libRocket and our own fork here https://github.com/Qfusion/libRocket is that the former manages its own library of fonts and glyphs and is closely tied to freetype. Quite often this is an undesired behaviour: bitmap fonts, fonts are managed by the application, etc.

    Related PR: https://github.com/libRocket/libRocket/pull/267/files

    Related commit in our fork: https://github.com/Qfusion/libRocket/commit/c0d15d82128f6e254234adf9e5531042f3d94661

    The downside of our implementation isn't able to handle font effects as it doesn't export rendered glyphs to libRocket.

    enhancement 
    opened by viciious 27
  • Rename project, libMissile?

    Rename project, libMissile?

    As suggested by @barroto in #2, this fork of libRocket is now quite distinct from the original project. A rename of this work then seems natural.

    Some things that me may consider with this change:

    • Update the original documentation with the new changes
    • Rename the namespace from Rocket to.. Missile?
    • A new logo?
    • Updated templates?

    What do you think? These are just ideas I'm throwing out there, any ideas you may have are very welcome.

    I'm not sure how the original documentation was built, but you seem able to assist here, @barroto?

    opened by mikke89 21
  • ElementDocument::FocusFirstTabElement

    ElementDocument::FocusFirstTabElement

    bool FocusFirstTabElement(void) { return FocusNextTabElement(this, true); }
    

    We use this function to focus on the first "tabbable" element when the document is displayed for the first time, if possible. Make sense for modal dialogs, input forms and such.

    Please consider adding this function to the public API or maybe, as an alternative, a new Focus flag with similar functionality.

    enhancement 
    opened by viciious 20
  • Remove all manual reference counting

    Remove all manual reference counting

    And replace them with unique_ptr, or shared_ptr where strictly necessary. E.g. elements should uniquely own their children. Replace AddChild with CreateChild so users don't have to move them on every element creation.

    All use of raw pointers should then denote a non-owning pointer.

    enhancement 
    opened by mikke89 20
  • Pack assets directory to binnary resource

    Pack assets directory to binnary resource

    Is it possible to pack assets directory to binnary resource?

    What Sciter(https://sciter.com/) did:

    Run commond packfolder.exe ui resources.cpp -v "resources" and then generate code like this:

    const unsigned char resources[] = {
    0x53,0x41,0x72,0x00,0x43,0x00,0xff,0xff,0x03,0x00,0xff,0xff,0x6e,0x00,0xff,0xff,0x04,0x00,0xff,0xff,0x66,
    //...
    

    What Electron(https://github.com/electron/electron) and yue(https://github.com/yue/yue) did:

    Pack assets directory to a zip(like) file without compression but support random access. See:https://github.com/electron/asar

    discussion 
    opened by xland 16
  • Add ability for user to override container types

    Add ability for user to override container types

    This is an implementation of my ideas raised in #107. Please review and comment.

    It was nice to find out that lua integration did not require any changes whatsoever. Yay!

    Few unrelated observations:

    • Project should adopt .editorconfig. I had to restore bunch of trailing spaces to avoid extra noise in commits. Editor was eager to get rid of them. This would also configure editors to use tabs.
    • Project should adopt .gitattributes and normalize line endings. Most files use \n while some use \r\n. This puts us in a position where one line change may flag entire file as changed only because editor changed line endings.
    • Changes to CMakeLists.txt are not proper, but then again entire build script is in a state where it just can not be fixed, but should be rewritten instead. I might do it in the future (no promises).
    enhancement 
    opened by rokups 16
  • Media queries

    Media queries

    This is a big one.

    This PR adds support for basic media queries in RCSS.

    Usage & Features

    • RCSS media-blocks to apply properties conditional to context properties:
      • viewport width & height given in pixels, supports range (min-/max-)
      • resolution, aka dpi (using the density_independent_pixel_ratio value), supports range (min-/max-)
      • aspect ratio, using ratio notation like 16/9, internally using it as a float, supports range (min-/max-)
      • orientation "landscape" / "portrait", comparing viewport width against height
    • Creating composite queries using "and" operator

    Example usage:

    div {
    	height: 48px;
    	width: 48px;
    }
    
    @media (min-width: 640px) {
    	div {
    		height: 32px;
    		width: 32px;
    	}
    }
    
    @media (orientation: landscape) and (min-resolution: 90dpi) {
    	div {
    		height: 32px;
    		width: 32px;
    	}
    }
    
    @media (max-aspect-ratio: 4/3) {
    	div {
    		height: 64px;
    		width: 64px;
    	}
    }
    

    I've tried to adhere as closely as possible to the early CSS media query standards, by for instance inforcing fixed units like dpi for resolution, and pixels for width & height and reusing the CSS names for the various properties. The CSS feature of media distinction like "screen" etc. does not really apply in RCSS, therefore it was omitted. The current approach matches media blocks with an all or nothing approach, since only conjunctive chaining ("and") is allowed.

    Internals

    In order to assemble the correct style sheet for a given context configuration, a new top-level class above StyleSheet was introduced: the StyleSheetContainer. It maps a PropertyDictionary of the query-list properties to the contained sub-stylesheet.

    A function UpdateMediaFeatures creates a new combined StyleSheet and stores it inside the container, giving external access through a non-owning pointer.

    For parsing, new parsers needed to be introduced, namely for the aspect ratio notation, and others for the unit enforcing.

    The style sheet parser received a new parsing method with its own state machine parsing the custom syntax of the media query list

    The document re-compiles the stylesheet when it detects a context property change.

    A unit test suite checking all properties is provided.

    enhancement 
    opened by Dakror 15
  • GetOwnerDocument returns null in InstanceEventListener

    GetOwnerDocument returns null in InstanceEventListener

    I want to know which document it comes from when the event listener is initialized. But at this time the element has not been added to the document, so GetOwnerDocument returns null. I noticed that InstanceElement has a parameter, Element parent. Does this mean that the element already has an owner?

    opened by actboy168 15
  • font-charset

    font-charset

    The font interface libRocket as a whole relies on "font-charset". If this applies to RmlUi is there a possibility of removing font-charset workaround in order to simply generate glyphs as needed or at least let me use my own better font renderer.

    I mostly say this as I want to use emoji and russian and many other languages (depending on user choice).

    https://mikke89.github.io/RmlUiDoc/pages/localisation.html

    enhancement 
    opened by jack9267 15
  • HTML unicode escaping sequences

    HTML unicode escaping sequences

    Like discussed in #399 , implementing HTML unicode unescaping seems more sensible right now than CSS-based.

    This PR implements both decimal and hex decoding of html entities.

    opened by Dakror 0
  • Transform matrix not changing for TranslateZ

    Transform matrix not changing for TranslateZ

    I am trying to add support for transforms, and during testing it doesn't look like the transform matrix is changing then I use the "transform: translateZ(dp);" property.

    I have the perspective setup on the parent element, and am trying to set the translateZ to different values, however the resulting transform matrix is always the same. Here are 4 results from setting translateZ to 0dp, 50dp, 100dp and 150dp (with perspective set to 500dp).

    {{ {M11:1 M12:0 M13:0 M14:0} {M21:0 M22:1 M23:0 M24:0} {M31:-1.6 M32:-0.9 M33:1 M34:-0.002} {M41:0 M42:0 M43:0 M44:1} }}

    {{ {M11:1 M12:0 M13:0 M14:0} {M21:0 M22:1 M23:0 M24:0} {M31:-1.6 M32:-0.9 M33:1 M34:-0.002} {M41:0 M42:0 M43:0 M44:1} }}

    {{ {M11:1 M12:0 M13:0 M14:0} {M21:0 M22:1 M23:0 M24:0} {M31:-1.6 M32:-0.9 M33:1 M34:-0.002} {M41:0 M42:0 M43:0 M44:1} }}

    {{ {M11:1 M12:0 M13:0 M14:0} {M21:0 M22:1 M23:0 M24:0} {M31:-1.6 M32:-0.9 M33:1 M34:-0.002} {M41:0 M42:0 M43:0 M44:1} }}

    Any ideas as to why it's not changing? I don't see any Rml errors being generated.

    support 
    opened by YTN0 8
  • misc cmake update

    misc cmake update

    this pr makes some changes:

    • add RMLUI_FREETYPE_EXTERNAL option
    • add RMLUI_RLOTTIE_EXTERNAL option
    • enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS and CMAKE_POSITION_INDEPENDENT_CODE

    RMLUI_FREETYPE_EXTERNAL makes rmlui use existed freetype target. such as:

    add_subdirectory(freetype)
    add_subdirectory(rlottie)
    set(RMLUI_FREETYPE_EXTERNAL ON CACHE BOOL "use existed freetype target")
    set(RMLUI_RLOTTIE_EXTERNALON ON CACHE BOOL "use existed rlottie target")
    add_subdirectory(RmlUi)
    

    the reason use freetype_interface instead of freetype is freetype has not set -fpie, so it make a link error.

    build 
    opened by cathaysia 5
  • RMLUI_ASSERT(open_inline_box == inline_box) error

    RMLUI_ASSERT(open_inline_box == inline_box) error

    hi, i found one assert error. you can easily reproduce this error by the code below: <div style="display:inline;"> <div style="display:inline;"> <div style="display:block;"></div> </div> <div style="display:inline;"> <div style="display:block;"></div> </div> </div> when you run this code, you will get error below: RMLUI_ASSERT(open_inline_box == inline_box) in LayoutLineBox.cpp:187 can anyone sovle this?

    layout 
    opened by ghexian 1
  • [Lua] Cannot access Element methods using ElementPtr values returned by CreateElement() and other functions

    [Lua] Cannot access Element methods using ElementPtr values returned by CreateElement() and other functions

    I'm creating UI for my game using RmlUi and Lua and I stumbled upon this issue: Document::CreateElement() returns ElementPtr, which I cannot use to fine tune the newly created element. More specifically, I populate <select> element from Lua code. Lua code parses some files and I need to put some set of values into pre-existing <select> element.

    There are many ways to overcome this limitation: for example, I've jerry-rigged a "get" attribute on the ElementPtr class and thus I can access the Element methods and properties.

    Other approach could be as such: Document::CreateElement() creates an element and returns ElementPtr , and Element::AppendChild() accepts ElementPtr, does its job and returns Element value. So I can use it like this:

    option = self.document:CreateElement("option");
    option = dropdown:AppendChild(option);
    option.value = "MyValue";
    option.inner_rml = "My Value Text";
    

    In my game I'm using Lua as the tool to program all the UI-related tasks, so I'm interested in improving quality of the Lua binding. Despite that I could quickly add the missing functionality and fulfill my needs, I'm also interested in contributing to upstream branch. So there's the question: does any of the described approaches look good for you? Maybe you could suggest another approach to solve the issue?

    Lua 
    opened by shubin 3
  • CSS Variables

    CSS Variables

    This PR aims to add CSS3 Variables to RCSS.

    • [x] Parse definitions
    • [x] Parse properties
    • [x] Store values cascadingly
    • [x] Resolve values
    • [x] Resolve recursive values
    • [x] Resolve shorthands
    • [x] Set Variables at document level
    • [x] Set Variables via data model
    • [x] Propagate dirty variables
    • [x] Extensive testing
    • [x] Variable resolution error reporting
    • [x] Handle variables inside more complex expressions like rgba(var(--bg-var, #000000), 0.5)
    • [x] Benchmarking
    • [x] Handle dependency cycles
    • [x] Improve performance
    enhancement 
    opened by Dakror 11
Releases(5.0)
  • 5.0(Dec 11, 2022)

    The release of RmlUi 5.0 brings several larger changes to the library. The main one being the backends concept, which will help integration for new users in particular, and ease the development for additional renderers and platforms. We have already added several new ones, such as a more modern OpenGL renderer, a Vulkan renderer, and the GLFW windowing library.

    There should also be plenty of features and important fixes for both new and existing users to enjoy with this release. Some big ones include support for sibling (+ and ~) and attribute ([foo]) selectors in RCSS, a large overhaul of the text input widget, and ensuring that the hover state of elements is always updated even without any mouse movement.

    I want to thank all the contributors for their pull requests, which help make this library better for everyone. We also have a number of new contributors, which is very nice to see. A special thanks goes to @barotto, @hobyst, and @shubin for helping to write the documentation, with pull requests on the documentation repository. I also got a lot of feedback from several users regarding the backends concept, in particular a detailed one from @jbatnozic, thank you to everyone!

    The documentation has been updated to reflect all the new changes. I've also been working for some time now to improve the documentation navigation, in particular with a search function. I'm interested to hear feedback on how well this works.

    With this release comes a refreshed logo as well! I hope you like it.

    RmlUi logo

    Changelog

    Backends

    RmlUi 5.0 introduces the backends concept. This is a complete refactoring of the old sample shell, replacing most of it with a multitude of backends. A backend is a combination of a renderer and a platform, and a light interface tying them together. The shell is now only used for common functions specific to the included samples.

    This change is beneficial in several aspects:

    • Makes it easier to integrate RmlUi, as users can directly use the renderer and platform suited for their setup.
    • Makes it a lot easier to add new backends and maintain existing ones.
    • Allows all the samples to run on any backend by choosing the desired backend during CMake configuration.

    All samples and tests have been updated to work with the backends interface, which is a very light abstraction over all the different backends.

    The following renderers and platforms are included:

    • A new OpenGL 3 renderer. #261
      • Including Emscripten support so RmlUi even runs in web browsers now.
    • A new Vulkan renderer. #236 #328 #360 #385 (thanks @wh1t3lord)
    • A new GLFW platform.
    • The OpenGL 2 and SDL native renderers ported from the old samples.
    • The Win32, X11, SFML, and SDL platforms ported from the old samples.

    The old macOS shell has been removed as it used a legacy API that is no longer working on modern Apple devices. Now the samples build again on macOS using one of the windowing libraries such as GLFW or SDL.

    See the Backends section in the readme for all the combinations of renderers and platforms, and more details. The backend used for running the samples can be selected by setting the CMake option SAMPLES_BACKEND to any of the supported backends.

    RCSS selectors

    • Implemented the next-sibling + and subsequent-sibling ~ combinators.
    • Implemented attribute selectors [foo], [foo=bar], [foo~=bar], [foo|=bar], [foo^=bar], [foo$=bar], [foo*=bar]. #240 (thanks @aquawicket)
    • Implemented the negation pseudo class :not(), including support for selector lists E:not(s1, s2, ...).
    • Refactored structural pseudo classes for improved performance.
    • Selectors will no longer match any text elements, like in CSS.
    • Selectors now correctly consider all paths toward the root, not just the first greedy path.
    • Structural selectors are no longer affected by the element's display property, like in CSS.

    RCSS properties

    • max-width and max-height properties now support the none keyword.

    Text editing

    The <textarea> and <input type="text"> elements have been improved in several aspects.

    • Improved cursor navigation between words (Ctrl + Left/Right).
    • Selection is now expanded to highlight selected newlines.
    • When word-wrap is enabled, words can now be broken to avoid overflow.
    • Fixed several issues where the text cursor would be offset from the text editing operations. In particular after word wrapping, or when suppressed characters were present in the text field's value. #313
    • Fixed an issue where Windows newline endings (\r\n) would produce an excessive space character.
    • Fixed operation of page up/down numpad keys being swapped.
    • The input method editor (IME) is now positioned at the caret during text editing on the Windows backend. #303 #305 (thanks @xland)
    • Fix slow input handling especially with CJK input on the Win32 backend. #311
    • Improve performance on document load and during text editing.

    Elements

    • Extend the functionality of Element::ScrollIntoView. #353 (thanks @eugeneko)
    • <img> element: Fix wrong dp-scaling being applied when an image is cloned through a parent element. #310
    • <handle> element: Fix move targets changing size when placed using the top/right/bottom/left properties.

    Data binding

    • Transform functions can now be called using C-like calling conventions, in addition to the previous pipe-syntax. Thus, the data expression 3.625 | format(2) can now be identically expressed as format(3.625, 2).
    • Handle null pointers when trying to access data variables. #377 (thanks @Dakror)
    • Enable registering a custom data variable definition. #367 (thanks @Dakror)

    Context input

    • The hover state of any elements under the mouse will now automatically be updated during Context::Update(). #220
    • Added Context::ProcessMouseLeave() which ensures that the hovered state is removed from all elements and stops the context update from automatically hovering elements.
    • When Context::ProcessMouseMove() is called next the context update will start updating hover states again.
    • Added support for mouse leave events on all backends.

    Layout improvements

    • Scroll and slider elements now use containing block's height instead of width to calculate height-relative values. #314 #321 (thanks @nimble0)
    • Generate warnings when directly nesting flexboxes and other unsupported elements in a top-level formatting context. #320
    • In some situations, changing the top/right/bottom/left properties may affect the element's size. These situations are now correctly handled so that the layout is updated when needed.

    Lua plugin

    • Add QuerySelector and QuerySelectorAll to the Lua Element API. #329 (thanks @Dakror)
    • Add input-related methods and dp_ratio to the Lua Context API. #381 #386 (thanks @shubin)
    • Lua objects representing C++ pointers now compare equal if they point to the same object. #330 (thanks @Dakror)
    • Add length to proxy for element children. #315 (thanks @nimble0)
    • Fix a crash in the Lua plugin during garbage collection. #340 (thanks @slipher)

    Debugger plugin

    • Show a more descriptive name for children in the element info window.
    • Fixed a crash when the debugger plugin was shutdown manually. #322 #323 (thanks @LoneBoco)

    SVG plugin

    • Update texture when the src attribute changes. #361

    General improvements

    • Small performance improvement when generating font effects.
    • Allow empty values in decorators and font-effects.
    • RCSS located within document <style> tags can now take comments containing xml tags. #341
    • Improve in-source function documentation. #334 (thanks @hobyst)
    • Invader sample: Rename event listener and instancer for clarity.

    General fixes

    • Font textures are no longer being regenerated when encountering new ascii characters, fixes a recent regression.
    • Logging a message without an installed system interface will now be written to cout instead of crashing the application.
    • Fix several static analyzer warnings and one possible case of undefined behavior.
    • SDL renderer: Fix images with no alpha channel not rendering. #239

    Build fixes

    • Fix compilation on Emscripten CI. #335 (thanks @hobyst)
    • Fix compilation with EASTL. #350 (thanks @eugeneko)

    Breaking changes

    • Changed the signature of the keyboard activation in the system interface, it now passes the caret position and line height: SystemInterface::ActivateKeyboard(Rml::Vector2f caret_position, float line_height).
    • Mouse and hover behavior may change in some situations as a result of the hover state automatically being updated on Context::Update(), even if the mouse is not moved. See above changes to context input.
    • Removed the boolean result returned from Rml::Debugger::Shutdown().
    • RCSS selectors will no longer match text elements.
    • RCSS structural pseudo selectors are no longer affected by the element's display property.
    • Data binding: The signature of transform functions has been changed from Variant& first_argument_and_result, const VariantList& other_arguments -> bool success to const VariantList& arguments -> Variant result.

    New Contributors

    • @LoneBoco made their first contribution in https://github.com/mikke89/RmlUi/pull/323
    • @hobyst made their first contribution in https://github.com/mikke89/RmlUi/pull/335
    • @slipher made their first contribution in https://github.com/mikke89/RmlUi/pull/340
    • @eugeneko made their first contribution in https://github.com/mikke89/RmlUi/pull/350
    • @shubin made their first contribution in https://github.com/mikke89/RmlUi/pull/381

    Full Changelog: https://github.com/mikke89/RmlUi/compare/4.4...5.0

    Source code(tar.gz)
    Source code(zip)
    RmlUi-vs2017-win32.zip(26.43 MB)
    RmlUi-vs2017-win64.zip(31.45 MB)
    RmlUi-win64-samples-only.zip(2.98 MB)
  • 4.4(May 13, 2022)

    Summer is approaching and I figured it's time for a new release! There are several improvements throughout the library, most notably to the font engine. You might also see some performance improvements when loading or interacting with a document, especially if you use a lot of RCSS style rules with class names. These are now just as fast to lookup as IDs and tags.

    Much of this work has been done through contributions from users, and I'd like to thank all of you! In particular I've noticed that there are several new contributors this release, welcome and keep up the good work!

    Fonts

    • Support for color emojis 🎉. #267
    • Support for loading fonts with multiple included font weights. #296 (thanks @MexUK)
    • The font-weight property now supports numeric values. #296 (thanks @MexUK)
    • The opacity property is now also applied to font effects. #270

    Performance and resource management

    • Substantial performance improvement when looking up style rules with class names. Fixes some cases of low performance, see #293.
    • Reduced memory usage, more than halved the size of ComputedValues.
    • Added Rml::ReleaseFontResources to release unused font textures, cached glyph data, and related resources.
    • Release memory pools on Rml::Shutdown, or manually through the core API. #263 #265 (thanks @jack9267)

    Layout

    • Fix offsets of relatively positioned elements with percentage positioning. #262
    • select element: Fix clipping on select box.

    Data binding

    • Add DataModelHandle::DirtyAllVariables() to mark all variables in the data model as dirty. #289 (thanks @EhWhoAmI)

    Cloning

    • Fix classes not always copied over to a cloned element. #264
    • Drag clones are now positioned correctly when their ancestors use transforms. #269
    • Drag clones no longer inherit backgrounds and decoration from the cloned element's document body.

    Samples and plugins

    • New sample for integration with SDL2's native renderer. #252 (thanks @1bsyl)
    • Add width and height attributes to the <svg> element. #283 (thanks @EhWhoAmI)

    Build improvements

    • CMake: Mark RmlCore dependencies as private. #274 (thanks @jonesmz)
    • CMake: Allow lunasvg library be found when located in builtin tree. #282 (thanks @EhWhoAmI)

    Breaking changes

    • FontEngineInterface::GenerateString now takes an additional argument, opacity.
    • Computed values are now retrieved by function calls instead of member objects.

    Path to RmlUi 5.0

    There are some exciting developments toward RmlUi 5.0 happening already, please see the RmlUi 5.0 development and feedback post for more details. I'd love to hear your feedback. I intend to start merging these changes to master soon. There might be some breaking changes coming up but I don't expect anything major. Of course I'll keep documenting any breaking changes.


    Screenshots

    color_emojis

    font-weights

    Source code(tar.gz)
    Source code(zip)
    RmlUi-vs2017-win32.zip(26.08 MB)
    RmlUi-vs2017-win64.zip(31.04 MB)
    RmlUi-win64-samples-only.zip(2.97 MB)
  • 4.3(Dec 11, 2021)

    Time for a new release now that we are approaching the end of the year. This release comes with a widely requested feature, flexbox support! This feature has been in the works for a few months now, hope it comes handy when designing your layouts. In addition, we have many smaller improvements and bug fixes for some quality-of-life enhancements.

    Again we have several contributions from the community helping out with pull requests. Special thanks to all of you, and keep up the good work!

    Flexbox layout

    Support for flexible box layout. #182 #257

    display: flex;
    

    See usage examples, differences from CSS, performance tips, and all the details in the flexbox documentation.

    Flexbox

    Elements

    • select element:
      • Emit change event even when the value of the newly selected option is the same.
      • Do not wrap around when using up/down keys on options.
      • Fix unintentional clipping of the scrollbar.
    • tabset element: Fix index parameter having no effect in ElementTabSet::SetPanel and ElementTabSet::SetTab. #237 #246 (thanks @nimble0)

    RCSS

    • Add (non-standard) property value clip: always to force clipping to the element, see clip documentation. #235 #251 (thanks @MatthiasJFM)
    • Escape character changed from forward slash to backslash \ to align with CSS.

    Layout improvements

    • See flexbox layout support above.
    • Fix an issue where some elements could end up rendered at the wrong offset after scrolling. #230
    • Improve behavior for collapsing negative vertical margins.
    • Pixel rounding improvements to the clip region.
    • Performance improvement: Avoid unnecesssary extra layouting step in some situations when scrollbars are added.

    Samples

    • Add clipboard support to X11 samples. #231 (thanks @barotto)
    • Windows shell: Fix OpenGL error on startup.

    Tests

    • Visual tests suite: Add ability to overlay the previous reference capture of the test using the shortcut Ctrl+Q.
    • Add support for CSS flexbox tests to the CSS tests converter.

    Lua plugin

    • Make Lua plugin API consistently one-indexed instead of zero-indexed. #237 #247 (thanks @nimble0)
    • Fix crash due to double delete in the Lua plugin. #216

    Dependencies

    • Update LunaSVG plugin for compatibility with v2.3.0. #232
    • Warn when using FreeType 2.11.0 with the MSVC compiler, as this version introduced an issue leading to crashes.

    Build improvements

    • Fix log message format string when compiling in debug mode. #234 (thanks @barotto)
    • Avoid enum name collisions with Windows header macros. #258

    Breaking changes

    • The clip property is now non-inherited. Users may need to update their RCSS selectors to achieve the same clipping behavior as previously when using this property.
    • Minor changes to the clipping behavior when explicitly using the clip property, may lead to different results in some circumstances.
    • RCSS escape character is now \ instead of /.
    • Lua plugin: Some scripts may need to be changed from using zero-based indexing to one-indexing.
    Source code(tar.gz)
    Source code(zip)
    RmlUi-vs2017-win32.zip(25.85 MB)
    RmlUi-vs2017-win64.zip(30.78 MB)
    RmlUi-win64-samples-only.zip(2.97 MB)
  • 4.2(Aug 23, 2021)

    It's time for a new release! This time we have collected a sizable amount of smaller quality-of-life improvements and several bugfixes. As always, thanks a lot to all the contributors to the project! This one contains quite a lot of PRs from many different users, and that makes me happy.

    Improvements

    • Add Rml::Debugger::Shutdown. This allows the debugger to be restarted on another host context. #200 #201 (thanks @Lyatus)
    • Improve color blending and animations. #203 #208 (thanks @jac8888)
    • Improve error messages on missing font face.
    • Export Rml::Assert() in release mode. #209 (thanks @kinbei)
    • Add .clang-format. #223

    Elements

    • Fix a crash in some situations where the input.range element could result in infinite recursion. #202
    • The input.text element will no longer copy to clipboard when the selection is empty.
    • Checkboxes (input.checkbox) no longer require a value attribute to properly function. #214 (thanks @ZombieRaccoon)
    • Fix handle element resizing incorrectly when the size target has box-sizing: border-box. #215 (thanks @nimble0)
    • Improve warnings when using unsupported positioning and floating modes on tables. #221

    Samples

    • Fix shortcut keys on X11 and macOS. #210.
    • Fix full reloading shortcut (Ctrl+R) in visual tests suite.

    Other fixes

    • Fix minor layout issue in inline-blocks. #199 (thanks @svenvvv)
    • Fix an issue in data bindings where text expressions initialized with an empty string would not be evaluated correctly. #213
    • Fix an issue in the FreeType font engine where .woff files would cause a crash on shutdown. #217
    • Fix inline styles not always being applied on a cloned element. #218
    • Fix render interface destructor calling virtual functions in some circumstances. #222

    Breaking changes

    • Removed built-in conversion functions between UTF-8 and UTF-16 character encodings.
    • Slightly modified the lifetime requirements for the render interface for special use cases, see requirements here. Will warn in debug mode on wrong use. #222

    Special thanks to @ZombieRaccoon for creating a Conan recipe for RmlUi and keeping it up to date on ConanCenter. RmlUi has also been added to vcpkg as of RmlUi 4.1. These dependency managers should make it a lot more convenient to consume RmlUi in your projects, more details can be found in the documentation.

    The documentation has also been updated with a search feature. Hopefully this will help you find the things you are looking for, let me know if there are any issues. I would also like to give a gentle reminder that documentation pull requests are very much welcome. There's a handy "edit" button on pages so you can edit and submit a PR directly on GitHub, don't be afraid to use it for even the smallest things, thanks!

    A special thanks goes to @barotto and @ZombieRaccoon for general improvements to the documentation.

    Source code(tar.gz)
    Source code(zip)
    RmlUi-vs2017-win32.zip(25.59 MB)
    RmlUi-vs2017-win64.zip(30.50 MB)
    RmlUi-win64-samples-only.zip(2.94 MB)
  • 4.1(Jun 19, 2021)

    RmlUi 4.1 is a maintenance release with the following changes.

    • Several CMake fixes so that clients can more easily find and import RmlUi.
    • Curly brackets can now be used inside string literals in data expressions. #190 (thanks @Dakror).
    • Inline events are now attached and detached when on.. attributes change. #189 (thanks @ZombieRaccoon).

    Thanks for the contributions!

    Read the full changelog here.

    Source code(tar.gz)
    Source code(zip)
    RmlUi-vs2017-win32.zip(25.58 MB)
    RmlUi-vs2017-win64.zip(30.47 MB)
    RmlUi-win64-samples-only.zip(2.93 MB)
  • 4.0(May 9, 2021)

    RmlUi 4.0 comes densely packed with several highly requested and impactful new features, as well as many bug fixes.

    Notable new features

    • Data binding using a model-view-controller (MVC) approach. A built-in feature for synchronizing the user interface with the application data.
    • New RCSS properties: border-radius, word-break, box-sizing, caret-color.
    • RCSS table support.
    • Media queries support.
    • Improved high DPI support with resolution media feature and sprite sheet target scaling.
      • Samples now implement responsive high DPI support on Windows 10.
    • New elements: <label>, <svg> (with plugin), <lottie> (with plugin).
    • Added Element::QuerySelector, Element::QuerySelectorAll, and Element::Closest.
    • Added ElementDocument::ReloadStyleSheet to reload styles without affecting the document tree.
    • Several layout improvements including better overflow clipping and shrink-to-fit widths.
    • Many improvements to the Lua plugin, as well as detailed documentation.

    Read the full changelog here, the above is just a small selection of changes.

    The new features have also been thoroughly documented, so make sure to read the official documentation for details. RmlUi has been restructured to simplify its usage, resulting in larger breaking changes. Users upgrading from RmlUi 3.x are encouraged to read the upgrade guide.

    Finally, it has been fun to see the community grow over the last year, and I'm very happy that you are all helpful and welcoming to members both new and old. It has been a delight to see the uptake in contributions from users. Thank you for all the contributions and let's keep it going!

    Windows binaries built using Visual Studio 15 2017.

    Source code(tar.gz)
    Source code(zip)
    RmlUi-vs2017-win32.zip(25.47 MB)
    RmlUi-vs2017-win64.zip(30.34 MB)
    RmlUi-win64-samples-only.zip(2.93 MB)
  • 3.3(Jun 28, 2020)

    RmlUi 3.3 fixes several bugs and adds some quality-of-life improvements.

    Feature updates

    • Element select improvements.
      • Scrolling in the selection box will now always prevent scrolling in the parent window. Scrolling the window will close the selection box.
      • The selection box will now limit its height to the available space within the context's window dimensions, and position itself either below or above the select element as appropriate.

    Other notable improvements

    • The style attribute no longer requires a semi-colon ; after the final property.
    • Improved compilation times.
      • Cleaned up header files and #includes to only include what they use.
      • Support for precompiled header files with CMake.
    • Now builds cleanly with a higher level of warning flags.
    • RmlUi is now C++20 compatible (C++14 is still the minimum requirement).

    In addition, several bugs have been fixed. See the full changelog for details.

    Read the full changelog here.

    Windows binaries built using Visual Studio 15 2017.

    Source code(tar.gz)
    Source code(zip)
    RmlUi-win32.zip(22.04 MB)
    RmlUi-win64-samples-only.zip(2.23 MB)
    RmlUi-win64.zip(26.05 MB)
  • 3.2(Feb 1, 2020)

  • 3.1(Dec 10, 2019)

  • 3.0(Nov 27, 2019)

    RmlUi 3.0 is the biggest change yet, featuring a substantial amount of new features and bug fixes. One of the main efforts in RmlUi 3.0 has been on improving the performance of the library. Users should see a noticable performance increase when upgrading.

    Notable new features

    • Major performance improvements, up to 25x performance increase in some situations.
    • New and improved decorators.
    • Sprite sheet support.
    • Replaced manual reference counting with smart pointers.
    • Improved transforms API and implementation.
    • Improved debugger
    • Major overhaul of the font engine.
      • Fully replacable by users.
      • All strings should now be considered as encoded in UTF-8, the old UCS-2 strings are gone.
      • Unicode characters are loaded on demand, no longer a need to define a character set.
      • Emoji support (monochrome glyphs).

    Read the full changelog here.

    Note that this release contains breaking changes. C++14-compatible compiler required. Windows binaries built using Visual Studio 15 2017.

    Source code(tar.gz)
    Source code(zip)
    RmlUi-win32.zip(22.38 MB)
    RmlUi-win64-samples-only.zip(2.20 MB)
    RmlUi-win64.zip(26.28 MB)
  • 2.0(Nov 27, 2019)

DeskGap is a framework for building cross-platform desktop apps with web technologies (JavaScript, HTML and CSS).

A cross-platform desktop app framework based on Node.js and the system webview

Wang, Chi 1.8k Jan 4, 2023
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

Electron 105.2k Jan 3, 2023
A small C library for building user interfaces with C, XML and CSS

LCUI A small C library for building user interfaces with C, XML and CSS. Table of contents Table of contents Introduction Features Screenshots Related

Liu 3.9k Dec 27, 2022
Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. 🚀

NodeGui Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. ?? NodeGUI is powered by Qt5 ?? which make

NodeGui 8.1k Dec 30, 2022
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.

Georgi Gerganov 2.1k Jan 1, 2023
GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features.

GacUI GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features. Read the LICENSE first

Vczh Libraries 2.1k Jan 7, 2023
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

omar 44.5k Jan 7, 2023
ROS_Melodic_Qt_GUI_Template is a Graphical User Interface programmed with Qt framework.

This is a GUI template for ros to control your robot and read data from sensors.

null 28 Nov 15, 2022
AnUI is a powerful Graphical User Interface framework made for people that actually care about design!

What's AuUI ** Project is not finished ** AuUI, an abbreviation for "Actual Understandable User Interface" is a graphical user interface framework to

Goat 4 Jun 17, 2022
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.

Micha Mettke 13.5k Jan 8, 2023
Library for writing text-based user interfaces

Termbox for RT-Thread 中文说明文档 This repository forks from nullgemm/termbox_next Getting started Termbox's interface only consists of 12 functions: tb_in

Meco Jianting Man 5 May 25, 2022
A simple/fast stacking box layout library. It's useful for calculating layouts for things like 2D user interfaces.

A simple/fast stacking box layout library. It's useful for calculating layouts for things like 2D user interfaces. It compiles as C99 or C++. It's tested with gcc (mingw64), VS2015, and clang/LLVM. You only need one file to use it in your own project: layout.h.

Andrew Richards 713 Dec 28, 2022
Fast UI Draw is a library that provides a higher performance Canvas interface.

Fast UI Draw is a library that provides a higher performance Canvas interface. It is designed so that it always draws using a GPU.

Intel Corporation 595 Dec 9, 2022
AirPods desktop user experience enhancement program

AirPodsDesktop AirPods desktop user experience enhancement program

Sprite 381 Jan 5, 2023
Arcan is a powerful development framework for creating virtually anything from user interfaces

Arcan is a powerful development framework for creating virtually anything from user interfaces for specialized embedded applications all the way to full-blown standalone desktop environments.

Bjorn Stahl 1.3k Dec 26, 2022
GTK is a multi-platform toolkit for creating graphical user interfaces.

GTK — The GTK toolkit General information GTK is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets,

GNOME Github Mirror 1.1k Dec 31, 2022
LicenseValidationDialog is a class designed to validate license keys on the user's side.

QT-LicenseValidationDialog Basic LicenseValidationDialog is a class designed to validate license keys on the user's side. The class is designed to ver

Piotr Napierała 1 Jun 10, 2022
Elements C++ GUI library

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

Cycfi Research 2.5k Dec 30, 2022
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

Pietro Gagliardi 10.4k Jan 2, 2023