{"id":13731997,"url":"https://github.com/aiekick/ImGuiFileDialog","last_synced_at":"2025-05-08T06:31:03.303Z","repository":{"id":37548106,"uuid":"117348282","full_name":"aiekick/ImGuiFileDialog","owner":"aiekick","description":"Full featured file Dialog for Dear ImGui","archived":false,"fork":false,"pushed_at":"2024-11-03T16:00:04.000Z","size":13874,"stargazers_count":1237,"open_issues_count":7,"forks_count":200,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-12T05:36:46.114Z","etag":null,"topics":["bookmark","cimgui","cross-platform","custom-filter","custom-pane","dialog","directory-chooser","dlg","emscripten","filedialog","filter-collections","filter-coloring","free-library","icons","imgui","linux","macos","multi-selection","pane","windows"],"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/aiekick.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":"2018-01-13T14:04:14.000Z","updated_at":"2024-11-11T17:24:50.000Z","dependencies_parsed_at":"2023-10-12T00:18:53.797Z","dependency_job_id":"4bd10c76-d874-46bc-b26c-c476d060d854","html_url":"https://github.com/aiekick/ImGuiFileDialog","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFileDialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFileDialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFileDialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiekick%2FImGuiFileDialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiekick","download_url":"https://codeload.github.com/aiekick/ImGuiFileDialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224707583,"owners_count":17356361,"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":["bookmark","cimgui","cross-platform","custom-filter","custom-pane","dialog","directory-chooser","dlg","emscripten","filedialog","filter-collections","filter-coloring","free-library","icons","imgui","linux","macos","multi-selection","pane","windows"],"created_at":"2024-08-03T02:01:43.350Z","updated_at":"2025-05-08T06:31:03.293Z","avatar_url":"https://github.com/aiekick.png","language":"C++","readme":"# ImGuiFileDialog\n\n## Build Matrix\n\n|  | Win | Linux | MacOs |\n|  :---: |  :---: |  :---: |  :---: |\n| Msvc | [![Win Msvc](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Win_Msvc.yml/badge.svg)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Win_Msvc.yml)  |  |   |\n| Gcc |  | [![Linux Gcc](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux_Gcc.yml/badge.svg)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux_Gcc.yml) | [![Osx Gcc](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx_Gcc.yml/badge.svg)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx_Gcc.yml) |\n| Clang |  | [![Linux Clang](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux_Clang.yml/badge.svg)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux_Clang.yml)  | [![Osx Clang](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx_Clang.yml/badge.svg)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx_Clang.yml)  |\n| Leak Sanitizer | | [![Leak Sanitizer](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Leak.yml/badge.svg)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Leak.yml) | |\n\n## Purpose\n\nImGuiFileDialog is a file selection dialog built for (and using only) [Dear ImGui](https://github.com/ocornut/imgui).\n\nMy primary goal was to have a custom pane with widgets according to file extension. This was not possible using other\nsolutions.\n\n## Possible Dialog Customization\n\n![alt text](https://github.com/aiekick/ImGuiFileDialog/blob/DemoApp/doc/demo_dialog.png)\n\n## ImGui Supported Version\n\n\u003e [!NOTE]\n\u003e ImGuiFileDialog follow the master and docking branch of ImGui.\n\u003e Currently : [![Wrapped Dear ImGui Version](https://img.shields.io/badge/Dear%20ImGui%20Version-1.90.5-blue.svg)](https://github.com/ocornut/imgui)\n\n### Documentation :\n\n\u003e [!NOTE]\n\u003e for a complete explanation and howto about ImGuiFileDialog Api, \n\u003e you can check the [**Documentation**](https://github.com/aiekick/ImGuiFileDialog/blob/master/Documentation.md)\n\n## Structure\n\n* The library is in [Master branch](https://github.com/aiekick/ImGuiFileDialog/tree/master)\n* A demo app can be found in the [DemoApp branch](https://github.com/aiekick/ImGuiFileDialog/tree/DemoApp)\n\nThis library is designed to be dropped into your source code rather than compiled separately.\n\nFrom your project directory:\n\n```\nmkdir lib    \u003cor 3rdparty, or externals, etc.\u003e\ncd lib\ngit clone https://github.com/aiekick/ImGuiFileDialog.git\ngit checkout master\n```\n\nThese commands create a `lib` directory where you can store any third-party dependencies used in your project, downloads\nthe ImGuiFileDialog git repository and checks out the Lib_Only branch where the actual library code is located.\n\nAdd `lib/ImGuiFileDialog/ImGuiFileDialog.cpp` to your build system and include\n`lib/ImGuiFileDialog/ImGuiFileDialog.h` in your source code. ImGuiFileLib will compile with and be included directly in\nyour executable file.\n\nIf, for example, your project uses cmake, look for a line like `add_executable(my_project_name main.cpp)`\nand change it to `add_executable(my_project_name lib/ImGuiFileDialog/ImGuiFileDialog.cpp main.cpp)`. This tells the\ncompiler where to find the source code declared in `ImGuiFileDialog.h` which you included in your own source code.\n\n## Requirements:\n\nYou must also, of course, have added [Dear ImGui](https://github.com/ocornut/imgui) to your project for this to work at\nall.\n\nImguiFileDialog is agnostic about the filesystem api you can use.\nIt provides a IFileSystem you can override for your needs.\n\nBy default you can use dirent or std::filesystem. you have also a demo of uisng boos filesystem api in the DemoApp branch\n\nAndroid Requirements : Api 21 mini\n\n## Features\n\n- C Api (succesfully tested with CimGui)\n- Separate system for call and display\n\t- Can have many function calls with different parameters for one display function, for example\n- Can create a custom pane with any widgets via function binding\n\t- This pane can block the validation of the dialog\n\t- Can also display different things according to current filter and UserDatas\n- Advanced file style for file/dir/link coloring / icons / font\n    - predefined form or user custom form by lambda function (the lambda mode is not available for the C API)\n- Multi-selection (ctrl/shift + click) :\n\t- 0 =\u003e Infinite\n\t- 1 =\u003e One file (default)\n\t- n =\u003e n files\n- Compatible with MacOs, Linux, Windows, Emscripten, Android\n- Supports modal or standard dialog types\n- Select files or directories\n- Filter groups and custom filter names\n- can ignore filter Case for file searching\n- Keyboard navigation (arrows, backspace, enter)\n- Exploring by entering characters (case insensitive)\n- Custom places (bookmarks, system devices, whatever you want)\n- Directory manual entry (right click on any path element)\n- Optional 'Confirm to Overwrite\" dialog if file exists\n- Thumbnails Display (agnostic way for compatibility with any backend, sucessfully tested with OpenGl and Vulkan)\n- The dialog can be embedded in another user frame than the standard or modal dialog\n- Can tune validation buttons (placements, widths, inversion)\n- Can quick select a parrallel directory of a path, in the path composer (when you clikc on a / you have a popup)\n- regex support for filters, collection of filters and filestyle (the regex is recognized when between (( and )) in a filter)\n- multi layer extentions like : .a.b.c .json.cpp .vcxproj.filters etc..\n- advanced behavior regarding asterisk based filter. like : .* .*.* .vcx.* .*.filters .vcs*.filt.* etc.. (internally regex is used)\n- result modes GetFilePathName, GetFileName and GetSelection (overwrite file ext, keep file, add ext if no user ext exist)\n- you can use your own FileSystem Api\n    - by default Api Dirent and std::filesystem are defined\n\t- you can override GetDrieveList for specify by ex on android other fs, like local and SDCards\n\n### WARNINGS :\n- the nav system keyboard behavior is not working as expected, so maybe full of bug for ImGuiFileDialog\n \n### Simple Usage :\n\n```cpp\nvoid drawGui() { \n  // open Dialog Simple\n  if (ImGui::Button(\"Open File Dialog\")) {\n    IGFD::FileDialogConfig config;\n\tconfig.path = \".\";\n    ImGuiFileDialog::Instance()-\u003eOpenDialog(\"ChooseFileDlgKey\", \"Choose File\", \".cpp,.h,.hpp\", config);\n  }\n  // display\n  if (ImGuiFileDialog::Instance()-\u003eDisplay(\"ChooseFileDlgKey\")) {\n    if (ImGuiFileDialog::Instance()-\u003eIsOk()) { // action if OK\n      std::string filePathName = ImGuiFileDialog::Instance()-\u003eGetFilePathName();\n      std::string filePath = ImGuiFileDialog::Instance()-\u003eGetCurrentPath();\n      // action\n    }\n    \n    // close\n    ImGuiFileDialog::Instance()-\u003eClose();\n  }\n}\n```\n\n![alt text](https://github.com/aiekick/ImGuiFileDialog/blob/DemoApp/doc/dlg_simple.gif)\n\n### How to build the sample app\n\nThe sample app is [here in master branch](https://github.com/aiekick/ImGuiFileDialog/tree/master)\n\nYou need to use CMake. For the 3 Os (Win, Linux, MacOs), the CMake usage is exactly the same,\n\n    Choose a build directory. (called here my_build_directory for instance) and\n    Choose a Build Mode : \"Release\" / \"MinSizeRel\" / \"RelWithDebInfo\" / \"Debug\" (called here BuildMode for instance)\n    Run CMake in console : (the first for generate cmake build files, the second for build the binary)\n\ncmake -B my_build_directory -DCMAKE_BUILD_TYPE=BuildMode\ncmake --build my_build_directory --config BuildMode\n\nSome CMake version need Build mode define via the directive CMAKE_BUILD_TYPE or via --Config when we launch the build. This is why i put the boths possibilities\n\nBy the way you need before, to make sure, you have needed dependencies.\n\n### On Windows :\n\nYou need to have the opengl library installed\n\n### On Linux :\n\nYou need many lib : (X11, xrandr, xinerama, xcursor, mesa)\n\nIf you are on debian you can run :\n\nsudo apt-get update \nsudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev\n\n### On MacOs :\n\nyou need many lib : opengl and cocoa framework\n\n\u003c/blockquote\u003e\u003c/details\u003e\n\n## That's all folks :-)\n\nYou can check by example in this repo with the file CustomImGuiFileDialogConfig.h :\n- this trick was used to have custom icon font instead of labels for buttons or messages titles\n- you can also use your custom imgui button, the button call stamp must be same by the way :)\n\nThe Custom Icon Font (in CustomFont.cpp and CustomFont.h) was made with ImGuiFontStudio (https://github.com/aiekick/ImGuiFontStudio) i wrote for that :)\nImGuiFontStudio is also using ImGuiFileDialog.$\n\n![Alt](https://repobeats.axiom.co/api/embed/22a6eef207d0bce7c03519d94f55100973b451ca.svg \"Repobeats analytics image\")\n","funding_links":[],"categories":["C++","Uncategorized","Graphics"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiekick%2FImGuiFileDialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiekick%2FImGuiFileDialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiekick%2FImGuiFileDialog/lists"}