ImGui Command Palette: a command palette, as in Sublime Text or VS Code: the user types to find and run the app’s commands.
The C++ API of ImGui Command Palette: the signatures and the documentation of its headers. This page is generated by litgen, the engine behind the Python bindings of Dear ImGui Bundle. Functions without Python bindings are not listed.
imcmd_command_palette.h¶
TODO support std::string_view¶
TODO support function pointer callback in addition to std::function
ImCmdTextType (enum)¶
enum ImCmdTextType| Member | Value | |
|---|---|---|
ImCmdTextType_Regular | 0 | |
ImCmdTextType_Highlight | 1 | |
ImCmdTextType_COUNT, } | 2 |
ImCmdTextFlag (enum)¶
enum ImCmdTextFlag| Member | Value | |
|---|---|---|
ImCmdTextFlag_Underline | 0 | |
ImCmdTextFlag_COUNT, } | 1 |
Command (struct)¶
struct Command| Member | |
|---|---|
std::string Name; | |
std::function<void()> InitialCallback; | |
std::function<void(int selected_option)> SubsequentCallback; | |
std::function<void()> TerminatingCallback; |
Command management¶
ImCmd::AddCommand¶
void AddCommand(Command command);ImCmd::RemoveCommand¶
void RemoveCommand(const char* name);Styling¶
ImCmd::GetStyleFlag¶
bool GetStyleFlag(ImCmdTextType type, ImCmdTextFlag flag);ImCmd::SetStyleFlag¶
void SetStyleFlag(ImCmdTextType type, ImCmdTextFlag flag, bool enabled);ImCmd::GetStyleFont¶
ImFont* GetStyleFont(ImCmdTextType type);ImCmd::SetStyleFont¶
void SetStyleFont(ImCmdTextType type, ImFont* font);ImCmd::GetStyleColor¶
ImU32 GetStyleColor(ImCmdTextType type);ImCmd::SetStyleColor¶
void SetStyleColor(ImCmdTextType type, ImU32 color);ImCmd::ClearStyleColor¶
void ClearStyleColor(ImCmdTextType type);< Clear the style color for the given type, defaulting to ImGuiCol_Text
Command palette widget¶
ImCmd::SetNextCommandPaletteSearch¶
void SetNextCommandPaletteSearch(const char* text);ImCmd::SetNextCommandPaletteSearchBoxFocused¶
void SetNextCommandPaletteSearchBoxFocused();ImCmd::CommandPalette¶
void CommandPalette(const char* name);ImCmd::IsAnyItemSelected¶
bool IsAnyItemSelected();ImCmd::RemoveCache¶
void RemoveCache(const char* name);ImCmd::RemoveAllCaches¶
void RemoveAllCaches();Command palette widget in a window helper¶
ImCmd::SetNextWindowAffixedTop¶
void SetNextWindowAffixedTop(ImGuiCond cond = 0);ImCmd::CommandPaletteWindow¶
void CommandPaletteWindow(const char* name, bool* p_open);ImCmd::Prompt¶
void Prompt(std::vector<std::string> options);Command responses, only call these in command callbacks (except TerminatingCallback)
imgui-command-palette-py-wrapper.h¶
ContextWrapper (struct)¶
struct ContextWrapperContextWrapper::ContextWrapper¶
inline ContextWrapper();