-
Notifications
You must be signed in to change notification settings - Fork 35
ImGui Addons Branch Home
It's a fork of "Dear ImGui" (the original repository is hosted here: https://github.com/ocornut/imgui).
It's a collection of "extra imgui widgets" together with an automatic way of "binding" ImGui to a specific openGL library (glfw, SDL2, glut and WinAPI), or to the Direct3D9 library, so that a single "main.cpp" file can be used for all of them.
"ImGui Addons Branch" is hosted here: https://github.com/Flix01/imgui.
"ImGui Addons" does NOT modify the original ImGui library in any way (i.e. imgui.cpp, imgui_draw.cpp and imgui_demo.cpp are untouched); it just adds:
- the "addons" subfolder.
- the two files "imgui_user.h" and "imgui_user.inl" (in the base ImGui folder).
- (optional) the "examples/addons_examples" subfolder.
Currently the extra imgui widgets that are available are:
- imguistyleserializer: to load and save ImGuiStyle from/to file.
- imguifilesystem: this addon provides: chooseFileDialog, chooseFolderDialog, saveFileDialog together with plenty of handy methods to perform file system operations and an experimental support for browsing inside zip files (through an additional definition).
- imguidatechooser: a combobox-like datechooser.
- imguilistview: a list view widget with a lot of optional features (setting its height, row sorting through column header clicking, cell editing).
- imguitoolbar: a very flexible imagebutton-bar that can be used inside ImGui Windows (with dynamic layout) and outside (docked at the sides of the screen).
- imguipanelmanager: a mini dock panel layout. Basically it uses imguitoolbar and optionally assigns an ImGui Window to some buttons. Please see main2.cpp for an extensive example on how to use it.
- imguitabwindow: contains ImGui::TabWindow, a self-partitioning ImGui::Window with TabLabels that can be dragged around (it's used in the central window of main2.cpp) and ImGui::TabLabels(...)/ImGui::TabLabelsVertical(...) that can be used as a general tab control in common windows.
- imguidock: Lumix Engine's docking system [from: https://github.com/nem0/LumixEngine/blob/master/src/editor/imgui/imgui_dock.h].
- imguivariouscontrols: a series of minor widgets, such as: ProgressBar, PopupMenuSimple (a fast, single column, scrollable, popup menu), PopupMenu (a single column menu with image entries), ColorChooser and ColorCombo (based on the code from: https://github.com/benoitjacquier/imgui), InputTextMultilineWithHorizontalScrolling (based on the code by Roflraging, https://github.com/ocornut/imgui/issues/383), ImageButtonWithText and ImageWithZoomAndPan, the ImageAnimation struct (that can be used to display animated images or animated buttons from frames in a texture or from a .gif image), TreeView (a generic tree control), and many others.
- imguinodegrapheditor: Based on the code posted by Omar, the creator of ImGui.
And in addition:
- imguistring: This file contains some classes that can be used to replace some STL classes, such as ImString and ImVectorEx<...> (but they do not support iterators).
- imguihelper: Currently it contains: OpenWithDefaultApplication(...), that should work with urls, folders and files, two serialization helper classes (mainly for internal usage, to provide serialization support to other addons) in a dedicated ImGuiHelper namespace and two optional Gz decompression helper methods (that require the zlib library) that can be used to load .ttf.gz fonts.
- imguicodeeditor: WIP (UNUSABLE NOW): this is an attempt to develop a code editor using ImGui only (without direct STL support). However, developing such a control is a huge challange, and I'm not sure when and if it will eventually be functional. An experimental cut-down version of this editor is available in the form of the function: ImGui::InputTextWithSyntaxHighlighting(...).
Tip: every single imgui "widget" addon listed above can be excluded by defining at the project level something like: NO_IMGUIFILESYSTEM, etc (and the first demo, main.cpp, should always compile).
And furthermore there's a new kind of imgui addons, called "yes addons", that must be explicitly enabled using a definition (e.g. YES_IMGUISDF). Currently they are: imguipdfviewer, imguisdf, imguisoloud, imguitinyfiledialogs, imguisqlite3, imguifreetype, imguiminigames and imguiimageeditor.
Further info about the ImGui Addons Branch, together with two demos (that are additionally available precompiled to html), can be found in the ImGui Addons Branch repository (see: examples/addons_examples/README_FIRST.txt).
Demo1 (with most of the addon widgets described above).
Demo2 (test demo of imguipanelmanager and imguitabwindow, with a custom font).
Demo3 (development playground for the imguicodeeditor control [WIP: UNUSABLE!]).