1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-15 11:33:29 +01:00
Commit Graph

1208 Commits

Author SHA1 Message Date
ocornut
8439a73645 Overlap: Added 'SetNextItemAllowOverlap()' as a replacement for 'SetItemAllowOverlap()'. (#6512, #3909, #517)
# Conflicts:
#	imgui.cpp
#	imgui_widgets.cpp
2023-06-28 14:40:47 +02:00
ocornut
a9a5cbf431 Overlap: Internals: add NextItemData.ItemFlags to facilitate implementation of SetNextItemAllowOverlap() + potentially remove extra_flags from ItemAdd(). (#6512, #3909) 2023-06-28 14:40:47 +02:00
ocornut
07e24b4058 ButtonBehavior: pull ImGuiButtonFlags_Repeat from ImGuiItemFlags_ButtonRepeat, matching ItemHoverable() logic. So more widgets can take advantage of Repeat logic. 2023-06-28 14:40:47 +02:00
ocornut
51f564eea6 (Breaking) Overlap: Renamed 'ImGuiTreeNodeFlags_AllowItemOverlap' to 'ImGuiTreeNodeFlags_AllowOverlap', 'ImGuiSelectableFlags_AllowItemOverlap' to 'ImGuiSelectableFlags_AllowOverlap'. Kept redirecting enums (will obsolete). (#6512, #3909, #517)
+ Internals: Renamed 'ImGuiButtonFlags_AllowItemOverlap' to 'ImGuiButtonFlags_AllowOverlap' without redirection.
2023-06-28 14:37:05 +02:00
ocornut
06f5b46133 Overlap: Fixed first frame of an overlap highlighting underlying item if previous frame didn't hover anything. (#6512, #3909, #517) 2023-06-27 15:46:35 +02:00
ocornut
d5d4d709c7 Drag and Drop: moved "drag souce doesn't report as hovered" from ButtonBehavior() to ItemHoverable().
Ensure DragXXX, SliderXXXX, InputText, PlotXXX follow same logic. Amend 251f178a6, a33f0d1f7
2023-06-27 14:44:39 +02:00
ocornut
a2f6581171 Selectable: Fixed bad manual cherry-pick/merge (fixes 3ec128c) 2023-06-27 10:57:08 +02:00
ocornut
3ec128c5fd Selectable, TreeNode: When using ImGuiSelectableFlags_AllowOverlap/ImGuiTreeNodeFlags_AllowOverlap and holding item held, overlapping widgets won't appear as hovered. (#6512, #3909)
Essentially we are going to remove calls to SetItemAllowOverlap() and standardize the fact that only 'HoveredId == id' test from it is performed.

# Conflicts:
#	imgui_widgets.cpp
2023-06-26 19:08:10 +02:00
ocornut
0a53b45858 CollapsingHeader/TreeNode: Fixed text padding when using _Framed+_Leaf flags. (#6549) 2023-06-26 11:15:55 +02:00
ocornut
6b01114057 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
2023-06-23 16:04:13 +02:00
ocornut
94c46d7486 InputText: Fixed not returning true when buffer is cleared by ImGuiInputTextFlags_EscapeClearsAll. (#5688, #2620) 2023-06-21 14:20:13 +02:00
Krzysztof Adamek
959a9c79bd TreeNode: Added support for ImGuiTreeNodeFlags_UpsideDownArrow in frameless tree nodes (#6517, #6538) 2023-06-20 15:30:40 +02:00
ocornut
1450d23b60 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
2023-06-20 15:12:09 +02:00
ocornut
b60acfa87d Tooltips: Added SetItemTooltip(), BeginItemTooltip(). Improved Demo section. 2023-06-20 15:04:14 +02:00
ocornut
d96bbf0aae TreeNode: Added undocumented ImGuiTreeNodeFlags_UpsideDownArrow flag. (#6517)
+ Minor tweak comment/layout in ImGuiIO
2023-06-19 14:33:23 +02:00
ocornut
15d74bad1d Internals: Tooltips: renamed internal flags (expecting to expose later when we publish priority stuff). 2023-06-16 16:55:51 +02:00
ocornut
0664877998 Merge branch 'master' into docking 2023-06-09 14:02:19 +02:00
ocornut
a134892a3d BeginComboPreview: fix when part of preview rect is clipped by parent window. (#6501, #1658) 2023-06-09 13:41:11 +02:00
ocornut
61ebb37843 Version 1.89.7 WIP 2023-06-01 11:22:43 +02:00
ocornut
823a1385a2 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_sdlrenderer.h
#	docs/CHANGELOG.txt
#	imgui.cpp
2023-05-31 14:51:56 +02:00
ocornut
5319d1cffa Version 1.89.6 2023-05-31 14:47:32 +02:00
ocornut
54c1ac3e38 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2023-05-22 10:10:29 +02:00
ocornut
45c8c3b611 Listbox: commented out obsolete/redirecting functions that were marked obsolete more than two years ago: ListBoxHeader(), ListBoxFooter().
+ Added default parameter to SeparatorEx() amend 2c558d5
2023-05-22 10:09:20 +02:00
ocornut
2c558d5741 Internals: SeparatorEx(): expose thickness + add misc comments relating to Separators. 2023-05-20 16:25:14 +02:00
ocornut
530134d125 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_metal.mm
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
2023-05-10 12:57:37 +02:00
ocornut
6656553fa4 Nav: Record/restore preferred position on each given axis.
Tagging #6344 #6003 #2694 #1688 as it relates to scoring, however this doesn't technically fix any of them fully yet.
But e.g. once we restore axial path for #2694 this commit will allow going back and forth to initial location.
2023-05-09 17:26:27 +02:00
ocornut
6cdedf5834 Drag, Sliders: if the format string doesn't contain any %, when using CTRL+Click to input we use a default format. (#6405) 2023-05-09 12:04:04 +02:00
ocornut
031148dc56 Fixed bad merge. 2023-04-25 16:30:31 +02:00
ocornut
594cc4793a Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2023-04-25 12:21:16 +02:00
ocornut
d3ad2f357f Menus: Fixed an issue when opening a menu hierarchy in a given menu-bar would allow opening another via simple hovering. (#3496, #4797)
Amend 48f26333
2023-04-25 12:17:37 +02:00
ocornut
bba39762dc Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2023-04-21 19:12:11 +02:00
ocornut
01ca196530 Focus: move focused child restore code in FocusWindow() with ImGuiFocusRequestFlags_RestoreFocusedChild flag. (#6357)
# Conflicts:
#	imgui.cpp
2023-04-21 19:07:08 +02:00
ocornut
30eceaf95f Focus: start moving modal check into FocusWindow(), add ImGuiFocusRequestFlags_UnlessBelowModal (currently opt-in, should try to make opt-out). (#6357, #4317) 2023-04-21 19:06:11 +02:00
ocornut
f0fe1957a8 Focus: merge extra param for FocusTopMostWindowUnderOne() from docking branch to facilitate merge. 2023-04-21 19:05:58 +02:00
ocornut
4f692ba840 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_metal.mm
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
2023-04-19 16:35:50 +02:00
lukaasm
0948cfc19e InputText: do not set WantTextInputNextFrame during the frame InputText is deactivated. (#6341) 2023-04-18 11:35:12 +02:00
ocornut
064153fca4 Version 1.89.6 WIP 2023-04-17 14:40:00 +02:00
ocornut
0ea3b87bd6 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui_internal.h
2023-04-13 16:24:09 +02:00
ocornut
1ebb913827 Version 1.89.5 2023-04-13 16:17:49 +02:00
ocornut
ec461c6ccb Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui_demo.cpp
2023-04-06 19:16:08 +02:00
ocornut
dcb6335bfe Viewports: Setting focus from Platform/OS sets corresponding focus at Dear ImGui level. (#6299) 2023-04-05 20:25:05 +02:00
ocornut
47a07d8476 ButtonBehavior: Fixed an edge case where changing widget type/behavior while active and using same id could lead to an assert. (#6304)
+ Demo: use BeginDisabled() block in BackendFlags section.
I'd still consider this undefined behavior as some combination may not work properly, but let's fix things while we can as we encounter them.
2023-04-05 18:34:49 +02:00
ocornut
ee5ce36745 Merge branch 'master' into docking, including specific merge for imgui_impl_glfw.cpp for f070497
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2023-04-04 21:17:47 +02:00
ocornut
e8206db829 InputText: Fixed crash introduced by 5a2b1e848 (#6292, #4714) 2023-04-02 17:29:56 +02:00
ocornut
4fdafef54f Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	docs/CHANGELOG.txt
#	imgui_widgets.cpp
2023-03-29 18:41:41 +02:00
ocornut
5f301914a0 TabBar: Tab-bars with ImGuiTabBarFlags_FittingPolicyScroll can be scrolled with horizontal mouse-wheel (or Shift + WheelY). (#2702) 2023-03-29 17:10:03 +02:00
AJ Weeks
821814b450 InputText: Reworked prev/next-word behavior . Include period as delimiter and tweak prev/next words logic. (#6067) 2023-03-22 20:48:47 +01:00
ocornut
c98bad042d ColorEdit, RadioButton, Windows: Using adaptative tesselation for preview circles. 2023-03-21 17:48:09 +01:00
PanForPancakes
9ac94ff001 ColorPicker: Fixed shading of S/V triangle in Hue Wheel mode. (#6254, #5200)
Amend f6460970
2023-03-21 17:47:56 +01:00
ocornut
ad44f5831a Merge branch 'master' into docking 2023-03-21 17:04:54 +01:00
David Briscoe
cac76b2754 Slider, Drags: skip %+ and %# format flags for scanning. (#6259)
(There are two additional unhandled flags that only affect padding: '-' and ' '. Formatting flags don't make sense in a SliderInt's format string, so I've omitted them)
2023-03-21 12:09:38 +01:00
ocornut
5a2b1e8482 InputText: Fixed a tricky edge case, ensuring value is always written back on the frame where IsItemDeactivated() returns true (#4714)
Altered ItemAdd() clipping rule to keep previous-frame ActiveId unclipped to support that late commit.

Also, MarkItemEdited() may in theory need to do:
if (g.ActiveIdPreviousFrame == id)
        g.ActiveIdPreviousFrameHasBeenEditedBefore = true;
But this should already be set so not adding now.
2023-03-16 21:12:57 +01:00
ocornut
314e6443c9 Internals: removed ImGuiInputSource_Nav enum,
Essentially finishing the work of removing Nav a dual input source (with e.g. removal of NavInput[]).
2023-03-16 20:28:05 +01:00
ocornut
c501c2d4cd Internals: inverted a block in InputScalar() to facilitate reading/stepping in common case. 2023-03-16 15:15:12 +01:00
ocornut
6b3435a2db Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl3.cpp
#	docs/CHANGELOG.txt
2023-03-16 12:01:13 +01:00
ocornut
24a44b9abe Version 1.89.5 WIP 2023-03-15 12:25:20 +01:00
ocornut
9e30fb0ec1 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
2023-03-14 16:38:22 +01:00
ocornut
f3f6295d53 Version 1.89.4
Commented out obsolete enums/functions names: ImGuiSliderFlags_ClampOnInput, ImGuiInputTextFlags_AlwaysInsertMode, ImDrawList::AddBezierCurve(), ImDrawList::PathBezierCurveTo()()
2023-03-14 16:36:19 +01:00
ocornut
552969e33e BeginTooltip: correctly testing return value of BeginTooltipEx() even though it always return true in current code.
Amend 3b2f617
2023-03-14 14:28:41 +01:00
ocornut
9937660b1c Merge branch 'master' into docking
# Conflicts:
#	examples/example_allegro5/main.cpp
#	examples/example_apple_metal/main.mm
#	examples/example_apple_opengl2/main.mm
#	examples/example_glfw_metal/main.mm
#	examples/example_glfw_opengl2/main.cpp
#	examples/example_glfw_opengl3/main.cpp
#	examples/example_glfw_vulkan/main.cpp
#	examples/example_glut_opengl2/main.cpp
#	examples/example_sdl2_directx11/main.cpp
#	examples/example_sdl2_metal/main.mm
#	examples/example_sdl2_opengl2/main.cpp
#	examples/example_sdl2_opengl3/main.cpp
#	examples/example_sdl2_vulkan/main.cpp
#	examples/example_sdl3_opengl3/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
2023-03-10 18:40:04 +01:00
ocornut
a322122f74 InputText: Fixed not being able to use CTRL+Tab while an InputText() using Tab for completion or textinput is active.
(regresion from 1.89) + removed unnecessary if block in NavProcessItem()
2023-03-09 16:24:03 +01:00
ocornut
e2cede6542 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2023-03-08 17:41:32 +01:00
Marc Delorme
c8ad25caa6 Make classes not depend on the implicit GImGui context (#5856, #6199): ImGuiWindow, ImGuiInputTextCallbackData, ImGuiListClipper, ImGuiStackSizes
This commit is a preparation toward adding ImGui apis with explicit context
and making ImGui applications being able to use multiple context at the same time
whatever their concurrency model.

This commit modifies ImGuiInputTextCallback, ImGuiListClipper and ImGuiStackSize so those classes do not to depend on GImGui context anymore.

About ImGuiInputTextCallback:
- ImGuiInputTextCallback depends on ImGuiContext because it has a
  `InsertChars` method adding character to `g.InputTextState`
- To make ImGuiInputTextCallback aware of which context to use, the
  appropriate context is given as argument of ImGuiInputTextCallback
  constructor.

About ImGuiListClipper:
- ImGuiListClipper apply to a context through its `Begin`, `End`, and `Step`
  method.
- To make ImGuiListClipper aware of which context to use, the
  appropriate context is given as argument of ImGuiListClipper
  constructor.
- Since the behavior is different than previously the class has been
  renamed ImGuiListClipperEx
- In order to preserve backward compatibility, a subclass of ImGuiListClipperEx
  named ImGuiListClipper has been defined and forward the implicit context
  to ImGuiListClipperEx parent.

About ImGuiTextFilter:
- ImGuiTextFilter depends on the implicit context because the Draw(..)
  method call ImGui::InputText(...)
- Instead from that commit the Draw(...) method takes an explicit context
  as first argument
- Since the behavior is different than previously the class has been
  renamed ImGuiTextFilterEx
- In order to preserve backward compatibility, a subclass of ImGuiTextFilterEx
  named ImGuiTextFilter has been defined. This subclass has a draw method
  override which and forward the implicit context to the parent class Draw(...)

About ImGuiStackSizes:
- ImGuiStackSizes was depending on ImGuiContext because of its
  `SetToCurrentState` and `CompareWithCurrentState` method
- ImGuiStackSizes is an helper object use
  for comparing state of context. It does not necessarily need to
  compare the same context. For that reason, as opposed to previous
  classes it takes the context it wants to compare to as argument of
  its method.
- For this occasion `SetToCurrentState` and `CompareWithCurrentState`
  have been renamed `SetToContextState` and `CompareWithContextState`
  to match the new method signature.

ImGuiListClipper

ImGuiInputTextCallbackData
2023-03-08 15:55:38 +01:00
ocornut
c9a53aa74d Nav: Made Enter key submit the same type of Activation event as Space key. (#5606)
Instead of adding NavActivateInputId support in ButtonBehavior() started untangling the mess.
2023-03-07 18:41:49 +01:00
ocornut
b6586bb06d TestEngine: update IMGUI_TEST_ENGINE_ITEM_ADD() hooks to support passing item in flags. 2023-03-06 18:10:04 +01:00
ocornut
4078abe14c Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
#	imgui.h
2023-03-06 17:03:55 +01:00
ocornut
696a533532 TestEngine: added ImGuiItemStatusFlags_Inputable flag report to facilitate fuzzing. 2023-02-16 12:15:06 +01:00
ocornut
a1b8457cb5 Moved the optional "courtesy maths operators" (#define IMGUI_DEFINE_MATH_OPERATORS) implementation from imgui_internal.h in imgui.h. (#6164, #6137, #5966, #2832) 2023-02-15 19:23:12 +01:00
ocornut
e25e4526cd Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
2023-02-15 18:18:47 +01:00
ocornut
204cb4d226 Version 1.89.4 WIP 2023-02-15 15:35:56 +01:00
ocornut
192196711a Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2023-02-14 16:01:11 +01:00
ocornut
458a109031 Version 1.89.3 2023-02-14 16:00:18 +01:00
ocornut
fa0852f9e5 ColorEdit, ColorPicker: Fixed hue/saturation preservation logic from interfering with the displayed value (but not stored value) of others widgets instances. (#6155)
Amend 30546bc0, accb0261b, 38d22bc4
2023-02-14 15:35:00 +01:00
ocornut
ea4565368e Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl2.h
#	backends/imgui_impl_sdl3.cpp
#	backends/imgui_impl_sdl3.h
#	imgui.cpp
2023-02-10 17:05:06 +01:00
ocornut
99c0bd65df Added SeparatorText() widget. (#1643) 2023-02-10 12:16:41 +01:00
ocornut
e4233c6fb6 Merge branch 'master' into docking (doesn't include viewports-related changes for new SDL3 backend)
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx10.h
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx11.h
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx12.h
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_dx9.h
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_metal.h
#	backends/imgui_impl_metal.mm
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_opengl3.h
#	backends/imgui_impl_osx.h
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdlrenderer.cpp
#	backends/imgui_impl_sdlrenderer.h
#	backends/imgui_impl_vulkan.cpp
#	backends/imgui_impl_vulkan.h
#	backends/imgui_impl_win32.cpp
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui_widgets.cpp
2023-02-07 16:23:49 +01:00
ocornut
e816bc6723 Merge misc changes from docking branch to reduce small drift.
In particular:
- imgui.cpp : move UpdateInputEvents() higher in NewFrame() to match docking + update RenderMouseCursor() to match.
- imgui_draw.cpp: ImDrawList::_ResetForNewFrame() change from c807192ab
- Backends: SDL2. Add MouseWindowID + change SDL_CaptureMouse() test to match docking branch. Not strictly necessary but aimed at reducing drift because we go on and fork this file.
+ moved responsability of checking valid names to TabBarGetTabName() to simplify both branches.
2023-02-07 13:22:23 +01:00
ocornut
b0a936e5d4 Merge branch 'master' into docking (incl revert of examples refactor)
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl.cpp
#	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
2023-02-03 22:38:39 +01:00
Giuseppe Barbieri
c75410e72c
Debug: fix display order of InputText's data CurLenA/CurLenW (#6143) 2023-02-03 17:55:26 +01:00
ocornut
887abe9578 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_osx.mm
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
#	imgui_widgets.cpp
2023-02-01 22:18:57 +01:00
ocornut
d719776460 Internals: added 'ImGuiButtonFlags flags' to ImageButtonEx(). (#6126) 2023-01-31 11:30:27 +01:00
ocornut
f142887088 Combo: Allow SetNextWindowSize() to alter combo popup size. (#6130)
Amend a5e939214
2023-01-31 11:23:24 +01:00
ocornut
27f2dd56d6 Internals: move "%s" skip-formatting logic to ImFormatStringToTempBuffer() function, meaning Text() and all the *V() functions can also benefit from it. (#3466)
Amend 645a6e0 and 23a785a.
2023-01-27 15:24:23 +01:00
ocornut
fc50532213 InputText: On OSX, inhibit usage of Alt key to toggle menu when active (used for work skip). 2023-01-25 21:44:30 +01:00
AJ Weeks
f4ef420c01 InputText: Added support for Ctrl+Delete to delete up to end of word. (#6067) 2023-01-25 14:41:38 +01:00
ocornut
3d8885cbbd TabBar: Internals: add GetCurrentTabBar(), TabBarFindTabByOrder(), TabBarGetCurrentTab(), TabBarGetTabOrder(), TabBarGetTabName(), TabBarQueueFocus() + clear LastTabItemIdx on EndTabBar(). (#5853, #5997)
ImGuiTabBar::GetTabOrder() -> TabBarGetTabOrder().
ImGuiTabBar::GetTabName() -> TabBarGetTabName()
2023-01-24 19:41:20 +01:00
ocornut
f6db9e2f39 Menus: Fixed layout of MenuItem()/BeginMenu() when label contains a '\n'. (#6116) 2023-01-24 16:11:38 +01:00
ocornut
88dfd85e92 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2023-01-21 00:49:06 +01:00
ocornut
51c97a41aa PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets. 2023-01-18 15:13:23 +01:00
ocornut
ccf94e2e6e Strip seemingly unecessary tests, as UTF-8 decoder can not return null since 9cca1b2e9 2023-01-12 12:46:06 +01:00
ocornut
482ac70a0b Version 1.89.3 WIP 2023-01-11 15:52:30 +01:00
ocornut
d822c65317 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	docs/CHANGELOG.txt
2023-01-05 15:58:49 +01:00
ocornut
d7c8516a4b Version 1.89.2 2023-01-05 15:49:29 +01:00
ocornut
83429abf4a Internals: simplify ButtonBehavior(), also to allow easily adding a mouse_button_down thing. 2023-01-05 12:19:37 +01:00
ocornut
03add24acf Selectable: Internals: removed unused ImGuiSelectableFlags_DrawHoveredWhenHeld flag.
Needlessly introduced in baae057a from WIP tables branch at the time, ended up unused by Tables.
A comment "I find it counter intuitive that hovering supersedes activation." in #3516 led me to this however this is not the cause of said issue.
2023-01-05 11:28:05 +01:00
ocornut
57a5b73a4c InputText: fixed cursor navigation when pressing Up Arrow on the last character of a multiline buffer which doesn't end with a carriage return. (#6000)
Simplify stb_textedit_find_charpos(). Leaving that to simmer for a while before attempting an upstream PR.
2023-01-04 17:58:07 +01:00
ocornut
c191faf0ba Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
#	imgui_widgets.cpp
2022-12-08 21:19:01 +01:00
ocornut
59b63defe5 Misc shallow merge/sync from docking designed to faciliate cross-merging between docking and string_view. 2022-12-08 21:14:39 +01:00
ocornut
3ea0fad204 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui.h
2022-12-01 20:22:27 +01:00
Marc Delorme
a5e96ff99e Make ImGuiInputTextState not depend on the implicit GImGui context. (#5856)
This commit is a preparation toward adding ImGui apis with explicit context
and making ImGui applications being able to use multiple context at the same time
whatever their concurrency model.
--
Prior to this commit ImGuiInputTextState::OnKeyPressed was depending on the
global context to know which font and font size to use, and if it should
follow MacOSX behaviors or not (c.f ConfigMacOSXBehaviors).

Instead of using the global context, this commit store the context as
attribute of ImGuiInputTextState. Since this state is forwarded to most
of text edit related function, it possible to access font, font size and
ConfigMacOSXBehaviors from everywhere.

NOTE: I have noticed a bug prior to that commit: if the font or font size
change while editing the same widget, the ImGuiInputTextState become invalid
and there is no code to handle this invalidation. Fixing this bug is out
of scope of current pull request.

# Conflicts:
#	imgui_internal.h
2022-12-01 16:48:45 +01:00