{"id":17672143,"url":"https://github.com/brisklib/brisk","last_synced_at":"2025-04-15T19:42:50.266Z","repository":{"id":258191516,"uuid":"872660747","full_name":"brisklib/brisk","owner":"brisklib","description":"Cross-platform C++20 GUI framework featuring MVVM architecture, reactive capabilities, and scalable, accelerated GPU rendering.","archived":false,"fork":false,"pushed_at":"2025-04-11T20:32:13.000Z","size":32470,"stargazers_count":224,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-11T21:35:32.579Z","etag":null,"topics":["cpp20","cross-platform-gui","gui","hardware-acceleration","modern-cpp","mvvm","mvvm-cpp","reactive","widgets"],"latest_commit_sha":null,"homepage":"https://brisklib.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brisklib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-14T20:46:51.000Z","updated_at":"2025-04-09T16:33:26.000Z","dependencies_parsed_at":"2024-10-26T12:33:51.351Z","dependency_job_id":null,"html_url":"https://github.com/brisklib/brisk","commit_stats":null,"previous_names":["brisklib/brisk"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brisklib%2Fbrisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brisklib%2Fbrisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brisklib%2Fbrisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brisklib%2Fbrisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brisklib","download_url":"https://codeload.github.com/brisklib/brisk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249140862,"owners_count":21219375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp20","cross-platform-gui","gui","hardware-acceleration","modern-cpp","mvvm","mvvm-cpp","reactive","widgets"],"created_at":"2024-10-24T04:07:08.617Z","updated_at":"2025-04-15T19:42:50.257Z","avatar_url":"https://github.com/brisklib.png","language":"C++","readme":"# Brisk\n\n**Brisk** is a modern, cross-platform C++ GUI framework designed to build responsive, high-performance applications with flexibility and ease.\n\nInitially developed for a graphics-intensive proprietary project with a complex and dynamic GUI.\n\n\u003e [!Note]\n\u003e The Brisk library is currently under active development. Breaking changes may occur, and the documentation might not always be up to date. Contributions are always welcome!\n\nRecommended reading:\n\n➡️ [Brisk Design and Feature Overview](docs/docs/about.md) ⬅️\n\n[Documentation on docs.brisklib.com](https://docs.brisklib.com)\n\n![Build](https://img.shields.io/github/actions/workflow/status/brisklib/brisk/test.yml?style=flat-square\u0026label=Build)\n![License](https://img.shields.io/badge/License-GPL2%2FCommercial-blue.svg?style=flat-square)\n\n![C++](https://img.shields.io/badge/C%2B%2B-20-blue.svg?style=flat-square)\n![Clang 16+](https://img.shields.io/badge/Clang-16%2B-green.svg?style=flat-square)\n![GCC 12+](https://img.shields.io/badge/GCC-12%2B-green.svg?style=flat-square)\n![MSVC 2022](https://img.shields.io/badge/MSVC-2022%2B-green.svg?style=flat-square)\n![Xcode 14.3+](https://img.shields.io/badge/Xcode-14.3%2B-green.svg?style=flat-square)\n\n### Key Features 🌟\n\n- **Declarative GUI**: Enables the creation of complex GUIs in C++ using a flexible declarative syntax.\n- **Stateful \u0026 Stateless Widgets**: Supports both modes, with powerful binding for efficient state management.\n- **Stylesheets**: Offers declarative styles to easily modify the application's look and feel.\n- **Hardware-Accelerated Graphics**: Backends include D3D11, D3D12, Vulkan, OpenGL, Metal, and WebGPU.\n- **Color Processing**: Supports various color spaces and linear color blending for physically accurate rendering.\n- **Font support**: OpenType support, advanced shaping for non-European languages, ligatures, rich text formatting, SVG fonts, emojis, and rendering for RTL and bidirectional text.\n- **Modular Architecture**: Core, Graphics, Window, GUI, Network, and Widgets modules for versatile application development.\n\n### Code Example\n\n#### Component example\n\n```c++\nconst NameValueOrderedList\u003cTextAlign\u003e textAlignList{ { \"Start\", TextAlign::Start },\n                                                     { \"Center\", TextAlign::Center },\n                                                     { \"End\", TextAlign::End } };\n\nclass Example : public Component {\npublic:\n    RC\u003cWidget\u003e build() final {\n        // rcnew Widget{...} is equivalent to std::shared_ptr\u003cWidget\u003e(new Widget{...})\n        return rcnew Widget{\n            layout = Layout::Vertical,\n            rcnew Text{\n                \"Switch (widgets/Switch.hpp)\",\n                classes = { \"section-header\" }, // Widgets can be styled using stylesheets\n            },\n\n            rcnew HLayout{\n                rcnew Widget{\n                    rcnew Switch{\n                        // Bind the switch value to the m_toggled variable (bidirectional)\n                        value = Value{ \u0026m_toggled },\n                        rcnew Text{ \"Switch\" },\n                    },\n                },\n                gapColumn = 10_apx, // CSS Flex-like properties\n                rcnew Text{\n                    text = Value{ \u0026m_label }, // Text may be dynamic\n                    visible =\n                        Value{ \u0026m_toggled }, // The Switch widget controls the visibility of this text widget\n                },\n            },\n\n            // Button widget\n            rcnew Button{\n                rcnew Text{ \"Click\" },\n                // Using lifetime() ensures that callbacks will be detached once the Component is deleted\n                onClick = lifetime() |\n                          [this]() {\n                              // Notify bindings about the change\n                              bindings-\u003eassign(m_label) = \"Updated text\";\n                          },\n            },\n\n            // ComboBox widget\n            rcnew ComboBox{\n                Value{ \u0026m_textAlignment },  // Bind ComboBox value to an enumeration\n                notManaged(\u0026textAlignList), // Pass the list of name-value pairs to populate the ComboBox\n            },\n\n            // The Builder creates widgets dynamically whenever needed\n            Builder([this](Widget* target) {\n                for (int i = 0; i \u003c m_number; ++i) {\n                    target-\u003eapply(rcnew Widget{\n                        dimensions = { 40_apx, 40_apx },\n                    });\n                }\n            }),\n            depends = Value{ \u0026m_number }, // Instructs to rebuild this if m_number changes\n        };\n    }\n\nprivate:\n    bool m_toggled            = false;\n    TextAlign m_textAlignment = TextAlign::Start;\n    std::string m_label       = \"OK\";\n    float m_progress          = 0;\n    int m_number              = 0;\n};\n```\n\n### Screenshots\n\n\u003cimg src=\"docs/images/Brisk-screenshot1.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e \u003cimg src=\"docs/images/Brisk-screenshot2.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e \u003cimg src=\"docs/images/Brisk-screenshot3.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e \u003cimg src=\"docs/images/Brisk-screenshot4.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e \u003cimg src=\"docs/images/Brisk-screenshot5.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e \u003cimg src=\"docs/images/Brisk-screenshot6.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e \u003cimg src=\"docs/images/Brisk-screenshot7.png\" width=\"48%\" alt=\"Brisk screenshot\"/\u003e\n\n### Modules\n\n#### **Core**\n   - **Compression \u0026 Basic Cryptography**: Provides data compression and basic cryptographic functions, including hashing algorithms.\n   - **Dynamic Library Loading**: Loads and interacts with `.dll` or `.so` files dynamically.\n   - **String Manipulation**: Handles UTF-8, UTF-16, and UTF-32, with text manipulation utilities.\n   - **Stream I/O**: Input/output operations for handling data streams.\n   - **Localization Support**: Basic localization and internationalization features for multilingual applications.\n   - **Logging**: Built-in logging framework for application diagnostics.\n   - **Reflection**: Supports reflection.\n   - **Serialization**: Serializes/deserializes data to/from JSON.\n   - **App-Global Settings**: Manages global application settings.\n   - **Threading**: Provides task queues for multi-threaded applications.\n   - **Binding**: Supports value binding, capable of handling multi-threaded environments.\n\n#### **Graphics**\n   - **Color \u0026 Colorspaces**: Supports working with colors, including various colorspaces.\n   - **Geometry**: Provides 2D geometry types like `Rect`, `Point`, `Size`, and 2D matrices for transformations.\n   - **Canvas \u0026 Path**: Supports drawing with paths and Bézier curves.\n   - **SVG Rasterization**: Renders SVG images into raster formats.\n   - **Image Processing**: Supports image encoding, decoding, resizing, and manipulation.\n   - **Font Handling**: Manages fonts, including loading, rendering, caching, and text layout. Supports advanced text shaping (using HarfBuzz) and SVG fonts (emojis).\n\n#### **Window**\n   - **Clipboard**: Provides clipboard access for copy/paste functionality.\n   - **OS Dialogs**: Native dialogs for file open/save, folder selection, and message boxes.\n   - **Display Information**: Retrieves and manages display/monitor information from the OS.\n   - **Buffered rendering** : Brisk supports both buffered rendering, which enables partial repaints, and direct rendering to the window backbuffer.\n\n#### **GUI**\n   - **Widgets**: Includes a wide variety of widgets with CSS-style flex layout.\n   - **Style Sheets**: Styles your widgets using a stylesheet system that supports property inheritance.\n   Viewport-relative units are supported (`vh`, `vw`, `vmin`, `vmax)\n   - **Binding Support**: Data-binding between UI elements and application data. Supports transforming values using a function on-the-fly and compound values (e.g., sums of other values).\n   - **Stateful and Stateless Modes**: Choose between stateful widgets for persistent state or stateless widgets for easily rebuilding widget subtrees.\n   - **Drag-and-Drop**: Supports drag-and-drop within the GUI, with the option to attach a C++ object to represent the dragged data.\n\n#### **Widgets**\n   - **Widgets**: Includes buttons, lists, comboboxes, toggle switches, radio buttons, progress bars, sliders, scroll boxes, checkboxes, popup buttons, tabs, tables, spin boxes, dialogs, and more. All public properties are styleable and bindable.\n   - **Layouts**: Supports CSS flexbox-style layouts.\n   - **Text Editors**: Provides text editing widgets with LTR and RTL text support.\n   - **WebGPU**: Ability to render 3D content to the window using the WebGPU API (backed by Google's Dawn), with full support for composition with the UI.\n\n### Requirements ⚙️\n- **C++20 Compiler**: Brisk requires a C++20-compatible compiler such as MSVC 2022, Clang, XCode, or GCC.\n- **Dependency Management**: Uses [vcpkg](https://github.com/microsoft/vcpkg) to manage dependencies across platforms, simplifying the build process. Alternatively, you can download prebuilt binaries.\n\n### Platform Support\n\n|                     | Windows | macOS | Linux |\n|---------------------|---------|-------|-------|\n| Core Functionality  | Beta    | Beta  | Beta  |\n| Graphics            | Beta    | Beta  | Beta  |\n| Window System       | Beta    | Beta  | Beta  |\n| Widgets             | Beta    | Beta  | Beta  |\n| Application Support | Alpha   | Alpha | N/A   |\n\n#### OS Support\n\n|         | Minimum version                 |\n|---------|---------------------------------|\n| Windows | Windows 10, Windows Server 2016 |\n| macOS   | macOS 11 Big Sur                |\n| Linux   | n/a                             |\n\n#### Graphics Backend Support\n\n|         | Backends                        |\n|---------|---------------------------------|\n| Windows | D3D11 and WebGPU (D3D12/Vulkan) |\n| macOS   | WebGPU (Metal)                  |\n| Linux   | WebGPU (OpenGL/Vulkan)          |\n\n### Example Projects\n\nThe `examples` directory contains projects that showcase how to use the Brisk library.\n\nFor a minimal example, check out the [brisk-helloworld](https://github.com/brisklib/brisk-helloworld) repository.\n\nExample Project Binary Size:\n\n| OS          | Static Build, Release (Full Unicode Support)  |\n|-------------|-----------------------------------------------|\n| Windows x64 | **10.1 MB** (D3D11)                           |\n| Linux x64   | **18.2 MB** (WebGPU: Vulkan/OpenGL), stripped |\n| macOS x64   | **16.5 MB** (WebGPU: Metal), stripped         |\n\nThese sizes do not include embedded resources (such as fonts).\n\n### Development 💻\n\nBrisk is in active development, and we welcome contributions and feedback from the community to improve and expand the toolkit.\n\nThe `main` branch contains the latest features and generally passes all built-in tests ✅. Other branches are reserved for feature development and may be force-pushed.\n\n### License 📜\n\nBrisk is licensed under the **GPL v2.0** or later. However, for those who wish to use Brisk in proprietary or closed-source applications, a **commercial license** is also available. For more details on commercial licensing, please contact us at [brisk@brisklib.com](mailto:brisk@brisklib.com).\n","funding_links":[],"categories":["GUI"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrisklib%2Fbrisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrisklib%2Fbrisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrisklib%2Fbrisk/lists"}