RepositoryC++SGSingapore
BT

btzy/nativefiledialog-extended

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.

1.1kstars
142forks
10issues
0views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: file-dialog

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: folder-picker

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: file-dialog

#1 Repository Của Tuần

📁 Gọi native file dialog trên mọi nền tảng chỉ với một thư viện C nhỏ

Viết code dialog một lần, chạy native trên Windows, macOS, Linux — không cần Qt, không cần wxWidgets.

nativefiledialog-extended là thư viện C nhẹ, tĩnh, cho phép gọi các hộp thoại mở file, chọn thư mục và lưu file gốc của từng hệ điều hành. Dự án fork từ Michael Labbe's Native File Dialog nhưng phá vỡ tương thích API để bổ sung hàng loạt tính năng thực tế: tên bộ lọc dễ đọc, tự động thêm phần mở rộng, đặt đường dẫn mặc định, và hỗ trợ cửa sổ cha giữ dialog trên cùng.

Thư viện hoạt động trên Windows (MSVC, MinGW, Clang), macOS (Clang), và Linux (GTK, xdg-desktop-portal). License Zlib, không phụ thuộc bên thứ ba, build bằng CMake hiện đại. Dùng chung tốt với SDL, GLFW, và ImGui.

✨ Điểm nổi bật

  • Lean C API, static library: Không cần runtime C++/ObjC, liên kết tĩnh gọn nhẹ
  • Cross-platform thực sự: Windows (MSVC/MinGW/Clang), macOS, Linux (GTK + portal)
  • Tên bộ lọc thân thiện: Hiển thị C/C++ Source files (*.c;*.cpp) thay vì (*.c;*.cpp)
  • Tự động thêm phần mở rộng: Trên các nền tảng mà người dùng kỳ vọng hành vi này
  • Hỗ trợ UTF-8 nhất quán: Ký tự Unicode đầy đủ trên mọi nền tảng, thêm UTF-16 wchar_t trên Windows
  • Multiple selection: Chọn nhiều file trong hộp thoại mở và chọn thư mục
  • xdg-desktop-portal trên Linux: Mở trình chọn file "native" của desktop environment
  • C++ wrapper tuỳ chọn: Dùng unique_ptr auto-freeing, optional parameters cho project C++
  • Init/Quit tách rời: Khởi tạo COM/GTK/D-Bus độc lập với gọi dialog, ứng dụng tự kiểm soát vòng đời

💡 Vì sao đáng chú ý

So với thư viện gốc, bản extended giải quyết đúng các pain point thực tế khi dùng native file dialog: tên filter hiển thị rõ ràng cho người dùng, tự động append extension tránh file không có đuôi, và support parent window handle giúp dialog không bị mất dưới cửa sổ chính. Việc tách rời việc khởi tạo nền tảng khỏi gọi dialog cho phép ứng dụng kiểm soát chính xác thời điểm init/de-init COM hay GTK — quan trọng khi tích hợp vào engine hoặc framework lớn.

Dự án phù hợp cho bất kỳ ứng dụng C/C++ nào cần hộp thoại mở/lưu file mà không muốn kéo theo cả Qt hay wxWidgets. Cộng đồng duy trì wiki liệt kê các binding ngôn ngữ và project nổi bật phụ thuộc thư viện này, cho thấy mức độ tin cậy trong thực tế.


#C #CPlusPlus #CrossPlatform #FileDialog #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

Repository
fffaraz/awesome-cpp

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

74.0k
Oct 11, 2026
RepositoryVim Script
vim/vim

The official Vim repository

41.2k
Oct 26, 2026
RepositoryC++
huihut/interview

📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

38.3k
Sep 17, 2026
RepositoryC++
google/flatbuffers

FlatBuffers: Memory Efficient Serialization Library

26.6k
Oct 23, 2026
RepositoryC++
fmtlib/fmt

A modern formatting library

25.9k
Oct 18, 2026
RepositoryC++
sqlitebrowser/sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:

24.7k
Oct 26, 2026
RepositoryC++
RPCS3/rpcs3

PlayStation 3 emulator and debugger

20.2k
Oct 24, 2026
RepositoryC++
CoatiSoftware/Sourcetrail

Sourcetrail - free and open-source interactive source explorer

16.5k
Dec 13, 2021
RepositoryC++
react/react-native

A framework for building native applications using React

126.8k
Oct 26, 2026