mcpp index

huxerui.huxerui

import

HuxerUI — declarative cross-platform UI framework in C++20 (GTK4 on Linux, Win32/Direct2D, AppKit/Metal)

import huxerui;

Module name read from the upstream `export module` declaration in modules/huxerui.cppm.

mcpp add huxerui.huxerui@0.5.5

Usage

From this repository's own test project — built and run by CI, not written for the website.

// HuxerUI is a GUI framework, and this test opens no window: a CI runner has
// no display, and the point here is that the PACKAGE resolves, builds and
// links, not that GTK can paint.
//
// The last assertion is the one that carries that weight. Rect/Color are
// header-attached entities that `import huxerui;` re-exports, so on their own
// they would still compile if libhuxerui had never been built.
// FlatLightThemeSpec/FlatDarkThemeSpec are out-of-line definitions living in
// the library itself, so reaching them is what proves the link.
import std;
import huxerui;

using huxerui::Color;
using huxerui::Point;
using huxerui::Rect;

int main() {
    const Rect bounds{10.0F, 20.0F, 100.0F, 50.0F};
    const bool inside  = bounds.Contains(Point{60.0F, 40.0F});
    const bool outside = !bounds.Contains(Point{5.0F, 40.0F});

    // Rgba32 decodes 0xRRGGBBAA, so this is opaque orange.
// …

tests/examples/huxerui-module/tests/runtime.cpp · project tests/examples/huxerui-module

Build · upstream manifest

modules
huxerui
targets
huxerui (lib)
language
c++23
manifest version
0.5.5
source
https://raw.githubusercontent.com/HuxerUI/HuxerUI/v0.5.5/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
0.5.5 latest LinuxWindowsmacOS GLOBAL CN a968ab1756dc…
0.4.0 LinuxWindowsmacOS source 46631651105b…
0.3.0 LinuxWindowsmacOS GLOBAL CN 8b326d95015e…