1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-09-24 11:38:34 +02:00
Commit Graph

2172 Commits

Author SHA1 Message Date
ocornut
90ef327882 Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. (#2625, #4921, #3724)
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
ocornut
467a1cd4a5 Misc: io.Framerate moving average now converge in 60 frames instead of 120. (#5236, #4138) 2022-07-01 17:09:58 +02:00
ocornut
609b935a8c InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing Enter keep the input active and select all text. 2022-06-30 15:47:54 +02:00
ocornut
24dfe6db8a Version 1.89 WIP 2022-06-27 16:55:55 +02:00
ocornut
9aae45eb4a Version 1.88
(fix "Show Debug Log" checkbox in Metrics window)
2022-06-21 18:11:50 +02:00
ocornut
d3fd2630b7 Sliders: An initial click within the knob/grab doesn't shift its position. (#1946, #5328) + Adjust default GrabMinSize. 2022-06-20 18:13:10 +02:00
Rokas Kupstys
37a07858a9 Nav: Fixed inability to cancel nav in modal popups. (#5400) 2022-06-17 14:58:26 +02:00
ocornut
07efd7cc20 Renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS. 2022-06-15 16:02:55 +02:00
ocornut
1d6e34f3f9 Debug: Added ShowDebugLogWindow().
Internal: renamed old IMGUI_DEBUG_LOG() to IMGUI_DEBUG_PRINT().
Amended once.
2022-06-13 19:05:55 +02:00
ocornut
076d8fc868 Nav: Fixed issues with nav request being transferred to another window when calling SetKeyboardFocusHere() and simultaneous changing window focus. (#4449) 2022-06-10 19:25:53 +02:00
ocornut
a35e876978 InputText: Amends and tidying up: Fixed undo/redo state corruption when editing buffer in user callback. (#4947, #4949) 2022-06-08 15:27:36 +02:00
ocornut
64d6c30562 InputText: Fixed an undo-state corruption issue when editing buffer before reactivating item. (#4947) + Metrics: Added "InputText" section. 2022-06-07 15:34:21 +02:00
ocornut
74f02703e6 Misc comments + Demo: use IsItemVisible() when using direct ImDrawList calls. 2022-06-07 11:48:05 +02:00
ocornut
65c4c0a490 IO: Added SetAppAcceptingEvents() function (#4921, #4858) 2022-06-02 16:56:00 +02:00
Rokas Kupstys
f58bd817e2 Tables: Fix drawcall merging of last column. (#4843, #4844)
Amend 83d22f4e
2022-05-31 14:22:23 +02:00
ocornut
697ce2d67b InputText: Fixed a one-frame display glitch where pressing Escape to revert after a deletion would lead to small garbage being displayed for one frame. (#3008)
Curiously very old, amend 83efdce and bdbb2b2. Using stb_ functions updated ->CurLenA without updating ->TextA, leading to `buf_display_end = buf_display + state->CurLenA;` in the display.
Since f3ab5e62 they are 1 case out of 4 which didn't apply back to ->TextA and this is essentially the one where we ensure appliance. Another solution would be to alter the lower display code, but applying to TextA makes things more consistent.
2022-05-25 18:39:00 +02:00
ocornut
7bf07d2526 Renamed CaptureMouseFromApp() and CaptureKeyboardFromApp() to SetNextFrameWantCaptureMouse() and SetNextFrameWantCaptureKeyboard(). Added demo. (#5304, #4831, #4480, #533) 2022-05-23 11:22:46 +02:00
ocornut
e346059eef IO: Fixed input queue trickling of mouse wheel events. (#4921, #4821) 2022-05-18 14:16:02 +02:00
ocornut
9e0517a134 DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. (#5249, #5293, #3491)
Amend 8ed34af6f8
2022-05-13 17:19:51 +02:00
ocornut
55f8989392 Docs update, binaries link + Backend: Allegro: fix warning (#5281) 2022-05-04 15:16:05 +02:00
ocornut
6d27fecce1 Debug: added DebugTextEncoding() to help diagnose between text encoding issues and font loading issues. Simplified code + extracted DebugNodeFontGlyph().
Helper to diagnose issues such as #4866, #3558, #3436, #2233, #1880, #1780, #905, #832, #762, #726, #609, #565, #307)
2022-05-03 19:23:54 +02:00
ocornut
3e5dde9a26 Tables: Fixed incorrect auto-fit of parent windows when using non-resizable weighted columns. (#5276) 2022-05-02 16:45:27 +02:00
ocornut
5b29d14783 Layout: Fixed mixing up SameLine() and SetCursorPos() together. SameLine() is a stateful.
+ minor unrelatedcomments.
2022-04-22 17:48:06 +02:00
Andrea Palmatè
14ca75d4e7 Backends: SDL, OpenGL3: Small fixes for AmigaOS4. (#5190) + Allow redefining IM_COL32_XXX layout macros. (#5190, #767, #844) 2022-04-13 20:43:35 +02:00
ocornut
90386780e3 Misc: Fixed calling GetID("label") _before_ a widget emitting this item inside a group (such as InputInt()) from causing an assertion when closing the group. (#5181). 2022-04-12 14:44:57 +02:00
David Maas
937d073328 Updated comment about Edit.NavigateTo to Edit.GoToAll. (#5179)
This command was renamed in Visual Studio 2017.
2022-04-11 17:11:51 +02:00
ocornut
f7f30476d5 Added comments about requirement for bilinear filtering. (#5156, #3245) + Backends: SDL_Renderer: Explicitely call SDL_SetTextureScaleMode(). (#4927) 2022-04-07 14:28:08 +02:00
ocornut
2c03aac6d3 Renamed ImGuiKeyModFlags to ImGuiModFlags (Breaking but technically never advertised type) 2022-04-05 15:45:00 +02:00
ocornut
c521883be4 Sliders, Drags: Fixed manual input when using hexadecimal display format string. (#5165, #3133)
InputScalar: Fixed manual input when using %03d style width in display format string.
(amended once)
2022-04-04 18:42:04 +02:00
ocornut
508c9aaf60 Sliders, Drags: Fixed using hexadecimal display format strings (pretty much never worked). (#5165, #3133)
Ditched unnecessary code. When transitioning from float in 3e8087458 we added an unnecessary path there, which evolved in c5fb92955.
2022-04-04 14:43:30 +02:00
ocornut
f5c5926fb9 Internals: remove obsolete variants of RenderArrow(), RenderBullet(), ImHash() + misc comments. 2022-03-29 15:43:47 +02:00
ocornut
2747a8ca40 Turned ImVec2 to const ref to RenderChar(), RenderText(), ColorButton(), PushClipRect(). for consistency. Comments about polygon filling winding order. 2022-03-29 12:13:31 +02:00
ocornut
0dec430707 Menus: Adjusted BeginMenu() closing logic so hovering void or non-MenuItem() in parent window always lead to menu closure. 2022-03-28 12:33:58 +02:00
ocornut
3587ee492b Viewports: store Viewport field in ImGuiWindow to facilitate using code accross branches + fix PVS warnings. 2022-03-25 15:40:20 +01:00
ocornut
16ddc1698d Fixed creating multiple-context (regression in 28ba54a). (#5135) 2022-03-24 11:01:46 +01:00
ocornut
28ba54a32a Internals: add AddSettingsHandler(), RemoveSettingsHandler(). 2022-03-14 10:23:30 +07:00
ocornut
fd06ed833b Misc: tweaks + fix warnings on backends withtout -wno-memaccess (#4995, #5104) 2022-03-13 17:57:32 +07:00
ocornut
fa2b318dd6 IO: Fixed input queue trickling of interleaved keys/chars events when InputText() is not active. (#4921, #4858) 2022-02-22 14:36:27 +01:00
ocornut
5659db5529 IO: Fixed backward-compatibility accesses to io.KeysDown[]. (#4921, #4858)
+ Snuck in unrelated comments and removed the "fill once" comment (#5043)
2022-02-21 21:31:01 +01:00
ocornut
dca527be1b Clipper: Assert on extraneous calls to Step(). (#4822) + Demo tweak. 2022-02-18 18:40:43 +01:00
ocornut
29d462ebce Set HoveredID even when g.NavDisableMouseHover is set by gamepad/keyboard navigation. This will facilitate the use of future InputOwner API based on HoveredID/ActiveID.
Note that this widen the small gap between polling g.HoveredID and using IsItemHovered() the later does various filtering.
Added IsItemHovered(ImGuiHoveredFlags_NoNavOverride) to disable that specific state redirect/filter.
Side-effect: fix EndGroup() use of combining HoveredId values when gamepad/keyboard nav is active. Unlikely to have user-visible side effect since IsItemHovered() would have filtered out anyway.
Side-effect: fix IsAnyItemHovered() when gamepad/keyboard is active (but this wasn't the primary intent of this change).
Side-effect: fix using SetItemUsingMouseWheel() while hovering an item and gamepad/keyboard is active. (#2891)
2022-02-17 18:39:03 +01:00
ocornut
d9e60d29e1 Clipper: Fixed a regresssion when not calling End() + calling End() twice as well. (#4822) 2022-02-17 11:09:06 +01:00
thedmd
5c8f8d0311 ImVector: Fixed erase() with empty range. (#5009) amend/fix b6b8f66
Actual change was missing in b6b8f66
2022-02-16 20:08:58 +01:00
ocornut
2dfa71fad5 Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate. Using KeyModAlt. Removed KeyModsPrev. 2022-02-16 20:08:58 +01:00
thedmd
b6b8f6634e ImVector: Fixed erase() with empty range. (#5009) 2022-02-15 11:16:08 +01:00
Jeff Mears
71f98dd056 Declare ImVec2 and ImVec4 constructors as constexpr (#4995) 2022-02-11 12:27:27 +01:00
thedmd
4691fa0ed5 ImDrawList: PthArcTo: Add small tolerance when comparing angles (#4993) 2022-02-08 17:37:45 +01:00
ocornut
88de982071 Version 1.88 WIP 2022-02-08 14:45:26 +01:00
ocornut
97b1abd6dd Internals: rework RenderMouseCursor() signature so we can use it in docking branch more naturally. 2022-02-08 12:22:46 +01:00
ocornut
c71a50deb5 Version 1.87 2022-02-07 18:16:54 +01:00
ocornut
6f73dbea80 TestEngine: submit window data to item system. 2022-02-01 15:20:32 +01:00
Clownacy
422902dbda Correct typos (#4954, #4955), use IM_STATIC_ASSERT now that old pre-C++11 macro has been obsoleted. 2022-01-31 11:58:33 +01:00
ocornut
49e38a5b32 Revert moving ImGuiKeyModFlags to internal.h (amendc906c65) 2022-01-28 15:53:09 +01:00
ocornut
c906c65cac (BREAKING) Replaced AddKeyModsEvent() added by 790132a in favor of unified key enum system. Backends: update most. (#4921, #4858)
Sorry this is an unusual breaking but since we are WIP it is a good time to make a correction.
2022-01-27 17:46:48 +01:00
ocornut
8555335935 Shallow alignment of ImGuiKey stuff + moving some in internals. Internals: add offset to ImBitArray<>, simpify ActiveIdUsingKeyInputMask. 2022-01-25 18:11:34 +01:00
ocornut
b17b2fb732 Popups: Fixed an issue when reopening a same popup multiple times would offset them by 1 pixel on the right. (#4936)
Passing explicit ImGuiPopupFlags_MouseButtonRight to OpenPopupOnItemClick() calls somehow document the unusual (due to legacy) default value.
2022-01-24 13:24:54 +01:00
sergeyn
dd6a44abb1
Fix compiler warning for Intel compiler (#4934) 2022-01-24 12:09:02 +01:00
ocornut
26e59c8742 Nav: Fixed gamepad navigation in wrapping popups not wrapping all the way. (#4365) 2022-01-21 14:41:34 +01:00
ocornut
62d6be3747 IO: Removed ImGuiInputSource from public api for now, unnecessary. (#4858, #787) 2022-01-20 17:39:25 +01:00
ocornut
f33bb99821 IO: added AddKeyAnalogEvent() and support for ImGuiKey_GamepadXXXX. (#4858, #787) 2022-01-20 17:24:52 +01:00
Rokas Kupstys
19471da3fd Popups: Fix a crash when a new window is created after a modal on the same frame. (#4920) 2022-01-20 15:03:56 +01:00
ocornut
7ad42ff431 IO: renamed io.ConfigInputEventQueue to io.ConfigInputTrickleEventQueue. (#4858) 2022-01-19 18:45:57 +01:00
ocornut
97b1ffcb3b IO: Reorder enums, compact a little in header. Removed const from internal GetKeyData(). 2022-01-19 15:42:27 +01:00
ocornut
91ae56af45 Removed support for legacy arithmetic operators (+*/) when inputing text into a slider/drag. (#4917, #3184) 2022-01-19 15:10:42 +01:00
ocornut
673f5e588d IO: moved fields to put more focus on the new functions + update misc docs/references + update main.mm in Apple+Metal example (#4858) 2022-01-18 17:41:35 +01:00
ocornut
7374b96f5c IO: Added input queue. (#4858, #2787, #1992, #3383, #2525, #1320) 2022-01-17 17:36:55 +01:00
thedmd
b8e56dce83 IO: Added AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() api + updated all Backends. (#4858) (input queue code will be next commit)
Details: note that SDL, OSX and GLFW backends removed recording of MouseJustPressed[] which will be unnecessary with input queue (which is the NEXT commit). (#2787, #1992, #3383, #2525, #1320)
2022-01-17 17:35:37 +01:00
ocornut
92c4ff1c2f Rename ImGuiKey_LeftControl to ImGuiKey_LeftCtrl, ImGuiKey_RightControl to ImGuiKey_RightCtrl + made key order match mods order. (#4858) 2022-01-17 15:42:04 +01:00
ocornut
eb823655af Removed support for pre-C++11 compilers. We'll stop supporting VS2010. (#4537)
Build all
2022-01-17 11:54:11 +01:00
ocornut
7f8a89c25c Backends: Win32, SDL: maintain MouseButtonsDown instead of using IsAnyMouseDown(). Internals: added GetInputSourceName(). 2022-01-12 16:12:10 +01:00
ocornut
956e03009a Backends: OSX: Build fIx. Made GetKeyName() input tolerant. Internals: added GetNavInputName(). 2022-01-11 18:48:16 +01:00
ocornut
e8172fdfbc Rename io.AddKeyModEvent() -> io.AddKeyModsEvent() and updated backends accordingly. (#2625, #4858)
Amend 790132a (breaking)
2022-01-10 17:00:32 +01:00
ocornut
790132a672 Added io.AddKeyModEvent() and updated backends accordingly. (#2625, #4858) 2022-01-10 15:17:00 +01:00
ocornut
bf08c13e9b Inputs: Extra Keys / AddKeyEvent(): bidirectional mapping, basic CI, simplify backends, asserts on misuses, tested backward compat. (#2625, #4858, #2787)
(edit: simplified backends merged into previous commits to make history clearer)
2022-01-10 15:09:56 +01:00
thedmd
3b66929301 Inputs: Extra Keys / AddKeyEvent(): Added ImGuiKey values, io.AddKeyEvent(), GetKeyName(), IMGUI_DISABLE_OBSOLETE_KEYIO. Obsoleted GetKeyIndex(), io.KeyMap[], io.KeysDown[]. (#2625, #4858, #2787) 2022-01-10 15:09:56 +01:00
ocornut
afffcd5810 Inputs: rename ImGuiKey_KeyPadEnter > ImGuiKey_KeypadEnter (#2625) 2022-01-06 14:25:56 +01:00
Liu Liu
de36ff043e Platform IME: add ImGuiPlatformImeData::InputLineHeight (unused by win32). (#3113) 2022-01-05 13:47:21 +01:00
actboy168
29a8ee0826 Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME when not used. (#2589) 2022-01-05 13:47:21 +01:00
ocornut
3a90dc3893 Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API.
Ref #2589, #2598, #3108, #3113, #3653, #4642
2022-01-05 13:47:20 +01:00
ocornut
04bc0b0bb8 Fix IdxBuffer related comments. (#4845, #4863) 2022-01-05 12:20:33 +01:00
ocornut
206b9ead8f IO: removed unused MouseDragMaxDistanceAbs(). Using a shortcut variable in UpdateMouseInputs(). 2022-01-04 13:01:30 +01:00
ocornut
c5a3cae83a Reordered some IO fields. Misc comments. Removed beta marker from tables comments. 2022-01-04 13:01:30 +01:00
ocornut
2402958aec Commented out redirecting functions/enums names that were marked obsolete in 1.69, 1.70, 1.71, 1.72
- ImGui::SetNextTreeNodeOpen() -> use ImGui::SetNextItemOpen()
- ImGui::GetContentRegionAvailWidth() -> use ImGui::GetContentRegionAvail().x
- ImGui::TreeAdvanceToLabelPos() -> use ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetTreeNodeToLabelSpacing());
- ImFontAtlas::CustomRect -> use ImFontAtlasCustomRect
- ImGuiColorEditFlags_RGB/HSV/HEX -> use ImGuiColorEditFlags_DisplayRGB/HSV/Hex
2022-01-03 16:37:33 +01:00
ocornut
dbeea7220f Backends: Silence overzealous warnings. (#4834) Add comments about SetDragDropPayload() return value. (#4835) 2021-12-29 12:44:12 +01:00
ocornut
89a28209e8 Version 1.87 WIP + Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init, added in 1.86 (#4468, #4830) 2021-12-26 20:02:02 +01:00
ocornut
980deb4c9e Add missing include guard to avoid declaring ImFontAtlasGetBuilderForStbTruetype() function.
https://github.com/cimgui/cimgui/issues/193
https://github.com/imgui-rs/imgui-rs/pull/582
2021-12-26 19:51:10 +01:00
ocornut
512c54bbc0 Version 1.86 2021-12-22 15:31:13 +01:00
ocornut
4a43dcb940 Internals: reduced side-effects of setting window->HiddenFramesForRenderOnly > 0 2021-12-15 16:05:15 +01:00
ocornut
48f263336b Menus: fixed closing a menu inside a popup/modal. Fixed menu inside a popup/modal not inhibiting hovering of items in the popup/modal. (#3496, #4797)
Fixed sub-menu items inside a popups from closing the popup (debatable).
2021-12-14 16:54:23 +01:00
ocornut
a528398c77 Internals: support for varying _ChildWindow flag for menu windows. (#3496, #4797) 2021-12-14 16:19:43 +01:00
xndcn
8a9fe26866 Menus: fixed closing a menu by clicking on its menu-bar item when inside a popup. (#3496, #4797) 2021-12-10 18:58:41 +01:00
ocornut
e03383d088 Fixes for tooltip over modals leading to incorrect modal dimming. (#4729)
Amend 23ef6c1. Should rework tooltip to be in a consistent position in g.Windows[]
2021-12-09 11:50:38 +01:00
Rokas Kupstys
b38af0f522 Popups: Fix popups being closed by newly appearing windows. (#4317)
* Popups/modals now remain open when new windows are created from within popup/modal begin stack.
* Modals are not closed when new window appears behind active modal.
Tested by "window_popup_interruptions"
2021-12-07 15:52:13 +01:00
ocornut
027a7ba3eb Clipper: use line size instead of cursor comparaison when range are large. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 2021-12-06 17:17:43 +01:00
ocornut
a76bc52da5 Window, Clipper: store initial precision loss and apply in clipper. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 2021-12-06 16:19:47 +01:00
ocornut
23ef6c149e Reworked modal/ctrl+tab dimming system to be entirely processed at end of the frame (backported 1dc3af3 from docking) 2021-12-03 19:21:39 +01:00
ocornut
da3a36eefd Backport from docking branch: minor stuff.
Fixed software mouse cursor being rendered multiple times if Render() is called more than once.
2021-12-03 19:11:58 +01:00
ocornut
78c6435dbb Inputs: (breaking wip) removed IsMouseTripleClicked() added recently (during 1.86 WIP), replaced with GetMouseClickedCount(). (#3229) 2021-12-03 12:38:58 +01:00
ocornut
66f0fb986c Inputtext, Nav: fixed using SetKeyboardFocusHere() on InputTextMultiline(). (#4761) 2021-11-29 16:25:45 +01:00
ocornut
65f4be1a10 InputText: Internals: moved "apply_new_text" application code to reduce noise in a future commit (will be for #4714) + removed unused fields.
The move would ideally be no-op. technically we now clear state->Flags before calling ResizeCallback but those are unrelated. The 2 unused fields were incorrectly added by 24ff25981.
2021-11-25 15:12:23 +01:00
Pascal Thomet
7cd3cfa58a Demo: Add IMGUI_DEMO_MARKER (currently unused, but usage by altering GImGuiDemoMarkerCallback) (#3689)
Various amends/renames. (Amend to fix a warning)
2021-11-10 13:09:50 +01:00
ocornut
a9ea1ae854 Nav: fixing assert using Tab in a window without any tabbable element (#4449)
Amend 1a7526dc
2021-11-10 11:42:39 +01:00
ocornut
bce1ba400f Clipper: add ForceDisplayRangeByIndices (#3841, #3578)
This partially reverts commit 6a7e2c74fb.
2021-11-08 17:20:30 +01:00
ocornut
1a7526dcd4 Nav, Tabbing: refactor tabbing system to support clipped items, scrolling, using nav queries. (#4449)
Not using counter/modulo anymore and special provisions to handle tab wrapping with ImGuiListClipper. Wrapping may be done better as a next-frame forwarded request.
Also one extra step toward #3949 #3985
2021-11-04 20:48:12 +01:00
ocornut
f01a6d3e8f InputText, Nav: fixed repeated calls to SetKeyboardFocusHere() preventing to use InputText(). (#4682)
+ Stack Tool: favor inspecting HoveredID over ActiveID as the later is more likely to be locked.
2021-11-04 20:02:42 +01:00
ocornut
64daeddf6f Removed CalcListClipping() function. (#3841) 2021-11-04 14:14:16 +01:00
ocornut
6a7e2c74fb Clipper: remove ForceDisplayRangeByIndices/ForceDisplayRangeByPositions functions until we find a need for them, since #3841 is now solved automatically. 2021-11-04 14:05:14 +01:00
ocornut
93cccd27f6 Clipper: bunch of rework. (#3841, #1725)
- Focused/NavId now always included in display range.
- Any number of steps (while preserving zero-alloc policy).
- Non contiguous ranges for nav processing
- Moved new fields internally (+ moved StepNo away from sight so it doesn't get missused).
- Generally tweaks/refactors.
2021-11-04 14:05:14 +01:00
GamingMinds-DanielC
cd1b5f7883 Clipper: enhanced ImGuiListClipper (#3841) 2021-11-04 13:56:37 +01:00
ocornut
b409df34db Clipper: Fixed content height declaration slightly mismatching the one of when not using a clipper. 2021-11-03 17:00:40 +01:00
ocornut
a67f7dce31 Nav: relative rectangle positions are now stored relative to CursorStartPos to be independent of scrolling. Will facilitate rework of clipper (#3841)
+ Extracted code into NavUpdateCreateWrappingRequest()
+ Fix for PVS in NavUpdate() assigning g.NavMousePosDirty twice.
2021-10-27 14:18:03 +02:00
ocornut
19c72cd52a Nav: fixed absolute mouse position (with NavEnableSetMousePos config flag) when using Home/End leads to scrolling. 2021-10-27 12:28:35 +02:00
ocornut
9c78fc928a Inputs: Mouse: Amend c8e3a01 for tracking multiple clicks, renaming. (#3229) 2021-10-25 14:30:20 +02:00
Chris Savoie
2318c764cf Inputs: Mouse: Add support for tracking multiple clicks more than just double (#3229) 2021-10-25 14:30:17 +02:00
Rokas Kupstys
39b99072fb ImVector: fix Clang warning (implicit conversion changes signedness: 'const ptrdiff_t' (aka 'const long long') to 'unsigned long long') 2021-10-22 14:52:26 +02:00
ocornut
e3bd9434b1 1.86 WIP + internals: tweaks table temp data code. 2021-10-14 16:58:14 +02:00
Rokas Kupstys
be03b8ff93 Misc: Fix build with MinGW when using IMGUI_API. 2021-10-12 16:43:28 +02:00
ocornut
55d35d8387 Version 1.85 2021-10-11 19:24:25 +02:00
ocornut
31d033c9d8 Nav: refactor SetKeyboardFocusHere() into using Nav facility. Fix it for clipped items. (#343, #4079, #2352, #432)
+ Removed references to counter used by previous implementation of SetKeyboardFocus functions (the TabStop ones will be removed after)
2021-10-06 18:42:11 +02:00
ocornut
2de96c4bd5 Stack Tool: Added Stack Tool (ShowStackToolWindow() function and available from Demo and Metrics window). (#4631) 2021-10-06 17:47:27 +02:00
Guus Waals
30db674147 Fix printf format warnings on mingw clang (#4626, #4183, #3592) 2021-10-06 12:00:50 +02:00
ocornut
164a86d3b0 Moved !IsActiveIdUsingKey(ImGuiKey_Tab) check to UpdateTabFocus(). Added asserts to IsItemHovered() and IsWindowHovered(). 2021-10-05 22:06:12 +02:00
ocornut
8f495e5543 Internal: added ScrollToItem() upcoming replacement to ScrollToBringRectIntoView() + ImGuiScrollFlags (WIP) (#3692, #3208, #2812, #4242, #2900) 2021-09-29 17:13:45 +02:00
ocornut
fc4988ffb0 Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527) 2021-09-24 15:39:38 +02:00
ocornut
bbb95a5e06 IO: modify io.AddFocusEvent() to tolerate in/out for multi-viewports. Amend 2f40be6. (merged from docking) (#3532) 2021-09-22 15:47:53 +02:00
Martin Ejdestig
d7260104b1
Added comments about sliders clamping and ImGuiSliderFlags_AlwaysClamp (#4573) 2021-09-21 19:18:21 +02:00
Rokas Kupstys
30546bc0e7 ColorEdit: Fix multiple issues. (#4014)
* Change g.ColorEditLastColor type to ImU32 and store RGB color value.
  - Fixes inability to change hue when saturation is 0. (#4014)
  - Fixes edgecases where lossy color conversion prevent restoration of hue/saturation.
  - Fixes hue value jitter when modifying color using SV square.
* Fix hue resetting to 0 when it is set to 255 by explicitly restoring hue if it is 0 and previous value was 1.
* Further reduce hue jitter by restoring hue when color is modified using SV square.
2021-09-21 15:10:07 +02:00
ocornut
2cffcbdc64 InputText: fix Space key with nav enabled interfering with input text boxes (fix bd6c9e99). made it possible to activate InputText with tweak gamepad button (why not, now that we can cancel) (#4552, #2321) 2021-09-17 16:30:32 +02:00
ocornut
d366694062 Disabled: Added assert guard for mismatching BeginDisabled()/EndDisabled() blocks. (#211) + Added asserts for missing PopItemFlag() calls. Added both to ErrorCheckEndFrameRecover (#1651) 2021-09-15 15:26:29 +02:00
ocornut
82754561e2 Nav: Fixed a few widgets from not setting reference keyboard/gamepad navigation ID when activated with mouse. 2021-09-13 15:17:54 +02:00
ocornut
17a7084b57 Menus: Fixed crash when navigating left inside a child window inside a sub-menu. (#4510). 2021-09-10 15:37:59 +02:00
ocornut
321b84f01f Internals: refactored IsWindowHovered()/IsWindowFocused() to make their logic more similar + change underlying value of ImGuiHoveredFlags_AllowWhenBlockedByPopup + comment out docking only flags. 2021-09-08 16:44:53 +02:00
ocornut
bd6c9e99fc InputText: Allow cancelling/validating input with gamepad nav events.
Amend 158995f2 (#2321)
2021-09-06 18:47:12 +02:00
ocornut
3d9d3b49ae Internals: folded ImGuiItemAddFlags into ImGuiItemFlags. ImGuiItemAddFlags_Focusable > ImGuiItemFlags_Inputable. One step in the big nav/tab/focus rework.
Bonus simplified Selectable() handling of its custom disabled flag. (#211)
2021-09-01 14:46:08 +02:00
ocornut
4aea1c5adb IO: added io.WantCaptureMouseAllowPopupClose (#4480) + comments 2021-08-30 19:11:47 +02:00
ocornut
66102880a3 Updated links to Discussions 2021-08-30 17:06:51 +02:00
ocornut
333807b483 Windows: fixed background order of overlapping childs submitted sequentially. (#4493)
Amend 07704496
2021-08-30 13:08:41 +02:00
ocornut
780c1ee265 TextUnformatted: Accept null ranges including (NULL,NULL) without asserting. (#3615) 2021-08-24 19:30:02 +02:00
ocornut
4a7c21d330 Fonts: Fixed ImFontAtlas::ClearInputData() marking atlas as not built. (#4455, #3487) 2021-08-24 15:28:39 +02:00
ocornut
e23bee353c Removed GetWindowContentRegionWidth() function 2021-08-23 16:15:16 +02:00
ocornut
0649f750b4 Version 1.85 WIP 2021-08-23 15:31:06 +02:00
ocornut
d79ca9b0b6 Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [Legulysse] 2021-08-23 14:57:54 +02:00
ocornut
e6ffc04291 Moved ImDrawIdx declaration higher up in imgui.h (to ease work for dear_bindings)
Shuffled low-level data types declarations and tweaked comments
2021-08-23 12:00:16 +02:00
ocornut
32d4f6c5d9 Fix BeginDisabled(false), again, (#211, #4452, #4453) Version 1.84.1
(forced pushed since our earlier versioning didn't sort correctly in github web)
2021-08-20 23:59:46 +02:00
ocornut
f969e68c10 Fix BeginDisabled(false), (#211, #4452) 2021-08-20 20:30:51 +02:00
ocornut
d2ffbd9b86 Version 1.84
Fix PVS Studio false positive //-V1020
Fix missing #ifndef for IMGUI_IMPL_OPENGL_LOADER_CUSTOM path
2021-08-20 18:03:55 +02:00
ocornut
df2319a854 Small optimizations to BeginDisabled() to allow frequent calls (#211)
Not intended for frequent calls but I suspect some people will do it either way...
Rough/indicative: measured 0.1 ms for 5000 calls in release, 0.5 ms in debug on my desktop windows.
2021-08-20 17:19:18 +02:00
ocornut
c543d93af1 Expose BeginDisabled()/EndDisabled() in public API. Add to demo. (#211) 2021-08-20 16:34:43 +02:00
thedmd
2f40be638f IO, Backends: add io.AddFocusEvent(). Clear pressed keys after loosing input focus (#3532)
Amend/fix #2445, #2696, #3751, #4377
2021-08-17 20:10:45 +02:00
ocornut
ff428f1d2f Nav: Fix not clearing NavWindowingToggleLayer properly (old code left it to true, relied on Alt release only). Removed unnecessary KeyMenu_ from NavInput. (#4439, #787) 2021-08-17 12:54:51 +02:00
ocornut
044fd0cd2d Backends: GLFW: Mouse position is correctly reported when the host platform window is hovered but not focused. (#3751, #4377, #2445) 2021-07-29 19:37:18 +02:00
ocornut
e362c5af48 Internals: ColorEdit: renamed some internal masks to match our common coding style.
ImGuiColorEditFlags__DisplayMask > ImGuiColorEditFlags_DisplayMask_, ImGuiColorEditFlags__OptionsDefault > ImGuiColorEditFlags_DefaultOptions_, ImGuiColorEditFlags__DataTypeMask > ImGuiColorEditFlags_DataTypeMask_  etc.
2021-07-26 20:44:59 +02:00
ocornut
b846969fe1 Removed unnecessary line in Begin() + commented out redirecting functions/enums names that were marked obsolete in 1.67 and 1.69 + readded commented obsoleted function. 2021-07-26 12:22:48 +02:00
ocornut
6b8a059fc9 Internals: moved LastItem data to a shared structure (instead of one per window)
(should be a no-op as we are restoring things in Begin/End. Toward faciliate backup/restore of LastItemData and favor pulling from here instead of CurrentItemFlags, toward #211)
2021-07-19 21:25:47 +02:00
ocornut
1ad153056a Internals: ItemAdd: set LastItemXXX fields before navigation calls + comments about io.IniFilename (#4294) 2021-07-19 21:24:15 +02:00
ocornut
fb4bbeb033 Disabled: fixed IsItemHovered() if popped disabled state after item, or when using Selectable_Disabled. (#211) 2021-07-12 15:43:17 +02:00
Giovanni Funchal
6792e1a3e0 Backends: SDL2: Remove unnecessary ImGui_ImplSDL2_NewFrame() parameter. (#3244) 2021-06-30 15:04:40 +02:00
ocornut
23a15834fa Fonts: Fix calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). (#3487) + Backends: added additional assert to facilitate detecting user understand they haven't initialized a backend. 2021-06-29 18:16:47 +02:00
ocornut
b5a2bd1a5b Backends: amends to 1db1066 + merge minor bits from docking incl SetActiveIdUsingNavAndKeys().
No need to clear fields before deletion. DX12: renamed to match docking branch.
2021-06-29 15:25:19 +02:00
ocornut
0aeb978e61 Comments + adding spacing in headers because VS IDE parser display blocks so badly. Add helper in internal's ImGuiInputTextState. (#4275) 2021-06-28 11:58:37 +02:00
ocornut
9440974f66 Fonts: Add U+FFFD ("replacement character") to default asian glyphs ranges. Remove SetFallbackChar() (amend 0ffd99d31). (#4269) 2021-06-25 15:47:42 +02:00
ocornut
38165f420f Fonts: Prefer using U+FFFD character for fallback instead of '?'. Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269) 2021-06-25 15:44:14 +02:00
ocornut
1965f38e9e ImGuiWindowFlags_UnsavedDocument/ImGuiTabItmeFlags_UnsavedDocument display a dot instead of a '*'. 2021-06-24 14:30:32 +02:00
ocornut
f0c4d609a6 Default window focus scope not 0. Added ImGuiSelectableFlags_SelectOnNav with comments and caveats. (#1861, #4242,)
Focus scope default value: amend 7ee623d9 a5041c88 2ebe08be
2021-06-21 17:47:45 +02:00
ocornut
0cca0d1617 Internals/experimental: BeginComboPreview(), EndComboPreview(). (#4168, #1658)
(amended)
2021-06-15 15:27:28 +02:00
ocornut
d0c6dd9baf ImVector: added clear_delete(), clear_destruct() helpers. 2021-06-09 16:57:47 +02:00
ocornut
61f4aec868 Added PushDisabled(), PopDisabled() currently only exposed in imgui_internal.h (#211) 2021-06-09 15:28:59 +02:00
ocornut
6ee398ac2b Tables: Added ImGuiTableColumnFlags_Disabled acting a master disable over (hidden from user/context menu). (#3935, #3740) 2021-06-07 15:18:20 +02:00
ocornut
689e387180 Tables: offset and shuffle flags (breaks ABI compatibility as often)
If you rely on ABI compatibility consider reworking how your backends are created, using cimgui metadata output. We will happily often break ABI compat.
2021-06-07 13:20:03 +02:00
ocornut
1b4323a1b4 Tables: Added ImGuiTableColumnFlags_NoHeaderLabel to request TableHeadersRow() to not submit label for a column. (#4206) 2021-06-07 09:11:53 +02:00
ocornut
94b680e830 Internals: fixed ImPool:: iteration, rename GetBufSize to GetMapSize. Amend c6c82b9f 2021-06-04 17:27:20 +02:00
ocornut
c6c82b9f1d Internals: fixed iterating ImPool, fix after use of TableRemove() (was only used by TestEngine)
Merge metrics bits from 646c87359
2021-06-03 18:36:43 +02:00
ocornut
a640d8a6d2 Fixed printf-style format checks on non-MinGW flavors. (#4183, #3592) 2021-05-31 13:03:50 +02:00
ocornut
e31d13fa76 Version 1.84 WIP 2021-05-25 13:36:53 +02:00
ocornut
556689591c Backends: OpenGL3: Handle GL_CLIP_ORIGIN on <4.5 contexts if "GL_ARB_clip_control" extension is detected. (#4170, #3998)
Expecting this to somehow cause another issue but we will fix it when it comes.
2021-05-24 23:46:25 +02:00
ocornut
ad5d1a8429 Version 1.83 2021-05-24 17:39:25 +02:00
ocornut
029c83c73e Combos: Changed the combo popup to use a different id to also using a context menu with the default item id. (#4167) 2021-05-24 15:09:39 +02:00
thedmd
3c72e5142b Backends: Replace direct access to TextureId with GetTexID() call in ImDrawCmd. (#3761) 2021-05-19 18:39:18 +02:00
ocornut
41030cbfe2 Tweak computation of io.Framerate so it is less biased toward high-values in the first 120 frames. (#4138) 2021-05-16 20:37:38 +02:00
ocornut
84545dbe6f Disabling some of MSVC most aggressive Debug runtime checks for some simple/low-level functions
(e.g. ImVec2, ImVector) leading to a 10-20% increase of performances with MSVC "default" Debug settings.
2021-05-06 13:04:35 +02:00
ocornut
393941ceea Refactor focusable/tabbalbe item registration toward allowing to handle it prior to clipping (not yet the case) (#343, #4079)
Now performed in ItemAdd(). It can't be trivially moved above clipping effectively because it would require us to scroll to be useful, meaning we'd be better off locking the bounding box a frame earlier. Still wip.
As-is this commit has no value for end-user, but it's a reengineering that moves us closer to the solution. + Internals: moved internal flags.
2021-04-30 22:40:02 +02:00
ocornut
2c3f25d2d9 Nav: Fixed Tabbing initial activation from skipping the first item if it is tabbable through. (#787) 2021-04-30 21:49:40 +02:00
ocornut
9b90639577 Internals: ItemFlags is a shared resource as advertised. Fix Begin/PushItemFlags/End sequence (mostly for consistency) 2021-04-30 21:34:17 +02:00
ocornut
89162a04f4 Fixes for PVS Studio and MSVC static analyzers. Using a macro to suppress single-use MSVC false positives. (#3938, #4073) 2021-04-29 21:20:32 +02:00
ocornut
d28535f351 Fixes for Visual Studio 2019 static analyzers. (#3938, #4073) + two minor edge case were invalid scalar input (e.g. a sign only) would return buffer as modified. 2021-04-29 17:10:27 +02:00
ocornut
b493cae8c9 Nav: Fixed pressing Escape to leave menu layer while in a popup or child window. (#787) 2021-04-23 19:17:20 +02:00
ocornut
bfc4a3347a Nav: Fixed using SetItemDefaultFocus() on windows with _NavFlattened flag + tools in metrics. 2021-04-22 16:21:29 +02:00
ocornut
770f9daab3 Tables: Better preserve column data (mainly widths) when columns count changes. (#4046) + .ini skips columns with no data. 2021-04-16 18:30:11 +02:00
ocornut
5fed6bdc72 Demo: Improved popups demo and comments. 2021-04-15 15:58:12 +02:00
ocornut
b957300260 Documentation tweaks (#4042) 2021-04-14 15:46:55 +02:00
ocornut
00d570e280 Added OpenPopup() ImGuiID overload (#3993, #331) 2021-04-01 17:18:18 +02:00
ocornut
45c45d2506 Internals: shallow tidying up of the old resize border structure. Make them match the ImGuiDir order. Split GetWindowResizeID() into GetWindowResizeCornerID() and GetWindowResizeBorderID(). 2021-03-30 16:44:47 +02:00
ocornut
951c84969b Popups: fix comment about OpenPopupOnItemClick(). (#3981) 2021-03-29 15:49:40 +02:00
ocornut
aa5431fde2 Tables: Expose TableSetColumnEnabled() in public api. (#3935) 2021-03-24 14:36:01 +01:00
ocornut
59da01901e Scrolling: Fix scroll tracking with e.g. SetScrollHereX/Y() when WindowPadding < ItemSpacing. Fix scroll snapping on edge of scroll region when both scrollbars are enabled.
CalcNextScrollFromScrollTargetAndClamp() fixed snapping edge calculation missing ScrollbarSizes.y
2021-03-19 16:58:23 +01:00
ocornut
a1a39c632a Version 1.83 WIP 2021-03-16 14:45:30 +01:00
Elias Daler
64aab8480a DragScalar: Add default value for v_speed argument in DragScalar(), DragScalarN(). (#3922) 2021-03-16 12:54:49 +01:00
ocornut
35b1148efb Version 1.82 2021-03-15 20:26:48 +01:00
ocornut
287bd9b984 InputText: renamed ImGuiInputTextFlags_AlwaysInsertMode to ImGuiInputTextFlags_AlwaysOverwrite. (#2863) 2021-03-12 18:23:30 +01:00
Rokas Kupstys
1bc6f82091 Misc: added imgui.gdb and imgui.natstepfilter debugger helpers for gdb and msvc. 2021-03-12 17:03:16 +01:00
ocornut
033dfd9d35 ImDrawFlags: rework/revert c2d6d26 + 39432bf in a way that is closer to old version and back to opt-in but with default 0 = all corners. 2021-03-12 16:31:46 +01:00
ocornut
39432bfd9c Amend 0c93238a ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags 2021-03-11 16:03:45 +01:00
Rokas Kupstys
c2d6d26139 ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags 2021-03-11 16:03:32 +01:00
ocornut
8b9fedba28 Moved Obsolete function block lower in the file + obsoleted old SetScrollHere (->SetScrollHereY) 2021-03-11 12:16:52 +01:00
thedmd
e45847d99a Add version of PathArcTo() and PathArcToFast() with adaptive rendering quality. (#3491) 2021-03-11 11:23:55 +01:00
Rokas Kupstys
01a2bac7d5 DrawList: Replace "bool close" in drawing functions with flags. 2021-03-10 12:57:01 +01:00
ocornut
4bb5a36f90 Nav: do not clear per-window NavId when window reappears. Process NavInit regardless of current highllight state. Consistently set g.NavLayer in SetNavID(). (#787) 2021-03-09 12:39:18 +01:00
ocornut
954b06afe2 Drag and Drop: can use BeginDragDropSource() for other than the left mouse button (#1637, #3885)
As long as the item has an ID (for ID-less items will add new functionalities later.
Amend 2c3c5125
2021-03-08 15:50:53 +01:00
ocornut
3e6dfd3c1a ImDrawList: AddImageRounded() compare texid from cmdheader as with other functions. + Made the ImGuiMemAllocFunc / ImGuiMemFreeFunc consistent with our other typedefs (#3836) 2021-03-04 14:29:01 +01:00
ocornut
8dd692c29c Android: Amend backend and examples with minor consistency tweaks. (#3446) 2021-03-04 11:07:03 +01:00
ocornut
23ab4978e4 ImFontAtlas: Added 'bool TexPixelsUseColors' output to help backend decide of underlying texture format. (#3369, #3844) 2021-03-02 15:04:34 +01:00
ocornut
760c394707 Added links to Discussions. Closed Discord, yeah! (#2748) 2021-02-25 00:47:37 +01:00
ocornut
6f4b9c65ae Added commentary about DLL boundaries. Added GetAllocatorFunctions(). Tidying up. (#3836) 2021-02-24 19:38:39 +01:00
David Maas
ece854564a
Log/Capture: Added LogTextV, a va_list variant of LogText. (#3828) 2021-02-22 11:58:51 +01:00
thedmd
f107693d9b Improve on automatic circle segment count calculation. (#3808) 2021-02-17 12:55:39 +01:00
ocornut
b47aa46d81 Tables: TableSetupColumn() user id uses ImGuiID as intended (typedef ImU32). internals: added GetCurrentTable(), LeftMostEnabledColumn. Demo/docs tweaks. 2021-02-17 12:18:22 +01:00
ocornut
30b7545841 Version 1.82 WIP 2021-02-15 18:10:14 +01:00
ocornut
4df57136e9 Version 1.81 2021-02-10 21:16:58 +01:00
ocornut
f14042ca78 Viewports Added ImGui::GetMainViewport() as a way to get the bounds and work area of the host display. (#3789, #1542)
Viewports: Backport a few constructs from 'docking' branch.
Viewports: Added ImGuiViewportFlags_IsPlatformWindow, ImGuiViewportFlags_IsPlatformMonitor, ImGuiViewportFlags_OwnedByApp (none of them were in docking branch yet). ImGuiViewportFlags_IsPlatformMonitor is merely there to convey future intent, not yet used.
Reduce uses of io.DisplaySize.
MainMenuBar: Backport work area handling code from 'docking' branch.
Metrics: Backported "Viewports" debug visualizer from 'docking' branch.
Demo: Rework 'Examples->Fullscreen Window'.
Demo: 'Simple Overlay' demo now moves under main menu-bar (if any) using GetMainViewport()'s work area.
2021-02-10 16:09:53 +01:00
ocornut
56f7bdae99 ImDrawList: Clarified PathArcTo() need for a_min <= a_max with an assert. Fixed PathArcToFast() handling of a_min > a_max. 2021-02-08 16:37:51 +01:00
ocornut
b898281e3c Demo: Added 'Examples->Fullscreen Window' demo. (#3789) + repack and zero-clear ImDrawData. 2021-02-05 15:44:10 +01:00
ocornut
03d74a293d ListBox: renamed ListBoxHeader>BeginListBox, ListBoxFooter>EndListBox. Added demo bits. 2021-02-03 16:33:22 +01:00
ocornut
e5cbf60def ListBox: tweaked default height calculation. simplifying code internally (rework passing of full rect). Should have no visible side-effects + misc comments. 2021-02-03 14:54:56 +01:00
freddii
90a518c501 Fixed typos (#3782) 2021-02-03 12:37:32 +01:00
ocornut
a3f0393351 Menus: Fixed an issue with child-menu auto-sizing (issue introduced by 6af92b0) (#3779) 2021-02-02 13:06:51 +01:00
ocornut
9d576a96a5 Tables: added internal TableSetColumnEnabled() helper. Comments. 2021-02-02 09:23:40 +01:00
ocornut
24be26e00e imgui_freetype: Add support for colored glyphs. Font: add support for untinted glyphs (#3369)
Amend 9499afd with missing static inline.
2021-02-01 16:32:26 +01:00
ocornut
e28b51786e Tables: Fixed PopItemWidth() or multi-components items not restoring per-colum ItemWidth correctly. (#3760) rework local stacks to facilitate modifying current value without altering the stack.
May consider doing the same for ItemFlags and moving to g.ItemFlags...
2021-01-27 12:35:57 +01:00
ocornut
3867c6c5f0 Fonts: (Breaking) Rename ImGuiFreeType:: flags to ImGuiFreeTypeBuilderFlags_XXX. Remove ImGuiFreeType::BuildFontAtlas() flags. Rename ImFontConfig::RasterizerFlags to FontBuilderFlags. Add ImFontBuilderIO (opaque). Amend 53d59f3 with a dozen of small fixes. 2021-01-26 17:25:09 +01:00
Louis Schnellbach
9417acc20f Fonts: if IMGUI_ENABLE_FREETYPE, use library by default for font rasterization
Also renamed IMGUI_DISABLE_STB_TRUETYPE to IMGUI_ENABLE_STB_TRUETYPE
2021-01-26 17:23:11 +01:00
ocornut
2ed47e5822 Version 1.81 WIP 2021-01-25 16:30:44 +01:00
ocornut
f144c67676 ImDrawList: fixed AddCircle, AddCircleFilled buffer read overflow with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)
Amend 051ce076. Maximum cached count becomes 63 instead of 64.
2021-01-25 14:59:09 +01:00
ocornut
58075c4414 Version 1.80 2021-01-21 20:36:18 +01:00
ocornut
5178c3ce21 Tables: added ImGuiTableFlags_NoHostExtendX instead of using outer_size.x == 0.0f. Changed default outer_size to (0.0f, 0.0f). (#3605) 2021-01-21 16:20:31 +01:00
ocornut
74b3b7cf58 Added experimental io.ConfigDragClickToInputText feature to enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). (#3737)
+ Offset ImGuiTableColumnFlags values.
2021-01-20 19:18:03 +01:00
ocornut
ae0d2dd614 Tables: rework submission of content size and ideal content size to outer window (now using IdealMaxPos introduced in 6af92b0).
See Tests suite "table_reported_size_outer".
2021-01-20 11:38:46 +01:00
ocornut
6af92b05bf Internals: Layout: maintain two content sizes, optionally writing to IdealMaxPos to distinguish used from ideal size, later is used for auto-fit. Unused in this commit, should be no-op. (#3414)
# Conflicts:
#	imgui.cpp
2021-01-15 22:52:42 +01:00
ocornut
b0db741770 Demo tweaks. Moved Tabs to Widgets section. Added to Tables demo. Increased version following 00b35c08. 2021-01-14 11:59:33 +01:00
ocornut
00b35c081e Tables: (breaking) removed ImGuiTableColumnFlags_WidthAuto which now can be expressed as _Fixed + _NoResize. WidthRequest gets updated when RequestOutputMaskByIndex is set rather than Visible. 2021-01-13 18:42:02 +01:00
ocornut
002ba1a69f Tables: comments, tweak. CollapsingHeader: comments. (#3715) 2021-01-13 10:07:59 +01:00
ocornut
36535514d5 Backends: DX12: Fix warning (#3706). Disable obsolete Tables enums, leave them commented out. Using _MSVC_LANG to enable offsetof() and static_assert() on VS2015.3+ 2021-01-11 10:54:52 +01:00
ocornut
e18abe3619 Tables: (Breaking) Added ImGuiTableFlags_SizingFixedSame, ImGuiTableFlags_SizingStretchProp. Removed ImGuiTableFlags_SameWidths.
Simplified some code and clariffied that currently non-resizable = always revert to default (while waiting to untangle Fixed vs Auto and programmatic override not going through TableSetupColumn)
Whereas ImGuiTableFlags_SameWidths has some unusual handling of mixed Fixed/Stretch columns, we know treat them separately.
2021-01-08 18:40:52 +01:00
ocornut
414f82254b Tables: (Breaking) rename ImGuiTableFlags_SizingPolicyFixed > ImGuiTableFlags_SizingFixedFit, ImGuiTableFlags_SizingPolicyStretch > ImGuiTableFlags_SizingStretchSame in prevision for new policies. 2021-01-08 18:10:55 +01:00
ocornut
8b5f3798e0 Tables: Moved demo chunks. Made right-most non-resizable same-width column hidden to alleviate the issue where they are off by 1 pixel. 2021-01-07 17:11:18 +01:00
thedmd
94a432275b ImDrawList: Internals: Add ability to scale anti-alias fringe. This enable users to keep geometry sharp while scaling vertex buffer content. 2021-01-05 16:34:11 +01:00
ocornut
9bcf77eb81 Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). (#2034) + fix some PVS warnings, fix typo, blanks.
Amend e28b1078
2021-01-04 19:15:20 +01:00
ocornut
fa963b9aaf Inputs: Internal: added SetItemUsingMouseWheel() and mechanism to request mouse wheel for both HoveredId and ActiveId. (#2891)
Based on @kudaba PR.
2020-12-25 18:22:34 +01:00
ocornut
eb88fee052 Tables: internal tidying up, calculate WidthAuto in first loop of layout + TableSetupColumn() with unspecified stretch weight leaves it at -1.0f (unset) rather than overrding default. Amend 3b3503e.
Both changes are intended to have no side-effects. Committed separately from upcoming commit for easier future bissecting.
Small demo fix.
2020-12-25 16:30:44 +01:00
ocornut
3573195112 Tables: (breaking) rename ImGuiTableFlags_ColumnsWidthStretch > ImGuiTableFlags_SizingPolicyStretch, ImGuiTableFlags_ColumnsWidthFixed > ImGuiTableFlags_SizingPolicyFixed in prevision for other policies. 2020-12-24 18:32:27 +01:00
ocornut
b015ea93fd Style tweaks, disabled default window rounding by default, reduced size of resize grip, made less prominent, increased WindowBg alpha in classic style.
TestEngine: Fixed Checkbox() not reporting its checkable state when clipped.
2020-12-24 18:31:51 +01:00
ocornut
3fbb928c9f Tables: explicit/custom width in TableSetupColumn() is reapplied when table or column becomes not resizable. Comments. 2020-12-23 12:14:55 +01:00
ocornut
956435768f Tables: (breaking) renamed ImGuiTableColumnFlags_WidthAutoResize to _WidthAuto., default to WidthFixed policy when host window has auto-resize.
Fix edge case with TableSetColumnWidth on small windows (amend 972ca816)
2020-12-23 11:39:15 +01:00
ocornut
d497f112e7 Tables: simplified and tidying up TableSetColumnWidth(), fixes resizing a fixed column surrounded by stretch column (manually or via auto-fit menu). TableHeader() showing highlighted when held. 2020-12-22 17:13:11 +01:00
ocornut
972ca8166f Tables: extracted code for TableGetMaxColumnWidth(), fixing "stuck" resize being lossy as it used an older calculation for it and didn't honor e.g. _NoKeepColumnsVisible 2020-12-22 16:40:52 +01:00
ocornut
1aa59f90d0 Minor API comments and tweaks, standardize index used in imgui.h. Tables: tweaked TableSetupColumn() assert to use IM_ASSERT_USER_ERROR(). 2020-12-22 15:30:26 +01:00
ocornut
2e48c2da81 Removed redirecting functions/enums names that were marked obsolete in 1.63 (August 2018) + tables tweaks. 2020-12-21 19:42:37 +01:00
ocornut
4d8e839ddf Renamed ImDrawList::AddBezierCurve() to ImDrawList::AddBezierCubic(), ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). (#3127, #3664, #3665)
Renamed corresponding internal functions as well.
2020-12-21 17:13:36 +01:00
ocornut
550bfcfc59 Amend defce31 Add ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() (#3127, #3664, #3665) 2020-12-21 16:30:10 +01:00
Aiekick
defce31c2e Add ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() (#3127, #3664, #3665) 2020-12-21 16:25:14 +01:00
ocornut
ae63d56426 Tables: remove ImGuiTableFlags_NoHeadersWidth since it is so rarely used and can be specified on a per-column basis. 2020-12-18 19:03:47 +01:00
ocornut
532aa5a69b Tables: (breaking) change outer_size.x default value to -FLT_MIN, make outer_size.x == 0.0f act as ImGuiTableFlags_NoHostExtendX (#3605, ad83976b) when no scrolling and no stretch column. Which is more consistent.
Demo: moved "Compact table" to "Padding" section, makes more sense. Tweaked demo.
2020-12-18 17:51:50 +01:00
ocornut
ad83976b35 Tables: Added ImGuiTableFlags_NoHostExtendX (#3605) marked as WIP, will probably rename.
Moved some code from BeginTable() to TableUpdateLayout() to late latch some of the required data.
2020-12-18 14:32:51 +01:00
ocornut
892b48e2d6 Tables: Lock contents width while resizing down an horizontal scrolling table. Headers declare ideal width regardless of clipping. Misc comments. 2020-12-16 13:04:49 +01:00
ocornut
738606a294 Tables: added ImGuiTableFlags_SortTristate. Renamed ImGuiTableFlags_MultiSortable to ImGuiTableFlags_SortMulti. Removed now unused FlagsIn storage. 2020-12-11 23:01:09 +01:00
ocornut
17536f9add Tables: more consistent use of CellPadding.x*2 and clip-rect on right-most side of non-bordered column + fix cellbg for standalone TableHeader call.
Using CellPadding.x on both sides when BorderV is off, generally most consistent and with default value (4,2) promotes at-glance visible spacing between non-bordered columns. Effectively double horizontal padding on non-bordered columns.
Made ClipRect.Max.x matches WorkMaxX which is where we'd like to go for windows themselves.
TableHeader() submit single cell bg color if not already submitted as a full header row.
Misc comments/docs updates.
2020-12-09 15:13:09 +01:00
ocornut
6e38026627 Tables: changelog. removed TableGetHoveredColumn() from public API in favor of using TableGetColumnFlags(). renamed ImGuiTableSortSpecsColumn to ImGuiTableColumnSortSpecs. 2020-12-04 19:15:27 +01:00
ocornut
b194df413c Tables: exposed status flags via TableGetColumnFlags(), removed TableGetColumnIsSorted()
Scoped width auto calc.
2020-12-04 19:15:27 +01:00
ocornut
984c4cb5f8 Tables: distinguishing per-column IsVisible from IsRequestOutput which is returned to user. Clarified clipping rules/requirements. Comments. 2020-12-04 19:15:27 +01:00
ocornut
f70bf69e3b Tables: comments and tweaks on TableUpdateLayout(). changed "apply final width" loop to use natural column order. 2020-12-04 19:15:26 +01:00
ocornut
155b8bb816 Tables: Shared menu item id for "Size all" variations. Avoid allocation on single sort specs. Fix TableGetColumnIsEnabled(). Massage TableHeaderRows(). 2020-12-04 19:15:26 +01:00
ocornut
e126a64782 Tables: using a typedef in internal code to specify column/draw channel index storage. 2020-12-04 19:15:26 +01:00
ocornut
6aa8388e9f Tables: index tweaks, fixed some inconsistent spacings. 2020-12-04 19:15:26 +01:00
ocornut
5ef7b831c2 Tables: removed ImGuiTableSortSpecs::ColumnsMask because it needlessly exposes our 64-columns limitation which we'd eventually would like to lift
+ shuffle declarations in internals
2020-12-04 19:15:26 +01:00
ocornut
e09454aec4 Tables: removed TableGetColumnIsVisible from public api, re-specced as TableGetColumnIsHidden() returning same flag as setter, clipper increase CurrentRow. 2020-12-04 19:15:26 +01:00
ocornut
0c9ab0acdd Tables: setup and maintain ItemWidth per column. 2020-12-04 19:15:26 +01:00
ocornut
8f126d5d95 Tables: rename ImGuiTableFlags_SizingPolicyStretchX to ImGuiTableFlags_ColumnsWidthStretch, ImGuiTableFlags_SizingPolicyFixedX to ImGuiTableFlags_ColumnsWidthFixed. 2020-12-04 19:15:26 +01:00
ocornut
41f89e0f59 Tables: added ImGuiTableFlags_SameWidths, used in demo. Reordered columns flags and exposed them all in Columns Flags section. 2020-12-04 19:15:26 +01:00
ocornut
3a2f0bfc04 Tables: demo inner_size + scrollx + stretch, added TableGetRowIndex(), renamed _WidthAlwaysAutoResize to _WidthAutoResize. 2020-12-04 19:15:25 +01:00
ocornut
5465d30d67 Tables: added ImGuiTableFlags_PreciseStretchWidths. 2020-12-04 19:15:25 +01:00
ocornut
10db896813 Tables: store RawData in a simple void* pointer, rename ContentMinX > WorkMinX, misc tidying up.
Removed unnecessary casts when using CheckboxFlags().
2020-12-04 19:15:25 +01:00
ocornut
fe6131168a Tables: Additionally commentary about clipper in the demo + minor padding tweak. 2020-12-04 19:15:25 +01:00
ocornut
d9ca3939e1 Tables: Tidy up comments. Replaced some Columns by Tables in demo. Removed ImGuiTableFlags_Scroll (combining ScrollX/ScrollY) because each axis inccur different requirements/constraints. 2020-12-04 19:15:24 +01:00
ocornut
1731ae5a09 Tables: Reworked padding/spacing/width.
All widths are stored without padding.
Decorelate padding from presence of border.
Added ImGuiTableFlags_Pad/NoPad flags.
Added demo.
Merge StartXHeaders and StartXRows into StartX.
Distinguish CellSpacingX1 and CellSpacingX2 for clarity and to avoid loss of width on non-even spacing values.
2020-12-04 19:15:24 +01:00
ocornut
75c5f534e8 Tables: Avoid allocating into ColumnsName for empty strings, changed TableGetColumnName() to return "" on missing name, generally more friendly. 2020-12-04 19:15:24 +01:00
ocornut
ac5b1648e6 Tables: Various internal renaming + merge StartXHeaders/StartXRows into StartX. 2020-12-04 19:15:24 +01:00
ocornut
02b27b75a4 Tables: Added ImGuiTableFlags_NoBordersInBody, ImGuiTableFlags_NoBordersInBodyUntilResize, removed ImGuiTableFlags_BordersFullHeightV. 2020-12-04 19:15:24 +01:00
ocornut
172704c079 Tables: Add demo code. Remove dead code + seemingly duplicate border in TableDrawBorders(). 2020-12-04 19:15:24 +01:00
ocornut
e66b28693a Tables: Added ImGuiTableFlags_ContextMenuInBody flag.
Worked to get TableOpenContextMenu() in public API but kept it internal.
2020-12-04 19:15:24 +01:00
ocornut
6182973bde Tables: (Breaking) Rename TableNextCell() to TableNextColumn(), made TableNextRow() NOT enter into first column. 2020-12-04 19:15:24 +01:00
omar
25b5cc2f95 Tables: Fixes to support any number of frozen rows (over modifications to clipper code in master) + make clipper run eval after clipect update 2020-12-04 19:15:23 +01:00
ocornut
cc12ea084b Tables: Added TableSetColumnSortDirection() + added in default context menu code (disabled, feels unnecessary, but work is done to ensure programmatic access) 2020-12-04 19:15:23 +01:00
ocornut
9b37087fbe Tables: (Breaking) Rename TableAutoHeaders() to TableHeadersRow() + added TableGetColumnCount(). 2020-12-04 19:15:23 +01:00
ocornut
3021608392 Tables: (Breaking) Add TableSetupScrollFreeze() api, remove ImGuiTableFlags_ScrollFreezeXXX flags, tweak comments, move columns block.
Avoid awkwardly named ScrollFreeze flags, raise limit over 3, and will allow for future api maybe freezing bottom/right side.
2020-12-04 19:15:23 +01:00
ocornut
36b2f3b4f1 Tables: renamed ImGuiTableFlags_NoClipX to ImGuiTableFlags_NoClip, clarified purpose, moved lower in the list as it doesn't need to be so prominent. 2020-12-04 19:15:23 +01:00
omar
931829f701 Tables: (Breaking change) Sorting: Made it users responsability to clear SpecsDirty back to false, so TableGetSortSpecs() doesn't have side-effect any more. + comments 2020-12-04 19:15:23 +01:00
omar
8e97cdf8e8 Tables: Fix for calling TableSetBgColor(ImGuiTableBgTarget_CellBg) multiple times on the same cell. 2020-12-04 19:15:23 +01:00
omar
9d8b40414a Tables: Added TableSetBgColor() api with color for RowBg and CellBg colors. 2020-12-04 19:15:23 +01:00
omar
0847373b98 Tables: Comments on Sizing Policies + Rename border V/H flags HInner -> InnerH + offset every flags by two. 2020-12-04 19:15:23 +01:00
omar
a0e6aa1766 Tables: Fix calculation of auto-fit (remove padding). Demo setting a width in columns setup + ImGuiTableFlags_NoKeepColumnsVisible. 2020-12-04 19:15:22 +01:00
ocornut
798aed729a Tables: Added TableGetHoveredColumn(), extracted some context menu code out, simplifying TableAutoHeaders() toward aim of it being a user-land function. 2020-12-04 19:15:22 +01:00