| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- ###############################################################################
- # This file is a part of Dear ImGui Bundle, NOT a part of imgui-command-palette
- # -----------------------------------------------------------------------------
- # imgui_command_palette.pyi: auto-generated bindings
- # imgui-command-palette is a Sublime Text or VSCode style command palette in ImGui
- # https://github.com/hnOsmium0001/imgui-command-palette
- #
- # Most of the code of this file is automatically generated (using https://pthom.github.io/litgen/),
- # and is generally very close to the C++ version. Comments, docs are identical.
- # Do not manually edit the autogenerated parts (look for "Autogenerated" comments)!
- ###############################################################################
- from typing import List, Callable
- import enum
- from imgui_bundle.imgui import ImFont, ImU32
- ImGuiCond = int
- class Context:
- pass
- # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- # <litgen_stub> // Autogenerated code below! Do not edit!
- #################### <generated_from:imcmd_command_palette.h> ####################
- # TODO support std::string_view
- # TODO support function pointer callback in addition to std::function
- class ImCmdTextType(enum.IntEnum):
- regular = enum.auto() # (= 0)
- highlight = enum.auto() # (= 1)
- count = enum.auto() # (= 2)
- class ImCmdTextFlag(enum.IntEnum):
- #/ Whether the text is underlined. Default False.
- underline = enum.auto() # (= 0)
- count = enum.auto() # (= 1)
- class Command:
- name: str
- initial_callback: Callable[[], None]
- subsequent_callback: Callable[[int], None]
- terminating_callback: Callable[[], None]
- def __init__(self) -> None:
- """Autogenerated default constructor"""
- pass
- #/ Destroys the currently bound context.
- # Command management
- def add_command(command: Command) -> None:
- pass
- def remove_command(name: str) -> None:
- pass
- # Styling
- def get_style_flag(type: ImCmdTextType, flag: ImCmdTextFlag) -> bool:
- pass
- def set_style_flag(type: ImCmdTextType, flag: ImCmdTextFlag, enabled: bool) -> None:
- pass
- def get_style_font(type: ImCmdTextType) -> ImFont:
- pass
- def set_style_font(type: ImCmdTextType, font: ImFont) -> None:
- pass
- def get_style_color(type: ImCmdTextType) -> ImU32:
- pass
- def set_style_color(type: ImCmdTextType, color: ImU32) -> None:
- pass
- def clear_style_color(type: ImCmdTextType) -> None:
- """< Clear the style color for the given type, defaulting to ImGuiCol_Text"""
- pass
- # Command palette widget
- def set_next_command_palette_search(text: str) -> None:
- pass
- def set_next_command_palette_search_box_focused() -> None:
- pass
- def command_palette(name: str) -> None:
- pass
- def is_any_item_selected() -> bool:
- pass
- def remove_cache(name: str) -> None:
- pass
- def remove_all_caches() -> None:
- pass
- # Command palette widget in a window helper
- def set_next_window_affixed_top(cond: ImGuiCond = 0) -> None:
- pass
- def command_palette_window(name: str, p_open: bool) -> bool:
- pass
- def prompt(options: List[str]) -> None:
- """ Command responses, only call these in command callbacks (except TerminatingCallback)"""
- pass
- #################### </generated_from:imcmd_command_palette.h> ####################
- #################### <generated_from:imgui-command-palette-py-wrapper.h> ####################
- # Workaround for ImCmd::Context, since pybind11 stubbornly fails on perfect encapsulation
- # ImCmd::Context is perfectly encapsulated, since it is only defined privately in a C++ file, and not in a header.
- # See https://github.com/pybind/pybind11/issues/2770
- class ContextWrapper:
- def __init__(self) -> None:
- pass
- #################### </generated_from:imgui-command-palette-py-wrapper.h> ####################
- # </litgen_stub> // Autogenerated code end!
|