imgui_repository
¶
Classes:
-
Default– -
ImGuiRendererRepository– -
Imgui–A helper class to interact with the ImGui library
Default
dataclass
¶
Methods:
-
__call__– -
__getattr__–
ImGuiRendererRepository
¶
Imgui
¶
Bases: Protocol
A helper class to interact with the ImGui library
Methods:
-
accept_drag_drop_payload–Accept a drag and drop payload
-
align_text_to_frame_padding–Align text to the frame padding
-
arrow_button–Create an arrow button
-
begin–Begin a new window
-
begin_child–Begin a new child window
-
begin_combo–Begin a new combo box
-
begin_drag_drop_source–Begin a new drag and drop source
-
begin_main_menu_bar–Begin a new main menu bar
-
begin_menu–Begin a new menu
-
begin_popup–Begin a new popup
-
begin_tab_bar–Begin a new tab bar
-
begin_tab_item–Begin a new tab item
-
button–Create a button
-
checkbox–Create a checkbox
-
create_context–Create a new ImGui Context
-
end–End the current window
-
end_child–End the current child window
-
end_frame–End the current ImGui frame
-
end_main_menu_bar–End the current main menu bar
-
end_menu–End the current menu
-
end_popup–End the current popup
-
end_tab_bar–End the current tab bar
-
end_tab_item–End the current tab item
-
get_content_region_available–Get the content region available
-
get_cursor_screen_pos–Get the cursor screen position
-
get_draw_data–Get the draw data
-
get_io–Get the ImGui IO object
-
get_window_draw_list–Get the window draw list
-
image–Create an image
-
input_float–Create a float input field
-
input_text–Create an input text field
-
input_text_multiline–Create a multiline input text field
-
menu_item–Create a menu item
-
new_frame–Start a new ImGui frame
-
open_popup–Open a popup
-
radio_button–Create a radio button
-
render–Render the ImGui frame
-
same_line–Move the cursor to the same line
-
set_next_window_bg_alpha–Set the background alpha of the next window
-
set_next_window_collapsed–Set the collapsed state of the next window
-
set_next_window_content_size–Set the content size of the next window
-
set_next_window_focus–Set the focus of the next window
-
set_next_window_position–Set the position of the next window
-
set_next_window_size–Set the size of the next window
-
set_next_window_size_constraints–Set the size constraints of the next window
-
shutdown–Shutdown the ImGui context
-
slider_float–Create a float slider
-
slider_int–Create an integer slider
-
text–Print text
accept_drag_drop_payload
¶
arrow_button
¶
begin
¶
begin_child
¶
Begin a new child window
Parameters:
-
(id¶str) –The id of the child window
-
(width¶float) –The width of the child window
-
(height¶float) –The height of the child window
-
(border¶bool, default:False) –Whether the child window has a border (default: False)
-
(flags¶int, default:0) –The flags of the child window (default: 0)
Returns:
-
bool(bool) –True if the child window is open
begin_combo
¶
begin_drag_drop_source
¶
begin_main_menu_bar
¶
begin_menu
¶
begin_popup
¶
begin_tab_bar
¶
begin_tab_item
¶
button
¶
checkbox
¶
get_content_region_available
¶
get_cursor_screen_pos
¶
get_window_draw_list
¶
image
¶
image(texture_id: int, size: Tuple[int, int], uv0: Tuple[float, float] = (0.0, 0.0), uv1: Tuple[float, float] = (1.0, 1.0), tint_col: Optional[Tuple[float, float, float, float]] = None, border_col: Optional[Tuple[float, float, float, float]] = None) -> None
Create an image
Parameters:
-
(texture_id¶int) –The id of the texture
-
(size¶Tuple[int, int]) –The size of the image (width, height)
-
(uv0¶Tuple[float, float], default:(0.0, 0.0)) –The UV coordinates for the top-left corner (default: (0.0, 0.0))
-
(uv1¶Tuple[float, float], default:(1.0, 1.0)) –The UV coordinates for the bottom-right corner (default: (1.0, 1.0))
-
(tint_col¶Optional[Tuple[float, float, float, float]], default:None) –The tint color (default: None)
-
(border_col¶Optional[Tuple[float, float, float, float]], default:None) –The border color (default: None)
input_float
¶
input_float(label: str, value: float, step: float = 0.0, step_fast: float = 0.0, format: str = '%.3f', flags: int = 0) -> Tuple[bool, float]
Create a float input field
Parameters:
-
(label¶str) –The label of the input field
-
(value¶float) –The value of the input field
-
(step¶float, default:0.0) –The step of the input field (default: 0.0)
-
(step_fast¶float, default:0.0) –The fast step of the input field (default: 0.0)
-
(format¶str, default:'%.3f') –The format of the input field (default: "%.3f")
-
(flags¶int, default:0) –The flags of the input field (default: 0)
Returns:
input_text
¶
input_text_multiline
¶
input_text_multiline(label: str, value: str, buffer_length: int, width: float = 0.0, height: float = 0.0, flags: int = 0, callback: Optional[Any] = None) -> Tuple[bool, str]
Create a multiline input text field
Parameters:
-
(label¶str) –The label of the input field
-
(value¶str) –The value of the input field
-
(buffer_length¶int) –The length of the buffer
-
(width¶float, default:0.0) –The width of the input field (default: 0.0)
-
(height¶float, default:0.0) –The height of the input field (default: 0.0)
-
(flags¶int, default:0) –The flags of the input field (default: 0)
-
(callback¶Optional[Any], default:None) –The callback of the input field (default: None)
Returns:
menu_item
¶
menu_item(label: str, shortcut: Optional[str] = None, selected: bool = False, enabled: bool = True) -> Tuple[bool, bool]
Create a menu item
Parameters:
-
(label¶str) –The label of the menu item
-
(shortcut¶Optional[str], default:None) –The shortcut of the menu item (default: None)
-
(selected¶bool, default:False) –Whether the menu item is selected (default: False)
-
(enabled¶bool, default:True) –Whether the menu item is enabled (default: True)
Returns:
radio_button
¶
same_line
¶
set_next_window_bg_alpha
¶
set_next_window_collapsed
¶
set_next_window_content_size
¶
set_next_window_position
¶
set_next_window_size
¶
set_next_window_size_constraints
¶
set_next_window_size_constraints(min_width: float, min_height: float, max_width: float, max_height: float, cond: int = 0) -> None
Set the size constraints of the next window
Parameters:
slider_float
¶
slider_float(label: str, value: float, min_value: float, max_value: float, format: str = '%.3f', power: float = 1.0, flags: int = 0) -> Tuple[bool, float]
Create a float slider
Parameters:
-
(label¶str) –The label of the slider
-
(value¶float) –The value of the slider
-
(min_value¶float) –The minimum value of the slider
-
(max_value¶float) –The maximum value of the slider
-
(format¶str, default:'%.3f') –The format of the slider (default: "%.3f")
-
(power¶float, default:1.0) –The power of the slider (default: 1.0)
-
(flags¶int, default:0) –The flags of the slider (default: 0)
Returns:
slider_int
¶
slider_int(label: str, value: int, min_value: int, max_value: int, format: str = '%d', flags: int = 0) -> Tuple[bool, int]
Create an integer slider
Parameters:
-
(label¶str) –The label of the slider
-
(value¶int) –The value of the slider
-
(min_value¶int) –The minimum value of the slider
-
(max_value¶int) –The maximum value of the slider
-
(format¶str, default:'%d') –The format of the slider (default: "%d")
-
(flags¶int, default:0) –The flags of the slider (default: 0)
Returns: