{"id":16141203,"url":"https://github.com/mzying2001/sw","last_synced_at":"2025-04-06T00:07:31.466Z","repository":{"id":200005480,"uuid":"656202738","full_name":"Mzying2001/sw","owner":"Mzying2001","description":"SimpleWindow GUI Framework","archived":false,"fork":false,"pushed_at":"2025-03-19T14:09:34.000Z","size":6471,"stargazers_count":110,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T23:11:49.083Z","etag":null,"topics":["cpp","gui","win32","windows"],"latest_commit_sha":null,"homepage":"https://mzying2001.github.io/sw/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mzying2001.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-06-20T13:07:58.000Z","updated_at":"2025-03-21T12:39:17.000Z","dependencies_parsed_at":"2024-03-12T13:29:52.069Z","dependency_job_id":"673d6a50-48cc-4ee2-a040-06510aff7489","html_url":"https://github.com/Mzying2001/sw","commit_stats":{"total_commits":1004,"total_committers":2,"mean_commits":502.0,"dds":0.09063745019920322,"last_synced_commit":"3bb2d56f2c42ac437e49bda5e84cb09a3e7c65b2"},"previous_names":["mzying2001/sw"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mzying2001%2Fsw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mzying2001%2Fsw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mzying2001%2Fsw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mzying2001%2Fsw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mzying2001","download_url":"https://codeload.github.com/Mzying2001/sw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415968,"owners_count":20935388,"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":["cpp","gui","win32","windows"],"created_at":"2024-10-09T23:54:44.841Z","updated_at":"2025-04-06T00:07:31.438Z","avatar_url":"https://github.com/Mzying2001.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `sw`\n\n[中文](./README.md) | **English**\n\n`sw`, short for `SimpleWindow`, is a C++ GUI framework for building Windows desktop applications. It provides object-oriented encapsulation of Windows standard controls and is suitable for creating simple desktop applications.\n\n## Features\n\n+ **Based on Windows API**:  \n  SimpleWindow is a framework based on the Windows API with no additional dependencies.\n+ **Supports Properties**:  \n  It implements property syntax similar to C#, allowing for intuitive access and modification of object properties.\n+ **High DPI Support**:  \n  Native support for high DPI using DIP (Device Independent Pixels) as the default unit of measurement.\n+ **Flexible Layout**:  \n  Implements a layout system similar to WPF, supporting various layouts such as `GridLayout`, `StackLayout`, `DockLayout`, and more.\n+ **Routed Events**:  \n  Adopts a routed event mechanism, where events can bubble up from the source control to propagate upwards. Event handlers can be registered on controls at different levels.\n\n## Quick Start\n\nHere is a SimpleWindow HelloWorld program. For more examples, see [here](./examples).\n\n```c++\n#include \"SimpleWindow.h\"\n\nint wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, INT nCmdShow)\n{\n    // Window object\n    sw::Window mainWindow;\n\n    // Button object\n    sw::Button button;\n\n    // Modify the window layout to center the button\n    mainWindow.SetLayout\u003csw::FillLayout\u003e();\n\n    // Modify the button text by assigning a value to the Text property\n    button.Text = L\"Click Me\";\n\n    // Register a button click event handler to show a message box when the button is clicked\n    button.RegisterRoutedEvent(sw::ButtonBase_Clicked,\n        [](sw::UIElement\u0026 sender, sw::RoutedEventArgs\u0026 e) {\n            sw::MsgBox::Show(L\"Hello, SimpleWindow!\");\n        });\n\n    mainWindow.AddChild(button);\n    mainWindow.Show();\n\n    // Start the message loop\n    return sw::App::MsgLoop();\n}\n```\n\n## Documentation\n\nFor detailed documentation on SimpleWindow, please visit [mzying2001.github.io/sw](https://mzying2001.github.io/sw).\n\n## License\n\nThe SimpleWindow framework is released under the MIT license, allowing you to freely use and modify it in your own projects.\n\n## Contribution\n\nContributors are welcome to participate in the development and improvement of SimpleWindow. If you find bugs or have suggestions for improvements, please raise an issue or submit a pull request.\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/Mzying2001/sw.svg)](https://starchart.cc/Mzying2001/sw)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzying2001%2Fsw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmzying2001%2Fsw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzying2001%2Fsw/lists"}