diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index 814dfc3..5f65902 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-27T16:25:12","documenter_version":"1.5.0"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-28T09:37:25","documenter_version":"1.5.0"}}
\ No newline at end of file
diff --git a/dev/_changelog/index.html b/dev/_changelog/index.html
index 491ddb3..238cd57 100644
--- a/dev/_changelog/index.html
+++ b/dev/_changelog/index.html
@@ -1,2 +1,2 @@
-
CImGui.jl now uses semantic versioning to make development easier. This release is based on Dear ImGui 1.90.8.
Breaking: LibCImGui.jl has been merged into CImGui.lib, again for the sake of ease of development.
Breaking: The custom backends that we developed, ImGuiOpenGLBackend.jl and ImGuiGLFWBackend.jl, have been deprecated in favour of using ImGui's official backends. With this change we also dropped support for OpenGL 2, but purely out of laziness. If you need OpenGL 2 let us know and we can build and ship the official OpenGL 2 backend.
Breaking: The built-in renderloop is implemented using package extensions, which are only available on Julia 1.9+. Hence the new minimum required Julia version is 1.9.
CImGui.jl now uses semantic versioning to make development easier. This release is based on Dear ImGui 1.90.8.
Breaking: LibCImGui.jl has been merged into CImGui.lib, again for the sake of ease of development.
Breaking: The custom backends that we developed, ImGuiOpenGLBackend.jl and ImGuiGLFWBackend.jl, have been deprecated in favour of using ImGui's official backends. With this change we also dropped support for OpenGL 2, but purely out of laziness. If you need OpenGL 2 let us know and we can build and ship the official OpenGL 2 backend.
Breaking: The built-in renderloop is implemented using package extensions, which are only available on Julia 1.9+. Hence the new minimum required Julia version is 1.9.
This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible.
Transfer ownership of 'ttfdata' to ImFontAtlas! Will be deleted after destruction of the atlas. Set `fontcfg.FontDataOwnedByAtlas=false` to keep ownership of your data and it won't be freed.
Vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item).
Push window to the stack and start appending to it.
Usage
you may append multiple times to the same window during the same frame.
passing p_open != C_NULL shows a window-closing widget in the upper-right corner of the window, which clicking will set the boolean to false when clicked.
Begin return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
Note
Always call a matching End for each Begin call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc.) where the EndXXX call should only be called if the corresponding BeginXXX function returned true.
Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
Return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
For each independent axis of size:
x == 0.0: use remaining host window size
x > 0.0: fixed size
x < 0.0: use remaining window size minus abs(size)
Each axis can use a different mode, e.g. ImVec2(0,400).
Note
Always call a matching EndChild for each BeginChild call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc.) where the EndXXX call should only be called if the corresponding BeginXXX function returned true.
Lock horizontal starting position + capture group bounding box into one "item", so you can use IsItemHovered or layout primitives such as SameLine on whole group, etc.
Use if you want to reimplement ListBox will custom data or interactions. If the function return true, you can output elements then call EndListBox afterwards.
Helper to open and begin popup when clicked on last item. if you can pass a CNULL strid only if the previous item had an id. If you want to use that on a non-interactive item such as Text you need to pass in an explicit ID here.
Formatting is not supported which means you need to pass a formatted string to this function. It's recommended to use Julia stdlib Printf's @sprintf as a workaround when translating C/C++ code to Julia.
Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse clipping based on visibility to save yourself from processing those items at all.
If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse clipping based on visibility to save yourself from processing those items at all.
The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. ImGui already clip items based on their bounds but it needs to measure text size to do so. Coarse clipping before submission makes this cost and your own data fetching/submission cost null.
This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible.
Transfer ownership of 'ttfdata' to ImFontAtlas! Will be deleted after destruction of the atlas. Set `fontcfg.FontDataOwnedByAtlas=false` to keep ownership of your data and it won't be freed.
Vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item).
Push window to the stack and start appending to it.
Usage
you may append multiple times to the same window during the same frame.
passing p_open != C_NULL shows a window-closing widget in the upper-right corner of the window, which clicking will set the boolean to false when clicked.
Begin return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
Note
Always call a matching End for each Begin call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc.) where the EndXXX call should only be called if the corresponding BeginXXX function returned true.
Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
Return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
For each independent axis of size:
x == 0.0: use remaining host window size
x > 0.0: fixed size
x < 0.0: use remaining window size minus abs(size)
Each axis can use a different mode, e.g. ImVec2(0,400).
Note
Always call a matching EndChild for each BeginChild call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc.) where the EndXXX call should only be called if the corresponding BeginXXX function returned true.
Lock horizontal starting position + capture group bounding box into one "item", so you can use IsItemHovered or layout primitives such as SameLine on whole group, etc.
Use if you want to reimplement ListBox will custom data or interactions. If the function return true, you can output elements then call EndListBox afterwards.
Helper to open and begin popup when clicked on last item. if you can pass a CNULL strid only if the previous item had an id. If you want to use that on a non-interactive item such as Text you need to pass in an explicit ID here.
Formatting is not supported which means you need to pass a formatted string to this function. It's recommended to use Julia stdlib Printf's @sprintf as a workaround when translating C/C++ code to Julia.
Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse clipping based on visibility to save yourself from processing those items at all.
If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse clipping based on visibility to save yourself from processing those items at all.
The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. ImGui already clip items based on their bounds but it needs to measure text size to do so. Coarse clipping before submission makes this cost and your own data fetching/submission cost null.
Example
clipper = CImGui.Clipper()
Begin(clipper, 1000) # we have 1000 elements, evenly spaced.
while CImGui.Step()
dis_start = CImGui.Get(clipper, :DisplayStart)
dis_end = CImGui.Get(clipper, :DisplayEnd)-1
foreach(i->CImGui.Text("line number $i"), dis_start:dis_end)
-end
Step 0: the clipper let you process the first element, regardless of it being visible or not, so we can measure the element height (step skipped if we passed a known height as second arg to constructor).
Step 1: the clipper infer height from first element, calculate the actual range of elements to display, and position the cursor before the first element.
(Step 2: dummy step only required if an explicit items_height was passed to constructor or Begin and user call Step. Does nothing and switch to Step 3.)
Step 3: the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd), advance the cursor to the end of the list and then returns false to end the loop.
Arguments
items_count: use -1 to ignore (you can call Begin later). use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
items_height: use -1.0 to be calculated automatically on first step. otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing or GetFrameHeightWithSpacing. If you don't specify an items_height, you NEED to call Step. If you specify items_height you may call the old Begin/End api directly, but prefer calling Step.
You can also use SameLine(pos_x) for simplified columns. The columns API is work-in-progress and rather lacking (columns are arguably the worst part of dear imgui at the moment!)