huxerui.huxerui
importHuxerUI — declarative cross-platform UI framework in C++20 (GTK4 on Linux, Win32/Direct2D, AppKit/Metal)
import huxerui;
模組名讀自上游 modules/huxerui.cppm 裡的 `export module` 宣告。
mcpp add huxerui.huxerui@0.5.5
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// 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 · 專案 tests/examples/huxerui-module
建置 · 上游資訊清單
- modules
huxerui- targets
huxerui (lib)- language
c++23- manifest version
0.5.5- 來源
https://raw.githubusercontent.com/HuxerUI/HuxerUI/v0.5.5/mcpp.toml