@ -673,7 +673,7 @@ There is an auto-generated [c-api for Dear ImGui (cimgui)](https://github.com/ci
- Individuals: you can support continued maintenance and development via PayPal donations. See [README](https://github.com/ocornut/imgui/blob/master/docs/README.md).
- If you are experienced with Dear ImGui and C++, look at [GitHub Issues](https://github.com/ocornut/imgui/issues), [GitHub Discussions](https://github.com/ocornut/imgui/discussions), the [Wiki](https://github.com/ocornut/imgui/wiki), read [docs/TODO.txt](https://github.com/ocornut/imgui/blob/master/docs/TODO.txt), and see how you want to help and can help!
- Disclose your usage of Dear ImGui via a dev blog post, a tweet, a screenshot, a mention somewhere, etc.
You may post screenshots or links in the [gallery threads](https://github.com/ocornut/imgui/issues/6478). Visuals are ideal as they inspire other programmers. Disclosing your use of Dear ImGui helps the library grow credibility, and helps other teams and programmers with taking decisions.
You may post screenshots or links in the [gallery threads](https://github.com/ocornut/imgui/issues/6897). Visuals are ideal as they inspire other programmers. Disclosing your use of Dear ImGui helps the library grow credibility, and helps other teams and programmers with taking decisions.
- If you have issues or if you need to hack into the library, even if you don't expect any support it is useful that you share your issues or sometimes incomplete PR.
@ -139,7 +139,7 @@ Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
### Gallery
For more user-submitted screenshots of projects using Dear ImGui, check out the [Gallery Threads](https://github.com/ocornut/imgui/issues/6478)!
For more user-submitted screenshots of projects using Dear ImGui, check out the [Gallery Threads](https://github.com/ocornut/imgui/issues/6897)!
For a list of third-party widgets and extensions, check out the [Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page.
@ -170,7 +170,7 @@ We occasionally tag [Releases](https://github.com/ocornut/imgui/releases) (with
**Who uses Dear ImGui?**
See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors), and [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your game/software if you can! Also, see the [Gallery Threads](https://github.com/ocornut/imgui/issues/6478)!
See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors), and [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your game/software if you can! Also, see the [Gallery Threads](https://github.com/ocornut/imgui/issues/6897)!
- splitter: formalize the splitter idiom into an official api (we want to handle n-way split) (#319)
- docking: B: ordering currently held in tab bar should be implicitly held by windows themselves (also see #2304)
@ -215,7 +215,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer)
- tree node: tweak color scheme to distinguish headers from selected tree node (#581)
- tree node: leaf/non-leaf highlight mismatch.
- tree node: flag to disable formatting and/or detect "%s"
- tree node/opt: could avoid formatting when clipped (flag assuming we don't care about width/height, assume single line height? format only %s/%c to be able to count height?)
- settings: write more decent code to allow saving/loading new fields: columns, selected tree nodes?
// When this returns true you need to: a) call SetDragDropPayload() exactly once, b) you may render the payload visual/description, c) call EndDragDropSource()
// If the item has an identifier:
// - This assume/require the item to be activated (typically via ButtonBehavior).
IM_ASSERT(ret);// FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddendAndSkipItemsForCurrentFrame().
flags|=(g.DragDropSourceFlags&ImGuiDragDropFlags_AcceptNoDrawDefaultRect);// Source can also inhibit the preview (useful for external sources that live for 1 frame)
payload.Delivery=was_accepted_previously&&!IsMouseDown(g.DragDropMouseButton);// For extern drag sources affecting OS window focus, it's easier to just test !IsMouseDown() instead of IsMouseReleased()
// - Issues & support https://github.com/ocornut/imgui/issues
@ -24,7 +24,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.90 WIP"
#define IMGUI_VERSION_NUM 18993
#define IMGUI_VERSION_NUM 18994
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
#define IMGUI_HAS_DOCK // Docking WIP branch
@ -361,8 +361,8 @@ namespace ImGui
IMGUI_APIboolIsWindowHovered(ImGuiHoveredFlagsflags=0);// is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!
IMGUI_APIImDrawList*GetWindowDrawList();// get draw list associated to the current window, to append your own drawing primitives
IMGUI_APIfloatGetWindowDpiScale();// get DPI scale currently associated to the current window's viewport.
IMGUI_APIImVec2GetWindowPos();// get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetScreenCursorPos())
IMGUI_APIImVec2GetWindowSize();// get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)
IMGUI_APIImVec2GetWindowPos();// get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())
IMGUI_APIImVec2GetWindowSize();// get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
IMGUI_APIfloatGetWindowWidth();// get current window width (shortcut for GetWindowSize().x)
IMGUI_APIfloatGetWindowHeight();// get current window height (shortcut for GetWindowSize().y)
IMGUI_APIImGuiViewport*GetWindowViewport();// get viewport currently associated to the current window.
@ -442,13 +442,25 @@ namespace ImGui
IMGUI_APIImU32GetColorU32(ImU32col);// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
IMGUI_APIconstImVec4&GetStyleColorVec4(ImGuiColidx);// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
// Cursor / Layout
// Layout cursor positioning
// - By "cursor" we mean the current output position.
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
IMGUI_APIImVec2GetCursorScreenPos();// cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
IMGUI_APIvoidSetCursorScreenPos(constImVec2&pos);// cursor position in absolute coordinates
IMGUI_APIImVec2GetCursorPos();// [window-local] cursor position in window coordinates (relative to window position)
IMGUI_APIImVec2GetCursorStartPos();// [window-local] initial cursor position, in window coordinates
// Other layout functions
IMGUI_APIvoidSeparator();// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
IMGUI_APIvoidSameLine(floatoffset_from_start_x=0.0f,floatspacing=-1.0f);// call between widgets or groups to layout them horizontally. X position given in window coordinates.
IMGUI_APIvoidNewLine();// undo a SameLine() or force a new line when in a horizontal-layout context.
@ -458,15 +470,6 @@ namespace ImGui
IMGUI_APIvoidUnindent(floatindent_w=0.0f);// move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0
IMGUI_APIvoidBeginGroup();// lock horizontal starting position
IMGUI_APIvoidEndGroup();// unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
IMGUI_APIImVec2GetCursorPos();// cursor position in window coordinates (relative to window position)
IMGUI_APIfloatGetCursorPosX();// (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc.
IMGUI_APIfloatGetCursorPosY();// other functions such as GetCursorScreenPos or everything in ImDrawList::
IMGUI_APIvoidSetCursorPos(constImVec2&local_pos);// are using the main, absolute coordinate system.
IMGUI_APIImVec2GetCursorStartPos();// initial cursor position in window coordinates
IMGUI_APIImVec2GetCursorScreenPos();// cursor position in absolute coordinates (useful to work with ImDrawList API). generally top-left == GetMainViewport()->Pos == (0,0) in single viewport mode, and bottom-right == GetMainViewport()->Pos+Size == io.DisplaySize in single-viewport mode.
IMGUI_APIvoidSetCursorScreenPos(constImVec2&pos);// cursor position in absolute coordinates
IMGUI_APIvoidAlignTextToFramePadding();// 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)
IMGUI_APIfloatGetTextLineHeight();// ~ FontSize
IMGUI_APIfloatGetTextLineHeightWithSpacing();// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
@ -855,7 +858,7 @@ namespace ImGui
IMGUI_APIboolBeginDragDropTarget();// call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()
IMGUI_APIconstImGuiPayload*AcceptDragDropPayload(constchar*type,ImGuiDragDropFlagsflags=0);// accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.
IMGUI_APIvoidEndDragDropTarget();// only call EndDragDropTarget() if BeginDragDropTarget() returns true!
IMGUI_APIconstImGuiPayload*GetDragDropPayload();// peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type.
IMGUI_APIconstImGuiPayload*GetDragDropPayload();// peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type.
// Disabling [BETA API]
// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
@ -1096,7 +1099,8 @@ enum ImGuiTreeNodeFlags_
ImGuiTreeNodeFlags_FramePadding=1<<10,// Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
ImGuiTreeNodeFlags_SpanAvailWidth=1<<11,// Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default.
ImGuiTreeNodeFlags_SpanFullWidth=1<<12,// Extend hit box to the left-most and right-most edges (bypass the indented area).
ImGuiTreeNodeFlags_NavLeftJumpsBackHere=1<<13,// (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
ImGuiTreeNodeFlags_SpanAllColumns=1<<13,// Frame will span all columns of its container table (text will still fit in current column)
ImGuiTreeNodeFlags_NavLeftJumpsBackHere=1<<14,// (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanAvailWidth",&base_flags,ImGuiTreeNodeFlags_SpanAvailWidth);ImGui::SameLine();HelpMarker("Extend hit area to all available width instead of allowing more items to be laid out after the node.");
ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanAllColumns",&base_flags,ImGuiTreeNodeFlags_SpanAllColumns);ImGui::SameLine();HelpMarker("For use in Tables only.");
ImGui::Checkbox("Align label with current X position",&align_label_with_current_x_position);
ImGui::Checkbox("Test tree node as drag source",&test_drag_and_drop);
x1=window->Pos.x+window->DC.Indent.x;// Used to be Pos.x before 2023/10/03
x2=window->Pos.x+window->Size.x;
PushColumnsBackground();
}
// We don't provide our width to the layout so that it doesn't get feed back into AutoFit
// FIXME: This prevents ->CursorMaxPos based bounding box evaluation from working (e.g. TableEndCell)
@ -1473,7 +1466,11 @@ void ImGui::Separator()
// Those flags should eventually be configurable by the user
// FIXME: We cannot g.Style.SeparatorTextBorderSize for thickness as it relates to SeparatorText() which is a decorated separator, not defaulting to 1.0f.