# simple-gui **Repository Path**: iegc/simple-gui ## Basic Information - **Project Name**: simple-gui - **Description**: 基于SDL3实现的简单易用的GUI框架 - **Primary Language**: C++ - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-15 - **Last Updated**: 2025-11-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: GUI, Cpp ## README # SimpleGui(dev) ## 介绍 基于SDL3实现的简单易用的GUI框架。 ## 支持平台 Windows ## 组件 - Label: 文本显示 - Button: 命令按钮 - CheckBox: 带有文本标签的复选框 - ComboBox: 带有下拉列表的选择框 - DraggablePanel: 可自由移动的展示面板 - LineEdit: 单行文本编辑器 - ProgressBar: 水平或垂直进度条 - ScrollBar: 水平或垂直滚动条 - ScrollPanel: 可滚动显示内容超过显示大小的面板 - Slider: 水平或垂直滑块 - TextureRect: 显示图片的矩形区域 - ... ## 布局 - BoxLayout: 水平或垂直排列子组件 - AnchorPointLayout: 任意固定子组件的显示位置 - ... ## 示例 ```c++ #include using namespace SimpleGui; int main(int argc, char** argv) { // 初始化simple-gui程序 GuiManager::Init(argc, argv, R"(C:\WINDOWS\Fonts\msyh.ttc)"); // 创建一个窗口 auto& win = SG_GuiManager.GetWindow("simple gui", 300, 180); // 使用垂直盒子布局,并设置大小占据整个窗口 auto layout = win.AddComponent(Direction::Vertical); layout->SetSizeConfigs(ComponentSizeConfig::Expanding, ComponentSizeConfig::Expanding); // 在布局中添加一个标签 auto lbl = layout->AddChild