Pyimgui Versions Save

Cython-based Python bindings for dear imgui

2.0.0

1 year ago

A new major release is finally here!

It has been a very long and intense road. But I finally managed to take some time to gather everything together and release this new version of pyimgui. The project started three years ago when I took the challenge to upgrade the internal DearImGui library version from 1.65 to 1.79 and then to 1.82. What started as a small upgrade revealed itself to be a massive modification and asked for a lot of change. So many changes that the decision has been made to release it under a new major version of pyimgui.

Over the years, many have participated in this achievement, and I don't have enough words to thank them enough.

Important note

This new major release changes some function names, removes the support of old obsoleted DearImGui functions, and changes the way some previously implemented functions are called (e.g. change of arguments type or order). It thus may break some old code bases, and some care should be taken if you wish to update an old project.

In future releases, I want to be more transparent and rigorous about what changes exactly to help developers update their code.

Announcements

  • Support for DearImGui 1.82 is now official. It implies that many modern features have now been ported to pyimgui. Future releases will tend to catch up with DearImGui.
  • Support for python 2.7, 3.3, 3.4, and 3.5 is now dropped. Pyimgui currently supports python 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. We also officially support Pypy 3.7, 3.8, and 3.9. It is always possible to compile from source in order to use pyimgui with another python version, however, test routines may not work correctly.
  • We now have a docking branch (see: docking) that is up-to-date with the corresponding branch of DearImGui 1.82. Please note that this is still a work in progress, and many features still need to be properly ported and will still be worked on.

New features

Pyimgui is now divided into two submodules:

  • imgui.core, which contains core functionalities and is equivalent to the old imgui namespace. Note that import imgui defaults to imgui.core such that we can still use imgui.xxx() as before.
  • imgui.internal, which gives access to very few (to be increased in future) internal DearImGui functions such as push_item_flag() and pop_item_flag().

New

  • Pyimgui now supports using the with keyword instead of the begin/end syntax of DearImGui. The old syntax is still valid; it is just a bonus for a better Pythonic experience. (#264, #271, thanks to @mCodingLLC)
  • Mapping of begin_combo() and end_combo(), which also work with the with keyword (#313, thanks to @Willy-JL)
  • Mapping of additional drawlist methods:
    • add_rect_filled_multicolor, add_quad, add_quad_filled, add_triangle, add_triangle_filled, add_bezier_cubic, add_bezier_quadratic, path_clear, path_line_to, path_fill_convex, path_stroke, path_arc_to, path_arc_to_fast, and path_rect (#312, thanks to @Godzil)
    • add_image_rounded() (#279, thanks to @Willy-JL)
  • Mapping of io.fonts.texture_desired_width (#287, thanks to @Willy-JL)
  • Add support for TTF custom glyph ranges and font config (#241, thanks to @saulthu)
  • Mapping of set_next_window_size_constraints(), set_scroll_here_x(), set_scroll_here_y(), slider_angle(), get_drag_drop_payload(), show_about_window(), is_item_edited(), is_item_activated(), is_item_deactivated(), is_item_deactivated_after_edit(), is_item_toggled_open(), get_background_draw_list(), get_foreground_draw_list(), input_text_with_hint(), set_next_item_width(), set_next_item_open(), get_tree_node_to_label_spacing(), add_input_character_utf16(), capture_mouse_from_app(), get_clipboard_text(), set_clipboard_text(), load_ini_settings_from_disk(), load_ini_settings_from_memory(), save_ini_settings_to_disk(), save_ini_settings_to_memory(), color_convert_u32_to_float4(), color_convert_float4_to_u32(), color_convert_rgb_to_hsv(), color_convert_hsv_to_rgb(), drag_scalar(), drag_scalar_N(), input_scalar(), input_scalar_N(), slider_scalar(), slider_scalar_N(), v_slider_scalar(), drag_float_range2(), drag_int_range2(), push_clip_rect(), pop_clip_rect()
  • Functions slider_xxx() and drag_xxx() now take a SLIDER_FLAGS_xxx flag as parameter
  • Mapping of tab functionality: begin_tab_bar(), end_tab_bar(), begin_tab_item(), end_tab_item(), tab_item_button(), set_tab_item_closed()
  • Mapping of table functionality: begin_table(), end_table(), table_next_row(), table_next_column(), table_set_column_index(), table_setup_column(), table_setup_scroll_freez(), table_headers_row(), table_header(), table_get_sort_specs(), table_get_column_count(), table_get_column_index(), table_get_row_index(), table_get_column_name(), table_get_column_flags(), table_set_background_color()
  • Mapping of drawdata.display_pos(), drawdata.display_size(), drawdata.frame_buffer_scale()
  • Mapping of guistyle.log_slider_deadzone, guistyle.tab_rounding, guistyle.tab_border_size, guistyle.tab_min_width_for_close_button, guistyle.selectable_text_align, guistyle.anti_aliased_line_use_tex, guistyle.circle_segment_max_error, guistyle.window_menu_button_position, guistyle.color_button_position, guistyle.cell_padding, guistyle.config_drag_click_to_input_text
  • Mapping of drawlist.add_ngon(), drawlist.add_ngon_filled(), drawlist.flags, drawlist.push_clip_rect(), drawlist.push_clip_rect_full_screen(), drawlist.pop_clip_rect(), drawlist.push_texture_id(), drawlist.pop_texture_id(), drawlist.get_clip_rect_min(), drawlist.get_clip_rect_max()
  • Change mapping of popup context functionality: begin_popup_context_item(), open_popup_on_item_click(), begin_popup_context_void(), is_popup_open()
  • Mapping of fontatlas.get_glyph_ranges_thai(), fontatlas.get_glyph_ranges_vietnamese()
  • Mapping of io.metrics_render_indices, io.metrics_render_windows, io.metrics_active_allocations, io.config_windows_move_from_title_bar_only, io.config_windows_move_from_title_bar_only, io.config_windows_memory_compact_timer, io.config_windows_memory_compact_timer, io.nav_inputs
  • invisible_button() now takes a flag as input
  • Added callback functionality to function that allows it in DarImGui
  • Added a ton of new flags:
    • NONE
    • STYLE_CELL_PADDING, STYLE_TAB_ROUNDING, STYLE_SELECTABLE_TEXT_ALIGN
    • BUTTON_NONE, BUTTON_MOUSE_BUTTON_LEFT, BUTTON_MOUSE_BUTTON_RIGHT, BUTTON_MOUSE_BUTTON_MIDDLE
    • KEY_PAD_ENTER
    • KEY_MOD_NONE, KEY_MOD_CTRL, KEY_MOD_SHIFT, KEY_MOD_ALT, KEY_MOD_SUPER, NAV_INPUT_ACTIVATE, NAV_INPUT_CANCEL, NAV_INPUT_INPUT, NAV_INPUT_MENU, NAV_INPUT_DPAD_LEFT, NAV_INPUT_DPAD_RIGHT, NAV_INPUT_DPAD_UP, NAV_INPUT_DPAD_DOWN, NAV_INPUT_L_STICK_LEFT, NAV_INPUT_L_STICK_RIGHT, NAV_INPUT_L_STICK_UP, NAV_INPUT_L_STICK_DOWN, NAV_INPUT_FOCUS_PREV, NAV_INPUT_FOCUS_NEXT, NAV_INPUT_TWEAK_SLOW, NAV_INPUT_TWEAK_FAST, NAV_INPUT_COUNT
    • WINDOW_NONE, WINDOW_NO_BACKGROUND, WINDOW_NO_MOUSE_INPUTS, WINDOW_UNSAVED_DOCUMENT, WINDOW_NO_DECORATION
    • COLOR_EDIT_NONE, COLOR_EDIT_NO_ALPHA, COLOR_EDIT_NO_PICKER, COLOR_EDIT_NO_OPTIONS, COLOR_EDIT_NO_SMALL_PREVIEW, COLOR_EDIT_NO_INPUTS, COLOR_EDIT_NO_TOOLTIP, COLOR_EDIT_NO_LABEL, COLOR_EDIT_NO_SIDE_PREVIEW, COLOR_EDIT_NO_DRAG_DROP, COLOR_EDIT_NO_BORDER, COLOR_EDIT_ALPHA_BAR, COLOR_EDIT_ALPHA_PREVIEW, COLOR_EDIT_ALPHA_PREVIEW_HALF, COLOR_EDIT_HDR, COLOR_EDIT_DISPLAY_RGB, COLOR_EDIT_DISPLAY_HSV, COLOR_EDIT_DISPLAY_HEX, COLOR_EDIT_UINT8, COLOR_EDIT_FLOAT, COLOR_EDIT_PICKER_HUE_BAR, COLOR_EDIT_PICKER_HUE_WHEEL, COLOR_EDIT_INPUT_RGB, COLOR_EDIT_INPUT_HSV, COLOR_EDIT_DEFAULT_OPTIONS
    • TREE_NODE_NONE, TREE_NODE_SPAN_AVAILABLE_WIDTH, TREE_NODE_SPAN_FULL_WIDTH, TREE_NODE_NAV_LEFT_JUPS_BACK_HERE
    • POPUP_NONE, POPUP_MOUSE_BUTTON_LEFT, POPUP_MOUSE_BUTTON_RIGHT, POPUP_MOUSE_BUTTON_MIDDLE, POPUP_MOUSE_BUTTON_MASK, POPUP_MOUSE_BUTTON_DEFAULT, POPUP_NO_OPEN_OVER_EXISTING_POPUP, POPUP_NO_OPEN_OVER_ITEMS, POPUP_ANY_POPUP_ID, POPUP_ANY_POPUP_LEVEL, POPUP_ANY_POPUP
    • SELECTABLE_NONE, SELECTABLE_DISABLED, SELECTABLE_ALLOW_ITEM_OVERLAP
    • COMBO_NONE
    • TAB_BAR_NONE, TAB_BAR_REORDERABLE, TAB_BAR_AUTO_SELECT_NEW_TABS, TAB_BAR_TAB_LIST_POPUP_BUTTON, TAB_BAR_NO_CLOSE_WITH_MIDDLE_MOUSE_BUTTON, TAB_BAR_NO_TAB_LIST_SCROLLING_BUTTONS, TAB_BAR_NO_TOOLTIP, TAB_BAR_FITTING_POLICY_RESIZE_DOWN, TAB_BAR_FITTING_POLICY_SCROLL, TAB_BAR_FITTING_POLICY_MASK, TAB_BAR_FITTING_POLICY_DEFAULT
    • TAB_ITEM_NONE, TAB_ITEM_UNSAVED_DOCUMENT, TAB_ITEM_SET_SELECTED, TAB_ITEM_NO_CLOSE_WITH_MIDDLE_MOUSE_BUTTON, TAB_ITEM_NO_PUSH_ID, TAB_ITEM_NO_TOOLTIP, TAB_ITEM_NO_REORDER, TAB_ITEM_LEADING, TAB_ITEM_TRAILING
    • TABLE_NONE, TABLE_RESIZABLE, TABLE_REORDERABLE, TABLE_HIDEABLE, TABLE_SORTABLE, TABLE_NO_SAVED_SETTINGS, TABLE_CONTEXT_MENU_IN_BODY
    • TABLE_ROW_BACKGROUND, TABLE_BORDERS_INNER_HORIZONTAL, TABLE_BORDERS_OUTER_HORIZONTAL, TABLE_BORDERS_INNER_VERTICAL, TABLE_BORDERS_OUTER_VERTICAL, TABLE_BORDERS_HORIZONTAL, TABLE_BORDERS_VERTICAL, TABLE_BORDERS_INNER, TABLE_BORDERS_OUTER, TABLE_BORDERS, TABLE_NO_BORDERS_IN_BODY, TABLE_NO_BORDERS_IN_BODY_UTIL_RESIZE
    • TABLE_SIZING_FIXED_FIT, TABLE_SIZING_FIXED_SAME, TABLE_SIZING_STRETCH_PROP, TABLE_SIZING_STRETCH_SAME
    • TABLE_NO_HOST_EXTEND_X, TABLE_NO_HOST_EXTEND_Y, TABLE_NO_KEEP_COLUMNS_VISIBLE, TABLE_PRECISE_WIDTHS
    • TABLE_NO_CLIP
    • TABLE_PAD_OUTER_X, TABLE_NO_PAD_OUTER_X, TABLE_NO_PAD_INNER_X
    • TABLE_SCROLL_X, TABLE_SCROLL_Y
    • TABLE_SORT_MULTI, TABLE_SORT_TRISTATE
    • TABLE_COLUMN_NONE, TABLE_COLUMN_DEFAULT_HIDE, TABLE_COLUMN_DEFAULT_SORT, TABLE_COLUMN_WIDTH_STRETCH, TABLE_COLUMN_WIDTH_FIXED, TABLE_COLUMN_NO_RESIZE, TABLE_COLUMN_NO_REORDER, TABLE_COLUMN_NO_HIDE, TABLE_COLUMN_NO_CLIP, TABLE_COLUMN_NO_SORT, TABLE_COLUMN_NO_SORT_ASCENDING, TABLE_COLUMN_NO_SORT_DESCENDING, TABLE_COLUMN_NO_HEADER_WIDTH, TABLE_COLUMN_PREFER_SORT_ASCENDING, TABLE_COLUMN_PREFER_SORT_DESCENDING, TABLE_COLUMN_INDENT_ENABLE, TABLE_COLUMN_INDENT_DISABLE
    • TABLE_COLUMN_IS_ENABLED, TABLE_COLUMN_IS_VISIBLE, TABLE_COLUMN_IS_SORTED, TABLE_COLUMN_IS_HOVERED
    • TABLE_ROW_NONE, TABLE_ROW_HEADERS
    • TABLE_BACKGROUND_TARGET_NONE, TABLE_BACKGROUND_TARGET_ROW_BG0, TABLE_BACKGROUND_TARGET_ROW_BG1, TABLE_BACKGROUND_TARGET_CELL_BG
    • FOCUS_NONE
    • HOVERED_ALLOW_WHEN_DISABLED
    • DRAG_DROP_NONE
    • SORT_DIRECTION_NONE, SORT_DIRECTION_ASCENDING, SORT_DIRECTION_DESCENDING
    • MOUSE_CURSOR_NOT_ALLOWED
    • COLOR_TAB, COLOR_TAB_HOVERED, COLOR_TAB_ACTIVE, COLOR_TAB_UNFOCUSED, COLOR_TAB_UNFOCUSED_ACTIVE
    • COLOR_TABLE_HEADER_BACKGROUND, COLOR_TABLE_BORDER_STRONG, COLOR_TABLE_BORDER_LIGHT, COLOR_TABLE_ROW_BACKGROUND, COLOR_TABLE_ROW_BACKGROUND_ALT
    • DATA_TYPE_S8, DATA_TYPE_U8, DATA_TYPE_S16, DATA_TYPE_U16, DATA_TYPE_S32, DATA_TYPE_U32, DATA_TYPE_S64, DATA_TYPE_U64, DATA_TYPE_FLOAT, DATA_TYPE_DOUBLE
    • INPUT_TEXT_NONE, INPUT_TEXT_ALWAYS_OVERWRITE, INPUT_TEXT_CHARS_SCIENTIFIC, INPUT_TEXT_CALLBACK_RESIZE, INPUT_TEXT_CALLBACK_EDIT
    • DRAW_NONE, DRAW_CLOSED, DRAW_ROUND_CORNERS_TOP_LEFT, DRAW_ROUND_CORNERS_TOP_RIGHT, DRAW_ROUND_CORNERS_BOTTOM_LEFT, DRAW_ROUND_CORNERS_BOTTOM_RIGHT, DRAW_ROUND_CORNERS_NONE, DRAW_ROUND_CORNERS_TOP, DRAW_ROUND_CORNERS_BOTTOM, DRAW_ROUND_CORNERS_LEFT, DRAW_ROUND_CORNERS_RIGHT, DRAW_ROUND_CORNERS_ALL
    • DRAW_LIST_NONE, DRAW_LIST_ANTI_ALIASED_LINES, DRAW_LIST_ANTI_ALIASED_LINES_USE_TEX, DRAW_LIST_ANTI_ALIASED_FILL, DRAW_LIST_ALLOW_VTX_OFFSET
    • FONT_ATLAS_NONE, FONT_ATLAS_NO_POWER_OF_TWO_HEIGHT, FONT_ATLAS_NO_MOUSE_CURSOR, FONT_ATLAS_NO_BAKED_LINES
    • CONFIG_NONE
    • BACKEND_NONE, BACKEND_RENDERER_HAS_VTX_OFFSET

Obsoleted

These objects have been marked as obsolete from DearImGui and will be removed in a future release

  • Attribute GuiStyle.circle_segment_max_error
  • Function get_content_region_available_width()
  • Function get_overlay_draw_list()
  • Function listbox_header()
  • Function listbox_footer()
  • Parameter also_over_items of begin_popup_context_window()
  • Parameter power of drag_float(), drag_float2(), drag_float3(), drag_float4(), slider_float(), slider_float2(), slider_float3(), slider_float4()
  • Flag INPUT_TEXT_ALWAYS_INSERT_MODE
  • Flags DRAW_CORNER_NONE, DRAW_CORNER_TOP_LEFT, DRAW_CORNER_TOP_RIGHT, DRAW_CORNER_BOTTOM_LEFT, DRAW_CORNER_BOTTOM_RIGHT, DRAW_CORNER_TOP, DRAW_CORNER_BOTTOM, DRAW_CORNER_LEFT, DRAW_CORNER_RIGHT, and DRAW_CORNER_ALL. Please, use DRAW_* flags instead.

Depreciated

These objects have been depreciated from DearImGui API and have been removed.

  • Removed io.display_visible_min
  • Removed io.display_visible_max
  • Renamed io.config_resize_windows_from_edges to io.config_windows_resize_from_edges.
  • Renamed set_scroll_here() to set_scroll_here_y()
  • is_mouse_dragging() does not take default arguments anymore.

Improved

  • Cleaning up of documentation and examples (#311, thanks to @tayler6000)
  • io.ini_file_name and io.log_file_name can now be set to None for disabling (#292)
  • Now is_item_deactivated() returns the actual value instead of the function callable (#287, thanks to @Willy-JL)
  • Improvement in SDL examples (#276, thanks to @pthom)
  • Some python annotations (#226, thanks to @Oliver-Dahlen)
  • Better build pipeline (#305)
  • A HACKING.md file now contains important information about contributions

Bug fixes

  • Fix - Framebuffer scale crash (#307, thanks to @Willy-JL)
  • Fix - Compilation on MinGW Windows (303, thanks to @Willy-JL)
  • Fix - Typo in CONFIG_VIEWPORTS_ENABLE flag (#297, thanks to @mCodingLLC)
  • Fix - Restoring the last glPolygonMode after rendering UI (#296, thanks to @laralex)
  • Fix - Auto-resizing input buffer (#291)
  • Fix - Typo in table_setup_scroll_freeze() function (#275, thanks to @Willy-JL)
  • Fix - is_popup_open() was wrongly passing str type to DearImGui (#275, thanks to @Willy-JL)
  • Fix - Color Edit Flags (#257)
  • Fix - imgui.image() was not work if texture_id exceeded 256 (#250, thanks to @mCodingLLC)
  • Fix - Example cannot close custom window bug (#224, thanks to @gqw)
  • Fix - Typo in README.md (#267, thanks to @rp-bot)
  • Add some missing flags MOUSE_CURSOR_NONE, MOUSE_CURSOR_HAND (#209, thanks to @learn-more)
  • And many more that were not part of individual PR; feel free to lose yourself in the commit list if needed! :)

Docking branch

A docking branch that is synced to the DearImGui 1.82 docking branch has been added. It is still a work in progress but can be used if needed via manual installation. A lot of work has been put into it.

Huge thanks to

  • @saulthu (#242)
  • @ousttrue (#251)
  • @masc-it (#261)
  • @pthom (#277)

Notes from authors

I also want to address a special thanks to @learn-more, who help me a lot in managing various PR and issues. Your help has been very precious. And also to @tayler6000 for his help with issues moderation.

We also consider providing the internal DearImGui implementation as a DLL. Some work has been made in that direction thanks to @pvallet (#229), but it has not been possible to propose this in 2.0.0 and is still under considerations for future release.

Writing this release note has been quite a ride. I hope that I did not forget anything or, more importantly, anyone. Thank you all again for your help. Enjoy!

1.4.0

2 years ago

Announcements

  • Support for DearImGui 1.82 is comming in next major release (2.0)
  • 2.0.0 will drop support for Python 2.7, 3.3, 3.4, and 3.5

New features

  • Added mapping of ImGui::SliderAngle() as imgui.slider_angle() (#197, thanks to @billsix)
  • Added accessors texture_width() and texture_height() to font atlas (#203, thanks to @billsix)
  • Demo window using python functions instead of calling the C++ implementation (#206 and #223, thanks to @billsix)
  • Added missing enum values MOUSE_CURSOR_NONE, and MOUSE_CURSOR_HAND (#208, fixed in #209 thanks to @learn-more)
  • Added support for native mouse cursors in pyglet (#213, thanks to @learn-more)
  • Added mapping imgui.get_key_index(), imgui.is_key_pressed(), and imgui.is_key_down() (#218, thanks to @pbuckner)
  • AnsiText uses better colors and supports bold (bright) color codes (#221, thanks to @connorjak)

Bug fixes

  • Fix horizontal mouse wheel callback (#190, fixed in #198)
  • Removing unwanted print (#207, thanks to @learn-more)
  • Typo: CONFIG_NO_MOUSE_CURSOR_CHANGE (#216, thanks to @pbuckner)
  • Making makefile more robust (#217, thanks to @pbuckner)
  • IO has been made context specific (#219, thanks to @pbuckner)
  • Fix HSV colors in buttons (#223, thanks to @billsix)
  • Fix references to logfile/inifile (#230, fixed in #232, thanks to @learn-more)

Notes from authors

The next major release, 2.0, is right around the corner and will probably come with breaking changes. This minor release consists mainly of small features, bug fixes, and adjustments that could be squeezed in for those who won't be able to easily go to 2.0.

Build pipeline did go fully on AppVeyor using Cibuildwheel 2.1.3. This should ensure support for Python 3.6 to 3.9 on Windows, Linux, and MacOS. This implies the dropping of Python version 2.7 to 2.4 as announced in the previous minor release, but also 3.5. The current minor release has been built manually for all previously supported versions to be consistent with the made announcement. Python version support dropping will be effective for the next major release.

As you may have noticed, the project management team has changed a bit. Due to personal reasons, our dear @swistakm, creator and previous maintainer of the project, has been obliged to distance himself from the project. We are deeply grateful for what he started.

In accordance with this transition, the repository has been changed from @swistakm personal one to the @pyimgui/dev organization one. If you wish to help with the development and management of this project, feel free to contact me.

Special thanks to @learn-more who helped me to take on this project and moderated the list of issues.

1.3.0

3 years ago

Announcements:

  • support for ImGui 1.79 is coming in next major release (2.0.0)
  • The 2.0.0 version will drop support for EOL Python releases (Python 2.7, 3.3, 3.4)

New features:

  • ANSI Escape Sequence-based text coloring (#167 thanks to @connorjak), functions exposed in imgui.extra submodule
  • Glumpy integration (#164 thanks to @ivoihrke)
  • Added mapping of ImGui::CalcTextSize as imgui.calc_text_size() (#191 thanks to @KinoxKlark)

Bug fixes:

  • Fixed Pyglet example (#170 thanks to @EnigmaCurry)
  • Fixed get_column_width returning None (#179, fixed in #175 thanks to @jlalleve)
  • Fixed UnicodeDecodeError occurences in input_text_multiline (#186 thanks to @TTimo)
  • Fixed zero division exception during 'make build' on Windows (#189 thanks to @TTimo)
  • Fixed imgui.input_double actually calling InputInt instead of InputDouble (#185, fixed in #193 thanks to @billsix)

Notes from author

This release is a step towards next major release. Big thanks to @KinoxKlark for taking up this challenge!

Recent progress was sluggish mostly due to inefficient build pipelines. Building multi-platform extensions as binary wheels isn't easy. Preparing new artifacts for a minor release took often multiple days spent on fighting with issues on two different CI providers. Also free offering for OSS projects doesn't offer fast parallel builds. I simply could't afford spending so much of my personal time on doing this.

We'll be converging on Appveyor platform because it has way better support for multi-platform builds and their macOS image actually supports newer Python release. Unfortunately due to that change we are unable to provide Python3.3 wheels for macOS in ordinary release process. That's why this version will not have such a wheel. Anyway, September 2017 was the end of life for that release so I hope no body will miss it.

For next minor and patch releases we will be supporting some of other Python EOL releases but we will drop them in next major release (see Announcement section). We could support it for longer but it really makes pipelines more brittle and complex.

1.2.0

3 years ago

New features and improvements:

  • Programmable GL pipeline for pyglet integration
  • Ctrl/command key support for pyglet integration (PR #156, thanks to @tankorsmash)
  • New _IO class methods and attributes:
    • mouse attributes (mouse_wheel_horizontal, mouse_delta) and character input methods (add_input_characters_utf8, clear_input_characters) (PR #143 thanks to @Red-Pheonix)
    • Config and backend flags (PR #142 thanks to @Red-Pheonix)
    • ini_file_name attribute (#105)
  • Multiple new functions implemented (set_window_focus_labeled, set_window_size_named, set_next_window_content_size, set_window_position, set_window_position_labeled, set_window_collapsed, set_window_collapsed_labeled, text_disabled, text_wrapped, arrow_button, progress_bar, push_allow_keyboard_focus, pop_allow_keyboard_focus, push_button_repeat, pop_button_repeat, get_cursor_pos_x, get_cursor_pos_y, set_cursor_pos_x, set_cursor_pos_y, align_text_to_frame_padding) (PR #143 thanks to @Red-Pheonix)
  • Clipboard callbacks that enable clipboard integrations (PR #144 thanks to @scotty007)
  • Clipboard integration for glfw and SDL2 (PR #144 thanks to @scotty007)
  • Way to handle id scopes by push_id and pop_id methods together with handy scoped() context manager (#68, #56)
  • Allow for larger draw lists (#138 thanks to @mika-fischer)

Refactors:

  • BaseOpenGLRenderer moved to separate module (PR #148, thanks to @einarf)

Deprecations:

  • integrations.pyglet.PygletRenderer is deprecated in favour of PygletFixedPipelineRenderer, PygletProgrammablePipelineRenderer, or create_renderer factory method (PR #158 thanks to @matthewturk).

Fixes:

  • Pyglet-derrived integrations (i.e. pyglet and cocos2d) no longer end in infinite recursion on closing the window on macOS (#159). Note: requires pyglet>=1.5.6 on that platform.
  • Horizontal scrollbar with columns possible with set_window_content_size (#151, PR #143 thanks to @Red-Pheonix)
  • Fix missing space key in pyglet integration key map to enable keyboard navigation (PR #139 thanks to @frosenek)

To install this version with pip use following command:

pip install imgui==1.2.0

1.1.0

4 years ago

New features:

  • Python3.8 compatible release (PR #133, refs #132)
  • New set_window_size() function ()
  • New colored() context manager analogous to styled() (PR #129)
  • New push_id() and pop_id() functions (PR #123 thanks to @KeyMaster-)
  • Multiple new drawing functions for circles, rects, polylines, text, images (PR #131 thanks to @potocpav)
  • Gettable/settable GuiStyle colors (PR #127 thanks to @aforren1)
  • Drag and drop functionality (PR #130 thanks to @branpk)

Fixes:

  • Fixed window resizing for pygame backend (refs #128)
  • Fixed check for style variables (#119 thanks to @ifyoulike)
  • Updated docs for context creation (refs #122)

To install this version with pip use following command:

pip install imgui==1.1.0

1.0.0

4 years ago

Backwards incompatible changes:

  • Integration classes now require users to manually create ImGui context instance with imgui.create_context() before instantiation — all integrations raise RuntimeError exception if current context is not available (refs #111)
  • Context handling functions now return None if underlying pointer is NULL to avoid segmentation faults (refs #111)
  • selected widgets (windows, children) got first argument name changed from name to label for better API consistency (PR #101 thanks to @LuminousLizard)
  • Cocos2d integration got refactored — not it is based on general Pyglet integration (PR #102 thanks to @aforren1)
  • default power argument value of v_slider_float() changed from 0.0 to 1.0 (PR #92 thanks to @LuminousLizard)
  • Color handling function will now raise ValueError if provided with non-existing style variable (refs #112)
  • context managers and extra utilities imported directly from imgui.core that raised DeprecationWarnings are now finally moved to imgui.extra and are not available in the imgui.core namespace (refs #65, #113)

New features:

  • Support ImGui v1.65 (PR #83 thanks to @cammm)
  • Multiple new functions and code fixes including:
    • styling, cursors and plot widgets (PR #85 thanks to @lubieowoce)
    • focus handling, frame heights, colors, preconfigured themes (PR #77 thanks to @tim-rex)
    • plot_histogram() widget (ref #114)
    • TODO: push/pop id, push/pop clip rect, line/circle drawing, is mouse down (PR #103 thanks to @potocpav)
  • Pyglet integration (PR #102 thanks to @aforren1)
  • Python 3.7 support (refs #81, #79)
  • Support ImGui v1.61 (PR #73 thanks to @tim-rex)
  • Theming: GuiStyle class object obtained through imgui.get_style() now propagates changes to ImGui style (refs #112)
  • GuiStyle class can now instantiated only using GuiStyle.create() factory method — direct call to GuiStyle() will raise exception.
  • GuiStyle instances can now be compared using == operator — two instances are considered equal if underlying pointers are equal (refs #112)
  • _ImGuiContext classes can now be compared using == operator — two instances are considered equal if underlying pointers are equal (refs #111)
  • STYLE_BUTTON_TEXT_ALIGN style constant is now available (refs #112)

Fixes:

  • Improved memory safety of GuiStyle class — improper use no longer causes segmentation faults but instead raises proper RuntimeError exceptions (refs #112)
  • Added trailing null bytes to combo list items (PR #78 thanks to @angus-g)
  • Fixed examples in docs/examples directory (#104, #111)
  • Fixed framebuffer scaling issue on high-density screens (macOS, #111)
  • Fixed popup_border_size and child_border_size properties that got their code mixed together (refs #112)

Other notable changes:

  • Removed FutureWarning from integrations module (#109, #111)
  • Improvements to the documentation framework
  • New guides for font handling in the documentation (refs #110, #50)
  • Improved tests coverage, especially for things that previously could result in segmentation faults.
  • More examples (PR #99 thanks to @cellularmitosis)

To install this version with pip use following command:

pip install imgui==1.0.0

1.0.0a2

5 years ago

New features:

  • Support ImGui v1.65 (#83 thanks to @cammm)
  • Multiple new functions and code fixes (#85 thanks to @lubieowoce) including plot widget
  • Python 3.7 support (refs #81, #79)

Note: This is a pre-release. Detailed description of changes in the API will be provided in the first official (non-pre-release) version.

To install this prerelease version with pip use one of following commands:

pip install imgui==1.0.0a2
pip install -U imgui --pre

1.0.0a1

5 years ago

New features:

  • Support ImGui v1.61 (#73 thanks to @tim-rex)
  • Some new ImGui functions mapped (#77 thanks to @tim-rex)

Note: This is a pre-release. Detailed description of changes in the API will be provided in the first official (non-pre-release) version.

To install this prerelease version with pip use one of following commands:

pip install imgui==1.0.0a1
pip install -U imgui --pre

0.1.0

6 years ago

Fixes:

  • Fixed compatibility with Cython 0.28.x (#55 & #59, thanks to @pconerly)
  • Fixed min/max parameter swap in drag_float and drag_int widgets (#53 & #54, thanks to @jeremyherbert)

Improvements:

  • Fixed long description rendering on PyPI (#44)

Features:

  • Added is_mouse_double_clicked mapping for IsMouseDoubleClicked widget (#57, thanks to @pconerly)
  • Additional pythonic utility functions that do not exist in core C++ API are moved to imgui.extra submodule. List of these functions is documented here. This functions will be removed from imgui.core in 1.0.0 release.

Deprecation warnings:

  • imgui.core.font is now deprecated use imgui.extra.font or imgui.font instead
  • imgui.core.styled is now deprecated use imgui.extra.styled or imgui.styled instead
  • imgui.core.istyled is now deprecated use imgui.extra.istyled or imgui.istyled instead
  • imgui.core.vertex_buffer_vertex_pos_offset is now deprecated use imgui.extra.vertex_buffer_vertex_pos_offset or imgui.vertex_buffer_vertex_pos_offset instead
  • imgui.core.vertex_buffer_vertex_uv_offset is now deprecated use imgui.extra.vertex_buffer_vertex_uv_offset or imgui.vertex_buffer_vertex_uv_offset instead
  • imgui.core.vertex_buffer_vertex_col_offset is now deprecated use imgui.extra.vertex_buffer_vertex_col_offset or imgui.vertex_buffer_vertex_col_offset instead
  • imgui.core.vertex_buffer_vertex_size is now deprecated use imgui.extra.vertex_buffer_vertex_size or imgui.vertex_buffer_vertex_size instead
  • imgui.core.vertex_buffer_index_size is now deprecated use imgui.extra.vertex_buffer_index_size or imgui.vertex_buffer_index_size instead

0.0.3

6 years ago

Fixes:

  • Fixed max/min handling in drag widgets (#53, #54 thanks to @jeremyherbert)
  • Updated Cython requirements for sdist package and fixed CI build pipeline (relates to #55)