Commit Graph

1227 Commits

Author SHA1 Message Date
ocornut a138855d56 Hotfix for PushFocusScope() being utterly wrong (until we split the stacks), Added asserts on PopID to help catch bugs, Added GC trigger. 2020-11-12 22:59:05 +01:00
ocornut 78f1d2d319 ImDrawListSplitter: create first draw cmd on demand + Internals: fix incorrect ImBitArraySetBitRange() (only used by tables)
Make it cheaper to allocate unused draw cmd, can't measure perf difference other our stress tests.
2020-11-12 18:17:17 +01:00
ocornut 13258f5957 Internals: zero-clearing ImGuiWindow / ImGuiWindowTempData for simplicity. (amend)
All the non-zero fields previously initialized in ImGuiWindowTempData() are in fact setup in Begin: FocusCounterRegular, FocusCounterTabStop, TextWrapPos, LayoutType, ParentLayoutType
2020-11-12 12:19:50 +01:00
ocornut 5789e69a62 Checkbox: Added CheckboxFlags() helper with int* type. Demo: removed extraneous casts. 2020-11-05 21:32:05 +01:00
ocornut 5f97809cab Misc tidying up (zero-clear structures, more unused default in ClipRetFullscreen, NavApplyItemToResult() coding style fix)
Zero-clearing more structures
Remove arbitrary default ClipRetFullscreen value in ImDrawListSharedData.
Nav extracted NavApplyItemToResult() function.
Coding style fixes in OSX Backends.
2020-11-05 13:24:27 +01:00
ocornut d6a2f7e95e Reduced padding + unused storage in ImDrawList (224->192 bytes) + zero-init ImDrawListSplitter and ImDrawList
+ Readme tweak
2020-11-04 13:56:04 +01:00
ocornut 047d4c4500 Metrics: Extracted most functions.
+ avoid using full namesapce prefix
2020-10-30 23:48:58 +01:00
ocornut e6b99a420b Tab Bar: Do not display a tooltip if the name already fits over a given tab. (#3521) 2020-10-19 15:01:24 +02:00
ocornut fbe74ed50c Tab Bar: zero clear more structures. 2020-10-19 12:10:31 +02:00
ocornut 8c9b3c9013 Tab Bar: Fixed using more than 128 tabs in a tab bar.
Using ImS16 consistently + some better packing to avoid struct growing size.
2020-10-19 12:01:15 +02:00
ocornut 748bd1ba9c Tab Bar: Restore cursor position in EndTabBar() when amending (amend f2f32602) + made LastTabItemIdx consistent ImS8 as other tab storage relies on same type 2020-10-19 11:49:37 +02:00
ocornut f2f326024c Tab Bar: Made it possible to append to an existing tab bar by calling BeginTabBar()/EndTabBar() again. 2020-10-14 18:34:33 +02:00
ocornut 04de5ef819 Version 1.80 WIP 2020-10-12 13:04:34 +02:00
ocornut a38c6dfcc8 Internals: Added support for context hooks (for test engine or other extensions) 2020-10-09 17:13:03 +02:00
ocornut e5cb04b132 Version 1.79
+ Update readme and mission statement.
Removed "Minimize screen reel-estate usage", removed details on memory consumption (still very valid, just too much noise in a mission statement)
2020-10-08 16:01:59 +02:00
ocornut 4fd43a8b64 Internals: removed NavLayerCurrentMask (redundant, add extra shift in ItemAdd(). 2020-10-05 14:52:18 +02:00
ocornut 1ec464eb9a Tab Bar: Further simplification of section/clip rect handling. (#3291) 2020-09-22 16:43:40 +02:00
ocornut 6b76781c66 Tab Bar: Tidying up. Rework ShrinkWidths to allow marking tabs as not shrinkable (unused yet) + don't unnecessarily move data within ShrinkWidthBuffer. (#3291) 2020-09-22 16:43:39 +02:00
ocornut 205874f5b1 Tab Bar: Fix reorderable tab bars. Fix misleading use of tab_max_width in TabBarLayout(). Misc amends, shortening. (#3291) 2020-09-22 16:43:39 +02:00
Louis Schnellbach 3422cb1308 Tab Bar: Various fixes. Tried to reduce code complexity. (#3291) 2020-09-22 16:43:39 +02:00
ocornut 5e5f25e2dd Tab Bar: Rename named sections members into array. Various tidying up. (#3291) 2020-09-22 16:43:39 +02:00
Louis Schnellbach 7ac16c02cc Tab Bar: Fix multiple width and position computation issue. (#3291) 2020-09-22 16:43:38 +02:00
ocornut f23c39c395 Tab Bar: Fixed handling of scrolling policy with leading/trailing tabs. + warning fixes + bunch of renaming. (#3291)
Demo tweaks.
2020-09-22 16:43:38 +02:00
Louis Schnellbach 4a57a982be Tab Bar: Added TabItemButton(), ImGuiTabItemFlags_Leading, ImGuiTabItemFlags_Trailing + demo. (#3291)
(squashed various commits by 2 authors)
2020-09-22 16:43:38 +02:00
ocornut 29836412e1 Internals, CollapsingHeader, TabItem: Standardized using a #CLOSE id prefix for TabItem and ColllapsingHeader (same as window) 2020-09-22 15:49:47 +02:00
ocornut c47bcb25ed Fix popup and tooltip positioning when not fitting in the screen. Amend fa42ccea8.
# Conflicts:
#	docs/CHANGELOG.txt
2020-09-17 11:02:04 +02:00
Rokas Kupstys b2039aac67 Slider: Fixed to reach maximum value with inverted integer min/max ranges, both with signed and unsigned types. Added reverse Sliders to Demo. (#3432, #3449) 2020-09-07 17:57:23 +02:00
ocornut 70289ab42c Scrolling: Fixed edge snapping being applied prior to knowing ContentSize. (#3452)
Fix 473a01adb.
2020-09-03 17:38:51 +02:00
ocornut 8db94cd992 Internals: Scroll related, comments & shallow tweaks. 2020-09-03 17:07:03 +02:00
ocornut f4d062fa11 Nav: Added debug logging, extract bits of code into NavUpdateInitResult(). 2020-09-01 18:45:39 +02:00
ocornut ce230fc370 Internals: TabBar renaming and shuffling stuff around.
+ sneaking a readme change
2020-08-31 17:49:18 +02:00
ocornut 13f718337a Internals: Added support for overriding locale decimal point, undocumented. (#2278) + Misc doc update.
Doc: Mention IMGUI_VERSION_NUM in recent api breaking changes + textwrap some demo code.
2020-08-28 18:38:31 +02:00
ocornut 093afd4f7f Internals: Added Name to ImGuiDataTypeInfo + minor misc comments in BeginGroup(). 2020-08-26 21:00:43 +02:00
Louis Schnellbach 8c80d533d9 Tab Bar: Fixed a small bug where toggling a tab bar from Reorderable to not Reorderable would leave tabs reordered in the tab list popup. 2020-08-26 16:36:57 +02:00
ocornut 1e8b9f84da Nav: Removed stateful NavMoveFromClampedRefRect and made it more explicit that nav move request from gamepad start from a clipped location. 2020-08-26 11:28:35 +02:00
Rokas Kupstys 021c28ae39 Nav: Fix ScrollToBringRectIntoView() not bringing entire item into view when nav moves to the left. Correct some comments. 2020-08-25 16:48:49 +02:00
omar 2e50d0706b Selectable: Tweaks. Added internal ImGuiSelectableFlags_NoPadWithHalfSpacing. 2020-08-24 16:31:00 +02:00
ocornut 7b0570d6ba Revert "Drags, Sliders: internal ReadOnly flag gets forwarded properly to temp InputText()."
This reverts commit 640d1f60ce140e4c2bf858ac2f2e8a96d432e6a4.
2020-08-21 20:15:07 +02:00
ocornut fdf952108d Drags, Sliders: internal ReadOnly flag gets forwarded properly to temp InputText(). 2020-08-21 19:17:44 +02:00
ocornut 9262609eaf Version 1.79 WIP 2020-08-20 16:46:44 +02:00
ocornut fc9ccad6b9 InputText: Add ImGuiInputTextFlags_CallbackEdit, selection helpers in ImGuiInputTextCallbackData(). Add simple InputText() callbacks demo. 2020-08-20 11:25:39 +02:00
ocornut 4c201994d4 DragFloat, DragScalar: Fixed ImGuiSliderFlags_ClampOnInput not being honored in the special case where v_min == v_max. (#3361) 2020-08-20 11:21:15 +02:00
ocornut 95c99aaa4b Version 1.78 2020-08-18 17:50:45 +02:00
ocornut c6b01e8e1d Drag, Sliders: Merged ImGuiDragFlags back into ImGuiSliderFlags. (#3361, #1823, #1316, #642, #1829, #3209)
Technically API breaking (but ImGuiDragFlags were pushed on master 16 hours ago)
2020-08-18 17:02:58 +02:00
omar f32663b33c Drags, Sliders: Removed locking behavior with min > max (added in 1.73) 2020-08-17 22:10:42 +02:00
omar 7f8f0096d8 Internals: Renamed SliderCalcRatioFromValueT() -> ScaleRatioFromValueT(), SliderCalcValueFromRatioT() -> ScaleValueFromRatioT().
Replaced drag/slider flags with a single bool is_logarithmic in those functions.
2020-08-17 22:10:42 +02:00
Ben Carter fa279a6aa0 Drags, Sliders: Added deadzone to make selecting 0.0 on linear sliders easier, slider navigation delta accumulation. (#3361, #1823, #1316, #642) 2020-08-17 22:10:42 +02:00
omar 7607aea018 Drags, Sliders: Removed power features. Old entry points will pass-through if power=1.0f, otherwise assert + safe fallback. Remove 3 redirection functions (#3361, #1823, #1316, #642) 2020-08-17 22:10:41 +02:00
omar 43c099f31e Drags, Sliders: Logarithmic: Moved flags to internals, allowing 1.0f to pass by. (#3361, #1823, #1316, #642) 2020-08-17 22:10:41 +02:00
omar 152dae9e2a Drags, Sliders: Logarithmic: Split back flags into drag/slider flags. Moved to an obsolete section. (#3361, #1823, #1316, #642) 2020-08-17 22:10:40 +02:00
Ben Carter 9f98b4e7f2 Drags, Sliders: Logarithmic: Added logarithmic mode support to drag widgets, extended API to add flags to drag/sliders (#3361, #1823, #1316, #642) 2020-08-17 22:10:40 +02:00
Ben Carter a252a287bf Drags, Sliders: Logarithmic: WIP experiments with trying to make logarithmic sliders sensible (#3361, #1823, #1316, #642) 2020-08-17 22:10:40 +02:00
ocornut 46d75202b8 Tab Bar: Allow calling SetTabItemClosed() after a tab has been submitted (will process next frame).
+ larger combo height on TabBarTabListPopupButton()
2020-08-17 12:57:47 +02:00
omar 214dd68ec1 Comments, clarifying ClosePopupsOverWindow(). 2020-08-11 10:55:53 +02:00
omar a4dd4d60b4 CI: moved static analysis to a separate project + fix (uninitialized variable, was harmless in this case). 2020-08-10 17:46:02 +02:00
omar 8241cd6284 Make moving window prevent its active id from being stolen (#3392, #3243, #1738)
Amend 7b3d379, 615e9ae3

# Conflicts:
#	imgui.cpp
#	imgui_widgets.cpp
2020-08-10 16:30:23 +02:00
omar 89ac87cd91 Internals: Added SetLastItemData, rename ImGuiItemHoveredDataBackup to ImGuiLastItemDataBackup. 2020-08-10 11:31:55 +02:00
omar 8074b49148 Selectable: Fixed highlight/hit extent when used with horizontal scrolling (in or outside columns). (#3187, #3386)
# Conflicts:
#	imgui_widgets.cpp
2020-08-05 19:24:07 +02:00
omar 4929a8e4a5 InvisibleButton: Made public a small selection of ImGuiButtonFlags (previously in imgui_internal.h) and allowed to pass them to InvisibleButton(). 2020-08-03 18:45:30 +02:00
omar a876ad877d Window: Fixed clicking over an item which hovering has been disabled (e.g inhibited by a popup) from marking the window as moved.
+ comments
2020-08-03 18:05:20 +02:00
omar 76ddacd2a1 Internals: Backport HoveredWindowUnderMovingWindow code from Docking branch.
(effectively allowing a window to be a drag payload without have to make it _NoInputs)
2020-07-29 15:32:25 +02:00
omar 218ff3a2a5 Internals: Backport one ->WasActive test in NavRestoreLastChildNavWindow() from 9bf6509c6 + minor/shallow bits from docking branch. 2020-07-29 15:11:24 +02:00
omar c7f5876f8a Internals: backport window HitTestHole code from docking branch + RenderRectFilledWithHole() helper. (#1512, #3368) 2020-07-29 15:03:52 +02:00
omar fdc526e8f8 Stop advertisting for Drag v_min>v_max which was introduced in 1.73 likely for 0537ac00 then made unnecessary with 32c33c66, added undocumented ImGuiItemFlags_ReadOnly as possible replacement (unused), (#211) 2020-07-23 18:19:11 +02:00
omar b335225caa Internals: Extract ImFontAtlasBuildRender1bppRectFromString() out of ImFontAtlasBuildRenderDefaultTexData() + minor renaming, comments 2020-07-22 17:31:59 +02:00
omar 3a6c9907cd Texture-based thick lines: Minor tweaks and rename toward merging in master. Changes to allow changing AA_SIZE (disable texture path). 2020-07-08 20:18:41 +02:00
omar 78d6bdf080 Texture-based thick lines: Remove unnecessary indirection in fetching UV data, removed lerp call, renames, tweaks. 2020-07-08 17:38:02 +02:00
Ben Carter 403bf45245 Texture-based thick lines: Allow interpolation between textures for non-integer line widths 2020-07-08 17:38:01 +02:00
omar 222b7ddbfa Texture-based thick lines: Tweaks, fix for truetype builder. 2020-07-08 17:38:01 +02:00
Ben Carter 741ab74b55 Texture-based thick lines: Improvements to code for drawing anti-aliased lines using textures
Moved line width into a constant
Removed test code (now in imgui-tests)
Improved matching between geometry and texture rendering at non-integer sizes
2020-07-08 17:38:01 +02:00
Ben Carter 1d3c3070d8 Texture-based thick lines: Initial version of AA line drawing using textures (press SHIFT to enable) 2020-07-08 17:38:01 +02:00
omar ab4ef822f0 Version 1.78 WIP 2020-06-30 16:56:09 +02:00
Rokas Kupstys 0738611559 Misc: Bunch of code formatting changes suggested by a pass running 'astyle' 2020-06-30 16:37:21 +02:00
omar dca7c3c629 TestEngine: Added hook to notify test engine of a removed imgui context. 2020-06-29 20:16:55 +02:00
omar 9418dcb693 Version 1.77
+ fix minor clang-tidy warnings which seems reasonable
2020-06-29 15:54:28 +02:00
omar fed80b9537 Popups: Changed 'int mouse_buttons' to ImGuiPopupFlags. Added ImGuiPopupFlags_NoOpenOverExistingPopup, ImGuiPopupFlags_NoOpenOverItems. Refactored signature of BeginPopupContextWindow(). 2020-06-23 20:05:15 +02:00
omar 5acf6d861a Popups: Added ImGuiPopupFlags type, ImGuiPopupFlags_AnyPopupId and ImGuiPopupFlags_AnyPopupLevel flags for IsPopupOpen().
# Conflicts:
#	docs/CHANGELOG.txt
2020-06-23 20:00:32 +02:00
omar e0ec69d84b Internals: Added ImageButtonEx() helper to temporarily bypass ID issues (#2464, #1390) 2020-06-23 15:47:07 +02:00
omar 8ead38c100 Clang: Reduce uses of __has_warning for overall sanity, as compilers are hostile to software targetting multiple compiler version. 2020-06-18 17:02:24 +02:00
omar 704723744e Disabled latest overzealous warnings from Clang 2020-06-18 16:19:51 +02:00
ocornut 37eb89371b Popups: Internals: Added IsAnyPopupOpen(). 2020-06-16 18:46:25 +02:00
ocornut d31fe97f74 Popups: Fix an edge case where programatically closing a popup while clicking on its empty space would attempt to focus it and close other popups. (#2880) 2020-06-16 17:10:47 +02:00
omar 90c0c0c163 Columns: Lower overhead on column switches and switching to background channel. (second attempt for 9b3ce49)
Internals: Bits, comments, added ImRect::ToVec4()
2020-06-13 18:04:50 +02:00
ocornut 16da8e6da6 Revert "Columns: Lower overhead on column switches and switching to background channel (some stress tests in debug builds went 3->2 ms). (#125)"
This reverts commit 9b3ce494fd.
2020-06-10 17:54:19 +02:00
ocornut 9b3ce494fd Columns: Lower overhead on column switches and switching to background channel (some stress tests in debug builds went 3->2 ms). (#125)
This change benefits Columns but was primarily made with Tables in mind.
2020-06-08 23:18:23 +02:00
ocornut 57191fe3d0 Comments about limiting WindowRounding to a reasonable size. 2020-06-08 14:17:49 +02:00
ocornut 41e8837f59 Comments, adding some spacing in ImVec2() constructors. 2020-06-02 18:13:54 +02:00
omar 476daf9aac Settings: Added ReadInitFn pre-load handler.
(docking branch already has it, so it'll probably conflict with same contents)
2020-05-13 23:51:29 +02:00
Rokas Kupstys a6f4b0fd70 Nav, Menus: Fix vertical wrap-around in menus or popups created with multiple appending calls to BeginMenu()/EndMenu() or BeginPopup/EndPopup(). (#3223, #1207)
First call to EndPopup() called NavRequestTryWrapWindow() which performed wrap-around operation while we were not done composing menu. This resulted in navigation wrapping around to first item.
Since wrap-around operation is only valid in last call to EndPopup() and there is no way to know which call is last - this operation is delayed to the end of the frame.
2020-05-11 15:30:12 +02:00
omar 4f33dd15c4 Internals: stand-in for large branches to facilitate merging. 2020-05-08 17:00:11 +02:00
omar 5f752a5ba9 Internals: shuffling some sections (2) 2020-05-08 16:30:14 +02:00
omar f466cfc2ca Internals: shuffling some sections, added index. 2020-05-08 16:21:00 +02:00
omar 3aa1684129 Comments 2020-05-08 15:59:59 +02:00
omar d33021d828 Settings: Made it possible to load window .ini data mid-frame. Added clear and post-read handlers. (#2573) 2020-05-07 21:38:04 +02:00
omar b6a04d7750 Settings: Added Clear Settings in Metrics. (#2188) + Preserve last loaded copy in internal buffer used for save (so it can be browsed easily). 2020-05-07 21:38:03 +02:00
omar 0679e05677 Internals: Added code in TempInputScalar() to clamp values, NOT used by stock Drag/Float (#3209, #1829, #946, #413) 2020-05-07 12:27:21 +02:00
omar b4dd28ffbb Style: Added style.TabMinWidthForUnselectedCloseButton settings.
Set to 0.0f (default) to always make a close button appear on hover (same as Chrome, VS).
Set to FLT_MAX to only display a close button when selected (merely hovering is not enough).
Set to an intermediary value to toggle behavior based on width (same as Firefox).
2020-05-04 14:58:21 +02:00
ocornut c0283c1289 TestEngine: Changed PushID hooks into GetID(), makes more sense and catches more information. 2020-04-20 11:31:30 +02:00
omar 9f9ff84ba1 TestEngine: Added PushID() hooks. 2020-04-16 16:59:46 +02:00
omar b0e9092d6f TestEngine: Added extra storage and global enable flag. Added missing ItemInfo hooks. 2020-04-16 16:56:15 +02:00
omar 3233fbff0e Internals: Added SetNextWindowScroll() (#1526) 2020-04-16 14:07:58 +02:00
omar 1fd9e131e4 TreeNode: Fixed bug where dragging a payload over a TreeNode() with either _OpenOnDoubleClick or _OpenOnArrow would open the node. (#143) 2020-04-15 13:06:05 +02:00
omar e8c986b34e Version 1.77 WIP 2020-04-14 14:55:50 +02:00
omar 5503c0a12e Version 1.76
+ fixed PVS warning, update demo binaries, update readme image
2020-04-12 20:18:47 +02:00
omar f7852fa8e8 Internals: Extracted GetWindowScrollbarRect() out of Scrollbar() and tidying up code to make it more obvious how to draw over scrollbars. (#3114) 2020-04-10 11:51:17 +02:00
omar fb70d90fef Made default clipboard handlers for Win32 and OSX use a buffer inside the main context instead of a static buffer, so it can be freed properly on Shutdown. (#3110) 2020-04-09 13:34:39 +02:00
omar 4e7ceb5f90 Plot: Internals: Added hovered index to PlotEx() function. (#2670) 2020-04-07 12:11:06 +02:00
omar b7e1b13ca7 Update docs, FAQ, comments (mainly related to io.WantCaptureMouse / WantCaptureKeyboard flags). 2020-04-02 21:53:10 +02:00
omar fd56de1144 Nav: Store key mods associated to a nav request (for range_select) + use io.KeyMods.
+ renamed NavScoringRectScreen > NavScoringRect
2020-04-02 17:56:21 +02:00
omar 5be5add1ad Selectable: Removed extraneous WindowPadding.x worth of width when auto-sized selectable label goes off available width (would not be noticeable) + Renamed ImGuiSelectableFlags_DrawFillAvailWidth to ImGuiSelectableFlags_SpanAvailWidth. 2020-03-26 20:15:24 +01:00
omar b4d1287011 Selectable: Clarifying the code around use of ImGuiSelectableFlags_DrawFillAvailWidth (with intent of trying to remove it).
Amend old 6251d379, 2bcafc86
2020-03-26 17:02:10 +01:00
omar bdd31ec4db Internal: Refactor: Moved RenderColorRectWithAlphaCheckerboard() to imgui_draw.cpp, tweaked signature. 2020-03-18 22:48:23 +01:00
omar 0bbbbe0f68 Internal: Refactor: Moved RenderArrow, RenderBullet, RenderCheckMark to imgui_draw.cpp, changed RenderCheckMark to avoid using ImGui context 2020-03-18 22:48:22 +01:00
ocornut 339ffd25a9 Internals: Renamed ImBoolVector to ImBitVector, added low-level loose function to replicate the behavior include a help SetBitRange() function. 2020-03-13 18:50:02 +01:00
ocornut 1d5612a05e Internal: Added two missing ImVec2 operators for consistency. Split up DragDropWithinSourceOrTarget
ImVec2 *= ImVec2 to match  ImVec2 * ImVec2, likewise with /
2020-03-12 20:58:24 +01:00
ocornut 9a46a19e99 Internals: Rename ImGuiSelectableFlags_PressedOnXXX to ImGuiSelectableFlags_SelectOnXXX, ImGuiButtonFlags_NoHoveredOnNav to ImGuiButtonFlags_NoHoveredOnFocus. 2020-03-11 21:07:32 +01:00
ocornut aef057e975 Internals: Added GetInputTextState() + comments. 2020-03-07 15:55:05 +01:00
ocornut 0850b46c88 ImDrawList: Internals: Added IM_DRAWLIST_ARCFAST_TESSELLATION_MULTIPLIER setting. 2020-03-03 19:26:27 +01:00
ocornut 24bd33ace8 Menus: Some renaming, comments, add to demo. Amend 0342a3c. (#1207) 2020-02-28 16:42:24 +01:00
Rokas Kupstys 0342a3c548 Menus: Implement BeginMenu() appending to existing menu when executed with same ID multiple times. (#1207) 2020-02-28 16:35:33 +01:00
ocornut 898e91f20d Internals: Added TempInputText() to facilitate creation of custom widgets, renamed TempInputTextScalar() to TempInputScalar() etc. (#2718)
+ Minor imgui.h/todo comments
2020-02-25 21:34:02 +01:00
Omar b62f1ea8e9 Fix zealous PVS studio warnings. Minor tweaks. 2020-02-17 16:17:46 +01:00
omar ccaec1a270 Version 1.76 WIP 2020-02-11 16:56:56 +01:00
omar 30bb15672d Remove trailing spaces 2020-02-10 23:22:03 +01:00
omar d16c87a5b1 Internals: Minor renaming 2020-02-10 16:46:51 +01:00
omar 58b3e02b95 Version 1.75
Comments
2020-02-10 14:02:41 +01:00
omar d37d25470a Added IMGUI_DISABLE compile-time definition to make all headers and sources empty. 2020-02-09 17:08:33 +01:00
omar 5a437f198c Internals: GetItemStatusFlags(). Added Comments. 2020-02-02 21:01:22 +01:00
omar 47fab0e166 Misc renaming, comments. Docs: add missing spacing to Changelog. 2020-01-31 14:42:59 +01:00
Rokas Kupstys 9cff4d6e5e Columns: ImDrawList::Channels* functions now work inside columns.
Use a private splitter in columns, paving way for removal of obsolete ImDrawList::Channels* functions.
2020-01-31 12:02:56 +01:00
Konstantin Podsvirov 8cbb693f47 Emscripten: Allow filesystem support. (#3005)
Filesystem functions perfectly work for Emscripten platform. This changes remove extra changes added by #2734.
You can still disable filesystem functions by defining IMGUI_DISABLE_FILE_FUNCTIONS.
2020-01-30 16:26:09 +01:00
omar 6e1f8be07b Window: Fix SetNextWindowBgAlpha(1.0f) failing to override alpha component. (#3007) 2020-01-30 15:13:36 +01:00
omar 0e89041997 Internals: ButtonEx, ButtonBehavior can support multiple mouse buttons. 2020-01-29 18:55:49 +01:00
omar 5f4dfad5b7 Merge misc/shallow changes from Docking to reduce drift.
Most are comments. Fix menu bar clipping: 07ff47bf1b
2020-01-28 20:06:34 +01:00
omar 6c1a73774d Tooltip: Testing DragDropWithinSourceOrTarget in BeginTooltipEx() instead of just BeginTooltip() - feel this was an overlook. Added tooltip flags instead of using bool. 2020-01-27 22:02:43 +01:00
omar 4d4e3b97f4 TODO, Readme
(dropped TreeNode_NoIndent flag from todo, as it feels unnecessary)
2020-01-27 12:37:06 +01:00
omar 5363af7f47 AddCircle, AddCircleFilled: Add auto-calculation of circle segment counts (amends)
Tweak default max error value, Changelog, comments, path-fast for 12 segments circles, made LUT store ImU8
2020-01-23 14:55:05 +01:00
Ben Carter 051ce0765e AddCircle, AddCircleFilled: Add auto-calculation of circle segment counts 2020-01-23 14:52:48 +01:00
omar 2eda3585e7 Fixed hoverable/focus bug introduced in 3fe6ae97 (#2997)
+ ArrowButtonEx() internal bits.
2020-01-22 15:20:49 +01:00
omar 3fe6ae9732 Internals: Move some Nav functions and members around (no functional change) + Misc comments 2020-01-20 18:19:03 +01:00
omar 15c6abe4be Internals: Standard math functions default redirection uses a define instead of an extraneous inline function call 2020-01-20 11:48:17 +01:00
omar 9ad4c5da7e Fix zealous warnings + Internals: Renamed members from XxxxID to XxxxxId to be more consistent with rest of the codebase (still some inconsistency left that are harder to fix) 2020-01-16 23:44:05 +01:00
omar f6d6880a61 Internals: Nav: PushFocusScope, PopFocusScope, GetFocusScopeID() helpers 2020-01-14 20:34:26 +01:00
omar 2ebe08be40 Focus, Nav: Merged bits from RangeSelect features to enable early manipulation of focus scope for styling purpose.
FocusScopeId is tracked by nav scoring/request and stored in result.
It's all rather WIP and we should reorganize the SetNavIDXXX functions fiasco at some point (soon?).
Didn't separate FocusScope from SelectionScope for now, will re-investigate this later, this is the minimum commit to be able to do some styling.
2020-01-14 19:25:20 +01:00
omar e2eb0b4bc4 Internals: Begin tries to setup WindowTemp/DC members in same order as their declaration. Readme: remove Coverity banner (PVS is better) 2020-01-13 16:50:56 +01:00
omar 02c2d18aa3 Internals: Renaming and marking of legacy focus/tabbing system 2020-01-13 15:21:37 +01:00
omar 52334ad8df Internals: Minor ordering/comments of ImGuiWindowTempData. 2020-01-13 15:04:28 +01:00
omar 4b3c5ff5f1 Comments + minor moving 2020-01-11 16:08:17 +01:00
omar 1eb71fc72b ButtonBehavior: Added ImGuiButtonFlags_PressedOnClickReleaseAnywhere behavior (#2971)
Rearranged flags. Added tests in 'widgets_button_press'
2020-01-10 14:34:15 +01:00
omar 1db78b8ca7 Renaming + missing initialization + missing Changelog update. 2020-01-07 21:26:16 +01:00
Rokas Kupstys 32c33c6659 ColorEdit: Preserve last saturation value when V=0. Disable Hue editing lock.
This workaround is no longer necessary because preserving hue value prevents it from resetting when it is edited in said condition.
2020-01-07 21:26:15 +01:00
omar d581939387 Removed trailing spaces. 2020-01-06 15:24:16 +01:00
omar 854fc08194 Amend f70204f2 to facilitate merges. 2019-12-20 16:34:07 +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 10fdc03a46 Clarification about Im helpers + moving GetColorXXX functions outside of that block. 2019-12-17 13:19:36 +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 e42c1e1668 Exposed IMGUI_DEBUG_PARANOID in imconfig.h + using a #define with no value to match other uses in imconfig.h 2019-12-08 16:12:44 +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 e4a59d0025 TabItem: honor ImGuiTabItemFlags_NoCloseButton passed as parameter (although undocumented and part of private api) (#2923) 2019-12-07 16:22:07 +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 abaf0256b8 Version 1.75 WIP
Added message to font file loading assert.
2019-11-28 20:58:16 +01:00
omar a8092085b1 Internal: Added unused parameter named to facilitate cimgui parsing of imgui_internal.h
https://github.com/cimgui/cimgui/issues/108
2019-11-27 14:02:05 +01:00
omar bdce833636 Version 1.74 2019-11-25 18:38:53 +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
omar b205ab01f2 Internals: Added IM_ASSERT_PARANOID, IMGUI_DEBUG_PARANOID define. Shuffled a bit of the macros section in imgui_internal.h 2019-11-22 14:45:44 +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 ca30ef4269 Drag and drop: Increase local payload buffer from 8 to 16 bytes. 2019-11-15 18:36:06 +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 be05e12e21 Misc: Using static_assert() when using C++11, instead of our own construct (avoid zealous Clang warnings). 2019-11-14 18:02:18 +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 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 011d475532 TreeNode: The collapsing arrow accepts click even if modifier keys are being held, facilitating interactions with multi-select patterns. (#2886, #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 09b2310237 Internals: Added index of helpers and shuffled a few things. 2019-11-06 20:37:47 +01:00
omar 4c13807b7d Misc: Optimized storage of window settings data (reducing allocation count). 2019-11-05 22:43:53 +01:00
omar 8fee5a4349 Internals: Renaming for consistency. 2019-10-31 11:15:40 +01:00
stfx 6bf5aed325 Declaration and assignment can be joined, Member function may be 'const'. (#2875) 2019-10-29 17:11:49 +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 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
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 bc165df6fd)
2019-10-18 16:18:38 +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 c7bdec7e18 InputText, Nav: Fixed Left!Right keys broken when activating Keyboard Navigation. (#787) Amend 892dfb1 2019-10-14 22:43:04 +02:00
omar bf746c4215 DragScalar, SliderScalar, InputScalar: Added p_ prefix to parameter that are pointers to the datato clarify how they are used, and more comments redirecting to the demo code. (#2844) 2019-10-11 12:04:28 +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 c262276988 Version 1.74 WIP 2019-09-30 14:27:56 +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 eab03f4467 Selectable: Added ImGuiSelectableFlags_AllowItemOverlap flag in public api (was previously internal only). 2019-09-22 19:03:51 +02:00
omar 38d22bc47d ColorPicker / ColorEdit: restore Hue when zeroing Saturation. (#2722, #2770) - changelog, fixed uninitialized variables, tweaks, renaming. 2019-09-20 15:31:39 +02:00
Rokas Kupstys accb0261b8 ColorPicker / ColorEdit: restore Hue when zeroing Saturation. (#2722, #2770)
Issue is fixed by storing last active color picker color and last hue value when active color picker takes rgb as input. Then if current color picker color matches last active color - hue value will be restored. IDs are not used because ColorEdit4() and ColorWidget4() may call each other in hard-to-predict ways and they both push their own IDs on to the stack. We need hue restoration to happen in entire stack of these widgets if topmost widget used hue restoration. Since these widgets operate on exact same color value - color was chosen as a factor deciding which widgets should restore hue.
2019-09-20 15:31:15 +02:00
omar 74e01e62ce Fixed unused static function warning for some compilers. (#2793) 2019-09-18 13:21:12 +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
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
omar b05f6f6f50 Nav, Scrolling: Added support for Home/End key. (#787) 2019-09-16 19:01:40 +02:00
omar c077dd4872 Fixed missing IMGUI_API for IsMouseDragPastThreshold(). 2019-08-31 19:59:51 +02:00
omar 3f99890f40 TabBar: feed desired width (sum of unclipped tabs width) into layout system to allow for auto-resize. (#2768)
Before 1.71 tab bars fed the sum of current width which created feedback loops in certain situations. Amend f95c77eeea.
2019-08-29 14:57:34 +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 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 f624455d7b Version 1.73 WIP 2019-08-01 10:57:13 -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 6a0d0dab5a Version 1.72b (patch for nav) 2019-07-31 14:31:06 -07:00
omar 27079e68c2 Nav: Made hovering non-MenuItem Selectable not re-assign the source item for keyboard navigation. 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 494d804735 Internal: Added ImGuiInputTextState::ClearText() helper. 2019-07-30 15:02:40 -07:00
omar 9183e7c426 Version 1.73 WIP 2019-07-29 15:54:32 -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 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 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
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 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 ea79992d9a Fixed old SetWindowFontScale() api value from not being inherited by child window. Added comments about the right way to scale your UI (load a font at the right side, rebuild atlas, scale style).
+ Added missing IMGUI_API marker to the EmptyString storage used by ImGuiTextBuffer. (#2672)
2019-07-17 10:01:49 -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 e461e7bc7a Moved ImGuiColumnsFlags erroneously forward declared in imgui.h + demo bit. 2019-07-14 12:29:23 -07:00
omar 2a3517a399 Internals: Checkbox: Added undocumented mixed/indeterminate/tristate support via ImGuiItemFlags_MixedValue. (#2644) 2019-06-30 12:03:09 +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 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 5286ecb8a7 Version 1.72 WIP 2019-06-14 11:58:58 +02:00
omar 2da1c66d15 Version 1.71 + comments 2019-06-12 18:30:06 +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 afa3978ff6 Internals: Added drawlist and color arg to RenderArrow(), RenderBullet(). Reordered args for RenderPixelEllipsis. 2019-06-07 17:32:51 +02:00
omar 32ab0a82d6 imgui-test: Added IMGUI_TEST_ENGINE_LOG macro to emit into test log from core or user land. 2019-06-07 13:46:54 +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 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 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 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 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 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 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 cb7ba60d3f CollapsingHeader: When a close button is enabled, better clip the label to avoid overlap. (#600) 2019-05-28 21:25:28 +02:00