Commit Graph

4878 Commits

Author SHA1 Message Date
ocornut
8fa502ca42 Nav: Alt doesn't toggle menu layer if other modifiers are held. (#4439) 2021-08-17 12:23:54 +02:00
ocornut
f9b5168fb3 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
2021-08-02 16:00:50 +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
Rokas Kupstys
3e4c89051d Popups: Fix OpenPopup() being called after BeginPopup() resulting in a failure to open a popup when focus is NULL. (#4308)
Story of removed line begins in commit b80cf0a. It's purpose was to close popups when they lost focus.
Later on few other changes were introduced:
* bcc49ff - closing popups with RMB without changing window focus
* af679a1 - closing popups in FocusWindow()
These two changes covered all the cases of popup closing which made deleted line obsolete. Conveniently, now all popup closing is handled from within UpdateMouseMovingWindowEndFrame() either by calling FocusWindow() or ClosePopupsOverWindow().
2021-07-26 11:43:39 +02:00
ocornut
7bfc379a23 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2021-07-19 21:58:06 +02:00
ocornut
c881667c00 Fix - amend 1ad1530 (range-select branch need the NextItemData in NavProcessItem) 2021-07-19 21:45:44 +02:00
ocornut
90bf996e1a Internals: widgets always read back from g.LastItemData.InFlags (so we can now modify per-item disable state more easily). (#211) 2021-07-19 21:26:34 +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
ocornut
246ad6c03c Disabled: items more consistently release active id if the active item got disabled. (#211) (amend 2952525) 2021-07-12 15:39:47 +02:00
ocornut
638e1a721b Disabled: fixed IsItemHovered() returning true on disabled item when navigated to. (#211) 2021-07-12 15:01:02 +02:00
ocornut
a11f36811f Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_vulkan.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
2021-07-09 20:16:19 +02:00
Rokas Kupstys
5dd1e38b7a Disabled: disabled items set HoveredId, allowing e.g. HoveredIdTimer to function. (#211, #3419) + Menus: fix hovering a disabled menu or menu item not closing other menus.
Rework of https://github.com/rokups/imgui/commit/c24b470
Note that the declared intent of that commit "Prevents window from being dragged if mouse hovers a disabled item." was already fullfilled by a876ad87.
Changes in ButtonBehavior() not needed anymore since ImGuiButtonFlags_Disabled is gone
2021-07-09 19:54:46 +02:00
ocornut
4a100f7f11 Nav: Disabled items are not candidate for default focus. (#211, #787) + simplify handling of ImGuiButtonFlags_PressedOnDragDropHold path. 2021-07-09 18:57:23 +02:00
ocornut
cc40ae2101 PushDisabled(): added bool + clarify support for stacked disabled (#211) 2021-07-08 19:21:59 +02:00
ocornut
30d164eb26 Backends: Win32: IME functions are disabled by default for non-Visual Studio compilers (MinGW etc.) (#2590, #738, #4185, #4301)
Enable with '#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS' for those compilers. Undo change from 1.82.
2021-07-08 14:23:31 +02:00
ocornut
3512f2c2c2 Internals: Menus: minor tidying up + renaming in ImGuiMenuColumns + removing extraneous offset field which is always zero + using smaller types.
sizeof() 36 -> 20
2021-07-07 20:16:55 +02:00
ocornut
eb6f4b1a6a Docking: Fix crash when a dock node gets re-qualified as dockspace>floating>dockspace.. (#3203, #4295)
Which tends to happen when incorrectly calling DockBuilderAddNode() without ImGuiDockNodeFlags_Dockspace and using it as a Dockspace on the next frame after the floating window hosting the node has been automatically created.
2021-07-07 18:22:55 +02:00
ocornut
cd4cc9ff0d Docking: Fixed crash issues using DockBuilderRemoveNode() in some situations. (#3111, #3179, #3203, #4295)
If the deleted root node isn't part of a dockspace with a central node, it won't be "protected" but removed when last window gets removed.
2021-07-07 16:39:39 +02:00
ocornut
9e8e5ac363 Docking: Added ImGuiDockNodeFlags_NoDockingOverEmpty. Breaking definition of ImGuiDockNodeFlags_NoDockingOverOther which now means "non empty node". (#3492, #2648, #4292) 2021-07-05 13:32:36 +02:00
ocornut
6136b3844b Docking: Reworked node flags saving/inheritance... (#4292, #3834, #3633, #3521, #3492, #3335, #2999, #2648)
..so that flags enforced by docked windows via the DockNodeFlagsOverrideSet mechanism are are not left in empty dockspace nodes once the windows gets undocked.
2021-07-05 13:31:34 +02:00
ocornut
0a8ab75e4b Docking: removed DockNodeFlagsOverrideClear flags from ImGuiWindowClass. (#2999, #3521, #3633)
+ extraded bits of metrics into DebugNodeDockNodeFlags()
2021-07-05 12:58:33 +02:00
ocornut
4ddb6b46c3 Drag and Drop: drop target highlight doesn't try to bypass host clipping rectangle. (#4281, #3272)
Revert 4b94738c
2021-06-30 16:12:52 +02:00
ocornut
0f7eb00f67 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:31:05 +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
682447306d Merge branch 'features/backends_context' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_vulkan.cpp
#	backends/imgui_impl_win32.cpp
#	examples/example_apple_opengl2/main.mm
2021-06-29 14:53:25 +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
95db098477 ImFontAtlas: move implicit AddFontDefault call to Build() function + remove unnecessary asserts in backend. 2021-06-25 17:27:17 +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
ac35b4bba2 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
2021-06-24 18:21:19 +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
cce307a2be Viewports: Fix popup/tooltip created without a parent window from being given a ParentViewportId value of the implicit/fallback window. (#4236, #2409)
Amend 3ead9820
2021-06-17 16:22:14 +02:00
ocornut
afabb2f3d8 Viewport: extracted code out of Begin() into WindowSyncOwnedViewport() - no other change 2021-06-17 16:12:22 +02:00
ocornut
9b417b26d9 Metrics: Tentative fix for bad printf format.
Ref b53b8f58df, a7a1b3b0a7
2021-06-14 18:24:45 +02:00
ocornut
db0338a1f2 Nav, Drag and Drop, Docking: fixed two issues leading nav result to conflict with moving a window. (#4211, #3025) 2021-06-09 19:20:13 +02:00
ocornut
4161a67b38 ImVector: added clear_delete(), clear_destruct() helpers.
# Conflicts:
#	imgui.cpp
2021-06-09 18:44:02 +02:00
ocornut
865b2ca6f9 Added PushDisabled(), PopDisabled() currently only exposed in imgui_internal.h (#211) 2021-06-09 18:43:03 +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
16abfa5eb6 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2021-06-04 17:28:45 +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
5e528d9eea Docking: Clicking on the right-most close button of a docking node closes all windows. (#4186) 2021-06-03 17:22:18 +02:00
ocornut
f03ab2a5c5 Docking: Fix IsWindowAppearing() unnecessarily returning true twice in a row. (#4177, #3982, #1497, #1061) + added a zealous assert. 2021-06-03 16:46:01 +02:00
ocornut
fa1f540e6c Docking: Amend 91704b7, window->DockXXX booleans not properly cleared when window not docked. (#4177, #3982, #1497, #1061)
Fix issue with freshly split windows/nodes incorrectly returning true to IsWindowAppearing().
2021-06-03 16:07:22 +02:00
ocornut
91704b773e Docking: Fix IsWindowAppearing() and ImGuiCond_Appearing on docked windows. (#4177, #3982, #1497, #1061) 2021-05-31 17:06:46 +02:00
ocornut
5b4bc985ad Nav, Combo: removed unnecessary window->LastNavIds[] assignment in combo code. + minor renaming. 2021-05-28 17:27:52 +02:00
ocornut
1ad1429c6d Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	docs/CHANGELOG.txt
2021-05-25 18:45:54 +02:00
ocornut
c2bf4abfa1 Internals: Added ImTextCharToUtf8() helper. Added "out_" markers in more UTF-8 functions. Metrics: Fonts: Fixed display of EllipsisChar by feeding proper utf-8. 2021-05-25 13:37:27 +02:00
ocornut
3a941f95e9 Metrics, Demo: moved font details display to metrics code. (#4171) 2021-05-25 13:37:27 +02:00
ocornut
e31d13fa76 Version 1.84 WIP 2021-05-25 13:36:53 +02:00
ocornut
1b435ae3e0 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2021-05-24 17:49:20 +02:00
ocornut
ad5d1a8429 Version 1.83 2021-05-24 17:39:25 +02:00
ocornut
88a24fb896 Fix build with IMGUI_DISABLE_DEMO_WINDOWS 2021-05-24 15:42:26 +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
ocornut
c708299ca9 Docs: Improvements to description of using colored glyphes/emojis. (#4169, #3369) + Add Fonts to Metrics. Removed IMGUI_HAS_TABLE markers. 2021-05-24 13:07:26 +02:00
ocornut
b474bff6c6 Nav: Fixed single frame CTRL+Tab from properly enabling the menu layer of target window if it doesn't have other active layers. 2021-05-21 18:39:17 +02:00
ocornut
105d82d134 Docking: Docking node tab bar honors ItemInnerSpacing.x before first tab. Tweak rendering and alignment of dock node menu marker. (#4130)
+ Fix ~0 in EndFrameDrawDimmedBackgrounds() which is obsolete way of signifying "all round corners".
2021-05-20 18:14:16 +02:00
ocornut
86c2b609ef Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	imgui.cpp
2021-05-19 19:05:01 +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
4ce6bd8cff Tables: sharing splitter and sort buffers between tables, reducing memory footprints. (#3740)
+ GC pass on that data.
2021-05-07 20:49:52 +02:00
ocornut
32c453ae53 Tables: sharing transient buffers between tables, reducing memory footprints. (#3740) 2021-05-07 20:49:52 +02:00
ocornut
31290807dc Merge branch 'master' into docking
+ fix warning fix for mingw+dx9
# Conflicts:
#	backends/imgui_impl_dx9.cpp
#	imgui.cpp
2021-04-30 22:52:46 +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
788e91aece Fixes for MSVC static analyzers (wider range of versions). (#3938, #4073) + warning fix (#4089) + comments. 2021-04-30 18:21:07 +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
Rokas Kupstys
21428ad3f4 Nav, InputText: Fixed accidental menu toggling while typing non-ascii characters using AltGR. (#370) 2021-04-23 18:50:46 +02:00
ocornut
4540177ce7 Nav: clear activeid on menu toggle (so pressing Alt leaving an InputText will steal ActiveID. Previously wouldn't not, but ButtonBehavior() hover logic would not show Menu layer item as hovered when ActiveId != 0). (#787)
(Adjacent to #370)
2021-04-23 18:50:46 +02:00
ocornut
e61e8aea9c Nav: clear navid in NavInitWindow() when window is marked with ImGuiWindowFlags_NoNavInputs. (#787)
(no expected side-effects, maybe consistency, but those NavLastIds[] values would likely have been 0 already)
2021-04-23 18:50:46 +02:00
ocornut
daf97832f1 Internals: Nav: renaming. 2021-04-23 18:39:08 +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
33cdbe97b8 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2021-04-19 20:05:59 +02:00
ocornut
936f53229d Internals: maintaining focus order inside windows + only storing root windows in WindowsFocusOrder[] array. (toward #2304) 2021-04-16 19:28:24 +02:00
ocornut
34d4bc620d Merge remote-tracking branch 'origin/master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
2021-04-15 19:57:52 +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
e5efa01920 Docking: Fix window menu button. Broken by 3f16a52 (#4043)
Worked on single-frame click.
2021-04-14 14:35:11 +02:00
ocornut
3f16a524c8 Docking: move NavWindow to SelectedTabId application lower to leave a chance for in-between code to alter focus. + store per-node window menu button id to simplify usage. 2021-04-13 18:45:08 +02:00
ocornut
646c873598 Docking: Fixed reappearing docked windows with no close button showing a tab with extraneous space for one frame. 2021-04-13 16:12:14 +02:00
ocornut
e87dd0e65d Docking: Fixed multiple simultaneously reappearing window from appearing undocked in their initial frame. 2021-04-12 19:47:37 +02:00
ocornut
539de4387b Docking: Fixed restoring of tab order within a dockspace or a split node.
(tests in "docking_tab_order")
2021-04-12 16:51:05 +02:00
ocornut
d6a5cc7934 Metrics: hotfix (fix 6ba13349 + f08566b4, #4005) 2021-04-07 17:57:14 +02:00
ocornut
92b7b1f72b Scrolling: Fix mouse wheel axis swap when using SHIFT on macOS (system already does it). (#4010) 2021-04-06 17:51:21 +02:00
ocornut
00d570e280 Added OpenPopup() ImGuiID overload (#3993, #331) 2021-04-01 17:18:18 +02:00
ocornut
65cd14502c Fix popup positioning, broken by 84e6fe4. (#3991, #3982) 2021-03-31 19:10:12 +02:00
ocornut
f0fc822837 Fix popup positioning, broken by 84e6fe4. (#3991, #3982) 2021-03-31 19:09:08 +02:00
ocornut
6ddcdbe3e8 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_widgets.cpp
2021-03-31 16:41:17 +02:00
ocornut
3c7177c6a7 Internals: storing WindowsHoverPadding in context for external access. + Docs update binaries 2021-03-31 16:06:36 +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
3ed07a8f0b Docking: removed io.ConfigDockingWithShift option. (#2109) 2021-03-30 15:00:16 +02:00
ocornut
84e6fe4fc7 Fix IsWindowAppearing() from returning true twice in most cases. (#3982, #1497, #1061) 2021-03-29 19:45:55 +02:00
ocornut
5991851eb9 Docking: DockSpace() returns its node ID + adding branch changelog. 2021-03-26 18:40:19 +01:00
ocornut
b305953bd1 Viewports: Hotfix for crash in monitor array access, caused by 4b9bc4902. (#3967) 2021-03-25 17:13:25 +01:00
ocornut
e7577d570e Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2021-03-25 16:57:01 +01:00
ocornut
a58271c079 Internals: extracted a more reusable BeginViewportSideBar() out of BeginMainMenuBar(). (#3966, #3518)
Complement ca34c81c in docking branch which removed assumption that we can't tell size ahead of Begin().
2021-03-25 16:20:42 +01:00
ocornut
ca34c81ce9 BeginMainMenuBar(): remove expectation that we don't know menu bar height ahead, allowing up to generalize placement in any direction (will be done in master)
Amend 75de34e281
2021-03-25 15:21:23 +01: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
412d6f7efe Fixes zealous MSVC static analyzers warnings (#3938)
Other unfixed as I'm not happy with caving to false positives of every analyzers.
2021-03-18 16:10:25 +01:00
Rokas Kupstys
0c5b0c8b97 Internals: Add a way to request window to not process any interactions for specified number of frames. 2021-03-18 14:19:23 +01:00
Rokas Kupstys
b17bfdd6f4 Docking: Add support for split_outer in DockContextCalcDropPosForDocking().
Misc: Add FIXME regarding behavior of some window fields.
2021-03-18 12:21:47 +01:00
ocornut
81e0b18e38 Merge branch 'master' into docking 2021-03-16 16:10:29 +01:00
ocornut
b202fa9063 Docking: undocking nodes/windows covering most of the monitor max their size down to 90% to ease further manipulations.
Kind of a welcome hack.
2021-03-16 16:01:12 +01:00
ocornut
a1a39c632a Version 1.83 WIP 2021-03-16 14:45:30 +01:00
ocornut
2231e1a369 Docking: Dockspace() never draws a background. (#3924) 2021-03-16 14:30:36 +01:00
ANF-Studios
ebe6ac5fb5 Improvements to minor mistakes in documentation comments (#3923) 2021-03-16 12:44:16 +01:00
ocornut
256594575d Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2021-03-15 20:38:34 +01:00
ocornut
35b1148efb Version 1.82 2021-03-15 20:26:48 +01:00
ocornut
352f64697c Internals: rename legagy tab focus fields to TabFocusXXXX for clarity + removed one unnecessary FocusWindow() call. 2021-03-15 20:10:08 +01:00
CheckmateAt7
cfe83c4b44
Removed deprecated flag stopping compilation (#3902) 2021-03-12 18:02:46 +01:00
ocornut
0157502eab 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:33:29 +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
f1bf642e8f Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
#	misc/debuggers/imgui.natvis
2021-03-11 16:32:14 +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
ocornut
8ed34af6f8 ImDrawList: clarified that PathArcTo()/PathArcToFast() cannot take radius < 0.0f. (#3491) + changed poor-man ceiling in _CalcCircleAutoSegmentCount() to use 0.999999f to reduce gaps
Previously it sorts of accidentally worked but would lead to counter-clockwise paths which and have an effect on anti-aliasing.
2021-03-11 10:51:20 +01:00
ocornut
4b9bc49020 Viewports, Internals: added GetViewportPlatformMonitor() will a safety net to keep code portable + simplified handling of disconnected monitor in Begin(). 2021-03-10 17:10:07 +01:00
ocornut
6ba1334903 Nav: internals: renaming ImGuiInputSource so it is not specific to nav. Comments. 2021-03-10 16:36:39 +01:00
Rokas Kupstys
01a2bac7d5 DrawList: Replace "bool close" in drawing functions with flags. 2021-03-10 12:57:01 +01:00
ocornut
a64e0eb3a4 Nav: merged SetNavID() and SetNavIDWithRectRel() to improve sanity, moved flags overwrite off them. (#787) 2021-03-09 17:21:01 +01:00
ocornut
1c9cc7c117 Nav: tweaks so docking can use same code. NavRestoreLayer restore nav id but Menu key typicallys clears it for menu layer (+ less relying on _ChildWindow flag). 2021-03-09 16:57:13 +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
d5a4d53000 Viewports, Backend: SDL: Fix missing ImGuiBackendFlags_HasSetMousePos flag in docking branch (ok in master), GLFW: Fix application of WantSetMousePos. (#1542, #787)
Shows how little this feature is used with nav (was designed for small devices and frankly may be dropped) - but the backend support itself we will make use of for other features.
2021-03-05 17:22:22 +01:00
ocornut
705f082674 Internals: rename RootWindow->RootWindowDockTree, RootWindowDockStop->RootWindow.
Why?  So by default RootWindow matches user expectation on both branches, and RootWindowDockTree is more intentful.
(Actually should reduce diff between master<>docking)
2021-03-05 16:24:29 +01:00
ocornut
80533ea5e1 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_widgets.cpp
2021-03-05 16:04:15 +01:00
ocornut
fdebb2e093 Internals: removed HoveredRootWindow, tweak IsWindowHovered(). 2021-03-05 15:56:59 +01:00
ocornut
ee643b2ad9 IsItemHovered(): fixed return value false positive when used after EndChild(), EndGroup() or widgets using either... (#3851, #1370)
...when the hovered location is located within a child window, e.g. InputTextMultiline().
This is intended to have no side effects, but brace yourself for the possible comeback..
This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
More or less should fix/revert c76f014292 which was a revert of 344d48be3
2021-03-04 19:59:59 +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
6aee4bcdc5 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
2021-03-02 18:27:07 +01:00
ocornut
25679a411e Window, Nav: Fixed crash when calling SetWindowFocus(NULL) as the time a new window appears. (#3865) 2021-03-02 18:23:08 +01:00
ocornut
b794ecc079 Internals: Docking: some renaming. 2021-03-02 12:12:38 +01:00
Rokas Kupstys
839ecce571 Internals: Add a way to request window to not process any interactions for specified number of frames. 2021-02-25 15:12:53 +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
ocornut
edf135c18d Win32+MinGW: Re-enabled IME functions by default even under MinGW. (#2590, #738) 2021-02-22 14:39:44 +01:00
David Maas
ece854564a
Log/Capture: Added LogTextV, a va_list variant of LogText. (#3828) 2021-02-22 11:58:51 +01:00
ocornut
3ec14186cb Viewports: Fix setting of ImGuiViewportFlags_NoRendererClear. (#3213) 2021-02-18 14:11:14 +01:00
ocornut
ffa863a3ba Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_sdl_vulkan/main.cpp
#	imgui.cpp
2021-02-18 11:41:27 +01:00
ocornut
fb15d8c858 Improve on automatic circle segment count calculation. (#3808) Amends 2021-02-17 14:22:31 +01:00
thedmd
f107693d9b Improve on automatic circle segment count calculation. (#3808) 2021-02-17 12:55:39 +01:00
ocornut
30b7545841 Version 1.82 WIP 2021-02-15 18:10:14 +01:00
ocornut
3d75f438bc Docking: Made close button enable logic consistent on dockspace. When no docked window have a close button or it is disabled on the node, the space is given to tabs.
Clarified close_button_is_visible vs close_button_is_enabled behavior in DockNodeUpdateTabBar().. (#3633, #3521)
Reduced alpha of disabled close button a little bit further.
Removed 'EnableCloseButton' which was actually unused (can't be infered early, need ->VisibleWindow anyway, which is not == ->ActiveWindow)
2021-02-12 21:17:31 +01:00
ocornut
61b19489f1 Made a change to CalcWindowSizeAfterConstraint() which MSVC optimizer seems to trip on. (read on)
We seldomly modify a local ImVec2 passed as parameter. This should be perfectly legal but libigl stumbled on a what may be a MSVC optimizer bug?
Only seven function in the codebase modify as 'ImVec2 parameter' but this is the only static one (and fairly small that is) which may tempt optimizer to perform optimizations over caller-callee boundaries?
While we can't explain it fully yet and I assume it may haunt us back someday. Might also be chain reaction from some unobvious UB but can't see it right now...
Link: https://github.com/libigl/libigl/issues/1669
2021-02-12 16:34:22 +01:00
ocornut
239d09804d Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2021-02-10 21:28:16 +01:00
ocornut
4df57136e9 Version 1.81 2021-02-10 21:16:58 +01:00
ocornut
04f7ea818d Viewports: Setting the new (currently dummy) flags on viewports. (#3789, #1542, #3680, #3350, #3012, #2471)
Amend the merging of f14042ca78 (merge ee59d7a266)
2021-02-10 16:42:22 +01:00
ocornut
ee59d7a266 Merge branch 'features/viewport_in_master' into docking (WIP need adding code for new ImGuiViewportFlags values)
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2021-02-10 16:34:17 +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
3607c42bec Viewports: Fix issue inferring viewport z-order when new popups gets created. (#3734) + Metrics updates.
Revert 6bc52667
Showing inferred order and missing flags in metrics.
2021-02-10 14:31:23 +01:00
ocornut
2a5eaf239f Misc tweaks - mostly toward minimizing diff in upcoming backport merge of a few viewport structures in master 2021-02-10 14:28:04 +01:00
ocornut
7a516a266d Merge remote-tracking branch 'origin/master' into docking
# Conflicts:
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	imgui.cpp
#	imgui.h
2021-02-09 13:17:24 +01:00
ocornut
73ccb7e4b8 Viewports: (Breaking) turned GetWorkPos(), GetWorkSize() into straight fields -> WorkPos, WorkSize before exposing in master branch. 2021-02-09 13:15:01 +01:00
ocornut
1a3af8cb4c Viewports: trying to treat GetMainViewport() as const. Reducing unnecessary casts of ImGuiViewportP*
Metrics: readded root Drawlists node in metrics to match master.
The (void*) casts are implying const-casst but currently left GetMainViewport() as returning non-const.
2021-02-09 13:15:01 +01:00
ocornut
fa55b0cb60 Viewports: (breaking) removed ImGuiPlatformIO::MainViewport which is now pretty much unused and duplicate (and misleading as we will evolve the concept)
Use GetMainViewport() if stuck.
2021-02-05 16:14:47 +01:00
ocornut
58a0a7058c Backends: Using SetTexID() consistently instead of assigning to ->TexID. May make the later obsolete eventually. 2021-02-03 18:30:26 +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
ocornut
22d9a61b33 Docking: fix gap in hit test hold when using ImGuiDockNodeFlags_PassthruCentralNode touching the edge of a viewport. (#3733) 2021-02-02 15:16:46 +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
929563c3a7 Log/Capture: Fixes for handling \n in strings. Improve the look of various widgets. Added LogSetNextTextDecoration helper. Fixup/amend dbaf74d75.
For now removed LogRenderedTextNewLine() - it is eventually desirable but currently carries too much ambiguities, so reverted until we have a better system and test suite.
2021-02-02 12:29:58 +01:00
Louis Schnellbach
dbaf74d758 Log/Capture: Fix various new line/spacing issue by using same render text position when there are both RenderText and LogRenderedText call in widget code.
Also Buttons are now enclosed in bracket
2021-02-02 09:38:57 +01:00
GamingMinds-DanielC
84e8802891 Docking: on node split, update memorized DockId for currently closed windows (#3716)
Amended by @ocornut with same fix in DockBuilderRemoveNodeChildNodes().
2021-02-01 17:56:20 +01:00
ocornut
4622fa4b66 Fonts: Fixed CalcTextSize() width rounding so it behaves more like a ceil. (#3776)
his is in order for text wrapping to have enough space when provided width precisely calculated with CalcTextSize().x. Amend 7b0bf230.
Note that the rounding of either positions and widths are technically undesirable (e.g. #3437, #791) but variety of code is currently on it so we are first fixing current behavior before we'll eventually change it.
2021-02-01 12:49:18 +01:00
ocornut
577e7cb493 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
2021-01-28 21:02:13 +01:00
ocornut
9499afdf5e imgui_freetype: clarify breaking changes, and add BuildFontAtlas() to be consistent with planned obsolescence. Rename mislabelled internal helper. Demo: clarify labels in nested table demo. (#3765) 2021-01-28 20:53:53 +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
ocornut
6b32d0ebc7 Fixed minor title bar text clipping issue when FramePadding is small/zero and there are no close button in the window. (#3731) 2021-01-26 16:07:41 +01:00
Sammy Fatnassi
f3f2578e8f Internals: Added context hook removal support (#3580, #3626, #3753) 2021-01-26 15:24:01 +01:00
Sammy Fatnassi
376c88a864 Fixed some compile warnings with Clang on Windows (#3754) 2021-01-26 14:10:10 +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
bb26751b94 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2021-01-21 20:38:42 +01:00
ocornut
58075c4414 Version 1.80 2021-01-21 20:36:18 +01:00
ocornut
3b409d2b68 BeginChild: half-fixed child window name longer than 255 conflicting, merely raised the limit by using our shared large buffer. Comments. 2021-01-21 12:36:47 +01:00
ocornut
ebbb98d519 Docking: docked window honor tab and text colors by storing them. (#2771)
Later to lead into #2700 and #2539
Move tab submission block above in DockNodeUpdateTabBar(), not strictly necessary for this change as is, but useful if needing to apply override for TitleBg* as we'd need a value for node->VisibleWindow earlier than currently set.
2021-01-18 18:32:46 +01:00
ocornut
9e4956d86b Docking: added comments. added experimental TabItemFlagsOverrideSet to ImGuiWindowClass.
(Could probably do something similar with TabBarFlagsOverrideSet+Clear for #2700 later.)
2021-01-18 18:32: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
388ca563db Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx12.cpp
2021-01-15 19:20:42 +01:00
ocornut
626e3e2b3b Tables: fix reported inner-width for scrolling tables off by a small padding amount + moved code.
Makes not much difference for inner-scrolling but makes a difference when reported to outer-window.
2021-01-15 12:40:40 +01:00
ocornut
3edfc042ff Tables: Internals: Renaming, tweaks preparing ahead for trickier changes (should be all no-op). 2021-01-15 11:11:16 +01:00
ocornut
b11518d7d7 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	imgui.cpp
2021-01-05 16:46:38 +01:00
ocornut
0a5f399805 Tables: Fix hiding column right after the frozen line. Fix hovering/resising column delimiter scrolled under frozen columns. (#3678) 2021-01-03 15:45:56 +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
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
7b53551032 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2020-12-22 17:17:49 +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
nyorain
a640698123 Clipper: Fixed incorrect end-list positioning when using ImGuiListClipper with 1 item (bug in 1.79). (#3663) 2020-12-21 15:53:42 +01:00
ocornut
30468829c2 Tables: Internal: Maintain InnerRect to further clarify some code. Renamed Bg1 fields to Bg2 (used by Selectable) as the other handles Bg0+Bg1. 2020-12-18 14:32:51 +01:00
ocornut
f2df804fcc Tables: four small fixes.
Fixed last item flags leaking to disabled column, affecting IsItemHovered(). (#3651).
Validate and fix invalid DisplayOrder data from ini file.
Allow TableHeaderRows() to function will missing TableSetupColumn() calls.
Made TableHeader() use AllowItemOverlap mode to allow submit subsequent item in same cell, since it covers the whole cell area.
2020-12-13 19:57:19 +01:00
ocornut
06e87014f2 Merge branch 'master' into docking
# Conflicts:
#	imgui.h
#	imgui_internal.h
2020-12-11 23:10:06 +01:00
ocornut
bff1836922 Internals: added facility to hide windows from render without interfering with the HiddenFramesCanSkipItems/HiddenFramesCannotSkipItems fields which have effects on layout. Compact some fields.
Ideally we'd have a simpler system but it's not easy to make the capture system change to hook at the right spot. Will rework.
2020-12-11 14:37:58 +01:00
ocornut
dd4ca70b0d Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_demo.cpp
2020-12-04 19:22:15 +01:00
ocornut
7a61f3407b Tables: support internal TableResetSettings(), clarify lifetime, fixed missing auto-fit on column unhidden after first run, fixed resize assert when changing column sizing policy to stretch mid-frame (before of -1.0f weight) 2020-12-04 19:15:27 +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
bf197c74f6 Tables: storing WorkMaxX, made offset_x == MinX to be clearer, clip rect merge uses ClipRect.max.x directly, removed unused ShrinkWidth code, metrics. 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
507db499e4 Tables: work on background draw channel handling (amend "create a separate background draw channel") + Selectable disable spacing when spanning. 2020-12-04 19:15:25 +01:00
ocornut
e5a5256971 Tables: Garbage collection to relieve draw splitter buffers + for test engine: compact settings, remove table. 2020-12-04 19:15:25 +01:00
ocornut
d3222086f0 Tables: Moved TableSetupScrollFreeze(), TableUpdateDrawChannels() lower in more adequate spots.
+ rename IsFreezeRowsPassed to IsUnfrozen.
2020-12-04 19:15:24 +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
51abdd53e3 Tables: renamed somehow-duplicate ContentWidth members (implicitly == Max - Min), renamed StartX to ContentMinX for consistency. 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
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
omar
8ec05fc034 Tables: Fixed holding on table pointers accross resize/invalidation of the pool buffer. 2020-12-04 19:15:23 +01:00
ocornut
9372601322 Tables: Fixed stacked popups incorrectly accessing g.CurrentTable of parent-in-stack windows. 2020-12-04 19:15:23 +01:00
ocornut
af992d1321 Tables: Tweak settings functions to more prominently clarify the two levels of function. 2020-12-04 19:15:22 +01:00
omar
95c273618e Tables: Allow hot-reload of settings (merge policy), tidying up settings code 2020-12-04 19:15:21 +01:00
omar
9f43aae226 Tables: Calculating ideal total width, some renaming, comments. Clarify that inner_width is unused with ScrollX=0. Clip many comments to 120 columns. 2020-12-04 19:15:21 +01:00
omar
b7ff85d9ad Tables: Browse settings list in Metrics (outside of Table entry). 2020-12-04 19:15:21 +01:00
omar
164caa2db7 Tables: Support for multi-line columns name. Renaming of some fields from BackupXXX to HostXXX. Comments. 2020-12-04 19:15:20 +01:00
omar
325b4c69ba Tables: Moved border colors to the Style (maybe temporarily?) instead of hardcoding them. 2020-12-04 19:15:19 +01:00
omar
883c236eda Tables: Handle columns clipped due to host rect
Return false in user functions, set SkipItems in window, redirect to dummy draw channel.
2020-12-04 19:15:19 +01:00
omar
8da7d3c3e5 Tables: Initial commit. [Squashed 123+5 commits from tables_wip/] 2020-12-04 19:15:19 +01:00
omar
9c8671e7b0 Tables: Add empty file, skeleton. 2020-12-04 19:15:19 +01:00
ocornut
c1ffac2fee Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2020-12-03 20:05:49 +01:00
ocornut
998d7303b1 Log/Capture: fix capture to work on clipped child windows.
+ Tweak ErrorCheckEndFrameRecover() to use local window pointer.
2020-12-03 15:14:32 +01:00
ocornut
ae3e2406ec Misc tweaks/fixes (see details).
Combo: ultra minor fix for popup positioning policy mismatch depending on ImGuiComboFlags_PopupAlignLeft flag.
Made ImHashXXX functions return ImGuiID.
IsWindowNavFocusable use !WasActive.. it worked because it was only called in NewFrame()->NavUpdate() before the transition loop + EndFrame() only.
Fix unused variable warning.
2020-11-30 12:47:14 +01:00
ocornut
e0cae25c3c Clarify usage of right-aligned items in Layout>Widgets Width. Tweaks FAQ, added missing syntax coloring. 2020-11-20 17:24:18 +01:00
ocornut
4da92b89ed Viewports: fix incorrect whitening of popups above a modal if both use their own viewport + fix pvs warning. 2020-11-19 18:31:13 +01:00
ocornut
3dcbcd8bf0 Internals: added IsWindowAbove() for use for modal/viewport bugfix. 2020-11-19 18:31:10 +01:00
ocornut
97265602c4 Internals: added IsWindowAbove() for use for modal/viewport bugfix. 2020-11-19 16:59:21 +01:00
ocornut
cecf6b4209 Viewports: made standalone modals appear in taskbar + new window perform z-check before merging in main host viewport. (#3511, #1542)
This should fix a good amount of "lost modal" problems, however it is still possible to loose a modal in a host viewport if secondary viewports are configured as children above the host.
2020-11-19 16:07:07 +01:00
ocornut
9712bff0bb Internals: added experimental ErrorCheckEndFrameRecover() to unroll/end/pop. (#1651, #3600) 2020-11-19 15:43:42 +01:00
ocornut
c0ac4fb788 Columns/Internals: (Breaking): Renamed data structures. (#125, #513, #913, #1204, #1444, #2142, #2707) 2020-11-18 23:42:44 +01:00
ocornut
72de6f3360 Columns/Internals: (Breaking) renamed ImGuiColumnsFlags_* to ImGuiOldColumnFlags_*. (#125, #513, #913, #1204, #1444, #2142, #2707)
Affected: ImGuiColumnsFlags_None, ImGuiColumnsFlags_NoBorder, ImGuiColumnsFlags_NoResize, ImGuiColumnsFlags_NoPreserveWidths, ImGuiColumnsFlags_NoForceWithinWindow, ImGuiColumnsFlags_GrowParentContentsSize. Added redirection enums. Did not add redirection type.
2020-11-18 23:02:14 +01:00
ocornut
b2a91dc390 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2020-11-13 22:04:28 +01:00
ocornut
71cc636696 Metrics: Rebranded as "Dear ImGui Metrics/Debugger". Fix Show Window Rectangle. Fix Clang OSX warnings. Amend #3592 for Mingw only. 2020-11-13 21:30:19 +01:00
ocornut
e736039538 Nav: Fixed IsItemFocused() from returning false when Nav highlight is hidden because mouse has moved. (#787) 2020-11-13 21:10:03 +01:00
ocornut
8119759329 Internals: extracted stack checking code into a ImGuiStackSizes helper struct + added test for FocusScope
+ renamed g.ColorModifiers > g.ColorStack, g.StyleModifiers > g.StyleVarStack
2020-11-13 16:33:33 +01:00
ocornut
6e94013a3d Made ItemFlagsStack and GroupStack shared stacks. 2020-11-13 16:33:33 +01:00
ocornut
12ba6f4606 Fix PushFocusScopeID() + using shared stack. Renamed GetFocusScopeID() to GetFocusedFocusScope() - the two existing functions name are very error prone. 2020-11-13 16:26:59 +01:00
ocornut
a138855d56 Hotfix for PushFocusScope() being utterly wrong (until we split the stacks), Added asserts on PopID to help catch bugs, Added GC trigger. 2020-11-12 22:59:05 +01:00
ocornut
13258f5957 Internals: zero-clearing ImGuiWindow / ImGuiWindowTempData for simplicity. (amend)
All the non-zero fields previously initialized in ImGuiWindowTempData() are in fact setup in Begin: FocusCounterRegular, FocusCounterTabStop, TextWrapPos, LayoutType, ParentLayoutType
2020-11-12 12:19:50 +01:00
ocornut
dcfb986fa8 Made EndFrame() assertion for key modifiers being unchanged during the frame more lenient. (#3575) 2020-11-11 18:17:33 +01:00
ocornut
ac08593b96 Merge branch 'master' into docking + tweak dock node padding + use CheckboxFlags with int
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
#	imgui_internal.h
2020-11-05 21:36:22 +01:00
ocornut
5f97809cab Misc tidying up (zero-clear structures, more unused default in ClipRetFullscreen, NavApplyItemToResult() coding style fix)
Zero-clearing more structures
Remove arbitrary default ClipRetFullscreen value in ImDrawListSharedData.
Nav extracted NavApplyItemToResult() function.
Coding style fixes in OSX Backends.
2020-11-05 13:24:27 +01:00
ocornut
2fa00656a4 Fix for IMGUI_DISABLE_METRICS_WINDOW 2020-11-03 15:46:29 +01:00
Rokas Kupstys
9cca1b2e97 Replace UTF-8 decoder with one based on branchless version by Christopher Wellons. (not branchless anymore tho)
Decoding performance increase ~30%
2020-11-03 14:43:08 +01:00
ocornut
3777fbbd81 Renamed io.ConfigWindowsMemoryCompactTimer to io.ConfigMemoryCompactTimer as the feature will apply to other data structures. 2020-11-03 14:43:08 +01:00
ocornut
e3ac52630a Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	imgui.cpp
2020-10-31 00:47:57 +01:00
ocornut
047d4c4500 Metrics: Extracted most functions.
+ avoid using full namesapce prefix
2020-10-30 23:48:58 +01:00
ocornut
044ed22379 Metrics: Fixed mishandling of ImDrawCmd::VtxOffset in wireframe mesh renderer + omitting trailing empty ImDrawCmd in count + relying on IdxOffset value. 2020-10-30 22:56:29 +01:00
ocornut
df35157397 Drag and Drop: Fix losing drop source ActiveID (and often source tooltip) when opening a TreeNode() or CollapsingHeader() while dragging. (#1738)
Amend 7b3d379, 8241cd62 etc.
2020-10-26 14:40:44 +01:00
ocornut
b7530e5d04 Revert "Replace UTF-8 decoder with branchless version by Christopher Wellons." (#3558)
This reverts commit b3576dd354.
2020-10-25 16:27:43 +01:00
Rokas Kupstys
b3576dd354 Replace UTF-8 decoder with branchless version by Christopher Wellons.
Decoding performance increase ranges from 30-40%.

Changes:
* Errors handling near the end of string changed. If input does not contain enough bytes, decoder returns `IM_UNICODE_CODEPOINT_INVALID`, consuming all remaining bytes while old decoder consumed only one byte.

Guarantees:
* At least one byte is consumed, if input had at least one byte available.
* Number of consumed bytes will never seek past end of string.

Requirements:
* `in_text` is a valid pointer.
* String pointed by `in_text` must be zero-terminated, or `in_text_end` is not NULL.
2020-10-23 13:10:37 +02:00
ocornut
455c21df71 Merge branch 'master' into docking + dockspace demo comments
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	docs/CHANGELOG.txt
#	imgui_internal.h
#	imgui_widgets.cpp
2020-10-19 15:08:32 +02:00
Black Cat!
c9fafd5ea4 Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717) 2020-10-15 20:20:35 +02:00
ocornut
d3a80d9f1b Internals: Docking: More fixes to make DockNodeBeginAmendTabBar() viable (probably some issues left) 2020-10-15 15:02:05 +02:00
ocornut
b26f1530b7 Internals: Docking, Tab Bar: Add DockNodeBeginAmendTabBar() and work toward making hybrid dock node with windows tab bars somehow work (not done). 2020-10-15 12:18:20 +02:00
ocornut
042a3b01d2 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx10.h
#	backends/imgui_impl_vulkan.h
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
#	examples/README.txt
#	examples/example_glfw_opengl2/main.cpp
#	examples/example_glfw_opengl3/main.cpp
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_sdl_directx11/main.cpp
#	examples/example_sdl_opengl2/main.cpp
#	examples/example_sdl_opengl3/main.cpp
#	examples/example_sdl_vulkan/main.cpp
#	examples/example_win32_directx10/main.cpp
#	examples/example_win32_directx11/main.cpp
#	examples/example_win32_directx12/main.cpp
#	examples/example_win32_directx9/main.cpp
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
2020-10-14 14:44:03 +02:00
ocornut
b1a18d82e3 Moving backends code from examples/ to backends/ (step 6: update markdown documentation) 2020-10-14 14:42:00 +02:00
ocornut
d9b2fb7338 Moving backends code from examples/ to backends/ (step 1: moving source files) 2020-10-14 14:41:40 +02:00
ocornut
124c2608f1 Docs: Renamed all occurences of "binding" and "back-end" to "backend" in comments and documentations, for consistency. 2020-10-12 17:54:52 +02:00
ocornut
041ef01b33 Removed redirecting functions/enums names that were marked obsolete in 1.61: InputFloat, InputFloat2, InputFloat3, InputFloat4 with int decimal_precision parameter. (#648, #712) 2020-10-12 15:09:21 +02:00
ocornut
0f13fdd177 Removed redirecting functions/enums names that were marked obsolete in 1.60: io.RenderDrawListsFn, IsAnyWindowFocused(), IsAnyWindowHovered(), etc. 2020-10-12 13:17:05 +02:00
ocornut
04de5ef819 Version 1.80 WIP 2020-10-12 13:04:34 +02:00
ocornut
a38c6dfcc8 Internals: Added support for context hooks (for test engine or other extensions) 2020-10-09 17:13:03 +02:00
ocornut
682249396f Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2020-10-08 16:05:55 +02:00
ocornut
e5cb04b132 Version 1.79
+ Update readme and mission statement.
Removed "Minimize screen reel-estate usage", removed details on memory consumption (still very valid, just too much noise in a mission statement)
2020-10-08 16:01:59 +02:00
Christian
ae5b4991be
Docs: update gallery links. (#3514) 2020-10-08 13:56:05 +02:00
ocornut
4fd43a8b64 Internals: removed NavLayerCurrentMask (redundant, add extra shift in ItemAdd(). 2020-10-05 14:52:18 +02:00
ocornut
01cc666039 ImGuiListClipper: Renamed constructor parameters which created an ambiguous alternative to using the ImGuiListClipper::Begin() function, with misleading edge cases. 2020-10-05 12:28:28 +02:00
ocornut
958e58b06b Merge branch 'master' into docking
# Conflicts:
#	examples/example_apple_opengl2/main.mm
#	imgui.cpp
2020-10-01 13:33:08 +02:00
ocornut
c49330fc52 Docking: Fix handling of WindowMenuButtonPosition == ImGuiDir_None in Docking Nodes. (#3499) 2020-09-30 14:11:22 +02:00
ocornut
52c0b1a340 ImGuiListClipper: internal rework and tidying up to facilitate supporting frozen rows in tables + stop promoting using constructors parameters. 2020-09-28 17:25:34 +02:00
ocornut
324e0310ad Renamed ImGuiSliderFlags_ClampOnInput to ImGuiSliderFlags_AlwaysClamp. (#1829, #3209, #946, #413) 2020-09-25 13:34:31 +02:00
ocornut
fbabf651f4 Style: Renamed style.TabMinWidthForUnselectedCloseButton to style.TabMinWidthForCloseButton. Fixed README links. 2020-09-25 13:22:28 +02:00
ocornut
fa004ae79a Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_examples.sln
#	examples/imgui_impl_dx12.cpp
#	examples/imgui_impl_dx12.h
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui_demo.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2020-09-22 17:00:57 +02:00
ocornut
1ec464eb9a Tab Bar: Further simplification of section/clip rect handling. (#3291) 2020-09-22 16:43:40 +02:00
ocornut
5e5f25e2dd Tab Bar: Rename named sections members into array. Various tidying up. (#3291) 2020-09-22 16:43:39 +02:00
Louis Schnellbach
7ac16c02cc Tab Bar: Fix multiple width and position computation issue. (#3291) 2020-09-22 16:43:38 +02:00
ocornut
f23c39c395 Tab Bar: Fixed handling of scrolling policy with leading/trailing tabs. + warning fixes + bunch of renaming. (#3291)
Demo tweaks.
2020-09-22 16:43:38 +02:00
ocornut
29836412e1 Internals, CollapsingHeader, TabItem: Standardized using a #CLOSE id prefix for TabItem and ColllapsingHeader (same as window) 2020-09-22 15:49:47 +02:00
ocornut
795cf6fcb5 Removed return value from OpenPopupOnItemClick(). Use IsWindowAppearing() after BeginPopup() for a similar result. 2020-09-21 15:05:04 +02:00
ocornut
a58a727781 Renamed OpenPopupContextItem() back to OpenPopupOnItemClick(), reverting 99ab5210 2020-09-21 14:45:35 +02:00
ocornut
c206a19373 Removed ImFont::DisplayOffset in favor of ImFontConfig::GlyphOffset. (#1619)
+ Fonts: AddFontDefault() adjust its vertical offset based on floor(size/13) instead of always +1.
2020-09-17 16:45:21 +02:00
ocornut
c47bcb25ed Fix popup and tooltip positioning when not fitting in the screen. Amend fa42ccea8.
# Conflicts:
#	docs/CHANGELOG.txt
2020-09-17 11:02:04 +02:00
Rokas Kupstys
b7b08f52a4 Fix popup and tooltip positioning when not fitting in the screen. 2020-09-17 11:01:15 +02:00
ocornut
6bc526676c Viewports: Comments, removed unnecessary use of ViewportFrontMostStampCount (the LastFrontMostStampCount is enough) 2020-09-16 12:29:46 +02:00
omar
78f753ffff Merge branch 'master' into docking + incl add wd->Pipeline in ImGui_ImplVulkan_RenderDrawData platform code (#3455, #3459) 2020-09-08 17:02:58 +02:00
ocornut
70289ab42c Scrolling: Fixed edge snapping being applied prior to knowing ContentSize. (#3452)
Fix 473a01adb.
2020-09-03 17:38:51 +02:00
ocornut
8db94cd992 Internals: Scroll related, comments & shallow tweaks. 2020-09-03 17:07:03 +02:00
ocornut
36c331ff74 Merge branch 'master' into docking
# Conflicts:
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_sdl_vulkan/main.cpp
#	imgui.cpp
#	imgui_internal.h
2020-09-02 12:47:07 +02:00
ocornut
8dacb4da20 Docking: Fixed DockNode tab bar initial order broken by 8c80d533d 2020-09-02 12:11:45 +02:00
Valentin Vanelslande
9a9ee7f813
NavInitWindow: Change IMGUI_DEBUG_LOG to IMGUI_DEBUG_LOG_NAV (#3450) 2020-09-01 23:19:33 +02:00
ocornut
f4d062fa11 Nav: Added debug logging, extract bits of code into NavUpdateInitResult(). 2020-09-01 18:45:39 +02:00
ocornut
fc625d249f Internals: Begin: update ->Hidden flags only on first begin of the frame. (ignore whitespace to see simple diff)
# Conflicts:
#	imgui.cpp
2020-09-01 15:28:06 +02:00
ocornut
a456d17dfc Internals: Begin: update ->Hidden flags only on first begin of the frame. (ignore whitespace to see simple diff) 2020-09-01 15:24:24 +02:00