百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
I

imgui-command-palette

> 编程语言
开源

在 ImGui 中的 Sublime Text 或 VSCode 风格的命令面板

197 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

在 ImGui 中的 Sublime Text 或 VSCode 风格的命令面板

ImGui Command Palette

About

This library implements a Sublime Text or VSCode style command palette in ImGui. It is provided in the form of a window that you can choose to open/close based on condition (for example, when user pressed the shortcut Ctrl+Shift+P).

Features

  • Minimum C++ 11
  • Dynamic registration and unregistration of commands
  • Subcommands (prompting a new set of options after user selected a top-level command)
  • Fuzzy search of commands and subcommands
    • Highlighting of matched characters
      • Option: setting custom font
      • Option: setting custom text color

Planned Features

  • Support for std::string_view
  • Support for function pointers instead of std::function
  • Visualization of previously entered options (example: Sublime Merge)
  • Highlighting of matched characters using underline
  • Command history
  • Reducing the minimum required C++ version

Usage

Simply drop all .h and .cpp files in the project root folder to your buildsystem. Minimum of C++11 is required. No external dependencies except Dear ImGui are required.

See the examples for how to use the APIs.

Examples

The examples/ folder is organized in the following way:

  • The src/ and fonts/ folders contains source code and assets for the example app. If you want to hack away, the relevant code are all here!
  • The app-*/ folders each provide a separate way to build the project. Choose one that works the best for you -- they should all produce the same result.
    • app-vcpkg/ provides CMake + vcpkg build scripts
      bash
      $ pwd
      /examples/app-vcpkg
      $ mkdir build
      $ cd build
      $ cmake .. -GNinja -DCMAKE_TOOLCHAIN_FILE="/path/to/your-vcpkg/scripts/buildsystem/vcpkg.cmake"
      $ ninja
    • app-manual/ provides CMake + system deps + file drop in
      • Ensure glfw3 is installed as a system package, available for CMakle find_package
      • Download the following files from https://github.com/ocornut/imgui and drop them in app-manual/
        • Every .h and .cpp in the root dir (that is, imgui itself)
        • backends/imgui_impl_glfw.h
        • backends/imgui_impl_glfw.cpp
        • backends/imgui_impl_opengl3.h
        • backends/imgui_impl_opengl3.cpp
        • backends/imgui_impl_opengl3_loader.h
      bash
      $ pwd
      /examples/app-manual
      $ mkdir build
      $ cd build
      $ cmake .. -GNinja
      $ ninja

Once you have it built, run the examples with working directory = examples/. This is needed because the app uses relative paths to locate fonts. That is, if the build had produced examples/app-vcpkg/build/imcmd-demo.exe for example, you should run it as:

bash
$ pwd
/examples
$ ./app-vcpkg/build/build/imcmd-demo.exe ⏎

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言