Commit Graph

4359 Commits

Author SHA1 Message Date
ocornut
97dad66516 Metrics: Various tweaks, listing windows front-to-back, greying inactive items when possible. 2020-08-20 16:49:11 +02:00
ocornut
9262609eaf Version 1.79 WIP 2020-08-20 16:46:44 +02:00
ocornut
5dc5610ad5 Docs: TODO, FAQ 2020-08-20 11:20:17 +02:00
ocornut
05bc204dbd Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.h
2020-08-18 17:51:43 +02:00
ocornut
95c99aaa4b Version 1.78 2020-08-18 17:50:45 +02:00
ocornut
c6b01e8e1d Drag, Sliders: Merged ImGuiDragFlags back into ImGuiSliderFlags. (#3361, #1823, #1316, #642, #1829, #3209)
Technically API breaking (but ImGuiDragFlags were pushed on master 16 hours ago)
2020-08-18 17:02:58 +02:00
omar
b36d1d465d Docking: Untangle a little bit of the ActiveIdClickOffset mess. 2020-08-18 12:40:43 +02:00
ocornut
25a9209b75 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
#	imgui_widgets.cpp
2020-08-17 23:29:17 +02:00
omar
f32663b33c Drags, Sliders: Removed locking behavior with min > max (added in 1.73) 2020-08-17 22:10:42 +02:00
omar
fb0f2ebd41 Drags, Sliders: Tweaks. 2020-08-17 22:10:42 +02:00
Ben Carter
fa279a6aa0 Drags, Sliders: Added deadzone to make selecting 0.0 on linear sliders easier, slider navigation delta accumulation. (#3361, #1823, #1316, #642) 2020-08-17 22:10:42 +02:00
omar
7607aea018 Drags, Sliders: Removed power features. Old entry points will pass-through if power=1.0f, otherwise assert + safe fallback. Remove 3 redirection functions (#3361, #1823, #1316, #642) 2020-08-17 22:10:41 +02:00
omar
a9626e1162 Docking: Made DockBuilderAddNode() automatically call DockBuilderRemoveNode(). (#3399, #2109) 2020-08-11 11:52:13 +02:00
omar
214dd68ec1 Comments, clarifying ClosePopupsOverWindow(). 2020-08-11 10:55:53 +02:00
omar
8241cd6284 Make moving window prevent its active id from being stolen (#3392, #3243, #1738)
Amend 7b3d379, 615e9ae3

# Conflicts:
#	imgui.cpp
#	imgui_widgets.cpp
2020-08-10 16:30:23 +02:00
omar
a5ba26806f Make moving window prevent its active id from being stolen (#3392, #3243, #1738)
Amend 7b3d379, 615e9ae3
2020-08-10 16:28:46 +02:00
omar
dbc70f21a9 Docking: Fixed docking overlay bits appearing at (0,0), because of 43bd80a4. Most typically noticable when disabling multi-viewport. 2020-08-10 15:54:41 +02:00
omar
85a661d276 Docking: Storing HoveredDockNode in context which can be useful for easily detecting e.g. hovering an empty node. (#3398) 2020-08-10 12:55:37 +02:00
omar
acf043a675 Docking: Moved code unjustly in DockNodeTreeFindNodeByPos() out of it and into caller (should have no side-effect ideally). Removed dupe in Begin() from earlier merge. 2020-08-10 12:52:23 +02:00
omar
2c13a74a9d Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_sdl_vulkan/main.cpp
#	imgui.cpp
2020-08-10 11:35:51 +02:00
omar
89ac87cd91 Internals: Added SetLastItemData, rename ImGuiItemHoveredDataBackup to ImGuiLastItemDataBackup. 2020-08-10 11:31:55 +02:00
omar
8074b49148 Selectable: Fixed highlight/hit extent when used with horizontal scrolling (in or outside columns). (#3187, #3386)
# Conflicts:
#	imgui_widgets.cpp
2020-08-05 19:24:07 +02:00
omar
473a01adb0 Scrolling: Avoid SetScroll, SetScrollFromPos functions from snapping on the edge of scroll limits. (#3379) + Demo: Rename "Layout" to "Layout & Scrolling". 2020-08-05 17:09:40 +02:00
omar
db886f3953 Demo: Rework Clipping section. Fix for static analysis. Added bindings in Readme. 2020-08-05 10:43:42 +02:00
omar
963839373c Demo tweaks + general removal of the word dummy were possible with no issues (kept the API call). 2020-08-03 21:31:42 +02:00
omar
de1588928b Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2020-08-03 19:54:31 +02:00
omar
4929a8e4a5 InvisibleButton: Made public a small selection of ImGuiButtonFlags (previously in imgui_internal.h) and allowed to pass them to InvisibleButton(). 2020-08-03 18:45:30 +02:00
omar
a876ad877d Window: Fixed clicking over an item which hovering has been disabled (e.g inhibited by a popup) from marking the window as moved.
+ comments
2020-08-03 18:05:20 +02:00
omar
76ddacd2a1 Internals: Backport HoveredWindowUnderMovingWindow code from Docking branch.
(effectively allowing a window to be a drag payload without have to make it _NoInputs)
2020-07-29 15:32:25 +02:00
omar
70fa37527d Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
#	imgui_draw.cpp
#	imgui_internal.h
2020-07-29 15:15:14 +02:00
omar
218ff3a2a5 Internals: Backport one ->WasActive test in NavRestoreLastChildNavWindow() from 9bf6509c6 + minor/shallow bits from docking branch. 2020-07-29 15:11:24 +02:00
omar
c7f5876f8a Internals: backport window HitTestHole code from docking branch + RenderRectFilledWithHole() helper. (#1512, #3368) 2020-07-29 15:03:52 +02:00
omar
f79f0e42f7 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_opengl3.cpp
#	imgui.h
2020-07-14 18:38:47 +02:00
omar
eefae08261 Nav: Fixed clicking on void from not clearing focused window. Amend d31fe97f7. (#3344, #2880)
This would be problematic e.g. in situation where the application relies on io.WantCaptureKeyboard flag being cleared accordingly.
2020-07-14 18:36:35 +02:00
omar
cbade7b16d Docking: Workaround recovery for node created without the _ockSpace flags later becoming DockSpace. (#3340) 2020-07-10 19:17:49 +02:00
omar
3a6c9907cd Texture-based thick lines: Minor tweaks and rename toward merging in master. Changes to allow changing AA_SIZE (disable texture path). 2020-07-08 20:18:41 +02:00
omar
78d6bdf080 Texture-based thick lines: Remove unnecessary indirection in fetching UV data, removed lerp call, renames, tweaks. 2020-07-08 17:38:02 +02:00
omar
222b7ddbfa Texture-based thick lines: Tweaks, fix for truetype builder. 2020-07-08 17:38:01 +02:00
Ben Carter
1d3c3070d8 Texture-based thick lines: Initial version of AA line drawing using textures (press SHIFT to enable) 2020-07-08 17:38:01 +02:00
Ben Carter
8e4046e13b Atlas build use GetCustomRectByIndex() + comments, rename, and shallow merge from tex_antialiasing_lines branch. 2020-07-08 17:25:40 +02:00
omar
4f5aac319e Docking: moved local-ish IMGUI_DOCK_SPLITTER_SIZE to DOCKING_SPLITTER_SIZE at the top of the file. 2020-07-03 15:51:05 +02:00
omar
fc9d6b6cb5 Docking: Added experimental flags to perform more docking filtering and disable resize per axis. Designed for toolbar patterns.
The local/shared flags specs, saving and inheriting rules are pretty inconsistent at the moment.
2020-06-30 19:55:59 +02:00
omar
4bdbea8375 Docking: Rework size allocation to allow user code to override node sizes. Not all edge cases will be properly handled but this is a step toward toolbar emitting size constraints. 2020-06-30 18:53:13 +02:00
omar
2b9d88196e Docking: Rework size allocations to recover when there's no enough room for nodes + do not hold on WantLockSizeOnce forever (#3328)
(Ensure if the fact that WantLockSizeOnce was kept when only 1 child is visible was desired/desirable)
2020-06-30 18:52:02 +02:00
omar
ab4ef822f0 Version 1.78 WIP 2020-06-30 16:56:09 +02:00
omar
90ea7e2f2f Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
#	imgui_internal.h
2020-06-30 16:43:16 +02:00
Rokas Kupstys
0738611559 Misc: Bunch of code formatting changes suggested by a pass running 'astyle' 2020-06-30 16:37:21 +02:00
omar
dca7c3c629 TestEngine: Added hook to notify test engine of a removed imgui context. 2020-06-29 20:16:55 +02:00
omar
ddabfc3477 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2020-06-29 17:15:40 +02:00
omar
9418dcb693 Version 1.77
+ fix minor clang-tidy warnings which seems reasonable
2020-06-29 15:54:28 +02:00
omar
f4f04cb5ec Windows: Amend 6b0cf2e6 to facilitate working in viewport branch + handle safe area padding and ConfigWindowsMoveFromTitleBarOnly.
# Conflicts:
#	imgui.cpp
2020-06-25 23:14:46 +02:00
omar
dd02a180b5 Windows: Amend 6b0cf2e6 to facilitate working in viewport branch + handle safe area padding and ConfigWindowsMoveFromTitleBarOnly. 2020-06-25 23:04:55 +02:00
Rokas Kupstys
d7ef56dca2 Windows: Fix unintended window size changes when resizing windows close to main viewport edges. 2020-06-25 22:58:39 +02:00
Rokas Kupstys
6b0cf2e6ae Windows: Fix unintended window size changes when resizing windows close to main viewport edges. 2020-06-25 22:16:19 +02:00
omar
45a7cf47ab FAQ update, removed redundant block in imgui.cpp 2020-06-25 16:44:06 +02:00
omar
5628416bd3 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2020-06-25 14:03:40 +02:00
omar
fed80b9537 Popups: Changed 'int mouse_buttons' to ImGuiPopupFlags. Added ImGuiPopupFlags_NoOpenOverExistingPopup, ImGuiPopupFlags_NoOpenOverItems. Refactored signature of BeginPopupContextWindow(). 2020-06-23 20:05:15 +02:00
omar
5acf6d861a Popups: Added ImGuiPopupFlags type, ImGuiPopupFlags_AnyPopupId and ImGuiPopupFlags_AnyPopupLevel flags for IsPopupOpen().
# Conflicts:
#	docs/CHANGELOG.txt
2020-06-23 20:00:32 +02:00
omar
e1d7e14717 Viewports: used main viewport for centering (wip), clarified the meaning of how ImGuiPlatformMonitor WorkPos/WorkSize should be set if unknown, added asserts. 2020-06-23 18:42:01 +02:00
omar
a616ff5d4a BeginPopupModal() doesn't set the ImGuiWindowFlags_NoSavedSettings flag anymore, and will not always be auto-centered. (#915, #3091)
# Conflicts:
#	imgui.cpp
2020-06-23 17:54:55 +02:00
omar
b83a1f3b00 BeginPopupModal() doesn't set the ImGuiWindowFlags_NoSavedSettings flag anymore, and will not always be auto-centered. (#915, #3091) 2020-06-23 17:52:13 +02:00
omar
68389200c4 Internals: Comments about CalcWrapWidthForPos() (#778) 2020-06-23 16:29:48 +02:00
omar
76e40fe5d1 Docking: Fix misuse of PushClipRect in UpdateWindowManualResize(). (#3311) 2020-06-20 22:09:58 +02:00
omar
20d61f5f62 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2020-06-20 22:06:01 +02:00
omar
1a1dcea1a0 Internals: Initialize drawlist earlier in Begin() to facilitate detecting accidental draw earlier than legal. (#3311) 2020-06-20 22:04:04 +02:00
omar
99f68d7958 Docs: Added FAQ entries removed old one which is misleading today. Misc tweaks. 2020-06-19 11:34:04 +02:00
omar
9c2a36f573 Internals: clarified the code for ClampWindowRect().
As a side-effect, some rounding error may be neutralized however this isn't the intent. (#3309)
2020-06-19 10:08:05 +02:00
omar
8ead38c100 Clang: Reduce uses of __has_warning for overall sanity, as compilers are hostile to software targetting multiple compiler version. 2020-06-18 17:02:24 +02:00
omar
704723744e Disabled latest overzealous warnings from Clang 2020-06-18 16:19:51 +02:00
ocornut
078571b7a9 Popups: added comments, reorganized the functions in imgui.h 2020-06-16 23:39:00 +02:00
ocornut
6e138504c1 Popups: Fix BeginPopupContextVoid() when clicking over the area made unavailable by a modal. (#1636) 2020-06-16 19:32:59 +02:00
ocornut
37eb89371b Popups: Internals: Added IsAnyPopupOpen(). 2020-06-16 18:46:25 +02:00
ocornut
d31fe97f74 Popups: Fix an edge case where programatically closing a popup while clicking on its empty space would attempt to focus it and close other popups. (#2880) 2020-06-16 17:10:47 +02:00
ocornut
1dfd0634cb Internals: Allow ItemHoverable() to be used with id==0 to facilitate high-level read-only hover test in widget code. 2020-06-15 22:13:06 +02:00
ocornut
99ab521024 Renamed OpenPopupOnItemClick() to OpenPopupContextItem(). Kept inline redirection function (will obsolete). + Removed CalcItemRectClosestPoint() entry point 2020-06-15 22:12:38 +02:00
omar
90c0c0c163 Columns: Lower overhead on column switches and switching to background channel. (second attempt for 9b3ce49)
Internals: Bits, comments, added ImRect::ToVec4()
2020-06-13 18:04:50 +02:00
ocornut
2665288b30 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2020-06-11 11:36:38 +02:00
ocornut
a933cc4f4d Documentation update 2020-06-11 10:21:31 +02:00
ocornut
16da8e6da6 Revert "Columns: Lower overhead on column switches and switching to background channel (some stress tests in debug builds went 3->2 ms). (#125)"
This reverts commit 9b3ce494fd.
2020-06-10 17:54:19 +02:00
ocornut
53f0f97273 Added FAQ entry about DPI. Added Japanese font loading example. 2020-06-09 17:29:26 +02:00
ocornut
40b799023b Docs: Update fonts.md (#2861) + update all references to FONTS.txt 2020-06-09 16:56:48 +02:00
ocornut
9b3ce494fd Columns: Lower overhead on column switches and switching to background channel (some stress tests in debug builds went 3->2 ms). (#125)
This change benefits Columns but was primarily made with Tables in mind.
2020-06-08 23:18:23 +02:00
ocornut
b1f2eacdf3 ImDrawList: Prefixed internal functions with underscore, renamed UpdateClipRect() to _OnChangedClipRect(), UpdateTextureID() -> _OnChangedTextureID() 2020-06-08 20:58:30 +02:00
ocornut
117d57df5b ImDrawList: Additional comments and extracted bits into ImDrawList::PopUnusedDrawCmd() 2020-06-08 20:58:29 +02:00
ocornut
57191fe3d0 Comments about limiting WindowRounding to a reasonable size. 2020-06-08 14:17:49 +02:00
ocornut
8baa4ccff5 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2020-06-06 20:31:24 +02:00
ocornut
0320e7257b ImDrawList: Small refactor to create empty command when beginning the frame, allowing to simplify some functions.
+ Missing clearing two fields in ClearFreeMemory() (was hamrless)
2020-06-06 20:27:24 +02:00
ocornut
003153b3ac ImDrawList: Tweaks to make style consistent (using pointers, same local names). Added comments. Should be no-op. 2020-06-06 20:26:04 +02:00
thedmd
e22e3f300a ImDrawList: Fixed an issue when draw command merging or cancelling while crossing the VtxOffset boundary would lead to draw command being emitted with wrong VtxOffset value. (#3129, #3163, #3232) 2020-06-06 18:54:53 +02:00
ocornut
79fbab543d Minor fix to avoid undefined behavior sanitizer triggering (#3276) 2020-06-04 18:59:04 +02:00
ocornut
41e8837f59 Comments, adding some spacing in ImVec2() constructors. 2020-06-02 18:13:54 +02:00
ocornut
5d472c4895 Merge branch 'master' into docking + fixes for #3259
# Conflicts:
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_sdl_vulkan/main.cpp
#	examples/imgui_impl_sdl.cpp
#	imgui.cpp
2020-05-25 18:32:15 +02:00
ocornut
5ddf60d8ce Commit to facilitate branches merges 2020-05-25 18:28:25 +02:00
ocornut
0fe5170bc4 Viewports: Report minimized viewports as zero DisplaySize to be consistent with main branch + comments (#1542) 2020-05-25 16:28:55 +02:00
omar
d29157ce58 Moved static array with non-trivial constructors outside of function seems to remove requirement of linking with libstdc++ on some compilers. 2020-05-24 12:32:31 +02:00
omar
c8cde28cf3 IO: AddInputCharacters function ignore 0 input. (#3252)
Amend ef13d954 + c8ea0a01 (#2541, #2538, #2815)
2020-05-20 17:56:08 +02:00
ocornut
615e9ae345 Docking: Fix undocking (#3243), amend 7b3d3798 (#1738) 2020-05-18 15:08:47 +02:00
omar
3b3af6b731 Docking: Fix extraneous function declaration (#3236) + moved some other declarations in imgui_internal to facilitate moving docking code. 2020-05-16 16:11:42 +02:00
omar
e4d8267188 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
2020-05-16 14:14:51 +02:00
omar
1cd32d3afe Docking: moving small docking context to imgui_internal.h, removed unnecessary indirection, renaming. 2020-05-14 00:19:56 +02:00