{"id":19017450,"url":"https://github.com/junkdog/pupene_imgui","last_synced_at":"2025-07-08T14:09:22.695Z","repository":{"id":136336834,"uuid":"107610681","full_name":"junkdog/pupene_imgui","owner":"junkdog","description":"generic editor widget for classes/structs (C++17)","archived":false,"fork":false,"pushed_at":"2017-11-27T09:43:59.000Z","size":2902,"stargazers_count":21,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-07T05:17:15.803Z","etag":null,"topics":["imgui"],"latest_commit_sha":null,"homepage":"","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/junkdog.png","metadata":{"files":{"readme":"README.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":"2017-10-19T23:51:56.000Z","updated_at":"2024-10-25T11:06:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d5def1d-9f0c-44a2-a091-80166d1bc847","html_url":"https://github.com/junkdog/pupene_imgui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/junkdog/pupene_imgui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fpupene_imgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fpupene_imgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fpupene_imgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fpupene_imgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junkdog","download_url":"https://codeload.github.com/junkdog/pupene_imgui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junkdog%2Fpupene_imgui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264284401,"owners_count":23584679,"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":["imgui"],"created_at":"2024-11-08T19:47:03.517Z","updated_at":"2025-07-08T14:09:22.643Z","avatar_url":"https://github.com/junkdog.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## pupene_imgui\n\nA small demo exploring automatically building editor widgets for\nstructs. Objects are introspected using [pupene][pupene], while\n[imgui][imgui] provides the underlying UI.\n\n\nA struct:\n\n```cpp\nstruct complex_thing {\n    vec22fi v22fi;\n    vec2f xy;\n    float decimal;\n    int32_t integer;\n    uint8_t byte;\n    Color color;\n    std::string hallo = \"hi there\";\n};\n```\n\nCalled every frame:\n\n```cpp\nui::widget::object_editor(object, config);\n```\n\n![pupene_imgui demo](pupene_imgui.gif?raw=true \"UI\")\n\n\n### A quick intro\n\n[pupene][pupene] requires that a `pup()` function is provided for\neach serializable type. These functions work with all puppers. As\nsuch, for any type for which a UI can be constructed, binary and json\nserialization is available too.\n\nSimplified usage:\n\n```cpp\n    // object to edit\n    auto ct = complex_thing{};\n\n    // the config object holds state for the current editor\n    auto config = EditorConfig{\"object\"};\n    config.filter.pattern.reserve(50); // rough edges\n\n    while (!poll_events(key_callback)) {\n        render_frame(window, [\u0026ct, \u0026config]() {\n            \n            // called each frame\n            ui::widget::object_editor(ct, config);\n        });\n    }\n``` \n\n[pup-fns.h][pups] contains all necessary `pup()` functions and types.\n\n\n### Project setup\n\nThis has only been tested on Kubuntu 17.10, using clang-5.0 and\ngcc 7.2. It should/might work elsewhere too.\n\n**Requirements:**\n- Recent compiler with C++17 support\n- CMake 3.8+\n- Python and [conan](https://conan.io/) (`pip install conan`)\n\nAdd [this conan remote][conan-jd] for imgui and pupene dependencies:  \n\n```bash\nconan remote add junkdog https://api.bintray.com/conan/junkdog/conan\n```\n\n\n#### Configure\n\nThis step also builds the dependencies and installs them into the\nlocal conan cache.\n\n```bash\ncmake -H. -B_builds \\\n    -DCMAKE_BUILD_TYPE=Release \\\n    -DCMAKE_INSTALL_PREFIX=_install\n```\n\n#### Build\n\n```bash\n cmake --build _builds --target install -- -j 8\n```\n\n\n#### Run\n\nUnless running the executable from a folder containing`SourceCodePro-Semibold.ttf`,\nthe default imgui font will be used. \n\n```bash\ncd _install/bin\n./example\n```\n\n [conan-jd]: https://bintray.com/junkdog/conan\n [pupene]:   https://github.com/junkdog/pupene\n [imgui]:    https://github.com/ocornut/imgui\n [pups]:     https://github.com/junkdog/pupene_imgui/blob/master/src/pup-fns.h\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkdog%2Fpupene_imgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunkdog%2Fpupene_imgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunkdog%2Fpupene_imgui/lists"}