Commit Graph

4670 Commits

Author SHA1 Message Date
omar
861f786d81 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
2020-01-10 14:38:09 +01:00
omar
f9630e60c5 Metrics: Fix not being able to expand "ParentWindow" when parent window is same as root window. 2020-01-07 21:32:00 +01:00
omar
d581939387 Removed trailing spaces. 2020-01-06 15:24:16 +01:00
omar
22d7f26e06 Tweak wording
Remove Patreon
2020-01-06 12:55:01 +01:00
omar
3b1b5266e5 Docking: Fixed a bug where the tab bar of a hidden dockspace would keep requesting focus. (#2960) 2020-01-02 22:50:56 +01:00
omar
c163b856d7 Docking: Fix for IMGUI_DEBUG_INI_SETTINGS=1, comments 2020-01-02 22:35:29 +01:00
omar
07eb7adbb4 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-12-20 16:36:41 +01:00
omar
854fc08194 Amend f70204f2 to facilitate merges. 2019-12-20 16:34:07 +01:00
omar
4c108d22f0 Minor bits, placeholder aimed at facilitating merging of Tables branch into Docking
# Conflicts:
#	imgui.cpp
2019-12-19 17:01:22 +01:00
omar
f70204f2f4 Minor bits, placeholder aimed at facilitating merging of Tables branch into Docking 2019-12-19 16:53:44 +01:00
omar
c706ff6f3a Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_sdl.cpp
#	imgui.cpp
2019-12-18 20:49:41 +01:00
omar
a610f1da52 Bezier Tweaks, fixed parameter order of 3831d50 2019-12-17 16:43:05 +01:00
Rokas Kupstys
3831d50ab9 Add ImBezierClosestPoint() function which returns a point on bezier curve which is closed to a specified point. 2019-12-17 16:22:02 +01:00
omar
9d444062f9 Limiting Columns()/BeginColumns() api to 64 columns (#125)
While the current code technically supports it, future code may not so we're putting the restriction ahead.
2019-12-17 13:25:46 +01:00
omar
10fdc03a46 Clarification about Im helpers + moving GetColorXXX functions outside of that block. 2019-12-17 13:19:36 +01:00
omar
992736dc5d Merge branch 'refs/heads/master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_sdl.cpp
#	examples/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2019-12-13 17:06:27 +01:00
omar
43bd80a40d Internals: Breaking: ImRect() default constructor initializes all fields with 0.0f
Instead of (FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX). Previous behavior was designed for adding into a bounding box but rarely relied on and not worth it.
2019-12-13 11:56:00 +01:00
omar
6fdde67be2 Documentation, FAQ, todo tweaks 2019-12-10 13:37:29 +01:00
omar
f9c26d23de Removed redirecting functions/enums that were marked obsolete in 1.53 (December 2017).
Comments
2019-12-08 16:38:27 +01:00
Ben Carter
697f15e339 Added PrimUnreserve() API. Obsoleted calling ImDrawList::PrimReserve() with a negative count. 2019-12-08 16:06:32 +01:00
omar
f656e7775e Inputs: Added ImGuiMouseButton enum for convenience (e.g. ImGuiMouseButton_Right=1).
We forever guarantee that the existing value will not changes so existing code is free to use 0/1/2.
2019-12-06 16:29:36 +01:00
omar
6cbed03d4a Comments, clarified mouse button ordering. 2019-12-06 16:29:32 +01:00
omar
b521cd357d Removed implicit default parameter to IsMouseDragging(int button = 0) to be consistent with other mouse functions.
(none of the other functions have it).
2019-12-05 18:33:36 +01:00
omar
8342e5b91a Amend previous commits (added ImGuiMouseCursor_NotAllowed enum + new cursors in GLFW 3.4)
Amend b5cad20d79, 945a509773
+ unrelated minor typos
2019-12-05 15:45:30 +01:00
omar
927580d4a8 Docking: Cleanup, rename DockNodePreviewDockCalc() -> DockNodePreviewDockSetup() 2019-12-04 23:06:36 +01:00
omar
abaf0256b8 Version 1.75 WIP
Added message to font file loading assert.
2019-11-28 20:58:16 +01:00
omar
a1e4af62d3 Docking: Fix bug added in 71a58261 + Misc docking omments 2019-11-28 20:52:46 +01:00
omar
4dff49b2f1 Docking, Viewports: Moving code.
Moved NewFrame() sanity checks in NewFrameSanityChecks().
Moved some of DockNodeUpdate() into DockNodeUpdateForRootNode().
2019-11-27 19:13:15 +01:00
omar
71a58261f6 Docking: Internals: Removed redundancy in code path leading to the BeginAsDockableDragDropSource(), clarified UpdateMouseMovingWindowEndFrame()
Note that the ConfigWindowsMoveFromTitleBarOnly path for UpdateMouseMovingWindowEndFrame() would previously test the window->RootWindow title bar instead of window->RootWindowDockStop. This didn't have any side effect afaik because we wouldn't enter that function anyway as clicking on any tab bar would trigger the move before UpdateMouseMovingWindowEndFrame() does it. However for consistency made the UpdateMouseMovingWindowEndFrame()code more correct.
+ minor renaming
2019-11-27 18:57:01 +01:00
omar
8d1b82d596 Docking: Internals: Rename StartMouseDragFromTitleBar() -> StartMouseMovingWindowOrNode(), clarify. 2019-11-27 15:51:15 +01:00
omar
3096e7a9cd Viewports: Preserve last known size for minimized main viewport to be consistent with secondary viewports.
Amend 606175b9, d8ab2c1a.
However becomes inconsistent with viewport-enabled setup. Should report some of that logic in master, need back-end rework.
2019-11-26 21:02:28 +01:00
omar
1c3a9c8e74 Docking: Remove Size > 0.0f asserts added in 718e15c7 and 7c183dc6. (#2690, #2109, #2906)
In #2906 the zero input came from a minimized viewport, but even without it we cannot prevent DockNode size from eventually reaching zero as padding are taken from the starting size.
In a separate commit we'll however shortcut some of the existing codepath on zero-sized viewport to reduce the likehood of lossy side-effects (just like we don't call ClampWindowRect in Begin)
2019-11-26 20:25:54 +01:00
omar
813e0c18e6 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx10.h
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx11.h
#	examples/imgui_impl_dx12.cpp
#	examples/imgui_impl_dx12.h
#	examples/imgui_impl_dx9.cpp
#	examples/imgui_impl_dx9.h
#	examples/imgui_impl_metal.h
#	examples/imgui_impl_metal.mm
#	examples/imgui_impl_opengl3.cpp
#	examples/imgui_impl_opengl3.h
#	examples/imgui_impl_vulkan.cpp
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2019-11-26 12:23:43 +01:00
omar
bdce833636 Version 1.74 2019-11-25 18:38:53 +01:00
omar
26d177bc03 Docs: Moved misc/fonts/README.txt to docs/FONTS.txt. + tweaks 2019-11-25 18:29:28 +01:00
omar
bbe0409942 Metrics: Show wire-frame mesh and approximate surface area when hovering ImDrawCmd. Amend aeb5795.
Internals: Added ImTriangleArea()
2019-11-25 12:01:04 +01:00
Ben Carter
aeb57952d6 Added area calculation for draw lists in metrics
Added ability to hover over a draw list's summary stats and see all the contents in wireframe

(cherry picked from commit fd808347bd68a07ad318af6c151028bc9f7b82e7)
2019-11-25 11:10:00 +01:00
omar
3a82994429 Docking: Can undock from the small triangle button. (#2109,. #2645) 2019-11-22 23:12:16 +01:00
omar
106184bbea Docking: Fixed node->HasCloseButton not honoring ImGuiDockNodeFlags_NoCloseButton in a floating node, leading to empty space at the right of tab-bars with those flags. (#2109) 2019-11-22 23:11:21 +01:00
omar
51e2e9b239 ImVector: Added shrink() helper. ImFont::RenderText minor optimisation for debug build. Misc: Metrics shows tab names because we now have them. 2019-11-22 14:06:51 +01:00
omar
51a02b319c Added IM_UNICODE_CODEPOINT_MAX. Changed specs of ImFontAtlas::AddCustomRectRegular() (breaking change). 2019-11-21 14:13:17 +01:00
omar
ca63349eb4 Renamed XX-bits -> XX-bit in comments to match what the world appears to be using. 2019-11-20 11:58:25 +01:00
omar
a899c1e570 Internals: Using ImU64 for internal ImFile api so we can later wrap them to fseeko/ftello//_fseeki64/_ftelli64 (#2734) 2019-11-20 10:40:14 +01:00
omar
ecbedc8c26 Tweaks, ammend 93efa54, rename to IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS (#1038) 2019-11-19 21:29:12 +01:00
omar
4e90906b04 Added IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS / IMGUI_DISABLE_FILE_FUNCTIONS #2734)
Using in Emscripten example.
2019-11-19 21:14:44 +01:00
omar
93efa5415f Renamed IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS to IMGUI_DISABLE_DEFAULT_FORMAT_STRING_FUNCTIONS. (#1038)
Renamed IMGUI_DISABLE_MATH_FUNCTIONS to IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS.
2019-11-19 20:53:17 +01:00
omar
9efaf2828b Doc comments. Removed .ini parsing code from 1.53 that parsed entries without the [Window] tag (which enabled importing an old .ini file) 2019-11-19 19:39:46 +01:00
omar
3895363432 Merge branch 'master' into docking inc alter GetWindowResizeID
# Conflicts:
#	imgui.cpp
2019-11-18 13:58:50 +01:00
omar
7e232092a6 Internals: Added GetWindowResizeID(), renamed GetScrollbarID() to GetWindowScrollbarID(). Using integer for resize ID so they matches regardless of the pointer size.
Internals: Renamed IMGUI_USER_ERROR to IM_ASSERT_USER_ERROR().
2019-11-15 16:59:43 +01:00
omar
a1e43c682a Merge branch 'master' into docking (with fixes)
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-11-15 15:32:36 +01:00
Tracy Ma
8f40020ca6 Disable Win32 clipboard and IME functions when build target UWP (#2892, #2895) 2019-11-15 12:19:44 +01:00
omar
b23dcab6e1 Fix 25eee91 incorrect assert when ending a child-popup (rarely used but used by sub-nenus) 2019-11-14 16:06:39 +01:00
omar
be436e2b0b Fix HelpMarker() symbol collision for unity builds (#2893) 2019-11-13 22:04:16 +01:00
omar
03852470de Internals: Routing recoverable user errors via IMGUI_USER_ERROR() macro. (#1651) 2019-11-13 21:58:18 +01:00
omar
25eee91542 Error handling: Assert if user mistakenly calls End() instead of EndChild() on a child window. (#1651)
Internals: Moved some error handling code.
2019-11-13 21:51:38 +01:00
omar
b138f8cbcd Internal: Nav rename preparing for nav inputs ownership changes. IsNavInputPressed() -> IsNavInputTest() 2019-11-13 21:02:25 +01:00
omar
7c441e37fa CI: Update jobs to MacOS latest (Catalina)
Metrics: Added description to Item Picker.
2019-11-13 20:34:55 +01:00
omar
c3fd4ae473 Docking: comments 2019-11-12 11:06:02 +01:00
omar
6e8e2c0fa9 Scrollbar: Fixed an issue where scrollbars wouldn't display on the frame following a frame where all child window contents would be culled.
Demo: Fixed a small bug with scrolling demo.
Metrics: Tweaks.
2019-11-08 19:01:54 +01:00
omar
69b5c2f541 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-11-08 15:45:12 +01:00
omar
57dc34f4e8 TreeNode: Added IsItemToggledOpen() to explicitly query if item was just open/closed, facilitating interactions with custom multi-selections patterns. (#1896, #1861) 2019-11-08 15:30:15 +01:00
omar
d003674f2c Internals: Added ImChunkStream, used by window settings. (more generic followup to 4c13807, the class will be used more extensively by Tables) 2019-11-07 16:05:03 +01:00
omar
a337e219b6 Internals: ImPool: Renaming. 2019-11-07 16:04:51 +01:00
omar
28f1d60de1 Internals: Renaming + added ImStrSkipBlank() from docking branch.
(cherry picked from commit a573943fa0ce323ffb4080e57f5e8fe1bc777c36)
2019-11-06 23:37:35 +01:00
omar
4c13807b7d Misc: Optimized storage of window settings data (reducing allocation count). 2019-11-05 22:43:53 +01:00
omar
a704614b3e Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2019-11-04 16:33:57 +01:00
omar
792a8631aa Metrics: Expose basic details of each window key/value state storage. 2019-10-31 14:01:35 +01:00
omar
8fee5a4349 Internals: Renaming for consistency. 2019-10-31 11:15:40 +01:00
omar
d62a413476 Misc: Windows: Do not use _wfopen() if IMGUI_DISABLE_WIN32_FUNCTIONS is defined. (#2815) 2019-10-29 21:47:43 +01:00
omar
6024051a2f Viewport: Fixed 32380a0 (#2876) 2019-10-29 21:18:01 +01:00
omar
b3e94f5de8 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_opengl3.cpp
#	imgui_widgets.cpp
2019-10-29 17:21:19 +01:00
Rokas Kupstys
c863c1f6a1 Clean up number rounding. Now it is more obvious what code is doing. (#2862)
Add IM_ROUND() macro
Replace IM_FLOOR(n + 0.5f) and ImFloor(n + 0.5f) with IM_ROUND(n)
2019-10-29 17:05:25 +01:00
omar
32380a0112 Viewport: Store current dpi scale in context. 2019-10-29 16:43:11 +01:00
omar
4e56de757c Doc: Promote Discord over Discourse. Obsoleting Discourse server. 2019-10-25 15:36:37 +02:00
omar
664fb38e39 Docking: child windows don't use style.ChildRounding. 2019-10-25 11:13:51 +02:00
omar
0cbb96895a Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx12.cpp
#	imgui.cpp
#	imgui.h
#	imgui_widgets.cpp
2019-10-24 15:11:37 +02:00
omar
ec0e953cca Fixed a couple of subtle bounding box vertical positioning issues relating to text baseline alignment.
The issue would generally manifest when laying out multiple items on a same line, with varying heights and text baseline offsets. (#2833)
Some specific examples, e.g. a button with regular frame padding followed by another item with a multi-line label and no frame padding, such as: multi-line text, small button, tree node item, etc. The second item was correctly offset to match text baseline, and would interact/display correctly,but it wouldn't push the contents area boundary low enough.
Note: previously the second parameter to ItemSize() was 0.0f was default, now -1.0f to signify "no text baseline offset request". If you have code using ItemSize() with an hardcoded zero you may need to change it. (+1 squashed commits)
2019-10-23 18:05:44 +02:00
omar
23c1ff4907 Removed redirecting functions/enums names that were marked obsolete in 1.52 (October 2017).
- Begin() [old 5 args version]     -> use Begin() [3 args], use SetNextWindowSize() SetNextWindowBgAlpha() if needed
- IsRootWindowOrAnyChildHovered()  -> use IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows)
- AlignFirstTextHeightToWidgets()  -> use AlignTextToFramePadding();
- SetNextWindowPosCenter()         -> use SetNextWindowPos() with a pivot of (0.5f, 0.5f)
- ImFont::Glyph                    -> use ImFontGlyph
If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out the new names or equivalent features, or see how they were implemented until 1.73.
2019-10-22 14:45:11 +02:00
omar
7feccf9ab2 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx10.h
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx11.h
#	examples/imgui_impl_dx9.cpp
#	examples/imgui_impl_dx9.h
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_opengl2.cpp
#	examples/imgui_impl_opengl2.h
#	examples/imgui_impl_opengl3.cpp
#	examples/imgui_impl_opengl3.h
#	imgui.cpp
2019-10-18 16:50:30 +02:00
Rokas Kupstys
714fe29d1a Replace manual flooring with IM_FLOOR() macro. (#2850)
Macro is used to ensure that flooring operation is always inlined even in debug builds. __forceinline does not force inlining in /Od builds with MSVC.

(cherry picked from commit bc165df6fd7969605bbc07b8a6d3d28f9109e8f3)
2019-10-18 16:18:38 +02:00
omar
53278be61f FAQ, Readme. Use = {} instead of = { 0 }, wasn't problematic because they were all static variables or one stack array not read. But hey. 2019-10-18 16:18:05 +02:00
omar
5fc427a49e Improved and moved FAQ to docs/FAQ.md so it can be readable on the web. (#2848) 2019-10-16 11:04:00 +02:00
Rokas Kupstys
6892b81578 Remove trailing spaces from bunch of files.
(cherry picked from commit 50e0f8d4ddf4c426f62f346c8260a927f6b7c779)
2019-10-15 16:04:02 +02:00
omar
c21fdabb43 Doc: Readme: moving contents to FAQ. 2019-10-15 14:21:44 +02:00
omar
a41f0b2df4 Inputs: Fixed a miscalculation in the keyboard/mouse "typematic" repeat delay/rate calculation, used by keys and e.g. repeating mouse buttons as well as the GetKeyPressedAmount() function.
IMPORTANT: Renamed internal CalcTypematicPressedRepeatAmount to CalcTypematicRepeatAmount and reordered the t1, t0 arguments to t0, t1 !!
If you were using a non-default value for io.KeyRepeatRate (previous default was 0.250), you can add +io.KeyRepeatDelay to it to compensate for the fix.  The function was triggering on: 0.0 and (delay+rate*N) where (N>=1). Fixed formula responds to (N>=0).
Effectively it made io.KeyRepeatRate behave like it was set to (io.KeyRepeatRate + io.KeyRepeatDelay).
Fixed the code and altered default io.KeyRepeatRate,Delay from 0.250,0.050 to 0.300,0.050 to compensate.
If you never altered io.KeyRepeatRate nor used GetKeyPressedAmount() this won't affect you.
2019-10-14 23:07:06 +02:00
omar
67e4cd5cc6 Comments, some logging for NavInitRequest debugging Moved OpenPopupOnItemClick() next to BeginPopupContextItem() 2019-10-14 15:54:11 +02:00
omar
bf4880f6a2 Merge branch 'master' into docking 2019-10-07 19:14:37 +02:00
omar
73fa6509a5 Internal: InputTextEx: tweaked a bit of code (should be a no-op) 2019-10-05 16:57:12 +02:00
omar
e0c0e53edf Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2019-10-04 19:22:42 +02:00
omar
a6c3be4bda Internals: Tweaks to ItemSize() should be harmless. Added DebugDrawItemRect() helper. 2019-10-03 18:30:41 +02:00
omar
892dfb1dea InputText, Nav: Fixed Home/End key broken when activating Keyboard Navigation. (#787)
Small refactor of ActiveIdUsingXXX inputs flags toward a little more consistent system. (#2637)
2019-10-02 15:57:36 +02:00
omar
0dad3f436b Fix harmless float calculation overflow. (#2813) 2019-09-30 15:16:30 +02:00
omar
c262276988 Version 1.74 WIP 2019-09-30 14:27:56 +02:00
omar
6994bf10bc Merge branch 'master' into docking + fix for RenderMouseCursor()
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui_draw.cpp
#	imgui_internal.h
2019-09-24 17:14:51 +02:00
omar
d5efe16157 Version 1.73 2019-09-24 17:02:26 +02:00
omar
ca858c084b Demo tweaks. Comments. Compacting the rarely used AutoFitXXX fields in ImGuiWindowTempData. 2019-09-23 20:15:25 +02:00
omar
52deb415e0 Internal: Refactored internal RenderMouseCursor so colors can be specified. (#2614) 2019-09-23 14:53:49 +02:00
omar
25849234f6 Internal: Tree: tweaks (initially tried to implement auto-scrolling, stashed) 2019-09-23 13:11:38 +02:00
omar
3233d85d2f Merge branch 'master' into docking 2019-09-22 22:16:11 +02:00
omar
13f00331da Docking: Added ImGuiDockNodeFlags_NoDocking flag. (#2109) 2019-09-21 14:50:02 +02:00
omar
a45e3b5bb3 Readme, Wiki: Image loading examples. 2019-09-20 19:04:19 +02:00
omar
af93c21cf9 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-09-18 17:27:14 +02:00
omar
74e01e62ce Fixed unused static function warning for some compilers. (#2793) 2019-09-18 13:21:12 +02:00
omar
1ca6ff974c Viewport: fix to allow multiple shutdown / calls to DestroyPlatformWindows(). (#2769) 2019-09-17 18:02:58 +02:00
omar
575df6f192 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui_draw.cpp
#	imgui_internal.h
2019-09-17 16:35:50 +02:00
omar
b48dc067ae Style: Allow style.WindowMenuButtonPosition to be set to ImGuiDir_None to hide the collapse button. (#2634, #2639)
+ Fix #2775
2019-09-17 16:33:15 +02:00
omar
3b014d0c31 Merge branch 'features/ellipsis_rendering'
# Conflicts:
#	imgui.cpp
2019-09-17 12:07:30 +02:00
omar
7d5a17e5e4 Remove trailing spaces (grep for ' \r?$' in visual studio) 2019-09-17 11:33:18 +02:00
omar
1c951dca97 Font: Narrow ellipsis: once we know an ellipsis is going to be drawn, we can claim the space between pos_max.x and ellipsis_max.x which gives us enough extra space to not requires the further (and otherwise valid) optimizations. Gets us vastly simplified code, yay. (#2775) 2019-09-17 11:14:46 +02:00
omar
57623c15dd Font: Narrow ellipsis: various minor stylistic tweaks (#2775) 2019-09-17 11:13:34 +02:00
Rokas Kupstys
45405f0dc9 Font: implement a way to draw narrow ellipsis without relying on hardcoded 1 pixel dots. (#2775)
This changeset implements several pieces of the puzzle that add up to a narrow ellipsis rendering.

## EllipsisCodePoint

`ImFontConfig` and `ImFont` received `ImWchar EllipsisCodePoint = -1;` field. User may configure `ImFontConfig::EllipsisCodePoint` a unicode codepoint that will be used for rendering narrow ellipsis. Not setting this field will automatically detect a suitable character or fall back to rendering 3 dots with minimal spacing between them. Autodetection prefers codepoint 0x2026 (narrow ellipsis) and falls back to 0x0085 (NEXT LINE) when missing. Wikipedia indicates that codepoint 0x0085 was used as ellipsis in some older windows fonts. So does default Dear ImGui font. When user is merging fonts - first configured and present ellipsis codepoint will be used, ellipsis characters from subsequently merged fonts will be ignored.

## Narrow ellipsis

Rendering a narrow ellipsis is surprisingly not straightforward task. There are cases when ellipsis is bigger than the last visible character therefore `RenderTextEllipsis()` has to hide last two characters. In a subset of those cases ellipsis is as big as last visible character + space before it. `RenderTextEllipsis()` tries to work around this case by taking free space between glyph edges into account. Code responsible for this functionality is within `if (text_end_ellipsis != text_end_full) { ... }`.

## Fallback (manually rendered dots)

There are cases when font does not have ellipsis character defined. In this case RenderTextEllipsis() falls back to rendering ellipsis as 3 dots, but with reduced spacing between them. 1 pixel space is used in all cases. This results in a somewhat wider ellipsis, but avoids issues where spaces between dots are uneven (visible in larger/monospace fonts) or squish dots way too much (visible in default font where dot is essentially a pixel). This fallback method obsoleted `RenderPixelEllipsis()` and this function was removed. Note that fallback ellipsis will always be somewhat wider than it could be, however it will fit in visually into every font used unlike what `RenderPixelEllipsis()` produced.
2019-09-17 11:13:07 +02:00
Qix
561e7dd490 Fix signed types warning in pasteboard handler (#2786) 2019-09-17 16:21:09 +09:00
omar
b05f6f6f50 Nav, Scrolling: Added support for Home/End key. (#787) 2019-09-16 19:01:40 +02:00
omar
0bdc145343 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-08-31 19:19:00 +02:00
omar
d049a7988c Docking: comments for DockBuilder API. 2019-08-31 16:51:12 +02:00
omar
9e294be5c5 Docking: Fix for node created at the same time as windows that are still resizing (typically with io.ConfigDockingAlwaysTabBar) to not be zero/min sized. (#2109)
The fix delay their visibility by one frame, which is not ideal but not very problematic as the .ini data gets populated after that
2019-08-29 10:45:33 +02:00
omar
bfcdaeb610 Disable with ConfigWindowsMemoryCompactTimer < 0.0f (#2636) 2019-08-28 20:30:36 +02:00
omar
62f75c7fb1 Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when a window is unused for 60 seconds, as per io.ConfigWindowsMemoryCompactTimer = 60.0f). Note that memory usage has never been reported as a problem, so this is merely a touch of overzealous luxury. (#2636) 2019-08-28 20:28:36 +02:00
omar
a01d149369 Fixed context popup windows from not having the NoDocking flag. (#2763) 2019-08-28 10:52:17 +02:00
omar
483534b525 Internals: Using simpler ImVec2ih construct + fixed misnamed member. 2019-08-23 12:31:14 +02:00
omar
e1fca8d982 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-08-23 12:21:49 +02:00
omar
cb538fadfe Internals: Storing settings using ImVec2ih to match what we are doing with dock node. + removed ImMax from reading Size value (done in Begin) + removed seemingly unnecessary FLT_MAX compare in SettingsHandlerWindow_WriteAll.
About: Added backquote to text copied into clipboard so it doesn't mess up with github formatting when pasted.
2019-08-23 12:02:52 +02:00
omar
3fb5cf3541 Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. (#94) 2019-08-22 16:55:42 +02:00
omar
10a202422a Docking: Extracted some of BeginDocked() into a DockContextBindNodeToWindow() function.
Moved one of the undocking blurb to favor fast path.
(Commit intended to have no functional side effects)
2019-08-22 13:51:17 +02:00
omar
27431dcc6b Docking: fix BeginDocked() path that creates node so that SetNextWindowDockID() doesn't immediately discard the node..(#2109)
Amend 515ecbddc2, not sure at this point if the (auto_dock_node) flag was needed at all.
Comments. Exposed DockContextGenNodeID() in imgui_internal.h
2019-08-22 13:51:16 +02:00
omar
d8f9f6ba2a Viewport: Fixed issue where resize grip would display hovered (before of extruded hit rectangle) while mouse is still off the OS bounds so click would miss it and focus the OS window behind expected one. (#1542) 2019-08-22 13:51:16 +02:00
omar
c4b0bf718a More typos in comments (#2738) 2019-08-22 11:40:37 +02:00
omar
a856c670c1 TabBar: fixed single-tab not shrinking their width down.
+ minor typo fixes (#2738)
2019-08-22 11:38:58 +02:00
omar
72090b646f Fixed incorrect assignment of IsFallbackWindow which would tag dock node host windows created in NewFrame() as such, messing with popup viewport inheritance. 2019-08-22 11:35:17 +02:00
omar
aedcd2fb1a Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_dx11.cpp
#	imgui.cpp
2019-08-19 21:49:53 +02:00
omar
a33cedda14 Internals: Renaming window size calc functions. 2019-08-19 21:48:52 +02:00
omar
76ccbb899d Viewport: Fix modal/popup window being stuck in unowned hidden viewport associated to fallback window without stealing it back. (#1542)
Viewport: Fix modal reference viewport when opened outside of another window.
+ Comments
2019-08-19 11:58:30 +02:00
omar
5d87ee8d82 Internals: Added function index for Viewport and Docking. Renamed a few functions. 2019-08-16 15:29:58 +02:00
omar
9fce278918 ColorPicker: Made rendering aware of global style alpha of the picker can be faded out. (#2711)
Note that some elements won't accurately fade down with the same intensity, and the color wheel when enabled will have small overlap glitches with (style.Alpha < 1.0).
2019-08-16 11:46:11 +02:00
omar
451c756b01 Docking: Modals don't need to set ImGuiViewportFlags_NoFocusOnClick. This also mitigate the common described by #2445, which becomes particularly bad with unfocused modal. (#1542) 2019-08-01 16:23:54 -07:00
omar
3aa9aae0be Docking: Fix a crash that could occur with a malformed ini file (DockNode Parent value pointing to a missing node) 2019-08-01 15:50:05 -07:00
omar
f624455d7b Version 1.73 WIP 2019-08-01 10:57:13 -07:00
omar
967073ba3d Viewport: Handle case where host window gets moved and resized simultaneous (toggling maximized state). There's no perfect solution there, than using io.ConfigViewportsNoAutoMerge = false. (#1542) 2019-07-31 20:08:06 -07:00
omar
9bd7846f07 Internal: Made ScrollToBringRectIntoView() handle recursing back to scroll parent window, so the function can be called elsewhere (instead of 1 deep recursion done in NavUpdateMoveResult(). 2019-07-31 18:37:55 -07:00
omar
b8d8355f10 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2019-07-31 14:34:58 -07:00
omar
6a0d0dab5a Version 1.72b (patch for nav) 2019-07-31 14:31:06 -07:00
omar
4cfaf7d89c Scrolling, Nav: Fixed programmatic scroll leading to a slightly incorrect scroll offset when the window has decorations or a menu-bar (broken in 1.71). This was mostly noticeable when a keyboard/gamepad movement led to scrolling the view, or using e.g. SetScrollHereY() function. Fix/amend a0994d74. 2019-07-31 14:31:06 -07:00
omar
3548fb8013 Internal refactor: moved all Scroll related functions in a same spot. 2019-07-30 20:04:02 -07:00
omar
1b1e539288 Internal: Moved NavScrollToBringItemIntoView() declaration to imgui_internal.h. Fixed spacing missing in 494d804. Fixed changelog wreck from 1.72. 2019-07-30 18:21:44 -07:00
omar
5ef7445d92 Internal: Avoid using GImGui multiple times in same function. 2019-07-30 16:51:12 -07:00
omar
85ad8e0e2e Nav: Fixed an issue with NavFlattened window flag where widgets not entirely fitting in child window (often selectable because of their extruded bits) would be not considered to navigate toward the child window. (#787)
This creates a little bit of tension because g.NavDisableHighlight tends to makes the reference point not always visible.
Amend c665c15a7d
2019-07-30 14:27:25 -07:00
omar
07c52a25ff Docking: Recording dockspace parent window so pruning doesn't zealously lose the location of nodes. (#2109) 2019-07-29 15:56:59 -07:00
omar
cb2de62bb1 Docking: Renaming, comments. 2019-07-29 15:56:59 -07:00
omar
9183e7c426 Version 1.73 WIP 2019-07-29 15:54:32 -07:00
omar
a1164399b0 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2019-07-27 18:21:41 -07:00
omar
ecb9b1e2eb Version 1.72 2019-07-27 18:15:07 -07:00
omar
7a26a49f08 Internal: Added IsMouseDragPastThreshold(). Tweaks. Todo.
Demo: Showing how to use the format parameter of Slider/Drag functions to display the name of an enum value instead of the underlying integer value
2019-07-26 17:19:01 -07:00
omar
d057550209 Fixed Clang 8.0 warning "empty expression statement has no effect; remove unnecessary ';' to silence this" warning [-Wextra-semi-stmt]
+ Comment
2019-07-24 17:07:05 -07:00
omar
e5b905481d Viewport: Refactored ViewportFlagsOverrideMask+ViewportFlagsOverrideValue into ViewportFlagsOverrideSet+ViewportFlagsOverrideClear which appears easier to grasp. (#1542)
(cherry picked from commit 9437630872e7ca19065bee78fcafaab54a0d5bf2)
2019-07-24 13:45:18 -07:00
omar
7c183dc6a1 Docking: Explicitly inhibit constraint when docked for now (#2690, #2109)
Added asserts to catch issues.
2019-07-24 11:18:13 -07:00
omar
7fbd72b735 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-07-23 21:40:57 -07:00
omar
824e8c53b4 Internals: Added IMGUI_DEBUG_INI_SETTINGS. Made IMGUI_DEBUG_LOG redefinable in imconfig.h. Comments. Fix to allow Metrics's NodeWindow() being called with a NULL window. 2019-07-23 21:37:09 -07:00
omar
969278fc0b Docking: Fixed dragging/resizing from OS decoration not marking settings as dirty.
Internals: Added IMGUI_DEBUG_LOG_DOCKING, IMGUI_DEBUG_LOG_VIEWPORT macros to easily enable/disable a bunch of logging code.
2019-07-23 21:29:43 -07:00
omar
efc4c0fe9d Internals: Made IMGUI_DEBUG_LOG redefinable in imconfig.h. Comments. Fix to allow Metrics's NodeWindow() being called with a NULL window. 2019-07-23 21:26:15 -07:00
omar
db2581bee9 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-07-23 13:35:01 -07:00
omar
baae057a03 Internals: Merge in minor noise from wip Tables branch to simplify further merging. 2019-07-23 13:28:36 -07:00
omar
26f14e056c Scrolling: Made mouse-wheel scrolling lock the underlying window until the mouse is moved again or until a short delay expires (2 seconds). This allow uninterrupted scroll even if child windows are passing under the mouse cursor. (#2604) 2019-07-22 18:49:52 -07:00
omar
dcd03f62a7 Scrolling: Made it possible for mouse wheel and navigation-triggered scrolling to override a call to SetScrollX()/SetScrollY(), making it possible to use a simpler stateless pattern for auto-scrolling.
Demo: Log, Console: Using a simpler stateless pattern for auto-scrolling.
2019-07-22 18:49:51 -07:00
omar
835b50b773 Internals: Nav: Tweak NavUpdatePageUpPageDown() to make it more readable. 2019-07-22 17:27:41 -07:00
omar
75136d3bea Internals: Removed ShowDockingDemo(), moved into Metrics. Metrics: Added more links to browse window->node, node->window, node->node etc. 2019-07-22 11:51:04 -07:00
omar
0e6a096afd Docking: Renamed io.ConfigDockingTabBarOnSingleWindows to io.ConfigDockingAlwaysTabBar. (#2109)
Added ImGuiWindowClass::DockingAlwaysTabBar to set on individual windows.
2019-07-22 11:29:22 -07:00
omar
6f8d34768d Docking: Removed seemingly unnecessary test in TabItemEx() for undocking tab leading to window move. Added ImGuiDockNode::IsFloatingNode() helper to clarify code intent in various places. 2019-07-22 11:02:44 -07:00
omar
9cda3035fd Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_sdl.cpp
#	imgui.cpp
2019-07-22 10:29:14 -07:00
omar
29d9394a41 OSX: Disabled default native Mac clipboard copy/paste implementation in core library (added in 1.71), because it needs application to be linked with '-framework ApplicationServices'. It can be explicitly enabled back by using '#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS' in imconfig.h. Re-added equivalent using NSPasteboard api in the imgui_impl_osx.mm experimental back-end. (#2546) 2019-07-21 19:06:07 -07:00
omar
4b44f25c9a Fixed incorrect application of io.DisplaySafeAreaPadding which would be problematic with multi-viewports when a monitor uses negative coordinates (correct clamping is done right below). (#2674) 2019-07-21 18:19:56 -07:00
omar
f1ba217a92 Internals: Extracted some code out of the NewFrame() function. 2019-07-21 12:13:44 -07:00
omar
47f5ad32b7 Perform simple check: error if Docking or Viewport are enabled _exactly_ on frame 1 (instead of frame 0 or later), which is a common error leading to loss of .ini data. (#2109) 2019-07-21 12:05:04 -07:00
omar
9f35ba8546 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-07-19 15:19:10 -07:00
ocornut
047dc16af5 Debug Tools: Added DebugStartItemPicker() in imgui_internal.h to facilitate binding this anywhere in user's tool. Adedd highlight. Added IMGUI_DEBUG_TOOL_ITEM_PICKER_EX to break in ItemAdd(). 2019-07-19 11:28:03 -07:00
omar
7fd34d4f30 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-07-17 18:48:16 -07:00
omar
1f3feb481e Internals: Refactor: Moved all Columns code from imgui.cpp to imgui_widgets.cpp (#125)
Also moved NextColumn between BeginColumn and NextColumn which makes it easier to work on that code.
2019-07-17 17:10:27 -07:00
omar
bb2aa5e770 Docking: Making it possible to undock a node by clicking on the tab bar / title bar for the node. (#2645, #2109) 2019-07-17 13:55:00 -07:00
omar
56e10f1c35 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2019-07-16 18:29:31 -07:00
omar
130b44994e Debug, Metrics: Added "Tools->Item Picker" tool which allow clicking on a widget to break in the debugger within the item code. The tool calls IM_DEBUG_BREAK() which can be redefined in imconfig.h if needed. 2019-07-16 18:25:49 -07:00
omar
e6a286b3a5 Style: Added style.ColorButtonButton (left/right, defaults to ImGuiDir_Right) to move the color button of ColorEdit3/ColorEdit4 functions to either side of the inputs. 2019-07-16 16:43:21 -07:00
omar
718e15c7de Docking: Fix so that an appearing window making a dock node reappear won't have a zero-size on its first frame (because dock node ->Size was 0.0 unlike ->SizeRef) (#2109)
Docking: Added ImGuiDockNode to .natvis file.
2019-07-16 11:45:52 -07:00
omar
a35f42f123 Removed TreeAdvanceToLabelPos() which is rarely used and only does SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()). Kept redirection function (will obsolete). (#581, #324) 2019-07-15 18:30:20 -07:00
omar
7a9d32acee Fixed unnecessary test in UpdateMouseWheel() (thanks PVS).
TreeNodeBehavior: avoid computing bg_col for non-framed non-active tree nodes.
Comments, binaries update, minor typos.
2019-07-15 18:30:20 -07:00
omar
8bc6d976cb Docking: Fixed using ImGuiDockNodeFlags_AutoHideTabBar with ConfigDockingTabBarOnSingleWindows. (#2109) 2019-07-15 14:17:01 -07:00
omar
dd80db87a6 Viewport: Added ImGuiViewportFlags_NoAutoMerge to prevent merging into host viewport in a per-window basis via the ImGuiWindowClass override mechanism. (#1542) 2019-07-15 13:35:21 -07:00
omar
71d20abbc3 Settings: Minor optimization to reduce calls in SettingsHandlerWindow_WriteAll. 2019-07-12 13:33:38 +02:00
omar
d52c6316c8 Renamed ImFontAtlas::CustomRect to ImFontAtlasCustomRect. Keep redirection typedef (will obsolete). 2019-07-12 11:58:46 +02:00
omar
e66799f79a Prefixed internal structs exposed in imgui.h with a fully qualified name to facilitate auto-generation with cimgui. 2019-07-12 11:54:22 +02:00
omar
1f54c16f52 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2019-07-02 18:47:10 +02:00
omar
54c49b5fb1 Window: Mouse wheel scrolling while hovering a child window is automatically forwarded to parent window if ScrollMax is zero on the scrolling axis. Also still case if ImGuiWindowFlags_NoScrollWithMouse is set (not new), but previously the forwarding
would be disabled if ImGuiWindowFlags_NoScrollbar was set on the child window, which is not the case any more (amend #1502, #1380).
2019-07-02 18:33:50 +02:00
omar
58c9f8a194 Misc: Added IMGUI_DISABLE_METRICS_WINDOW imconfig.h setting to explicitly compile out ShowMetricsWindow(). + Internals: Minor renaming. 2019-07-01 20:58:10 +02:00
omar
da29d77253 Added SetScrollXHere, SetScrollFromPosX: Changelog, demo, comments (#1580). 2019-07-01 12:15:53 +02:00
kevreco
caf119a982 Added 'SetScrollHereX' and 'SetScrollFromPosX' (#1580) 2019-07-01 12:15:48 +02:00
omar
a89f05a10e Child windows inherit Hidden frames setting from parent more accurately, so HiddenFramesCannotSkipItems is honored by child windows. 2019-06-29 20:12:15 +02:00
omar
401e05147c Internals: Moved CalcListClipping close to ImGuiListClipper code (no-op) 2019-06-29 20:11:03 +02:00
omar
82711251b6 Internals: ImGuiListClipper using absolute coordinate (instead of relative one). Minor no-op tweaks + ImDrawListSplitter assert 2019-06-29 20:10:55 +02:00
omar
4b95e7c2f3 Doc: Tweak and extra mention of AddCustomRectFontGlyph + made the example register two rectangles. 2019-06-26 12:15:32 +02:00
omar
50d421fa19 Docking: Fixed GetBackgroundDrawList(), GetForegroundDrawList() overwriting ImDrawList flags after clear, leading to the AllowVtxOffset flag not being cleared. (#2638) 2019-06-26 09:52:25 +02:00
omar
f563e1a504 Internals: Renamed GetFrontMostPopupModal() to GetTopMostPopupModal() to be consistent. Renamed other locals to follow that terminology. 2019-06-19 18:16:38 +02:00
omar
e2c1f0a7cd Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2019-06-18 23:12:50 +02:00
omar
70fe409338 Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71). 2019-06-18 10:58:03 +02:00
omar
ae2c9f7101 Internals: Columns: Poke into WorkRect and use them in the GetContentRegionMax() functions. This should be a no-op, but preparing us to transition toward using WorkRect instead of ContentRegionRect.
Removed one use of ContentsRegionRect.
2019-06-17 12:14:34 +02:00
omar
e9b92d1cef Disable -Wpragmas warning in GCC to avoid relying on version checks, as unusual/forks/mods don't appear to always have same warning<>version. (#2618)
+ Fix version number in imgui.h
2019-06-17 11:32:00 +02:00
omar
ca43436cd3 Fix monitor dpi info not being copied to main viewport when multi-viewports are not enabled. (#2621, #1676) + Tweaks, short path in FindPlatformMonitorForRect(). 2019-06-17 11:19:34 +02:00
omar
b27fd87177 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui.h
2019-06-17 11:10:14 +02:00
omar
af3080b81b Removed redirecting functions/enums that were obsoleted in version 1.51 (June 2017): ImGuiCol_Column*, ImGuiSetCond_*, IsItemHoveredRect(), IsPosHoveringAnyWindow(), IsMouseHoveringAnyWindow(), IsMouseHoveringWindow(), IMGUI_ONCE_UPON_A_FRAME. 2019-06-14 12:05:00 +02:00
omar
5286ecb8a7 Version 1.72 WIP 2019-06-14 11:58:58 +02:00
omar
07d3083279 Docking: Fixed rendering of outer decoration happening on non-visible docked window (#2623, #2109). Revealed by 0770449. We are actually better than before now, as previously those would get unnecessarily get rendered into a hidden draw list. 2019-06-13 10:19:14 +02:00
omar
d3d998a885 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/README.txt
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
#	imgui_widgets.cpp
2019-06-12 18:40:50 +02:00
omar
2da1c66d15 Version 1.71 + comments 2019-06-12 18:30:06 +02:00
omar
5ae268c0a3 Internals: Reworked RenderTextEllipsis() to satisfy what we need for table headers. 2019-06-11 16:12:00 +02:00
omar
4597632662 Readme, comments, dear imgui prefixes 2019-06-11 16:11:36 +02:00
omar
a8eb64fc54 Log/Capture: Fixed BeginTabItem() label not being included in a text log/capture.
Extracted tab rendering code into a RenderTextEllipsis() function.
2019-06-11 14:03:13 +02:00
omar
0770449630 Window: child windows outer decorations (e.g. scrollbar) are rendered as part of their parent window, avoiding the creation of an extraneous draw command.
+ Metrics: inverted color of clip rect vs vertices bounding box when hovering a draw command, so the color matches the per-vertex preview.
2019-06-07 17:34:36 +02:00
omar
afa3978ff6 Internals: Added drawlist and color arg to RenderArrow(), RenderBullet(). Reordered args for RenderPixelEllipsis. 2019-06-07 17:32:51 +02:00
omar
2b997141cf Made PushID() behave the same in 32-bit and 64-bit, by not padding the integer into a void*. (Also technically faster.) 2019-06-06 16:36:26 +02:00
omar
63310acd58 Synced/merged minor cruft from master branch to minimize drift. Only meaningful change AFAIK is removing ImGuiComboFlags_PopupAlignLeft flag from the tab list combo emitted by TabBar. 2019-06-06 16:16:18 +02:00
omar
431aa4e456 Synced/merged minor cruft from docking branch to minimize drift. AFAIK the only meaningful no-op change is that the call UpdateHoveredWindowAndCaptureFlags() was moved above UpdateMouseMovingNewFrame() to match what docking branch has been doing for a while. 2019-06-06 16:13:30 +02:00
omar
480d57e6a2 Revert "Changed syntax for (very rarely used) IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT mechanism, instead you only need to '#define ImDrawVert MyDrawVert' to use this feature, avoiding the need to declare the entire structure within an awkward macro. Using the old macro will now error with a message pointing you to the new method. (#38, #103, #1172, #1231, #2489)"
This reverts commit 597c024904.
2019-06-06 01:00:30 +02:00
omar
597c024904 Changed syntax for (very rarely used) IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT mechanism, instead you only need to '#define ImDrawVert MyDrawVert' to use this feature, avoiding the need to declare the entire structure within an awkward macro. Using the old macro will now error with a message pointing you to the new method. (#38, #103, #1172, #1231, #2489) 2019-06-06 00:42:27 +02:00
omar
e6850891cc Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-06-05 16:09:06 +02:00
omar
c96f2c4057 Window: Fixed one case where auto-resize by double-clicking the resize grip would make either scrollbar appear for a single frame after the resize. Moved Scrollbar visibility block. 2019-06-05 15:59:14 +02:00
omar
300d8dd656 Internals: Moved scrollbar visibility calculation block below the call to UpdateManualResize(). This commit is _intended_ to have no side-effect (next commit will). Also moved ItemWidthDefault calculation below rectangles. 2019-06-05 15:59:14 +02:00
omar
c1a61d25a7 Scrollbar overlap an extra WindowBorderSize amount on the left to make all distances consistent. Reverted to BorderSize not affecting work/contents rectangles. Scrollbar, Style: Changed default style.ScrollbarSize from 16 to 14. 2019-06-05 15:59:14 +02:00
omar
15282261dd Internals: Minor no-op tidying up toward solving the WindowPadding / WindowBorderSize / ScrollbarSize overlapping mess.
+ Demo: Use SetScrollY().
2019-06-05 15:59:14 +02:00
omar
4149d22e85 Fixed newly created window (e.g. appearing child window) from having scrollbar active on the first frame. (fix 6e03b27) + reworded code a little. (+1 squashed commits)
Fixed auto-resize with AlwaysVerticalScrollbar or AlwaysHorizontalScrollbar flags not taking account of the expect scrollbar sizes.
2019-06-05 15:59:14 +02:00
omar
06f1d2c101 Internals: Storing ScrollMax into a member. Mostly to facilitate debugging. Also locking down window->Scroll slightly lower in the Begin function. 2019-06-05 15:59:13 +02:00
omar
d6df777ff2 TextWrapped, PushTextWrapPos(0.0f) within a window with horizontal scrolling from not covering the full horizontal area (previously only worked with an explicit contents size). 2019-06-05 15:59:13 +02:00
omar
fe32fde376 Internals: Renamed SizeContents to ContentSize, SizeContentsExplicit to ContentSizeExplicit. Tweaked Metrics->Show Rectangles functionality. 2019-06-05 15:59:13 +02:00
omar
f95c77eeea Window rectangles: Changed WorkRect to cover the whole region including scrolling (toward obsolete ContentsRegionRect) + using full WindowPadding*1 padding.
Tweaked InnerClipRect.
TreeNode, CollapsingHeader: Fixed highlight frame not covering horizontal area fully when using horizontal scrolling. (#2211, #2579)
TabBar: Fixed BeginTabBar() within a window with horizontal scrolling from creating a feedback loop with the horizontal contents size.
Columns: Fixed Columns() within a window with horizontal scrolling from not covering the full horizontal area (previously only worked with an explicit contents size). (#125)
Demo: Added demo code to test contentsrect/workrect
2019-06-05 15:59:13 +02:00
omar
a0994d74c2 Clarified behavior of SetNextWindowContentSize(). Content size is defined as the size available after removal of WindowPadding on each sides. So SetNextWindowContentSize(ImVec2(100,100)) + auto-resize will always allow submitting a 100x100 item without creating a scrollbar, regarding of WindowPadding.The exact meaning of ContentSize for decorated windows was previously ill-defined. 2019-06-05 15:59:13 +02:00
omar
09bcf9fbc5 Window rectangles: Made InnerRect not affected by window border sizes. its few users shouldn't be meaningfully affected. 2019-06-05 15:59:12 +02:00
omar
440ad0b440 Merge branch 'master' into docking 2019-06-05 00:37:20 +02:00
omar
5cdd788f30 Comments (#2599). Moved branch Changelog above 1.71 wip one. Added some missing changelog bits. 2019-06-05 00:37:14 +02:00
omar
57d8ab62f4 Nav: Fixed rare crash when e.g. releasing Alt-key while focusing a window with a menu at the same frame as clearing the focus. This was in most noticeable in some back-ends with emits key release events when focusing another viewport. (#2609) 2019-06-05 00:28:55 +02:00
omar
eb7849b477 Nav: Fixed gamepad/keyboard moving of window affecting contents size incorrectly, sometimes leading to scrollbars appearing during the movement. + minor fix with the mostly dead Ctrl+wheel scaling. 2019-05-31 20:48:52 +02:00
omar
84f3ecc231 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-05-30 18:52:24 +02:00
omar
546b728199 Internals: Window rectangles: Fixed ContentsRegion lag by moving back after Scrollbar, fixes b50c61c9. Shuffling setup order and added comments. 2019-05-30 18:19:14 +02:00
omar
21ebdcafc9 Internals: Window rectangles: Renaming of all rectangles toward their final form. Should be a no-op. Renamed GetWorkRectMax() to GetContentRegionMaxAbs(). Metrics shows SizeContents. 2019-05-30 18:04:21 +02:00
omar
8dc04a4c9f Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx9.cpp
#	examples/imgui_impl_opengl3.cpp
#	imgui.h
#	imgui_demo.cpp
2019-05-29 16:32:27 +02:00
omar
7755cbbef2 Renamed ImGuiBackendFlags_HasVtxOffset to ImGuiBackendFlags_RendererHasVtxOffset to match naming convention already used in viewport/docking branch. (#2591) + Fix OpenGL3 code missing flag. 2019-05-29 16:29:17 +02:00
omar
c72040a715 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx10.h
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx11.h
#	examples/imgui_impl_dx9.cpp
#	examples/imgui_impl_dx9.h
#	examples/imgui_impl_opengl3.cpp
#	examples/imgui_impl_opengl3.h
#	examples/imgui_impl_osx.h
#	examples/imgui_impl_osx.mm
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
2019-05-29 16:20:26 +02:00
omar
d1e8b698d0 ImDrawList: Added ImDrawCmd::VtxOffset value to support large meshes (64k+ vertices) using 16-bits indices. To enable the feature, the renderer back-end needs to set 'io.BackendFlags |= ImGuiBackendFlags_HasVtxOffset' and honor the ImDrawCmd::VtxOffset field. Otherwise the value will always be zero. This has the advantage of preserving smaller index buffers and allowing to execute on hardware that do not support 32-bits indices.
ImDrawList: Added ImDrawCmd::IdxOffset value, equivalent to summing element count for each draw command. This is provided for convenience and consistency with VtxOffset. (#2591)
2019-05-29 16:13:38 +02:00
omar
40b9e5e0b4 ImDrawList: Store initial flags for the frame in ImDrawListSharedData, reducing code duplication in setting up the flags. 2019-05-29 14:26:03 +02:00
omar
70d9f79312 Internal: Renamed InnerMainRect to InnerVisibleRect. Printing coordinates in Metrics window. 2019-05-28 11:23:04 +02:00
omar
c7c1bf177b Docking: Fixed DockBuilderRemoveNode() from overwriting other parent node flags when trying to move the CentralNode flag. 2019-05-28 00:06:21 +02:00
omar
5b0e59d9d5 Docking: Saving local _NoResize flag. (#2583) 2019-05-27 22:11:21 +02:00
omar
2d68e892a8 Added full "Dear ImGui" prefix to the title of "Dear ImGui Demo" and "Dear ImGui Metrics" windows. Shortened amount of nodes in columns>tree demo. 2019-05-27 18:38:28 +02:00
omar
7c06d9f043 Docking: Saving the NoTabBar, NoWindowMenuButton, NoCloseButton fields of dock node into the .ini file. Added them to the Metrics window. (#2583, #2423, #2109). 2019-05-27 17:06:17 +02:00
omar
511e32e8ca Docking: Clarified terminology of docking/tablist/collapse button into Window Menu button matching master. Added private ImGuiDockNodeFlags_NoWindowMenuButton, ImGuiDockNodeFlags_NoCloseButton flags. (#2583, #2109) 2019-05-27 12:35:20 +02:00
omar
e5dfa0855f Docking: Honor style.WindowMenuButtonPosition setting in docking node. 2019-05-24 21:59:44 +02:00
omar
afad952450 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2019-05-24 21:58:17 +02:00
omar
958d75c00a Style: Added style.WindowMenuButtonPosition (left/right, defaults to ImGuiDir_Left) to move the collapsing/docking button to the other side of the title bar. 2019-05-24 21:54:52 +02:00
omar
6c3697f6f1 Internal: CloseButton takes an upper-left corner + a size to be consistent with similar widgets. 2019-05-24 17:58:21 +02:00
omar
fda1365c15 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-05-23 00:04:25 +02:00
omar
7bc03f7155 Internals: Added InnerWorkRect equal to old InnerClipRect, added InnerWorkRectClipped actually clipped. 2019-05-22 23:56:31 +02:00
omar
a2eec8f5b5 Fix OuterRectClipped not being clipped correctly, which resulted in child window outside visible bound to not be marked with SkipItems. Broken in b50c61c961.
+ Comments on InnerClipRect being misleading. Demo: Tweak to sizing of child window in the Layout->Scrolling section.
2019-05-22 22:14:31 +02:00
omar
04022114d9 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-05-21 14:47:29 +02:00
omar
882d2c3aea Fixed crash when appending with BeginMainMenuBar() more than once and no other window are showing. (#2567) + comments 2019-05-21 12:18:34 +02:00
omar
392ab08580 BeginPopupContextItem(): Skip processing when SkipItems is set as LastItemId is unreliable and we assert when it is zero. + Minor comments on columns. 2019-05-20 16:46:47 +02:00
omar
f242cd4d8a Fixed GCC mem-access warnings (#2565)
+ using "if defined" more consistently for Clang.
2019-05-19 17:15:14 +02:00
omar
1575a3fbcd Docking: Fixed temporarily losing Dockspace flag when merging remaining sibling back into a parent node. (#2563, #2109)
Would trigger an assert in the Passthru hole path. Broken by fd5859ed.
2019-05-19 17:00:17 +02:00
omar
7e772f6a51 Docking: Fixed undocking whole node (from collapse/docking menu button) from losing its size/pos. Made collapose/docking menu id easier to compute for testing. 2019-05-18 18:42:59 +02:00
omar
31e3e861ef Update changelog, comments, made empty/no-text clipboard return NULL as with other implementation. Minor style tweaks. (#2546)
Fixed IMGUI_DISABLE_WIN32_FUNCTIONS not disabling IME code.
2019-05-18 17:44:09 +02:00
Andrew Willmott
02de498a41 Add native mac copy/paste support to match win32 (#2546) 2019-05-18 17:34:58 +02:00
omar
2e5860b5a0 Docking: Fixed incomplete merge of 36e714a leading to undocking. #2109 2019-05-18 13:00:00 +02:00
omar
4158cba1ff Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
2019-05-13 19:23:18 +02:00
omar
fc3c3de551 Fixed uses of IsItemDeactivated(), IsItemDeactivatedAfterEdit() on multi-components widgets and after EndGroup(). (#2550, #1875) 2019-05-13 19:05:41 +02:00
omar
99a845053a Internal: Renamed fields + minor tweaks (probably shallow break stack-layout pr, sorry!) 2019-05-13 18:26:28 +02:00
omar
64dbd932d2 Internal: Removed GetNextItemWidth(), relying on ItemAdd or NextItemData.ClearFlags() to clear the width data. Amend 5078fa20 and undo some of its effects of imgui_widgets.cpp 2019-05-13 15:29:00 +02:00
omar
632469d2e5 Renamed SetNextTreeNodeOpen() to SetNextItemOpen(). Refactored SetNextItemXXX stuff to match SetNextWindowXXX code closely. 2019-05-13 15:11:25 +02:00
omar
36e714a459 Internal: Storing flags for NextWindowData so that we can clear everything with a single write and remove dummy condition fields. 2019-05-13 14:57:30 +02:00
omar
0b485f12d7 Internal: Minor tidying/reordering of sections within ImGuiContext / window DC. 2019-05-13 14:02:03 +02:00
omar
7355c84701 Tweak EndGroup() to facilitate fixing #2550 later (currently should have no side-effect0. Demo: Add extra widget to status query test. 2019-05-12 21:42:36 +02:00
Chris Savoie
b955e485f1 Fixed unused variables warnings when asserts are compiled out. (#2551) 2019-05-12 17:53:08 +02:00
omar
aca6ee1a91 Cast ImTextureId to void* before printing in Metrics window. (#2548) 2019-05-11 11:34:41 +02:00
omar
ef13d95466 IO: changed AddInputCharacter(unsigned short c) signature to AddInputCharacter(unsigned int c).
Examples/Backends: Don't filter characters under 0x10000 before calling io.AddInputCharacter(), the filtering is done in io.AddInputCharacter() itself. This is in prevision for fuller Unicode support. (#2538, #2541)
2019-05-11 10:33:56 +02:00
omar
b668726a38 Fixed a PVS Studio static analyzer warning. 2019-05-10 22:58:24 +02:00
omar
835a8b2c9b Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2019-05-10 22:56:43 +02:00
omar
7c256fbd40 Internal: Extracted some of the Begin code into RenderWindowDecorations(). 2019-05-10 22:45:52 +02:00
omar
72951a1a85 Internal: Extracted some of the Begin code into RenderWindowTitleBarContents(). 2019-05-10 22:45:28 +02:00
omar
b50c61c961 Internal: Begin: Update rectangles before Scrollbar() which now uses them. Fixes 39eeda0. 2019-05-10 22:30:33 +02:00
omar
e29176df53 Internals: Columns: Renamed fields. Comments and tweak. Moved a demo block. 2019-05-09 13:12:09 +02:00
omar
a4d0b0efa4 Internal: Refactored Separator into SeparatorEx(), exposed ImGuiSeparatorFlags_SpanAllColumns in imgui_internal.h and support without. (#759) + misc comments 2019-05-09 12:55:01 +02:00
omar
b7c2759f95 Columns: Fixed Separator from creating an extraneous draw command. Fixed Selectable with SpanAllColumns flag from creating an extraneous draw command. (#125) 2019-05-09 12:10:36 +02:00
omar
239c8732d7 Viewports: Minor tweaks. (#2471) 2019-05-08 18:33:08 +02:00
omar
9bf3f910c8 Viewports: Fix to avoid SetNextWindowViewport being overrided by creation of a standalone viewport. (#2544, #1542) 2019-05-08 18:20:13 +02:00
omar
42fc563fed Version 1.71 WIP + fixed minor typo 2019-05-07 16:36:08 +02:00
omar
d1d5075b66 Version 1.70 2019-05-06 14:17:39 +02:00
omar
76e61958fd Merge branch 'master' into docking
# Conflicts:
#	examples/README.txt
#	examples/imgui_impl_dx9.cpp
#	imgui.cpp
#	imgui.h
2019-05-06 10:16:43 +02:00
omar
6c196cf432 Examples Readme and Changelog tweaks, added #2527, re-ordered examples/README alphabetically. 2019-05-06 10:02:59 +02:00
omar
526e2303bc Window: Fixed SetNextWindowSizeConstraints() with non-rounded positions making windows drift. (#2067, #2530) 2019-05-03 19:09:44 +02:00
omar
9c1f02a42c Misc: Made IMGUI_CHECKVERSION() macro also check for matching size of ImDrawIdx. 2019-05-03 18:42:53 +02:00
omar
e2166db282 Internals: Fixed incorrect repeat delay/rate calculation in IsMouseClicked() with repeat flag leading to involontary but thankfully doubling the rate. Using our standard function, making the multiplicator explicit. 2019-05-03 15:06:06 +02:00
omar
2dc81057ec Selectable: With ImGuiSelectableFlags_AllowDoubleClick doesn't return true on the mouse button releas efollowing the double-click. Only first mouse release + second mouse down (double-click) returns true. Likewise for internal ButtonBehavior() with both _PressedOnClickRelease | _PressedOnDoubleClick. (#2503) 2019-05-03 14:31:12 +02:00
omar
ce19cb465f Internals: Rename GetContentRegionMaxScreen() -> GetWorkRectMax(). At this point this is mostly useful to facilitate merge of other branches. 2019-05-02 16:29:40 +02:00
omar
825b61e4ba Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx12.cpp
#	examples/imgui_impl_dx9.cpp
#	examples/imgui_impl_opengl2.cpp
#	examples/imgui_impl_opengl3.cpp
#	examples/imgui_impl_vulkan.cpp
#	imgui.cpp
2019-05-02 14:56:47 +02:00
omar
a1c432d1ad Internals: SettingsHandlerWindow_ReadLine uses context parameter. 2019-05-02 14:30:35 +02:00
omar
3fbc0b7a9e Obsoleted GetContentRegionAvailWidth(), use GetContentRegionAvail().x instead. Kept inline redirection function. 2019-04-29 18:33:08 +02:00
omar
db2d58a68b Drag and Drop: Fixed drag source with ImGuiDragDropFlags_SourceAllowNullID and null ID from receiving click regardless of being covered by another window (it didn't honor correct hovering rules). (#2521) 2019-04-29 16:34:02 +02:00
omar
7e67aba286 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-04-29 13:06:55 +02:00
omar
0f2852806c Amend 48a09a7 with changelog, breaking changes, tweak demo code for spacing. (#2518) 2019-04-29 12:44:17 +02:00
omar
4dec744795 Tidying up BeginMenu() code + comments. 2019-04-29 00:02:02 +02:00
omar
842a720e72 Popups: Closes popup at the time of FocusWindow(). Fixes right-click from closing all popups instead of aiming at the hovered popup level (regression in 1.67's ae76a1fd). 2019-04-28 22:33:58 +02:00
omar
bda2cde68e Popups: Closing a popup restores the focused/nav window in place at the time of the popup opening, instead of restoring the window that was in the window stack at the time of the OpenPopup call. (#2517)
Among other things, this allows opening a popup while no window are focused, and pressing Escape to clear the focus again.
2019-04-28 22:18:51 +02:00
omar
09db2f6dec Fix 61d9258 when there is not scrollbar "Window: Fixed contents region being off by WindowBorderSize amount on the right when scrollbar is active." 2019-04-28 18:50:51 +02:00
omar
4e81b2d093 Internals: Renaming. Renamed ImGuiPopupRef to ImGuiPopupData for consistency and added constructor. 2019-04-28 17:15:08 +02:00
omar
00b3c830db Internals: Begin: Moved OuterRectClipped/InnerMainRect/InnerClipRect computation higher up in the function, next to ContentsRect/WorkRect code. Removed commented out debug drawing code which is now available in Metrics window. 2019-04-26 23:33:09 +02:00
omar
61d92580aa Window: Fixed contents region being off by WindowBorderSize amount on the right when scrollbar is active. 2019-04-26 23:32:29 +02:00
omar
5d799d76ea Internals: Nav scrolling uses InnerMainRect instead of InnerClipRect. 2019-04-26 23:31:51 +02:00
omar
dfb82d5c22 Merge branch 'master' into docking
# Conflicts:
#	examples/example_sdl_opengl2/main.cpp
#	examples/example_sdl_opengl3/main.cpp
#	examples/example_sdl_vulkan/main.cpp
#	examples/imgui_impl_sdl.cpp
#	examples/imgui_impl_sdl.h
#	imgui.cpp
2019-04-25 17:53:11 +02:00
omar
0ca1675ff9 Internals: TempInputText: Rename InputScalarAsWidgetReplacement() -> TempInputTextScalar(), ScalarAsInputTextId -> TempInputTextId, small tidying up in affected functions. 2019-04-25 16:03:47 +02:00
omar
59a3f0476d Internals: Using more explicit PushOverrideID() helper + renamed equivalent internal tree helper. 2019-04-25 15:21:22 +02:00
omar
4dc4ace864 Window: Fixed window with the AlwaysAutoResize flag unnecessarily extending their hovering boundaries by a few pixels (this is used to facilitate resizing from borders when available for a given window). One of the noticeable minor side effect was that navigating menus would have had a tendency to disable highlight from parent menu items earlier than necessary while approaching the child menu.
+ Changelog fixed unfinished sentence and tweaks,
2019-04-25 11:50:28 +02:00
omar
16b18b265e MenuItem, BeginMenu: Fix undesirable tall frames in horizontal layout context, which would be visible when trying to use rounded selectable/menus.
PushStyleVar: Added comments in the assert message.
Minor tweaks.
2019-04-25 11:34:07 +02:00
omar
6db0766564 Misc comments, internal renaming, added disable indentation option to Columns demo section. 2019-04-24 17:40:07 +02:00
omar
d0fb547dc1 Viewports: Avoid rendering/swapping secondary viewports that are minimized. (#1542, #2496) 2019-04-22 11:46:04 +02:00
omar
20f0cb0281 Docking: Fixed an issue where DockBuilderSplitNode() wouldn't update the CentralNode shortcut immediately, which was problematic for immediately following DockBuilderDockWindow(). (#2109) 2019-04-19 20:28:43 +02:00
omar
03b64defa5 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2019-04-19 19:52:45 +02:00
omar
59f012d656 Internals: ImHashStr() default parameter. 2019-04-19 19:48:51 +02:00
omar
5078fa208b Added SetNextItemWidth() helper to avoid using PushItemWidth/PopItemWidth() for single items. 2019-04-18 18:29:28 +02:00
omar
0e46d65b03 Misc: Fixed PushItemWidth(-width) (for right-side alignment) laying out certain items (button, listbox, etc.) with negative sizes if the 'width' argument was smaller than the available width at the time of item submission, 2019-04-18 15:46:13 +02:00
omar
a1cf7d636d Internals: Rework CalcItemWidth / CalcItemSize but make their similarities and their differences more obvious. (#2449) 2019-04-18 15:46:13 +02:00
omar
f355a40367 Added commentary about ContentRegion functions. Added internal GetContentRegionMaxScreen() to facilitate internal code at the moment. 2019-04-18 15:46:13 +02:00
omar
9d4a893a77 Internals: Moved CalcItemSize next to CalcItemWidth, added comments to clarify their respective intent. Should have no side effect. 2019-04-18 15:46:12 +02:00
omar
1aeee9d40f Internals: Columns: Tweaks, renaming. Metrics: Show rectangles for child windows.
Renamed SameLine() first parameter.
2019-04-17 22:12:17 +02:00
omar
1d3ebef364 Columns: Fixed boundary of clipping being off by 1 pixel within the left column. 2019-04-17 21:51:13 +02:00
omar
1f25cdd6b4 Clarified asserts comments + todo entries. (#2500) 2019-04-17 09:59:03 +02:00
omar
7baf45cffa Metrics: Added "Show windows rectangles" tool to visualize the different rectangles. 2019-04-16 22:02:56 +02:00
omar
655ebe4eaf Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2019-04-16 13:14:10 +02:00
omar
742b5f4c68 Merged a bunch of small changes from Docking branch to reduce the difference between branches.
Noticeable: horizontal alignment of CloseButton. Menu fill take account of border. Various stylistic tweaks to accomodate other changes in Docking.
2019-04-16 13:07:43 +02:00
omar
311469e9d6 Internals: Columns: Some renaming, extracted code into GetColumnsID(). 2019-04-16 11:58:54 +02:00
omar
f70eacee8e Docking: Internal: Added helper for automation to process docking at the mouse level. 2019-04-13 19:50:30 +02:00
omar
433a7556c7 Docking: Fixed another issue where the resulting node of a split would sometimes recall the pos/size of previous host window. Spent a whole day adding framework for testing more of docking so hopefully we'll heading toward the magical world of less regressions. (#2109) 2019-04-13 19:19:56 +02:00
omar
712203dbcb Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-04-13 18:53:00 +02:00
omar
e805ca29d8 Internals: Moved resize grips and borders to nav layer 1 so that testing system doesn't attempt to scroll to get them inside the InnerRect. 2019-04-13 18:51:32 +02:00
omar
800fb26606 Docking: Renamed target_node > node in some functions to facilitate debugger watch use across functions. 2019-04-13 00:36:24 +02:00
omar
224f087a5f Docking: Rename typo Autority -> Authority + Rename DockContextNewFrameUpdateDocking -> DockContextUpdateDocking. 2019-04-13 00:36:24 +02:00
omar
fb2626c21b Tests: Added hook/tweaks for imgui-test engine. + Fixed warnings. 2019-04-13 00:29:27 +02:00
omar
092426bed2 Docking: Hold Shift to force disable docking. (#2109) 2019-04-13 00:27:44 +02:00
omar
c6f1b7b92a Tests: Added hook/tweaks for imgui-test engine. + Fixed warnings. 2019-04-13 00:27:44 +02:00
omar
328e4fa7e7 Merge branch 'master' into docking
# Conflicts:
#	imgui_demo.cpp
2019-04-11 15:53:38 +02:00
omar
07a70dc972 Internals: Merge minor things from range_select branch. Added ImGuiButtonFlags_NoHoveredOnNav. Added IsItemToggledSelected() - unused here. Renaming. 2019-04-11 15:40:36 +02:00
omar
f3110a57cd Docking: Fixed an issue where newly created dock node override hosted window pos/size (#2109, #2386) 2019-04-11 14:51:01 +02:00
omar
7056032483 Merge branch 'vulkan_fix_docking' into docking 2019-04-07 16:23:34 +02:00
omar
50ceb25003 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_vulkan.cpp
2019-04-07 16:23:31 +02:00
omar
302af7b2c9 FAQ tweaks. Add missing entries in imgui.cpp (which until now where only in the README). 2019-04-07 16:22:41 +02:00
omar
9c364b16ff Merge branch 'vulkan_fix_master' into vulkan_fix_docking 2019-04-05 20:30:42 +02:00
omar
c8fd4afd75 Misc: Added IM_MALLOC/IM_FREE macros mimicking IM_NEW/IM_DELETE so user doesn't need to revert to using the ImGui::MemAlloc()/MemFree() calls directly. 2019-04-05 20:20:24 +02:00
omar
bd351e9ac5 Misc: Added IM_MALLOC/IM_FREE macros mimicking IM_NEW/IM_DELETE so user doesn't need to revert to using the ImGui::MemAlloc()/MemFree() calls directly. 2019-04-05 20:20:08 +02:00
omar
d61caf5714 Vulkan, Viewports: ImGui_ImplVulkan_RenderDrawData and renderer back-end automatically manage ImGui_ImplVulkanH_WindowRenderBuffers for each viewports so user doesn't have to do it. (#2461, #2348, #2378, #2097) 2019-04-05 18:52:45 +02:00
omar
43a85dd02e Merge branch 'master' into docking 2019-04-04 22:10:18 +02:00
omar
9ba64f9fe3 Viewport: Fixed PushClipRectFullScreen() missing out on negative coordinates. Among other things, the outer highlight during CTRL+Tab wouldn't appear in negative coordinates monitors. (~#2176, #1542) 2019-04-04 22:02:36 +02:00
omar
fc52364652 Tabs to Spaces, comments. 2019-04-03 17:25:02 +02:00
omar
49fb8e6c45 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_dx9.cpp
#	examples/imgui_impl_opengl3.cpp
2019-04-03 11:17:26 +02:00
omar
4a57507f75 InputText: Work-around for buggy standard libraries where isprint('\t') returns true. (#2467, #1336)
Not using isprint. + todo items.
2019-04-03 10:40:14 +02:00
omar
9bf6509c6e Docking: Fixed focus restore lagging by a frame when a tab stops being submitted. (#2109) Building on a little build of technical debt there, should transition toward a more general docking-agnostic system (#2304) 2019-03-28 18:43:27 +01:00
omar
5af385ea78 Viewport: Renamed member + added note about a Docking issue with restoring focus. 2019-03-28 18:02:03 +01:00
omar
47219dd5c6 Docking: Remove code in BeginDocked() to set HiddenFramesCannotSkipItems based on upcoming tab bar selection, solely based on focus (might break something subtle?). Follow-up to c355ed1267. (#2453, #2109) 2019-03-28 16:13:06 +01:00
omar
b6ae8a0dca Docking: Disable SkipItems when directly/programmatically focused (possible generalization of code currently in BeginDocked which relies on tab bar interaction, will remove that code in next commit). (#2453, #2109) 2019-03-28 16:11:50 +01:00
omar
a33d45d7cd Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2019-03-28 15:48:25 +01:00
omar
9a0e71a6ec Internals: Renamed the ImGuiWindow HiddenFrameXXX fields to decorrelate them from resizing behavior, as those values are set by other logic. 2019-03-28 15:41:49 +01:00
omar
5a665e423c Docking: Added ImGuiDockNodeFlags_NoTabBar (not exposed publicly). (#2423, #2109) 2019-03-27 20:44:49 +01:00
omar
fc95da8aa3 Docking: Internals: Moved CentralNode and HiddenTabBar state into LocalFlags for consistency. (#2423, #2109) 2019-03-27 20:32:44 +01:00
omar
fd5859ed04 Docking: Separating SharedFlags vs LocalFlags in dock node so settings can be applied to individual nodes. Made _NoResize logic on single node applies as expected. (#2423, #2109) 2019-03-27 19:00:36 +01:00
omar
75e3793f4d Docking: Fix DockBuilderAddNode() not storing flags when creating floating node. 2019-03-27 17:36:52 +01:00
omar
8d4b5fef1d Renamed ImGuiDockNodeFlags_Dockspace to ImGuiDockNodeFlags_DockSpace for consistency. DockBuilderCopyDockspace() to DockBuilderCopyDockSpace(). Made casing consistent elsewhere. (#2109) 2019-03-27 17:36:52 +01:00
omar
04a9ce3a18 Docking: Renamed ImGuiDockNodeFlags_PassthruDockspace to ImGuiDockNodeFlags_PassthruCentralNode. + Comments, shallow tweaks. (#2109) 2019-03-27 16:16:31 +01:00
omar
87883abd86 Docking: Tweak and silencing PVS studio static analyzer (back to zero warnings among our selected ones). 2019-03-26 14:15:56 +01:00
Tom Watson
f20725eada Docking: Fixed an issue where windows docked into a node that's part of their dockspace wouldn't recover their order correctly after init. (#2109)
(It only worked on floating dock node for the accidental reason that BeginDocked would generally early out on the first frame)
2019-03-26 13:58:03 +01:00
omar
26646f2450 Docking: Wrapping tab bar creation/destroy to make it easier to debug them. 2019-03-26 12:41:50 +01:00
omar
f208fd7ebb Docking: Fixed crash with ImGuiDockNodeFlags_AutoHideTabBar flag. (#2423, #2109) 2019-03-26 12:33:58 +01:00
omar
cf1b02e54e Rearrange code in UpdateMouseWheel(). (#2424, #1463) + Fix old io.FontAllowUserScaling feature (probably should be made obsolete, but until then best fixed) 2019-03-25 19:40:19 +01:00
Luca Rood
1963cc59be Implement horizontal scrolling with Shift+Scroll
This is standard scrolling behaviour in most applications.
2019-03-25 19:09:40 +01:00
omar
9350158d61 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui_internal.h
2019-03-25 16:08:09 +01:00
omar
d9f6ba3035 IsWindowHovered() made change which should have no effect in master but fix result of IsWindowHovered(ImGuiHoveredFlags_ChildWindows) over multiple viewport in docking branch. (#2432) 2019-03-25 15:39:11 +01:00
omar
7a5196601e Docking: BeginDocked() doesn't need to rely on tab bar data (will allow removing tab bar). 2019-03-18 09:48:06 -07:00
omar
c7619d4a6a Docking: Preserve existing docked nodes when setting the ImGuiDockNodeFlags_NoDockingInCentralNode flag. (#2423, #2109) 2019-03-18 09:48:00 -07:00
omar
221bf93a55 Comments, todo list, remove trailing spaces. 2019-03-17 00:56:21 +01:00
omar
7ba774a440 Viewports: Fixed being unable to refocus windows when ConfigViewportsNoTaskBarIcon + ConfigViewportsNoDecoration are enabled. (#2420, #1542) [@PathogenDavid] + comments. 2019-03-15 15:35:46 +01:00
omar
857381b9ca GetMouseDragDelta(): also returns the delta on the mouse button released frame. Verify that mouse positions are valid otherwise returns zero. Removed obsolete comment. Tweaked demo. (#2419) 2019-03-15 15:03:37 +01:00
omar
cf2c52282d Version 1.70 WIP 2019-03-15 13:07:30 +01:00
omar
b1af4d36ce Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/example_win32_directx10/main.cpp
#	examples/example_win32_directx11/main.cpp
#	examples/example_win32_directx12/main.cpp
#	examples/example_win32_directx9/main.cpp
2019-03-13 15:30:35 +01:00
omar
55c02099c5 Version 1.69, comments, typos 2019-03-13 15:29:43 +01:00
omar
c3f20f6b81 Viewport: DestroyPlatformWindow() skips calling user function if PlatformWindowCreated is set. + Clarified comment about implicit Debug viewport which may be hogging a viewport. 2019-03-13 11:27:30 +01:00
David Maas
e7dca4fec2 Fixed main viewport not being marked as created, which broke updating the IME input position for the main viewport.
This change also removes the logic scattered about that compensated for PlatformWindowCreated being wrong for the main viewport.
2019-03-13 10:59:32 +01:00
omar
a26085ed53 Internals: Fixed Navigation from reaching ImGuiItemFlags_Disabled items (#211) + Examples comments 2019-03-12 22:23:56 +01:00
omar
e1acb0b1fa Docking: Fixed node merging altering window position incorrectly in a way that would make SizeContents incorrect for the next frame (making scrollbar flicker). (#2414, #2109) 2019-03-11 19:46:37 +01:00
omar
3ead9820f7 Viewport: Popups and Tooltips viewports are correctly parented to the parent window's viewport. (#2409, #1542) 2019-03-11 16:51:46 +01:00
omar
f7db4fad31 Merge branch 'master' into docking
# Conflicts:
#	examples/example_win32_directx11/main.cpp
#	examples/example_win32_directx12/main.cpp
#	examples/example_win32_directx9/main.cpp
#	imgui.cpp
2019-03-11 16:08:16 +01:00
omar
cf4fcc4735 Viewports: Fixed delayed window pos->viewport pos sync leading to monitor not being updated at the time of clamping window position in Begin. (#2415, #1542) 2019-03-11 13:15:00 +01:00
omar
3eedb542a6 Viewports: Renamed ConfigViewportsNoParent to ConfigViewportsNoDefaultParent. Fix outdated comments in examples. 2019-03-11 11:07:23 +01:00
omar
ecf7666624 Docking: Fixed an issue where removing the last window from a dockspace node that is not a central node without remove the node. (#2414, #2109) 2019-03-10 22:19:18 +01:00
Bruce Mitchener
b5d57a6615 Fix typos. (#2413) 2019-03-09 10:10:17 +01:00
Bruce Mitchener
17c567c3a9 Don't use const qualified parameters in declarations.
This fixes warnings from clang-tidy like this:

    parameter 'v_max' is const-qualified in the function declaration;
    const-qualification of parameters only has an effect in function definitions

Since values (rather than references or pointers) don't need to be
const, they don't need to be marked that way in the function declaration.
2019-03-08 18:21:11 +01:00
omar
66936880ba Moved placeholder sections to match Docking branch. Comments. 2019-03-08 18:16:41 +01:00
omar
d77d3416d3 Merge branch 'master' into docking 2019-03-07 18:40:55 +01:00
omar
5ce93bc0cc Refactor: Move viewport code under other subsystem to simplify merging (4) (moving in multiple commits to make diff/patch behave nicely) 2019-03-07 18:39:31 +01:00
omar
54a129a2e2 Refactor: Move viewport code under other subsystem to simplify merging (3) (moving in multiple commits to make diff/patch behave nicely) 2019-03-07 18:38:40 +01:00
omar
bdf60dac6a Refactor: Move viewport code under other subsystem to simplify merging (2) (moving in multiple commits to make diff/patch behave nicely) 2019-03-07 18:37:17 +01:00
omar
bbb543fc16 Refactor: Move viewport code under other subsystem to simplify merging (1) (moving in multiple commits to make diff/patch behave nicely) 2019-03-07 18:36:11 +01:00
omar
f717df4eb6 Internal: Columns: Allow to use BeginColumns(1) so code designed for variable number of columns can still call NextColumn etc. (#125) 2019-03-07 18:22:28 +01:00
omar
28d8eb220b Fix for Android char being unsigned by default (#2408) 2019-03-07 16:07:16 +01:00
omar
e02d6014bf Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-03-05 22:13:38 +01:00
omar
344140004b Fixed IsItemDeactivated()/IsItemDeactivatedAfterEdit() from not correctly returning true when tabbing out of a focusable widget (Input/Slider/Drag) in most situations. (#2215, #1875)
+ Minor renaming of a local variable in widget code.
2019-03-05 22:09:25 +01:00
omar
26328fc9fe Internal: Tabbing/Focus: Tidying up old code, moved some state to context instead of window. Storing new data will allow us to fix the bug mentioned in #2215 (probably in next commit). 2019-03-05 19:51:27 +01:00
omar
ce4e62649a Internal: Tabbing: Tweaks to FocusableItemRegister and using the standard mechanism to allow/block Tab being interpreting by tabbing instead of InputText() widget. 2019-03-05 18:24:59 +01:00
omar
ac4842fa17 Nav: Fixed Ctrl+Tab keeping active InputText() of a previous window active after the switch. (#2380) 2019-03-05 12:03:54 +01:00
omar
8414c0bb09 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2019-03-04 18:08:19 +01:00
omar
94e794f81b Renamed GetOverlayDrawList() to GetForegroundDrawList() for consistency. Kept redirection function (will obsolete). (#2391)
Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
2019-03-04 16:35:50 +01:00
omar
96b13760d4 Added GetBackgroundDrawList() helper to quickly get access to a ImDrawList that will be rendered behind every other windows. (#2391) 2019-03-04 16:10:51 +01:00
omar
49eb5f0280 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_opengl3.cpp
2019-03-03 23:34:56 +01:00
omar
1d0b4df3d9 Misc: Asserting in NewFrame() if style.WindowMinSize is zero or smaller than (1.0f,1.0f). Internal: ImHash functions tweaks. Added InputText() to query status section. 2019-02-28 22:57:22 +01:00
omar
ff0c6c2bde Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2019-02-27 19:00:09 +01:00
omar
6de09a5e48 Renamed ColorEdit/ColorPicker's ImGuiColorEditFlags_RGB/_HSV/_HEX flags to respectively ImGuiColorEditFlags_DisplayRGB/_DisplayHSV/_DisplayHex. This is anticipation of adding new flags to ColorEdit/ColorPicker functions which would make those ambiguous. (#2384) [@haldean] 2019-02-27 16:45:58 +01:00
omar
4eecf80a4b Moved Settings section above Docking to facilitate master<>docking merges. 2019-02-26 15:34:47 +01:00
omar
104294c7e4 Moved Logging/Capturing section above Docking to facilitate master<>docking merges. 2019-02-26 15:33:50 +01:00
omar
8915f7933a Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-02-24 23:24:07 +01:00
David Wingrove
5d7bd2309b Fixes warning caused by a missing switch/case. (#2382, #2381) 2019-02-24 23:19:36 +01:00
omar
9558e327d2 Log/Capture: Fixed extraneous leading carriage return. Fixed an issue when empty string on a new line would not emit a carriage return. 2019-02-23 16:22:55 +01:00
omar
cd67d4d3c1 Log/Capture: Fixed LogXXX functions 'auto_open_depth' parameter being treated as an absolute tree depth instead of a relative one. Fixed CollapsingHeader trailing ascii representation being "#" instead of "##". Minor tidying up the of code. 2019-02-23 16:07:01 +01:00
omar
2cd7de5666 Internal: Log/Capture: Rework to add an internal LogToBuffer() function which is useful for writing automated tests. Clarified logging state by adding an enum. 2019-02-23 15:57:06 +01:00
omar
3eba840053 Nav: Fixed a tap on AltGR (e.g. German keyboard) from navigation to the menu layer. (follow and extend on e.g #369, #370) 2019-02-23 14:50:36 +01:00
omar
87ded34f9f Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_opengl3.cpp
#	imgui_widgets.cpp
2019-02-22 12:29:18 +01:00
omar
81a8730022 Internal: InputText: Renamed is_editable to !is_readonly, Hopefully more explicit. Renamed internal member. Shuffled some code. Added comments, assert (_will_ trigger on !readonly > readonly edge, old bug). 2019-02-21 19:55:36 +01:00
omar
257f5d204e Version 1.69 WIP 2019-02-20 00:11:36 +01:00
omar
93b06e6e7c Internal: Changed Scrollbar() signature. Using GetScrollbarID() in InputTextMultiline().
Removed multiple semi-colons (#2368)
2019-02-20 00:08:21 +01:00
omar
9dc02464a4 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2019-02-19 13:04:35 +01:00
omar
3c15dffc94 Version 1.68 2019-02-19 12:50:46 +01:00
omar
5412cdf2c8 Docking: Made DockBuilderSplitNode/DockNodeTreeSplit work even if the node doesn't have a size yet. (#2357, #2109)
Followup to fa0ce4b7d, at that time I came to the conclusion that programmatic split couldn't work without knowing the size ahead of it. I forgot the reason for that.  May bite us back!
2019-02-18 16:23:54 +01:00
omar
3de440fda2 Docking: Fixed assert in DockContextProcessDock() preventing some uses of DockNodeBuilder api. (#2357, #2109) 2019-02-18 16:13:17 +01:00
omar
09c9bf2edb Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2019-02-14 20:35:11 +01:00
omar
76dbff37cd Selectable: Tweaks for #2347 (demo, changelog, member position) 2019-02-14 20:29:50 +01:00
haldean
b277cfffc8 Selectable: add support for specifying text alignment on selectables (#2347)
Adds a style variable to Selectable that allows clients to specify the
text alignment within Selectables, adds a section in the demo to
demonstrate selectable text alignment, and a pair of sliders in the
style editor to change selectable alignment on the fly.

In terms of implementation, this one is extremely simple: Selectable was
already calling an API that supports text alignment, but had hard-coded
it to top-left. This changes that to just pass the style variable
straight through to RenderTextClipped. Backwards-compatibility is
preserved by defaulting the text_align parameter to (0, 0), i.e.,
top-left.

This also fixes a bug with selectable text rendering that caused
right-aligned text in a selectable to be clipped incorrectly, because
the wrong clipping rectangle was being used.
2019-02-14 19:38:57 +01:00
omar
3c07ec6a61 Made it illegal/assert when io.DisplayTime == 0.0f (with an exception for the first frame).
Causing too many subtle side-effect, e.g. IsNavInputPressed() would return true multiple times in a row.
2019-02-14 17:14:29 +01:00
omar
2206df9e7a Demo: Added Auto-Scroll option in Log/Console. Comments. Removed some ImColor() uses. 2019-02-14 14:08:36 +01:00
omar
57a586b4f1 Font: Moved functions to internal block (not enforced). Made ConfigData pointer const. Added link to stb's notes. 2019-02-13 18:21:21 +01:00
omar
417cf2237f Font: Fixed high-level ImGui::CalcTextSize() used by most widgets from erroneously subtracting 1.0f*scale to calculated text width. Among noticeable side-effects, it would make sequences of repeated Text/SameLine calls not align the same as a single call, and create mismatch between high-level size calculation and those performed with the lower-level ImDrawList api. (#792) 2019-02-12 22:43:56 +01:00
omar
2cada3c143 Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_opengl2.cpp
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui_widgets.cpp
2019-02-11 18:59:49 +01:00
omar
a79785c0b9 ImDrawData: Added FramebufferScale field (currently a copy of the value from io.DisplayFramebufferScale).
This is to allow render functions being written without pulling any data from ImGuiIO, allowing incoming multi-viewport feature to behave on Retina display and with multiple displays. If you are not using a custom binding, please update your render function code ahead of time, and use draw_data->FramebufferScale instead of io.DisplayFramebufferScale. (#2306, #1676)
Examples: Metal, OpenGL2, OpenGL3: Fixed offsetting of clipping rectangle with ImDrawData::DisplayPos != (0,0) when the display frame-buffer scale scale is not (1,1). While this doesn't make a difference when using master branch, this is effectively fixing support for multi-viewport with Mac Retina Displays on those examples. (#2306) Also using ImDrawData::FramebufferScale instead of io.DisplayFramebufferScale.
Examples: Clarified the use the ImDrawData::DisplayPos to offset clipping rectangles.
2019-02-11 18:52:08 +01:00
omar
afc36cf802 Window: Fixed initial width of collapsed windows not taking account of contents width (broken in 1.67). (#2336, #176) 2019-02-08 14:34:42 +01:00
omar
4a3a895be9 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2019-02-06 14:47:53 +01:00
omar
f366828dd2 Minor tweaks to reduce false positive of PVS Studio static analyzer. 2019-02-06 13:16:52 +01:00
omar
5bdc7d7a6f Menus: Tweaked horizontal overlap between parent and child menu (to help convey relative depth) from using style.ItemSpacing.x to style.ItemInnerSpacing.x, the later being expected to be smaller. (#1086) 2019-02-06 12:32:10 +01:00
omar
e3dd95d335 Added IsItemActivated() as an extension to the IsItemDeactivated/IsItemDeactivatedAfterEdit functions which are useful to implement variety of undo patterns. (#820, #956, #1875) 2019-02-06 11:52:42 +01:00
omar
b8c24aff4c Internals: EndGroup: Removed unnecesary parameter to ItemSize() 2019-02-05 21:16:54 +01:00
omar
521470b3cd Internals: Removed unnecessary code. 2019-02-05 21:16:32 +01:00
omar
be107ba8f8 Merge branch 'master' into docking
# Conflicts:
#	imgui_internal.h
#	imgui_widgets.cpp
2019-02-05 13:52:32 +01:00
omar
8e44aacc8e Fonts: Fixed crash if FontGlobalScale is zero. Correctly debug naming default font if not 13 px. Demo: Moved PopupRounding along with other rounding values. Metrics: Displaying indexes with idx to be correct / less misleading. 2019-02-04 23:34:20 +01:00
omar
f902435a53 Docking: Fixed less of node size/pos caused by 1f2bdd37 (#2109) 2019-02-03 18:58:07 +01:00
omar
80d51c692a Docking: Fixed dragging docked window with _NoMove flag (#2325) 2019-02-03 18:44:30 +01:00
omar
7227454dca Merge branch 'master' into docking
# Conflicts:
#	examples/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui.h
2019-02-03 17:31:16 +01:00
omar
c23a19c26f Internals: Exposed internal SetWindowPos to imgui_internal.h (for imgui-test) 2019-02-03 17:29:51 +01:00
omar
f087359621 Revert part of change from 5536eded. Fixed drag and drop in docking branch. (#2331, reopening #2325) 2019-02-03 13:54:04 +01:00
omar
e215809c4d Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already). 2019-02-01 17:06:40 +01:00
omar
ac6d474103 Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already). 2019-02-01 16:37:07 +01:00
omar
d1c45c0d76 Merge branch 'master' into docking (enable range_select merge)
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-02-01 12:25:49 +01:00
omar
5cb7040f66 Internals: Tracking dummy select scope id (currently always zero) to facilitate merging of the range_select branch. (#1861) 2019-02-01 12:14:38 +01:00
omar
0d4a2a2cd0 Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. (#1861) 2019-02-01 12:14:37 +01:00
omar
65a2350a5f Docking: Extracted code into a DocknodeUpdateTabListMenu() functions + minor other changes. 2019-02-01 11:12:37 +01:00
omar
cbf24a9151 Comments. Fix duplicate entries in About box. Synchronize a few small changes from Master branch. 2019-02-01 11:04:04 +01:00
omar
52a9f8bd3e Merged from Docking branch: Various small changes, comments, typos fixes, moved blocks. To reduce overall drift. Should be no-op. 2019-02-01 10:26:08 +01:00
omar
f906d53f7d Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-01-31 19:19:35 +01:00
omar
1f2bdd37b3 Docking: Builder: Added DockBuilderSetNodePos, DockBuilderSetNodeSize, allow DockBuilderAddNode creating floating node (dockspace requires ImGuiDockNodeFlags_Dockspace) (#2109) 2019-01-31 17:01:15 +01:00
omar
dc8ff68871 Docking: VisibleWindow of a node spread its _NoMove attribute to the node (fixed dragging or undocking of dock node host from collapse button). (#2325, #2109) 2019-01-31 15:22:40 +01:00
omar
5536edede9 Docking: Fixed faulty undocking of windows with the _NoMove flag. (#2325, #2109)
Whereas BeginAsDockableDragDropTarget could be reworked to filter, we simply set g.HoveredWindowUnderMovingWindow to be NULL when MovingWindow is not set, which was the initial intent.
Also fixed some comments and removed unused braces in TabItemEx().
2019-01-31 14:59:45 +01:00
omar
578e15f006 Docking: Removed unnecessary ImGuiTabItemFlags_DockedWindow internal flag. 2019-01-31 14:55:00 +01:00
omar
e1143377c2 Viewport: Added ImGuiViewportFlags_NoFocusOnClick + support in imgui_impl_win32. Made windows with no decoration always set the _NoFocus flags. (#1542, #2117)
Fix e.g. clicking on protruding combo box stealing highlight from parent window with decoration.
2019-01-30 21:39:05 +01:00
omar
8563ef3ce4 Viewport: Popups by default merge into parent/host viewport as they have no decoration (same as menu/child). (#1542) 2019-01-30 21:13:07 +01:00
omar
fb4f1ff7f6 InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. (#2321, #787) 2019-01-30 15:16:09 +01:00
omar
0a233a505d imgui-test: Added extra item info callbacks. Using nav_bb for interactions when possible. Comments, Demo tweaks. 2019-01-30 12:53:01 +01:00
Francisco Gallego
aacf993ee1 ImStrncpy: Fixed -Wstringop-truncation warning on GCC8 (#2323) 2019-01-30 10:19:40 +01:00
omar
37fb531d1c Docking: Comments and tidying up (should be no-op) 2019-01-29 18:54:56 +01:00
omar
86d3bba157 Added ImGuiDockNodeFlags_AutoHideTabBar. (#2109) 2019-01-29 18:28:31 +01:00
omar
2ccc6d2ed1 Docking: Exposing extra flag in Configuration panel. Moved some forgotten Changelog entries at the right place. 2019-01-29 18:28:31 +01:00
omar
8a4422b2fa Fixed CloseCurrentPopup() on a child-menu of a modal incorrectly closing the modal. (#2308) 2019-01-27 23:54:17 +01:00
omar
13ca2fe845 Silence XCode static analysis false positive (#2309) 2019-01-27 23:30:44 +01:00
omar
13a5f5ba8b Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2019-01-27 16:46:35 +01:00
omar
b26ac92a12 Revert "Added PushID(size_t sz) helper (may not be useful/meaningful for non C/C++ languages)."
This reverts commit 20bc06af70.
2019-01-27 16:43:56 +01:00
omar
f56d9b74cc Nav: Removed unnecessary test (always failing). 2019-01-27 16:37:02 +01:00
omar
ee3b4f2bf1 Using IM_UNUSED() macro. 2019-01-27 16:23:23 +01:00
omar
c3c2cd1e82 Fix various XCode and PVS-Studio static analyzer warnings (#2309) 2019-01-27 16:18:23 +01:00
omar
20bc06af70 Added PushID(size_t sz) helper (may not be useful/meaningful for non C/C++ languages). 2019-01-27 16:18:23 +01:00
omar
07ff47bf1b Docking: Fixed various border / padding related inconsistency with dock node vs floating windows. (#2109) 2019-01-23 19:54:45 +01:00
omar
0737433c71 When resizing from an edge, the border is more visible and better follow the rounded corners. Border rendering moved to RenderOuterBorders so it can be called in a different order for docking. (#1495, #822) 2019-01-23 19:24:35 +01:00
omar
0bda7f196d Docking: Fixed overlapping issue with greyed out close button. 2019-01-23 19:24:35 +01:00
omar
9f96fcff3c Docking: Added ImGuiDockNodeFlags_Dockspace instead of node internal IsDockspace toward allowing the DockBuilder API to create non-dockspace nodes. 2019-01-23 19:24:34 +01:00
omar
c362a96a3f When resizing from an edge, the border is more visible and better follow the rounded corners. Border rendering moved to RenderOuterBorders so it can be called in a different order for docking. (#1495, #822) 2019-01-23 19:21:25 +01:00
omar
bfacbac7c4 Docking: Fix a focusing issue where dock node wouldn't be moved to the front as expected. 2019-01-23 11:05:00 +01:00
omar
86fce79a6c Comments + clear out VisibleWinodw field (should have no effect) 2019-01-23 10:50:58 +01:00
omar
c81a5a6070 Docking: Comments and renaming locals to facilitate debugging. 2019-01-22 12:38:10 +01:00
omar
0947fa3de0 Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-01-21 16:54:37 +01:00
omar
cb9a6b8a8b Merge branch 'master' into viewport
# Conflicts:
#	examples/README.txt
#	imgui.cpp
2019-01-21 16:52:22 +01:00
omar
f14f93ef6e Fixed range-version of PushID() and GetID() not honoring the ### operator to restart from the seed value. 2019-01-21 16:50:27 +01:00
omar
28901dd104 Internals: Tweaks. Comments about PushID/GetID public function. 2019-01-21 16:50:27 +01:00
omar
f994b8aab8 ImHash: Moved crc32 table out of the function so it can be shared, also avoid cases were compiler tries to makes its initialization thread-safe. 2019-01-21 16:50:27 +01:00
Thomas Ruf
1e4cf67a53 avoid floating point exception when _EM_OVERFLOW is enabled (#2303) 2019-01-21 16:43:07 +01:00
omar
2d21a64fed Comments 2019-01-21 14:25:13 +01:00
omar
00ffdb9fa9 ImGuiTextBuffer: Added append() function (unformatted). 2019-01-20 22:21:26 +01:00
omar
f94af2f5c5 Merge branch 'viewport' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui_draw.cpp
2019-01-20 22:13:35 +01:00
omar
8079344cee Merge branch 'master' into viewport
# Conflicts:
#	examples/example_sdl_vulkan/main.cpp
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx12.cpp
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_sdl.cpp
#	examples/imgui_impl_vulkan.h
#	imgui.cpp
2019-01-20 22:12:06 +01:00
omar
2c38b32db1 Removed trailing spaces (#2038, #2299) 2019-01-20 17:56:17 +01:00
omar
f94ba546ba Added checks for "zero-as-null-pointer-constant" warnings for older Clang (#2299, followup to #2277) 2019-01-20 17:46:00 +01:00
omar
fcd61e0c59 Comments about DLL boundaries and using TLS variables for GImGui. (#2292) 2019-01-18 23:04:45 +01:00
omar
b5144e477f Merge branch 'viewport' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2019-01-17 14:06:42 +01:00
omar
e9c625a1dc Merge branch 'master' into viewport
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_win32.cpp
#	imgui_demo.cpp
2019-01-17 14:05:40 +01:00
omar
d1851ed6b7 Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!) [docking branch] 2019-01-16 16:19:38 +01:00
omar
32c4e01267 Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!) 2019-01-16 16:13:23 +01:00
omar
06aaf23877 Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!) 2019-01-16 16:10:51 +01:00
omar
09f1cb642b FreeType: Minor tweaks previous commit (#2285) 2019-01-15 21:50:43 +01:00
omar
8a45c56c2c Merge branch 'viewport' into docking 2019-01-15 21:22:29 +01:00
omar
9391a97fbf Merge branch 'master' into viewport
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_win32.cpp
#	examples/imgui_impl_win32.h
2019-01-15 21:22:21 +01:00
omar
79d497edae Viewport: Made platform_io.Monitors mandatory for proper multi-viewport use. 2019-01-15 21:20:00 +01:00
omar
95ee99e6aa Version 1.68 WIP 2019-01-15 20:19:05 +01:00
omar
515ad62335 Merge branch 'viewport' into docking
# Conflicts:
#	docs/TODO.txt
2019-01-15 15:14:16 +01:00
omar
73353fad64 Merge branch 'master' into viewport 2019-01-15 15:13:29 +01:00
omar
b8c6e31c2d Fixed cursor issue caused by 6890e08b when calling BeginChild/EndChild multiple times to reappend into a same child window. (#2282) 2019-01-15 15:05:56 +01:00
omar
ff4bd758ca Merge branch 'viewport' into docking 2019-01-14 21:30:07 +01:00
omar
e24674fc0e Merge branch 'master' into viewport 2019-01-14 21:30:01 +01:00
omar
7a5058e3bf Version 1.67 2019-01-14 17:41:44 +01:00
omar
6e41745f31 Added a bunch of diagnostic ignore to cope with Clang -Weverything being absurd. Also fixed two legit warnings. (#2277) 2019-01-13 18:57:46 +01:00
omar
529fccd9c2 Merge branch 'viewport' into docking 2019-01-13 14:19:40 +01:00
omar
4ee4f65c70 Merge branch 'master' into viewport 2019-01-13 14:19:31 +01:00
omar
49994ceb6e FAQ entry, moved ImTextureId, Gallery links. 2019-01-12 19:48:07 +01:00
omar
7cc86d4bc9 Docking: Fixed docking a split node into the empty central node of a dockspace leading to the central node tag being incorrectly carried along. (#2109) 2019-01-10 18:20:52 +01:00
omar
8011197c50 Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
2019-01-10 16:02:32 +01:00
omar
c96aaef132 Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui.h
2019-01-10 16:01:36 +01:00
omar
1f6e0b2f98 ImVector: Made a struct. Using T/T* in the code instead of value_type/iterator. Renamed index_from_pointer() to index_from_ptr() (was not documented, added in 1.63, users not supposed to use ImVector, hopefully not a big deal). 2019-01-10 15:51:08 +01:00
omar
61a99f994e Minot internal tweaks, comments 2019-01-08 23:11:54 +01:00
omar
f53cd3ee0f Internals: LowerBound: Use raw pointer typedefs, we never use iterator anywhere else in the codebase.
Demo: Typo.
C98 fix.
2019-01-08 17:37:07 +01:00
omar
57b1622afc Added IMGUI_USE_STB_SPRINTF (undocumented) (#1038) 2019-01-08 15:28:33 +01:00
omar
b33977bc15 Tests: Reworking hook prototypes for imgui-test to be faster and multi-context friendly. 2019-01-07 23:59:05 +01:00
omar
3997e8b555 Fixed animated window titles from being updated when displayed in the CTRL+Tab list. + Adding overkill helpers for reusing buffers. (#787) 2019-01-07 22:46:42 +01:00
omar
6b32570644 Merge branch 'viewport' into docking
# Conflicts:
#	imgui_internal.h
#	imgui_widgets.cpp
2019-01-07 21:29:15 +01:00
omar
5af930f97a Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2019-01-07 21:28:29 +01:00
omar
5cb7ce2085 Renamed ImFont::GlyphRangesBuilder to ImFontGlyphRangesBuilder. Keep redirection typedef (will obsolete). 2019-01-06 16:59:51 +01:00
omar
c3af134cc8 IO: Renamed InputCharacters[], marked internal as was always intended. AddInputCharacter() goes into a queue which can receive as many characters as needed during the frame. This is useful for automation to not have an upper limit on typing speed. Will later transition key/mouse to use the event queue later. 2019-01-06 16:37:42 +01:00
omar
9ba202821f Nav: Fixed an keyboard issue where holding Activate/Space for longer than two frames on a button would unnecessary keep the focus on the parent window, which could steal it from newly appearing windows. (#787) 2019-01-04 19:03:56 +01:00
omar
d223d1e951 Added bindings in Readme. Added internal IMGUI_DEBUG_LOG() helper. Comments, missing breaking changes note relative to imgui_impl_xxxx changes, not really part of core but worth adding in the imgui.cpp breaking change section. 2019-01-04 18:01:43 +01:00
omar
515ecbddc2 Docking: Fix for handling of orphan/inactive dock node with ConfigDockingTabBarOnSingleWindows (would crash). 2019-01-03 23:02:40 +01:00
omar
6777544855 Added sanity check to debug parent/child ordering issues (they would generally manifest with an assert/crash in EndFrame bu tthis assert will catch some earlier). 2019-01-03 21:42:36 +01:00
omar
5278da98d2 Merge branch 'viewport' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui_demo.cpp
2019-01-03 21:40:08 +01:00
omar
e1ed27aeaa (Breaking change) Reorganized Viewports advanced flags, moved into new io.ConfigViewportsXXX flags. Pay attention that ImGuiConfigFlags_ViewportsDecoration became ConfigViewportsNoDecoeration, so the value is inverted! (#1542) 2019-01-03 21:33:33 +01:00
omar
c8349d3305 Viewport: Added ConfigViewportsNoParent to parent viewport default to NULL and not main viewport. Fix eg.. popups appearing erroneously focusing parent window. 2019-01-03 21:28:54 +01:00
omar
606175b98f Viewport: Fix for minimization of individual viewports (the current back-end forcing a parent/child relationship between secondary viewports and the main viewport have hidden this issue). Follows d8ab2c1ac. 2019-01-03 21:27:47 +01:00
omar
05bc323be0 Viewport: Fixed minimization of main viewport leading to it being omitted from platform_io.Viewport list where the users assume it is at index 0. Fix d8ab2c1ac. It wasn't a problem when other viewports were child of the main viewport because they would all be minimized together. (#1542) 2019-01-03 21:27:39 +01:00
omar
599a52629a Viewport: Added minimum viable information in the Changelog. 2019-01-03 17:46:23 +01:00
omar
c3efccaa9c Docking: Merge fix duplicate line + added assert to ease debugging. 2019-01-02 23:49:31 +01:00
omar
b26f16a27f Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
2019-01-02 23:16:10 +01:00
omar
a0c2e55e8c Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2019-01-02 23:11:52 +01:00
omar
237109caa5 Internals: Extracted code out of EndFrame() into UpdateMouseMovingWindowEndFrame() 2019-01-02 23:08:32 +01:00
omar
b3469fa94b Alternative fix for bug introduced in d845135 (#1651), fix CTRL+Tab and fallback tooltip. 2019-01-02 23:08:32 +01:00
omar
3e30bfd6c9 Revert "Fixes crash/assert bug introduced in d845135 (#1651): would assert when showing the CTRL+Tab list and or fallback "...." tooltip."
This reverts commit 1b0e38df47.
2019-01-02 22:56:17 +01:00
omar
1b0e38df47 Fixes crash/assert bug introduced in d845135 (#1651): would assert when showing the CTRL+Tab list and or fallback "...." tooltip. 2019-01-02 22:14:28 +01:00
omar
5aebfedfad Docking: Forward WindowClass from node to host window. 2019-01-02 21:41:00 +01:00
omar
ce1626a51e Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2019-01-02 21:36:21 +01:00
omar
0cabe4dedf Viewport: Added ImGuiWindowClass / SetNextWindowClass() (concept imported from Docking ImGuiDockFamily), which currently allows to overwrite viewport flags on a per-window basis. Exposed FindViewportByID(). Win32: Support for ParentViewportId. (#1542) 2019-01-02 21:33:23 +01:00
omar
0d6e3ab2b0 Docking: Renamed SetNextWindowId() -> SetNextWindowID() for consistency. (function vs member are still horribly inconsistent atm) 2019-01-02 21:28:16 +01:00
omar
4a6f95acc8 Viewport: Added Platform_UpdateWindow hook for general purpose: Rework Win32 code to reflect viewport flags changes into Win32 while the window is active. 2019-01-02 19:03:36 +01:00
omar
5305c32242 Viewport: Reorder flags. Set owned viewport common decoration flags in Begin(). Moved code in UpdateViewportsEndFrame() before we introduce family/class based overrides. 2019-01-02 19:03:11 +01:00
omar
951c9dd68b Merge branch 'master' into viewport
# Conflicts:
#	examples/imgui_impl_sdl.cpp
2019-01-02 19:00:31 +01:00
omar
4ea9fdbbea Docking: Agressively assert when CentralNode is a not a leaf node in order to find our bug. 2019-01-02 16:22:45 +01:00
omar
e194219f2e Renamed ImGuiDockFamily to ImGuiWindowClass. Renamed CompatibleWithClassZero to DockingAllowUnclassed. (#2109) 2019-01-02 16:22:44 +01:00
omar
6b97ded438 Happy new year! & comments 2019-01-02 10:57:57 +01:00
omar
e21bc44684 Comments: fixed missing line in the "how a simple rendering function may look like" section (#2258) 2019-01-02 09:57:25 +01:00
omar
d845135273 Error recovery: Extraneous/undesired calls to End() are now being caught by an assert in the End() function itself at the call site (instead of being reported in EndFrame). Past the assert, they don't lead to crashes any more. Missing calls to End(), pass the assert, should not lead to crashes any more, nor to the fallback/debug window appearing on screen. (#1651). 2018-12-23 18:00:37 +01:00
omar
a9a60a24c1 Tweaked asserts 2018-12-23 17:51:50 +01:00
omar
a71d3c8cb3 Viewport: Misc comments following user feedbacks.. 2018-12-21 18:40:16 +01:00
omar
238321c159 Fix merge in Docking branch, remove ConfigDockingWithShift flag from DX11 example + misnamed function. 2018-12-21 16:56:26 +01:00
omar
81a2546cea Merge branch 'viewport' into docking
# Conflicts:
#	examples/example_allegro5/main.cpp
#	examples/example_win32_directx9/main.cpp
2018-12-20 23:06:29 +01:00
omar
ee5560a958 Merge branch 'master' into viewport + added style tweak block when viewports are enabled
# Conflicts:
#	examples/example_glfw_opengl3/main.cpp
#	examples/example_sdl_opengl3/main.cpp
#	examples/example_win32_directx11/main.cpp
2018-12-20 23:04:40 +01:00
omar
d9fda22763 Viewport: Fixed not clearing request flags in main viewport, which led some back-end (SDL) to break on resize as PlatformRequestResize would stay true forever and inhibit new sizes passed to AddUpdateViewport(). (#1542) 2018-12-20 22:33:51 +01:00
omar
b471813f54 Made it illegal to call Begin("") with an empty string. This somehow accidentally worked before but had various undesirable side-effect as the window would have ID zero. In particular it is causing problems in viewport/docking branches. 2018-12-20 20:01:02 +01:00
omar
5794c0491a Docking: Fix an edge case failing to dock into an explicit dockspace which only have inactive nodes (because all the windows are inactive). (#2246, #2109) 2018-12-20 19:20:26 +01:00
omar
e043b89814 Merge branch 'viewport' into docking
# Conflicts:
#	imgui.h
2018-12-20 17:03:21 +01:00
omar
02501f07c3 Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui.h
2018-12-20 16:54:32 +01:00
omar
a0e5bb9532 Viewport: Corrected/clarified comments. Moved RenderPlatformWindowsDefault() next to UpdatePlatformWindow(). Removed unnecessary flag check. 2018-12-20 16:49:31 +01:00
omar
5691385a33 IO: Added BackendPlatformUserData, BackendRendererUserData, BackendLanguageUserData void* for storage use by back-ends. (#2004 + for cimgui) 2018-12-20 11:41:24 +01:00
omar
6890e08bc5 Fixed using SetNextWindowPos() on a child window (which wasn't really documented) position the cursor as expected in the parent window, so there is no mismatch between the layout in parent and the position of the child window. Demo tweak and adding some child window stuff 2018-12-19 15:19:31 +01:00
omar
89ac0ea7c1 Various user-facing comments 2018-12-19 11:19:55 +01:00
omar
84d1ce3958 Tidying up README, moved entries to FAQ, updated screenshots, removed comma in title. 2018-12-18 16:17:27 +01:00
omar
ca953f0fee Fix merge issue on master. 2018-12-18 15:11:11 +01:00
omar
088ef6623a Merge branch 'viewport' into docking 2018-12-18 15:03:01 +01:00
omar
9c916cdaf9 Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
2018-12-18 15:02:35 +01:00
omar
ae76a1fda7 Window, Focus, Popup: Fixed an issue where closing a popup by clicking another window with the _NoMove flag would refocus the parent window of the popup instead of the newly clicked window. 2018-12-18 15:01:15 +01:00
omar
510ca373a2 Moved setting up NavHideHighlightOneFrame from lower-level ClosePopupToLevel() to CloseCurrentPopup() with an explanation. (Followup on 68d3e139a7) 2018-12-18 14:59:22 +01:00
omar
ac9512e095 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2018-12-14 18:46:24 +01:00
omar
65dac02171 Internals: Popups: Renamed CurrentPopupStack to BeginPopupStack which is much less ambiguous. 2018-12-14 18:44:17 +01:00
omar
f1c7596409 Internals: Popup related comments. Renamed the misleading internal ClosePopup() function. Added bool* test to BeginPopupModal in demo. 2018-12-14 18:42:22 +01:00
omar
5d20da1b36 Viewport, DPI: Now using DpiScale from the ImGuiPlatformMonitor array instead of calling Platform_GetWindowDpiScale() before the platform window creation. Might even tentatively see if things work out without Platform_GetWindowDpiScale. (#1676) 2018-12-14 12:12:26 +01:00
omar
587506dd57 Tests: Changed prototype of ImGuiTestEngineHook_ItemAdd to match functions called in same spot. Made ButtonBehavior submit fallback item info if ItemAdd() was not called (for resize grips, resize borders, scrollbar, columns, etc.) 2018-12-14 11:27:02 +01:00
omar
9b09c7597f Merge branch 'viewport' into docking
# Conflicts:
#	imgui_demo.cpp
2018-12-13 19:21:51 +01:00
omar
2a1e903f43 Merge branch 'master' into viewport
# Conflicts:
#	imgui.h
2018-12-13 19:20:34 +01:00
omar
8497948ba0 Comments, minor tweaks. 2018-12-13 19:17:36 +01:00
omar
e50894c95e Metrics: Fixed crash when viewports are disabled (g.MouseLastHoveredViewport is never set). 2018-12-13 19:16:44 +01:00
omar
991b16cc6a Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
#	imgui_widgets.cpp
2018-12-11 19:46:46 +01:00
omar
febc3e6aa1 Internals: Windows hidden with HiddenFramesRegular (but NOT HiddenFramesForResize) preserve their SizeContents, so restoring a auto-resize window after it's been hidden by tabs won't reset its size for a frame. Arguable. Let's see how it goes. (Followup to b48e295bddbf965d7382ec5578ed05d2fe601114) 2018-12-11 19:19:12 +01:00
omar
d9a84de9d9 Contents size is preserved while a window collapsed. Fix auto-resizing window losing their size for one frame when uncollapsed. 2018-12-11 19:08:06 +01:00
omar
067b691fd8 Merge branch 'viewport' into docking
# Conflicts:
#	docs/TODO.txt
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_draw.cpp
#	imgui_internal.h
#	imgui_widgets.cpp
2018-12-11 13:23:00 +01:00
omar
c40feabe4d Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2018-12-11 12:41:40 +01:00
omar
54a60aaa40 Added BETA api for Tab Bar/Tabs widgets. (#261, #351) (merged this feature from the from Docking branch so it can be used earlier as as standalone feature)
- Added BeginTabBar(), EndTabBar(), BeginTabItem(), EndTabItem(), SetTabItemClosed() API.
- Added ImGuiTabBarFlags flags for BeginTabBar().
- Added ImGuiTabItemFlags flags for BeginTabItem().
- Style: Added ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive colors.
- Demo: Added Layout->Tabs demo code.
- Demo: Added "Documents" example app showcasing possible use for tabs.
2018-12-11 12:36:47 +01:00
omar
cc1283fb78 Added ImGuiWindowFlags_UnsavedDocument window flag to append '*' to title without altering the ID, as a convenience to avoid using the ### operator. (merged from Docking branch) 2018-12-11 12:20:48 +01:00
omar
15447f5b7b Using named flags instead of 0 + shallow formatting tweaks from other branches. 2018-12-11 12:14:27 +01:00
omar
2d4018aa89 Docking: Fix io.ConfigWindowsMoveFromTitleBarOnly for docking branch. 2018-12-11 11:03:28 +01:00
omar
e6439e1a16 Merge branch 'viewport' into docking + moved io.ConfigFlags ImGuiConfigFlags_DockingNoSplit to io.ConfigDockingNoSplit
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
2018-12-10 16:21:49 +01:00
omar
26b9e2d0a5 Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2018-12-10 16:14:31 +01:00
omar
9476e07d5a Added io.ConfigWindowsMoveFromTitleBarOnly option. Still is ignored by window with no title bars (often popups). This affects clamping window within the visible area: with this option enabled title bars need to be visible. (#899)
Tweaked default value of style.DisplayWindowPadding from (20,20) to (19,19) so the default style as a value which is the same as the title bar height.
2018-12-10 16:05:30 +01:00
omar
59f3c4fc20 Renamed io.ConfigResizeWindowsFromEdges to io.ConfigWindowsResizeFromEdges and removed its [Beta] mark. Resizing windows from edge is now enabled by default (io.ConfigWindowsResizeFromEdges=true). Note that it only works _if_ the back-end sets ImGuiBackendFlags_HasMouseCursors, which the standard back-end do. 2018-12-10 15:41:01 +01:00
omar
d20e3ee710 Tests: Adding imgui-test engine hooks (experimental) to provide missing widget state to the testing system. 2018-12-10 14:30:41 +01:00
omar
f768727284 Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
2018-12-06 16:36:17 +01:00
omar
a03846bd9e Merge branch 'master' into viewport
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2018-12-06 16:33:39 +01:00
omar
ac52d9d44c Viewport: Fix handling of PlatformRequestResize/PlatformRequestPos. when OS decoration are enabled via ImGuiConfigFlags_ViewportsDecoration . 2018-12-06 15:36:36 +01:00
omar
e2082a675c Viewport: Fix handling of PlatformRequestResize/PlatformRequestPos. when OS decoration are enabled via ImGuiConfigFlags_ViewportsDecoration . 2018-12-05 23:39:04 +01:00
omar
b94f0241f1 Docking: Adjusting the docking popup menu position so it tends to stay within the same viewport. 2018-12-05 21:19:42 +01:00
omar
b96b1f2412 Docking: Documenting an issue. Renamed member of ImGuiDockFamily. 2018-12-04 16:38:27 +01:00
omar
125e62491e Internals: Nav: Added ImGuiNavLayer_ to clarify semantic of previously integer NavLayer values, and not pretend that increment/decrement operators on them super flexible. + Storage tweaks. 2018-12-04 14:34:49 +01:00
omar
6644f1ff64 Docking: Added io.ConfigDockingTabBarOnSingleWindows option (mostly made possible by the previous fixes).
Note that dock node have regressions compared to current floating window: no collapse, no auto-resize, resize grip under the scrollbar, border issues, general overhead. Will tackle those.
2018-12-04 13:37:46 +01:00
omar
8cac70d8af Docking: Focus fix (missing line in 8bac6d4) 2018-12-04 13:34:16 +01:00
omar
5105c6c0d0 Merge branch 'viewport' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
2018-12-04 00:06:26 +01:00
omar
3a678d48b1 Merge branch 'master' into viewport
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx11.cpp
2018-12-04 00:05:45 +01:00
omar
8bac6d428d Docking: Another attempt at tidying the inconsistent focus / tab bar reordering issues, and toward generalizing single window dock nodes. (#2109) 2018-12-04 00:01:20 +01:00
omar
2da200fc16 Docking: Fix generalizing the transition from loose windows to dock node so we can switch to single window dock node while transferring viewports (vs creating two viewports and dropping one). + Extracted DockContextGenNodeID out of DockContextAddNode(). 2018-12-04 00:01:19 +01:00
omar
fb6ef8b1db Comments, tweak 2018-12-03 23:50:59 +01:00
omar
f6b6ad1959 Viewport: Minor tweaks, better struct layout. 2018-12-03 20:30:00 +01:00
omar
3e84f7cd1d Viewport: Fixed a viewport bug which led some popups to merge in underlying host viewport when they should be z-over their parent viewport. 2018-12-03 18:16:47 +01:00
omar
10e13dd6bb Version 1.67 WIP (again, this time IMGUI_VERSION_NUM has leeway for another hot-fix). 2018-12-03 12:19:23 +01:00
omar
ac10889bde Merge branch 'viewport' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2018-12-03 11:44:51 +01:00
omar
65e579e558 Merge branch 'master' into viewport
# Conflicts:
#	docs/CHANGELOG.txt
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_dx12.cpp
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_opengl2.cpp
#	examples/imgui_impl_opengl3.cpp
#	examples/imgui_impl_sdl.cpp
#	examples/imgui_impl_vulkan.cpp
#	examples/imgui_impl_win32.cpp
#	imgui.h
#	imgui_demo.cpp
2018-12-03 11:41:53 +01:00
omar
801645d350 Version 1.66b (will revisit how to change IMGUI_VERSION_NUM across versions, this commit reduces the numerical IMGUI_VERSION_NUM compared to the commit on Nov 22). 2018-12-03 10:17:17 +01:00
omar
7658035e5a About, IO: Added io.BackendPlatformName, io.BackendRendererName for informational/QA purpose. 2018-11-30 18:30:21 +01:00
omar
3849def253 Added ShowAboutWindow(), About Window now showing various config/build information. 2018-11-30 18:30:21 +01:00
omar
f78b5a0cdb Merge branch 'viewport' into docking 2018-11-30 18:27:14 +01:00
omar
afeefadb4e Merge branch 'master' into viewport
# Conflicts:
#	examples/imgui_impl_dx10.cpp
#	examples/imgui_impl_dx11.cpp
#	examples/imgui_impl_glfw.cpp
#	examples/imgui_impl_opengl2.cpp
#	examples/imgui_impl_opengl3.cpp
#	examples/imgui_impl_sdl.cpp
#	examples/imgui_impl_win32.cpp
#	imgui.h
2018-11-30 18:24:43 +01:00
omar
a423f032ee About, IO: Added io.BackendPlatformName, io.BackendRendererName for informational/QA purpose. 2018-11-30 18:18:15 +01:00
omar
4ef06f5aa2 Added ShowAboutWindow(), About Window now showing various config/build information. 2018-11-30 18:02:01 +01:00
omar
753223bd7b Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2018-11-30 14:38:54 +01:00
omar
f663277591 Merge misc/shallow changes from Docking branch to minimize drift: moved some blocks, added comments. 2018-11-30 14:35:13 +01:00
omar
1c7be88a1a Viewport: Fixed a bug where tooltips on their first frame didn't find a monitor leading to the "recovery" code to revert it to the main viewport for a frame. (#1542) 2018-11-30 14:35:13 +01:00
omar
baf67d393f When the focused window become inactive don't restore focus to a window with the ImGuiWindowFlags_NoInputs flag. (#2213) 2018-11-29 23:25:29 +01:00
omar
3c114b280a Merge branch 'viewport' into docking
# Conflicts:
#	imgui_internal.h
2018-11-29 21:30:26 +01:00
omar
2fbbcaa339 Viewport: Avoid calling platform functions when window is not created (apart from Platform_GetWindowDpiScale, documented as such). Main viewport situation is still ambiguous. (#1542) 2018-11-29 21:28:47 +01:00
omar
36cbe1e521 Viewport: Misc renaming. 2018-11-29 21:21:04 +01:00
omar
19d17ed274 Docking: Added io.ConfigDockingTransparentPayload option (to use with ImGuiConfigFlags_ViewportsNoMerge) 2018-11-29 16:18:01 +01:00
omar
3bcc25f588 Merge branch 'viewport' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2018-11-27 19:56:23 +01:00
omar
99c32ed4a5 Merge branch 'master' into viewport 2018-11-27 19:46:40 +01:00
omar
c08b4b46f4 Viewport: Better support for toggling ImGuiConfigFlags_ViewportsEnable. (#2196) 2018-11-27 19:46:36 +01:00
omar
4105cc7e97 Added ImGuiConfigFlags_None, ImGuiBackendFlags_None for good measure. 2018-11-27 19:46:14 +01:00
omar
e138a5fcb5 Docking: Fixed debug Rebuild operation. 2018-11-27 17:40:25 +01:00
omar
fc16e54612 Docking: Maintain CentralNode. When SetNextWindowDockID() on a now split node id, we dig to find the central node or the last focused node. (#2109) 2018-11-27 13:35:05 +01:00
omar
4575354bc0 Docking: Comments + maiintain LastFrameFocused per node + using bitfiield for docking bools. 2018-11-27 13:29:09 +01:00