GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

ImGuiFileDialog

Full featured file Dialog for Dear ImGui

  • 语言C++
  • 默认分支master
  • 大小13.6 MB
  • 更新4月19日
  • Issues10
在 GitHub 打开
avataraiekick

项目介绍

aiekick/ImGuiFileDialog 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 1.5k 个 Star、244 次 Fork。

仓库全名
aiekick/ImGuiFileDialog

README 摘要

ImGuiFileDialog Build Matrix Win | Linux | MacOs | :---: | :---: | :---: | :---: | Purpose ImGuiFileDialog is a file selection dialog built for (and using only) Dear ImGui. My primary goal was to have a custom pane with widgets according to file extension. This was not possible using other solutions. Possible Dialog Customization ImGui Supported Version [!NOTE] ImGuiFileDialog follow the master and docking branch of…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ImGuiFileDialog 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 1.5k 个 Star。

ImGuiFileDialog 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 ImGuiFileDialog 的源码?

可以直接克隆仓库:git clone https://github.com/aiekick/ImGuiFileDialog.git,默认分支为 master;安装与运行步骤见仓库 README。

ImGuiFileDialog 最近还在维护吗?

仓库最近一次更新为 4月19日,当前有 10 个未关闭 Issue;Star 数为 1.5k,可作为社区活跃度的参考。

本页面展示项目元数据与原始 README,GitRead 中文社区 编辑团队负责选题收录。

相关仓库

tensorflow/tensorflow avatar
tensorflowtensorflow
6 小时前
201.4k
78.2k
3.4k

面向所有人的开源机器学习框架

deep-learningdeep-neural-networksdistributed+5
C++
1.4 GB
0
详情
ggml-org/llama.cpp avatar
llama.cppggml-org
6 小时前
133.8k
25.3k
2.6k

C/C++ 中的大语言模型推理

ggml
C++
479.1 MB
3
详情
react/react-native avatar
react-nativereact
6 小时前
126.9k
25.5k
1.4k

使用 React 构建原生应用的框架

androidapp-frameworkcross-platform+5
C++
970.4 MB
0
详情
electron/electron avatar
electronelectron
6 小时前
123.8k
17.9k
780

使用 JavaScript、HTML 和 CSS 构建跨平台桌面应用

electronjavascriptc-plus-plus+6
C++
227.6 MB
0
详情
godotengine/godot avatar
godotgodotengine
2 天前
119.9k
26.8k
13.4k

Godot Engine – 多平台 2D 和 3D 游戏引擎

game-developmentgame-enginegamedev+4
C++
1.8 GB
0
详情
microsoft/terminal avatar
terminalmicrosoft
2 天前
105.4k
9.6k
1.7k

新的 Windows Terminal 和原始的 Windows 控制台主机,全都集中在这里!

cmdcommand-lineconsole+8
C++
177.4 MB
0
详情
opencv/opencv avatar
opencvopencv
8 小时前
91.5k
57.1k
2.9k

开源计算机视觉库

opencvc-plus-pluscomputer-vision+2
C++
558.2 MB
0
详情
bitcoin/bitcoin avatar
bitcoinbitcoin
9 小时前
90.6k
30.0k
345

Bitcoin Core 集成/暂存树

bitcoinc-plus-pluscryptocurrency+2
C++
324.5 MB
0
详情

关于

bookmarkcimguicross-platformcustom-filtercustom-panedialogdirectory-chooserdlgemscriptenfiledialogfilter-collectionsfilter-coloringfree-libraryiconsimguilinuxmacosmulti-selectionpanewindows
  • MIT License
  • 1.5k Stars
  • 244 Forks
  • 16 Watching

简要分析

热度分
2027
价值分
988
活跃状态
活跃
GitHub

语言占比

C
C++
CMake

Release

  • ImGuiFileDialog v0.6.82025年10月4日
  • ImGuiFileDialog v0.6.72024年2月22日
  • ImGuiFileDialog v0.6.6.12023年11月27日
  • ImGuiFileDialog v0.6.62023年11月25日
  • ImGuiFileDialog v0.6.52023年5月29日

贡献者

aiekickaiekickZZBaronZZBarondmlodmloconhleeconhleeSimonMaracineSimonMaracinesepiabrownsepiabrowntvariusness-kingtvariusness-kingbrad0brad0chrismilechrismilelilggamegeniuslilggamegeniusgoossensgoossenshoffstadthoffstadt

ImGuiFileDialog

Build Matrix

Win Linux MacOs
Msvc Win Msvc
Gcc Linux Gcc Osx Gcc
Clang Linux Clang Osx Clang
Leak Sanitizer Leak Sanitizer

Purpose

ImGuiFileDialog is a file selection dialog built for (and using only) Dear ImGui.

My primary goal was to have a custom pane with widgets according to file extension. This was not possible using other solutions.

Possible Dialog Customization

alt text

ImGui Supported Version

[!NOTE] ImGuiFileDialog follow the master and docking branch of ImGui. Currently : Wrapped Dear ImGui Version

Documentation :

[!NOTE] for a complete explanation and howto about ImGuiFileDialog Api, you can check the Documentation

Structure

  • The library is in Master branch
  • A demo app can be found in the DemoApp branch

This library is designed to be dropped into your source code rather than compiled separately.

From your project directory:

mkdir lib    <or 3rdparty, or externals, etc.>
cd lib
git clone https://github.com/aiekick/ImGuiFileDialog.git
git checkout master

These commands create a lib directory where you can store any third-party dependencies used in your project, downloads the ImGuiFileDialog git repository and checks out the Lib_Only branch where the actual library code is located.

Add lib/ImGuiFileDialog/ImGuiFileDialog.cpp to your build system and include lib/ImGuiFileDialog/ImGuiFileDialog.h in your source code. ImGuiFileLib will compile with and be included directly in your executable file.

If, for example, your project uses cmake, look for a line like add_executable(my_project_name main.cpp) and change it to add_executable(my_project_name lib/ImGuiFileDialog/ImGuiFileDialog.cpp main.cpp). This tells the compiler where to find the source code declared in ImGuiFileDialog.h which you included in your own source code.

Requirements:

You must also, of course, have added Dear ImGui to your project for this to work at all.

ImguiFileDialog is agnostic about the filesystem api you can use. It provides a IFileSystem you can override for your needs.

By default you can use dirent or std::filesystem. you have also a demo of using boost filesystem api in the DemoApp branch

Android Requirements : Api 21 mini

Features

  • C Api (succesfully tested with CimGui)
  • Separate system for call and display
    • Can have many function calls with different parameters for one display function, for example
  • Can create a custom pane with any widgets via function binding
    • This pane can block the validation of the dialog
    • Can also display different things according to current filter and UserDatas
  • Advanced file style for file/dir/link coloring / icons / font
    • predefined form or user custom form by lambda function (the lambda mode is not available for the C API)
  • Multi-selection (ctrl/shift + click) :
    • 0 => Infinite
    • 1 => One file (default)
    • n => n files
  • Compatible with MacOs, Linux, Windows, Emscripten, Android
  • Supports modal or standard dialog types
  • Select files or directories
  • Filter groups and custom filter names
  • can ignore filter Case for file searching
  • Keyboard navigation (arrows, backspace, enter)
  • Exploring by entering characters (case insensitive)
  • Custom places (bookmarks, system devices, whatever you want)
  • Directory manual entry (right click on any path element)
  • Optional 'Confirm to Overwrite" dialog if file exists
  • Thumbnails Display (agnostic way for compatibility with any backend, sucessfully tested with OpenGl and Vulkan)
  • The dialog can be embedded in another user frame than the standard or modal dialog
  • Can tune validation buttons (placements, widths, inversion)
  • Can quick select a parrallel directory of a path, in the path composer (when you clikc on a / you have a popup)
  • regex support for filters, collection of filters and filestyle (the regex is recognized when between (( and )) in a filter)
  • multi layer extentions like : .a.b.c .json.cpp .vcxproj.filters etc…
  • advanced behavior regarding asterisk based filter. like : .* .. .vcx.* ..filters .vcs.filt.* etc… (internally regex is used)
  • result modes GetFilePathName, GetFileName and GetSelection (overwrite file ext, keep file, add ext if no user ext exist)
  • you can use your own FileSystem Api
    • by default Api Dirent and std::filesystem are defined
    • you can override GetDrieveList for specify by ex on android other fs, like local and SDCards
  • can select all displayed files with “ctrl+a” as in any OS
  • natural sorting for filenames and extension on demand

WARNINGS :

  • the nav system keyboard behavior is not working as expected, so maybe full of bug for ImGuiFileDialog

Simple Usage :

void drawGui() { 
  // open Dialog Simple
  if (ImGui::Button("Open File Dialog")) {
    IGFD::FileDialogConfig config;
	config.path = ".";
    ImGuiFileDialog::Instance()->OpenDialog("ChooseFileDlgKey", "Choose File", ".cpp,.h,.hpp", config);
  }
  // display
  if (ImGuiFileDialog::Instance()->Display("ChooseFileDlgKey")) {
    if (ImGuiFileDialog::Instance()->IsOk()) { // action if OK
      std::string filePathName = ImGuiFileDialog::Instance()->GetFilePathName();
      std::string filePath = ImGuiFileDialog::Instance()->GetCurrentPath();
      // action
    }
    
    // close
    ImGuiFileDialog::Instance()->Close();
  }
}

alt text

How to build the sample app

The sample app is here in master branch

You need to use CMake. For the 3 Os (Win, Linux, MacOs), the CMake usage is exactly the same,

Choose a build directory. (called here my_build_directory for instance) and
Choose a Build Mode : "Release" / "MinSizeRel" / "RelWithDebInfo" / "Debug" (called here BuildMode for instance)
Run CMake in console : (the first for generate cmake build files, the second for build the binary)

cmake -B my_build_directory -DCMAKE_BUILD_TYPE=BuildMode cmake --build my_build_directory --config BuildMode

Some 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

By the way you need before, to make sure, you have needed dependencies.

On Windows :

You need to have the opengl library installed

On Linux :

You need many lib : (X11, xrandr, xinerama, xcursor, mesa, wayland)

If you are on debian you can run :

sudo apt-get update sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev libwayland-dev

On MacOs :

you need many lib : opengl and cocoa framework

That’s all folks :-)

You can check by example in this repo with the file CustomImGuiFileDialogConfig.h :

  • this trick was used to have custom icon font instead of labels for buttons or messages titles
  • you can also use your custom imgui button, the button call stamp must be same by the way :)

The Custom Icon Font (in CustomFont.cpp and CustomFont.h) was made with ImGuiFontStudio (https://github.com/aiekick/ImGuiFontStudio) i wrote for that :) ImGuiFontStudio is also using ImGuiFileDialog.$

Alt

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
5.3万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。