Commit Graph

7662 Commits

Author SHA1 Message Date
ocornut
0d3b468cb3 BeginChild(): added ImGuiChildFlags_AutoResizeX, ImGuiChildFlags_AutoResizeY, ImGuiChildFlags_AlwaysAutoResize + support for SetNextWindowSizeConstraints(). (#1666, #1395, #1496, #1710) + Demo
Note that child don't report ideal content size to parent so nesting may be difficult.
Note 4e4042b simplified SkipItems logic.
Note e2035a5 standardizing WindowMinSize application on child
2023-11-07 20:15:32 +01:00
ocornut
44345c2108 Better documented the difference between BeginListBox() and BeginChild() w/ ImGuiChildFlags_FrameStyle.
BeginListBox() can't yet expose child flags because coarse clipping require query of stored size (same issue as with adding resize support to Tables).
2023-11-07 20:14:54 +01:00
ocornut
fa4c49b4a7 BeginChild(): resizing is only clamped on axis where there's no scrollbar. Added an extra ResizeX in Demo->Simple Layout. 2023-11-07 19:01:35 +01:00
ocornut
cdbc21a191 BeginChild(): Added ImGuiChildFlags_FrameStyle as a replacement for BeginChildFrame(). (#1666, #1496, #1395, #1710, #462, #503, #263)
Effectively allows us to avoid extending BeginChildFrame() api to mimic BeginChild() new parameters.
2023-11-07 18:50:32 +01:00
ocornut
ab47efd9a0 Bits / comments 2023-11-06 18:17:12 +01:00
ocornut
561af15d67 Internal: Added owner aware variant of IsMouseDoubleClicked() for consistency.
Amend 4448d97. Note that functions entry points will eventually be merged into one, so this is not a problem.
2023-11-06 14:09:35 +01:00
ocornut
376035fd01 Nav: fixed programmatic nav calls (e.g. SetKeyboardFocusHere() from storing io.KeyMods)
Note that the g.NavMoveKeyMods -> g.NavJustMovedToKeyMods chain is not used in this branch. Multi-select uses it.
2023-11-06 14:03:40 +01:00
ocornut
cfc71ab7c5 Made ImDrawCallback_ResetRenderState special value -8 instead of -1 so it is pointer aligned (#6969)
note https://github.com/dearimgui/dear_bindings/issues/56 may not be of direct use as-i.
2023-11-06 14:00:39 +01:00
ocornut
1ab63d925f Undid some of the changes done by c95fbb4 because they are not compatible with docking code.
(Will cherry-pick this from docking to master)

# Conflicts:
#	imgui.cpp
2023-11-02 18:08:39 +01:00
ocornut
c0bc43ccff Offset values for ImGuiWindowFlags_NoNavInputs, ImGuiWindowFlags_NoNavFocus, ImGuiWindowFlags_UnsavedDocument.
(ABI breaking but we technically never supported ABI backward/forward compat, thought it is possible that some generated backends be affected)
2023-11-02 17:39:32 +01:00
ocornut
f1d1a8d32b Windows: use relative mouse movement for border resize when the border geometry has moved. (#1710)
(e.g. resizing a child window triggering parent scroll) to avoid resizing feedback loop.
2023-11-02 17:34:49 +01:00
ocornut
9235352400 BeginChild: Added ImGuiChildFlags_ResizeX and ImGuiChildFlags_ResizeY. (#1710) 2023-11-02 17:34:49 +01:00
ocornut
34a0bc456e BeginChild: Added ImGuiChildFlags_AlwaysUseWindowPadding, obsoleted ImGuiWindowFlags_AlwaysUseWindowPadding. (#462, (toward #1666, #1496, #1395, #1710)
(bonus: will also eventually free a window flag)
2023-11-02 17:26:23 +01:00
ocornut
7713c29258 BeginChild: Upgraded 'bool border = true' parameter to use a ImGuiChildFlags type and the ImGuiChildFlags_Border value. (toward #1666, #1496, #1395, #1710) 2023-11-02 17:26:05 +01:00
ocornut
88fec09715 ColorPicker4(): Fixed ImGuiColorEditFlags_NoTooltip when ImGuiColorEditFlags_NoSidePreview is also set. (#6957) 2023-10-26 15:45:45 +02:00
ocornut
313676d200 Settings: omit outputing Collapsed=0 in .ini file. Changelog + docs tweaks 2023-10-20 17:56:54 +02:00
ocornut
8ee85137d8 BeginChild(): Internal name used by child windows now omits the hash/id if the child window is submitted in root of id stack of parent window.
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.h
2023-10-20 15:40:11 +02:00
ocornut
4e4042bc33 Windows: tidying up skipitems logic at end of Begin(), normally should be no meaningful side-effect. 2023-10-20 15:38:58 +02:00
ocornut
bc3c6e74e6 Windows: fixed double-clicked border from showing highlighted at the new position.
Amend c95fbb4 + misc tidying up, comments of grip/border resizing struct.
2023-10-19 18:38:32 +02:00
ocornut
e2035a514c Windows: shared code for CalcWindowMinSize().
+ Don't apply WindowMinSize during auto-fit of child windows (not exercised yet).
2023-10-19 17:32:51 +02:00
ocornut
c95fbb4464 Windows: Double-clicking bottom or right window border auto-resize on a singles axis. 2023-10-19 16:19:29 +02:00
ocornut
ade2acfd1d Inputs: Added IsKeyChordPressed() public helper function.
Amend 99913b5
2023-10-19 14:44:24 +02:00
ocornut
1b9cb52d7b BeginChild(): rename parameters to reduce diff of upcoming patches.
Should be a no-op.
2023-10-18 19:41:51 +02:00
ocornut
f8dc03d702 Windows: Can also auto-resize by double-clicking lower-left resize grip (not only lower-right one). 2023-10-18 17:48:33 +02:00
ocornut
56f7e853be Demo: expose more Combo flags + misc tidying up. 2023-10-18 17:48:33 +02:00
ocornut
9a5da23553 Changelog formatting 2023-10-17 14:22:58 +02:00
ocornut
d6d00b4fcf Moved BeginChild() above BeginChildEx() as it is more readable.
Misc shallow tidying up. Should be a no-op.
2023-10-17 13:45:39 +02:00
ocornut
99913b5051 Internals: added IsKeyChordPressed() for consistency. 2023-10-16 22:21:29 +02:00
ocornut
a8bdbfddf9 Tables: Fixed top-most and left-most outer border overlapping inner clip-rect when scrolling. (#6765) 2023-10-16 21:51:13 +02:00
ocornut
8db02ef8df Tables: Fixed an issue with ScrollX enabled where an extraneous draw command would be created.
Randomly found while deep-diving into #6765.
ContentMaxXHeadersUsed has been set to max since the dawn of tables, which contradict the intent of passing zero-width to ItemSize(). The ItemSize code allowed SameLine() to operate, but this mistake setting ContentMaxXHeadersUsed would make right-most visible column in a ScrollX set incorrectly use a draw command due to header claiming whole column width.
2023-10-16 21:33:51 +02:00
ocornut
947255c3da Tooltips: made it possible to use ImGuiHoveredFlags_ForTooltip + a ImGuiHoveredFlags_DelayXXXX override. (#1485) 2023-10-16 14:57:44 +02:00
ocornut
0b8c6b9bce Internals: removed seemingly unused AutoFitChildAxises.
The clamp was done on BeginChild(). Amend 2545d75c
2023-10-13 14:52:08 +02:00
ocornut
12a3c77c2f Demo: Minor tweak to angled headers demo. 2023-10-12 20:00:34 +02:00
ocornut
f96c5443b1 Tables: fixed angled headers with frozen columns. 2023-10-12 19:47:58 +02:00
ocornut
32228d8add Tables: added Angled headers support. Added ImGuiTableColumnFlags_AngledHeader, ImGui::TableHeadersAngledRow(), style.TableAngledHeadersAngle. (#2957) 2023-10-12 19:21:02 +02:00
ocornut
9f851ebfe4 Tables: added ImGuiTableFlags_HighlightHoveredColumn. 2023-10-12 19:15:17 +02:00
ocornut
be1311cfc1 Tables: fixed double-clicking on a column from clearing HoveredColumnBorder for a frame. 2023-10-12 13:56:06 +02:00
ocornut
08606714a3 Fixed incorrect assert in FocusTopMostWindowUnderOne() preventing child+popup from being used. (#6915, #718) 2023-10-12 12:21:30 +02:00
ocornut
5053d79a24 Tables: Internal: rework so stacked headers height may be used. 2023-10-11 17:28:07 +02:00
ocornut
b9ebb8e06f Tables: fixed right-clicking right-most section (past right-most column) from highlighting right-most column. 2023-10-10 16:44:56 +02:00
ocornut
feddcf3030 Combo: amends for ImGuiComboFlags_WidthFitPreview. (#6881)
Amend 112d8fc
2023-10-09 11:34:05 +02:00
mpv-enjoyer
112d8fc41d Combo: added ImGuiComboFlags_WidthFitPreview. (#6881) 2023-10-09 11:26:00 +02:00
ocornut
001f102f38 IO, Backends: added ImGuiKey_AppBack, ImGuiKey_AppForward. (#6891, #4921) 2023-10-05 21:26:07 +02:00
ocornut
7bbd758681 Backends: Win32: revert oops chunk.
Amend b0758c8
2023-10-05 20:58:25 +02:00
ocornut
b0758c86d8 Backends: Added support for extra ImGuiKey values: F13 to F24 function keys. (#6891, #4921) 2023-10-05 20:39:49 +02:00
Andon M. Coleman
73346e4341 IO: Add extra keys to ImGuiKey enumerator: ImGuiKey_F13 to ImGuiKey_F24. (#6891, #4921) 2023-10-05 20:16:08 +02:00
ocornut
0312a29e4c ImageButton(): clarify purpose of size. (#6901, #5533, #4471, #2464, #1390).
Amend 4a2ae06ca
2023-10-05 18:51:45 +02:00
ocornut
1107bffe84 Popups: clarified meaning of 'p_open != NULL' in BeginPopupModal() + set back user value to false when popup is closed in ways other than clicking the close button. (#6900) 2023-10-05 17:45:31 +02:00
ocornut
2c07d581de TreeNode: Added ImGuiTreeNodeFlags_SpanAllColumns for use in tables. (#3151, #3565, #2451, #2438) 2023-10-05 15:05:58 +02:00
ocornut
085ed7bfbe Drag and Drop: Rework drop target highlight. (#4281, #3272)
Amend 4ddb6b46, 4b94738c7
2023-10-05 14:13:27 +02:00