Commit Graph

4776 Commits

Author SHA1 Message Date
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
ocornut
34077c0140 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2020-09-01 12:07:35 +02:00
ocornut
ce230fc370 Internals: TabBar renaming and shuffling stuff around.
+ sneaking a readme change
2020-08-31 17:49:18 +02:00
ocornut
600b8f60b4 Docking: Fixed crash in metrics. 2020-08-28 20:20:28 +02:00
ocornut
13f718337a Internals: Added support for overriding locale decimal point, undocumented. (#2278) + Misc doc update.
Doc: Mention IMGUI_VERSION_NUM in recent api breaking changes + textwrap some demo code.
2020-08-28 18:38:31 +02:00
ocornut
901d432cb7 Nav: Fixed using Alt to toggle the Menu layer when inside a Modal window. (#787) Tidying up todo items. 2020-08-27 19:51:35 +02:00
ocornut
093afd4f7f Internals: Added Name to ImGuiDataTypeInfo + minor misc comments in BeginGroup(). 2020-08-26 21:00:43 +02:00
ocornut
45499b8f2f Window: Fixed using non-zero pivot in SetNextWindowPos() when the window is collapsed. (#3433) 2020-08-26 20:18:54 +02:00
ocornut
b30d33378d Nav: Activate InputSource as Gamepad when pressing any of the digital d-pad button. 2020-08-26 12:41:05 +02:00
ocornut
8d71bc2132 Internals: Nav: shallow refactor. 2020-08-26 12:39:34 +02:00
Rokas Kupstys
833eb771f2 Nav: Fix navigation resuming on first visible item when using gamepad.
In cases where navigation was requested with focused item out of view, clipping of current item rect resulted in an inverted rect, which was completely discarded and ImRect(0,0,0,0) was used as current point from which navigation scoring was calculated. IsInverted() check is completely removed as rect can no longer be inverted. Since rects are not initialized to ImRect(0,0,0,0) - old .Min.x != FLT_MAX check (which was changed in c7835dd189) is not necessary either.
2020-08-26 11:30:08 +02:00
ocornut
1e8b9f84da Nav: Removed stateful NavMoveFromClampedRefRect and made it more explicit that nav move request from gamepad start from a clipped location. 2020-08-26 11:28:35 +02:00
ocornut
e9053515bb Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_sdl_vulkan/main.cpp
2020-08-25 19:29:06 +02:00
ocornut
30f0900b1c Docking: Fix honoring payload filter with overlapping nodes. (we incorrectly over-relied on g.HoveredDockNode when making change for #3398)
Essentially undo part of 85a661d (#3398) + ref cf31254 (#3420)
2020-08-25 19:17:46 +02:00
Rokas Kupstys
021c28ae39 Nav: Fix ScrollToBringRectIntoView() not bringing entire item into view when nav moves to the left. Correct some comments. 2020-08-25 16:48:49 +02:00
omar
d451f6cc30 Nav tweaks. Demo: Fixed drag and drop demo state (broken by f152fac4f1). Fixed incorrect format string (which would work without IMGUI_DISABLE_OBSOLETE_FUNCTIONS). 2020-08-24 14:56:50 +02:00
ocornut
831e2c920e Docking, Viewport: Fixed a rare edge-case if the window targetted by CTRL+Tab stops being rendered. 2020-08-21 18:44:56 +02:00
ocornut
cf312545e8 Docking: Fixed docking while hovering a child window. (#3420) broken by 85a661d27. Improve metrics debugging. 2020-08-21 16:34:34 +02:00
ocornut
9d20a5f0a5 Docking: DockSpace() emits ItemSize() properly + dockspace demo (works now since 05a25e5f3) 2020-08-20 22:54:33 +02:00
ocornut
ad8fdc917f Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2020-08-20 22:42:14 +02:00
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