ocornut
1ad1429c6d
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
# docs/CHANGELOG.txt
4 years ago
ocornut
04fd5072fb
Fix warnings with VS2019 in C++20 mode ( #4173 )
4 years ago
ocornut
c2bf4abfa1
Internals: Added ImTextCharToUtf8() helper. Added "out_" markers in more UTF-8 functions. Metrics: Fonts: Fixed display of EllipsisChar by feeding proper utf-8.
4 years ago
ocornut
3a941f95e9
Metrics, Demo: moved font details display to metrics code. ( #4171 )
4 years ago
ocornut
e31d13fa76
Version 1.84 WIP
4 years ago
ocornut
1b435ae3e0
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
4 years ago
ocornut
ad5d1a8429
Version 1.83
4 years ago
ocornut
c708299ca9
Docs: Improvements to description of using colored glyphes/emojis. ( #4169 , #3369 ) + Add Fonts to Metrics. Removed IMGUI_HAS_TABLE markers.
4 years ago
ocornut
86c2b609ef
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx10.cpp
# backends/imgui_impl_dx11.cpp
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_glfw.cpp
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
4 years ago
ocornut
26a1bbfe1e
InputText: Fixed CTRL+Arrow or OSX double-click leaking the presence of spaces when ImGuiInputTextFlags_Password is used. ( #4155 , #4156 ) [@michael-swan]
4 years ago
ocornut
41030cbfe2
Tweak computation of io.Framerate so it is less biased toward high-values in the first 120 frames. ( #4138 )
4 years ago
ocornut
4ce6bd8cff
Tables: sharing splitter and sort buffers between tables, reducing memory footprints. ( #3740 )
...
+ GC pass on that data.
4 years ago
ocornut
32c453ae53
Tables: sharing transient buffers between tables, reducing memory footprints. ( #3740 )
4 years ago
Bartosz Taudul
4c9f0cec27
Add and use SSE-enabled ImRsqrt() in place of 1.0f / ImSqrt(). ( #4091 )
...
Squashed 3 commits.
4 years ago
ocornut
84545dbe6f
Disabling some of MSVC most aggressive Debug runtime checks for some simple/low-level functions
...
(e.g. ImVec2, ImVector) leading to a 10-20% increase of performances with MSVC "default" Debug settings.
4 years ago
ocornut
31290807dc
Merge branch 'master' into docking
...
+ fix warning fix for mingw+dx9
# Conflicts:
# backends/imgui_impl_dx9.cpp
# imgui.cpp
4 years ago
ocornut
393941ceea
Refactor focusable/tabbalbe item registration toward allowing to handle it prior to clipping (not yet the case) ( #343 , #4079 )
...
Now performed in ItemAdd(). It can't be trivially moved above clipping effectively because it would require us to scroll to be useful, meaning we'd be better off locking the bounding box a frame earlier. Still wip.
As-is this commit has no value for end-user, but it's a reengineering that moves us closer to the solution. + Internals: moved internal flags.
4 years ago
ocornut
9b90639577
Internals: ItemFlags is a shared resource as advertised. Fix Begin/PushItemFlags/End sequence (mostly for consistency)
4 years ago
ocornut
10a1c5b021
TestEngine: fixed wrong flags passed to ItemInfo queries. Was luckily/misleadingly not causing issues as the test-engine flags we tested were upper bits not colliding with the other type.
...
Moved those flags higher as well. (unrelated to the fix itself)
4 years ago
ocornut
788e91aece
Fixes for MSVC static analyzers (wider range of versions). ( #3938 , #4073 ) + warning fix ( #4089 ) + comments.
4 years ago
ocornut
89162a04f4
Fixes for PVS Studio and MSVC static analyzers. Using a macro to suppress single-use MSVC false positives. ( #3938 , #4073 )
4 years ago
ocornut
d28535f351
Fixes for Visual Studio 2019 static analyzers. ( #3938 , #4073 ) + two minor edge case were invalid scalar input (e.g. a sign only) would return buffer as modified.
4 years ago
ocornut
daf97832f1
Internals: Nav: renaming.
4 years ago
ocornut
33cdbe97b8
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
4 years ago
ocornut
936f53229d
Internals: maintaining focus order inside windows + only storing root windows in WindowsFocusOrder[] array. (toward #2304 )
4 years ago
ocornut
34d4bc620d
Merge remote-tracking branch 'origin/master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
4 years ago
thedmd
690a90bd35
Make PathArcTo accept counter-clockwise angles ( #4030 , #3491 )
4 years ago
ocornut
7c9c5dbe9a
Internals: Added ImFloorSigned() + use our own ImFloorSigned() for stb_truetype, compared as matching output for variety of font data. ( #2884 )
4 years ago
ocornut
e5efa01920
Docking: Fix window menu button. Broken by 3f16a52
( #4043 )
...
Worked on single-frame click.
4 years ago
ocornut
3f16a524c8
Docking: move NavWindow to SelectedTabId application lower to leave a chance for in-between code to alter focus. + store per-node window menu button id to simplify usage.
4 years ago
Doug Binks
f08566b4d7
InputText: Do not filter private unicode codepoints (e.g. icons) when pasted from clipboard. ( #4005 )
4 years ago
ocornut
6ddcdbe3e8
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_widgets.cpp
4 years ago
ocornut
3c7177c6a7
Internals: storing WindowsHoverPadding in context for external access. + Docs update binaries
4 years ago
ocornut
45c45d2506
Internals: shallow tidying up of the old resize border structure. Make them match the ImGuiDir order. Split GetWindowResizeID() into GetWindowResizeCornerID() and GetWindowResizeBorderID().
4 years ago
ocornut
b79b1cb9c0
TabBar: Amend previous commit. Fix tab reordering when tab bar has scrolling.
...
Some tidying up with helpers + honor 16-bit offsets as with other tab bar features (unlikely single reorder can reach that but consistent)
4 years ago
ocornut
688e06490e
TabBar: Amend previous commit. Fix tab reordering when tab bar has scrolling.
...
Some tidying up with helpers + honor 16-bit offsets as with other tab bar features (unlikely single reorder can reach that but consistent)
4 years ago
Rokas Kupstys
d7051928d9
TabBar: Use mouse position instead of hardcoded +1/-1 offset when reordering tabs.
...
Fixes tab reordering in test engine when using fast mode.
# Conflicts:
# imgui_widgets.cpp
4 years ago
Rokas Kupstys
475c0fcc39
TabBar: Use mouse position instead of hardcoded +1/-1 offset when reordering tabs.
...
Fixes tab reordering in test engine when using fast mode.
4 years ago
ocornut
e7577d570e
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_sdl.cpp
# backends/imgui_impl_win32.cpp
# imgui.cpp
# imgui_internal.h
# imgui_widgets.cpp
4 years ago
ocornut
a58271c079
Internals: extracted a more reusable BeginViewportSideBar() out of BeginMainMenuBar(). ( #3966 , #3518 )
...
Complement ca34c81c
in docking branch which removed assumption that we can't tell size ahead of Begin().
4 years ago
ocornut
ca34c81ce9
BeginMainMenuBar(): remove expectation that we don't know menu bar height ahead, allowing up to generalize placement in any direction (will be done in master)
...
Amend 75de34e281
4 years ago
ocornut
aa5431fde2
Tables: Expose TableSetColumnEnabled() in public api. ( #3935 )
4 years ago
Rokas Kupstys
0c5b0c8b97
Internals: Add a way to request window to not process any interactions for specified number of frames.
4 years ago
ocornut
81e0b18e38
Merge branch 'master' into docking
4 years ago
ocornut
a1a39c632a
Version 1.83 WIP
4 years ago
ocornut
256594575d
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
4 years ago
ocornut
35b1148efb
Version 1.82
4 years ago
ocornut
352f64697c
Internals: rename legagy tab focus fields to TabFocusXXXX for clarity + removed one unnecessary FocusWindow() call.
4 years ago
ocornut
f1bf642e8f
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
# misc/debuggers/imgui.natvis
4 years ago
Rokas Kupstys
c2d6d26139
ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
4 years ago
thedmd
e45847d99a
Add version of PathArcTo() and PathArcToFast() with adaptive rendering quality. ( #3491 )
4 years ago
ocornut
4b9bc49020
Viewports, Internals: added GetViewportPlatformMonitor() will a safety net to keep code portable + simplified handling of disconnected monitor in Begin().
4 years ago
ocornut
6ba1334903
Nav: internals: renaming ImGuiInputSource so it is not specific to nav. Comments.
4 years ago
ocornut
a64e0eb3a4
Nav: merged SetNavID() and SetNavIDWithRectRel() to improve sanity, moved flags overwrite off them. ( #787 )
4 years ago
ocornut
954b06afe2
Drag and Drop: can use BeginDragDropSource() for other than the left mouse button ( #1637 , #3885 )
...
As long as the item has an ID (for ID-less items will add new functionalities later.
Amend 2c3c5125
4 years ago
ocornut
d5a4d53000
Viewports, Backend: SDL: Fix missing ImGuiBackendFlags_HasSetMousePos flag in docking branch (ok in master), GLFW: Fix application of WantSetMousePos. ( #1542 , #787 )
...
Shows how little this feature is used with nav (was designed for small devices and frankly may be dropped) - but the backend support itself we will make use of for other features.
4 years ago
ocornut
705f082674
Internals: rename RootWindow->RootWindowDockTree, RootWindowDockStop->RootWindow.
...
Why? So by default RootWindow matches user expectation on both branches, and RootWindowDockTree is more intentful.
(Actually should reduce diff between master<>docking)
4 years ago
ocornut
80533ea5e1
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_widgets.cpp
4 years ago
ocornut
fdebb2e093
Internals: removed HoveredRootWindow, tweak IsWindowHovered().
4 years ago
ocornut
ee643b2ad9
IsItemHovered(): fixed return value false positive when used after EndChild(), EndGroup() or widgets using either... ( #3851 , #1370 )
...
...when the hovered location is located within a child window, e.g. InputTextMultiline().
This is intended to have no side effects, but brace yourself for the possible comeback..
This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
More or less should fix/revert c76f014292
which was a revert of 344d48be3
4 years ago
ocornut
d8c88bd943
Tables: Fixed unaligned accesses when using TableSetBgColor(ImGuiTableBgTarget_CellBg). ( #3872 )
...
ImSpanAllocator: Support for alignment.
4 years ago
ocornut
6aee4bcdc5
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# imgui.cpp
4 years ago
ocornut
23ab4978e4
ImFontAtlas: Added 'bool TexPixelsUseColors' output to help backend decide of underlying texture format. ( #3369 , #3844 )
4 years ago
David Maas
732cd837a9
Added missing IMGUI_API to internal docking-related structs. ( #3850 )
4 years ago
Rokas Kupstys
839ecce571
Internals: Add a way to request window to not process any interactions for specified number of frames.
4 years ago
ocornut
3776ba565f
Internals: TabBar: minor tweaks and renaming.
4 years ago
ocornut
a8f76c23a4
Window: Shrink close button hit-testing region when it covers an abnormally high portion of the window visible area (e.g. when window is collapsed and moved in a corner)to facilitate moving the window away. ( #3825 )
4 years ago
ocornut
ffa863a3ba
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx10.cpp
# backends/imgui_impl_dx11.cpp
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# examples/example_glfw_vulkan/main.cpp
# examples/example_sdl_vulkan/main.cpp
# imgui.cpp
4 years ago
ocornut
fb15d8c858
Improve on automatic circle segment count calculation. ( #3808 ) Amends
4 years ago
thedmd
f107693d9b
Improve on automatic circle segment count calculation. ( #3808 )
4 years ago
ocornut
b47aa46d81
Tables: TableSetupColumn() user id uses ImGuiID as intended (typedef ImU32). internals: added GetCurrentTable(), LeftMostEnabledColumn. Demo/docs tweaks.
4 years ago
ocornut
30b7545841
Version 1.82 WIP
4 years ago
ocornut
3d75f438bc
Docking: Made close button enable logic consistent on dockspace. When no docked window have a close button or it is disabled on the node, the space is given to tabs.
...
Clarified close_button_is_visible vs close_button_is_enabled behavior in DockNodeUpdateTabBar().. (#3633 , #3521 )
Reduced alpha of disabled close button a little bit further.
Removed 'EnableCloseButton' which was actually unused (can't be infered early, need ->VisibleWindow anyway, which is not == ->ActiveWindow)
4 years ago
ocornut
239d09804d
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
4 years ago
ocornut
4df57136e9
Version 1.81
4 years ago
ocornut
ee59d7a266
Merge branch 'features/viewport_in_master' into docking (WIP need adding code for new ImGuiViewportFlags values)
...
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_demo.cpp
# imgui_internal.h
# imgui_widgets.cpp
4 years ago
ocornut
f14042ca78
Viewports Added ImGui::GetMainViewport() as a way to get the bounds and work area of the host display. ( #3789 , #1542 )
...
Viewports: Backport a few constructs from 'docking' branch.
Viewports: Added ImGuiViewportFlags_IsPlatformWindow, ImGuiViewportFlags_IsPlatformMonitor, ImGuiViewportFlags_OwnedByApp (none of them were in docking branch yet). ImGuiViewportFlags_IsPlatformMonitor is merely there to convey future intent, not yet used.
Reduce uses of io.DisplaySize.
MainMenuBar: Backport work area handling code from 'docking' branch.
Metrics: Backported "Viewports" debug visualizer from 'docking' branch.
Demo: Rework 'Examples->Fullscreen Window'.
Demo: 'Simple Overlay' demo now moves under main menu-bar (if any) using GetMainViewport()'s work area.
4 years ago
ocornut
3607c42bec
Viewports: Fix issue inferring viewport z-order when new popups gets created. ( #3734 ) + Metrics updates.
...
Revert 6bc52667
Showing inferred order and missing flags in metrics.
4 years ago
ocornut
2a5eaf239f
Misc tweaks - mostly toward minimizing diff in upcoming backport merge of a few viewport structures in master
4 years ago
ocornut
6f5f80a544
Fix for compiling imgui_internal.h without operators + made GetWorkRect() consistent with clamped WorkSize.
4 years ago
ocornut
7a516a266d
Merge remote-tracking branch 'origin/master' into docking
...
# Conflicts:
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# imgui.cpp
# imgui.h
4 years ago
ocornut
73ccb7e4b8
Viewports: (Breaking) turned GetWorkPos(), GetWorkSize() into straight fields -> WorkPos, WorkSize before exposing in master branch.
4 years ago
ocornut
1a3af8cb4c
Viewports: trying to treat GetMainViewport() as const. Reducing unnecessary casts of ImGuiViewportP*
...
Metrics: readded root Drawlists node in metrics to match master.
The (void*) casts are implying const-casst but currently left GetMainViewport() as returning non-const.
4 years ago
freddii
90a518c501
Fixed typos ( #3782 )
4 years ago
ocornut
929563c3a7
Log/Capture: Fixes for handling \n in strings. Improve the look of various widgets. Added LogSetNextTextDecoration helper. Fixup/amend dbaf74d75
.
...
For now removed LogRenderedTextNewLine() - it is eventually desirable but currently carries too much ambiguities, so reverted until we have a better system and test suite.
4 years ago
Louis Schnellbach
dbaf74d758
Log/Capture: Fix various new line/spacing issue by using same render text position when there are both RenderText and LogRenderedText call in widget code.
...
Also Buttons are now enclosed in bracket
4 years ago
ocornut
9d576a96a5
Tables: added internal TableSetColumnEnabled() helper. Comments.
4 years ago
ocornut
24be26e00e
imgui_freetype: Add support for colored glyphs. Font: add support for untinted glyphs ( #3369 )
...
Amend 9499afd
with missing static inline.
4 years ago
ocornut
577e7cb493
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_win32.cpp
# docs/CHANGELOG.txt
# imgui.cpp
4 years ago
ocornut
9499afdf5e
imgui_freetype: clarify breaking changes, and add BuildFontAtlas() to be consistent with planned obsolescence. Rename mislabelled internal helper. Demo: clarify labels in nested table demo. ( #3765 )
4 years ago
ocornut
e28b51786e
Tables: Fixed PopItemWidth() or multi-components items not restoring per-colum ItemWidth correctly. ( #3760 ) rework local stacks to facilitate modifying current value without altering the stack.
...
May consider doing the same for ItemFlags and moving to g.ItemFlags...
4 years ago
ocornut
3867c6c5f0
Fonts: (Breaking) Rename ImGuiFreeType:: flags to ImGuiFreeTypeBuilderFlags_XXX. Remove ImGuiFreeType::BuildFontAtlas() flags. Rename ImFontConfig::RasterizerFlags to FontBuilderFlags. Add ImFontBuilderIO (opaque). Amend 53d59f3 with a dozen of small fixes.
4 years ago
Louis Schnellbach
9417acc20f
Fonts: if IMGUI_ENABLE_FREETYPE, use library by default for font rasterization
...
Also renamed IMGUI_DISABLE_STB_TRUETYPE to IMGUI_ENABLE_STB_TRUETYPE
4 years ago
ocornut
a8d2d8ee97
Fixed uninitialized variable, amend f3f2578
. ( #3753 )
4 years ago
Sammy Fatnassi
f3f2578e8f
Internals: Added context hook removal support ( #3580 , #3626 , #3753 )
4 years ago
ocornut
2ed47e5822
Version 1.81 WIP
4 years ago
ocornut
f144c67676
ImDrawList: fixed AddCircle, AddCircleFilled buffer read overflow with (rad > 0.0f && rad < 1.0f && num_segments == 0). ( #3738 )
...
Amend 051ce076
. Maximum cached count becomes 63 instead of 64.
4 years ago
ocornut
bb26751b94
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
4 years ago
ocornut
58075c4414
Version 1.80
4 years ago
ocornut
5178c3ce21
Tables: added ImGuiTableFlags_NoHostExtendX instead of using outer_size.x == 0.0f. Changed default outer_size to (0.0f, 0.0f). ( #3605 )
4 years ago
ocornut
3b409d2b68
BeginChild: half-fixed child window name longer than 255 conflicting, merely raised the limit by using our shared large buffer. Comments.
4 years ago
thedmd
f379dc28a3
ImBitArray: Rename ClearBits() to ClearAllBits() and add SetAllBits(). ImBitArraySetBitRange work on range [n..n2) instead of [n..n2]
4 years ago
ocornut
3fef132f62
Tables: Clear scroll value when reactivating scroll. Assert when passing width/weight to TableSetupColumn() without an explicit sizing policy at either table or column label.
...
Clearing scroll was initially made desirable by tests exhibiting side effects but generally feels saner.
table->UserOuterSize is poorly used in this commit but will be by subsequent commits.
4 years ago
ocornut
ebbb98d519
Docking: docked window honor tab and text colors by storing them. ( #2771 )
...
Later to lead into #2700 and #2539
Move tab submission block above in DockNodeUpdateTabBar(), not strictly necessary for this change as is, but useful if needing to apply override for TitleBg* as we'd need a value for node->VisibleWindow earlier than currently set.
4 years ago
ocornut
9e4956d86b
Docking: added comments. added experimental TabItemFlagsOverrideSet to ImGuiWindowClass.
...
(Could probably do something similar with TabBarFlagsOverrideSet+Clear for #2700 later.)
4 years ago
ocornut
6af92b05bf
Internals: Layout: maintain two content sizes, optionally writing to IdealMaxPos to distinguish used from ideal size, later is used for auto-fit. Unused in this commit, should be no-op. ( #3414 )
...
# Conflicts:
# imgui.cpp
4 years ago
ocornut
388ca563db
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx12.cpp
4 years ago
ocornut
3edfc042ff
Tables: Internals: Renaming, tweaks preparing ahead for trickier changes (should be all no-op).
4 years ago
ocornut
36535514d5
Backends: DX12: Fix warning ( #3706 ). Disable obsolete Tables enums, leave them commented out. Using _MSVC_LANG to enable offsetof() and static_assert() on VS2015.3+
4 years ago
ocornut
70703da782
Merge branch 'master' into docking
4 years ago
ocornut
e18abe3619
Tables: (Breaking) Added ImGuiTableFlags_SizingFixedSame, ImGuiTableFlags_SizingStretchProp. Removed ImGuiTableFlags_SameWidths.
...
Simplified some code and clariffied that currently non-resizable = always revert to default (while waiting to untangle Fixed vs Auto and programmatic override not going through TableSetupColumn)
Whereas ImGuiTableFlags_SameWidths has some unusual handling of mixed Fixed/Stretch columns, we know treat them separately.
4 years ago
ocornut
0e3ba37e6d
Tables: Tidying up. Shuffle some columns fields to facilitate debugging + comments + demo tweaks + metrics highlight.
4 years ago
ocornut
b11518d7d7
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
4 years ago
ocornut
9bcf77eb81
Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). ( #2034 ) + fix some PVS warnings, fix typo, blanks.
...
Amend e28b1078
4 years ago
ocornut
0a5f399805
Tables: Fix hiding column right after the frozen line. Fix hovering/resising column delimiter scrolled under frozen columns. ( #3678 )
4 years ago
ocornut
1c1d3b7ab5
Added 64-bit variants of CheckboxFlags() in imgui_internal.h. Improve assert on mismatched ListBoxFooter() call. Fix FAQ index. ( #3687 )
4 years ago
ocornut
fa963b9aaf
Inputs: Internal: added SetItemUsingMouseWheel() and mechanism to request mouse wheel for both HoveredId and ActiveId. ( #2891 )
...
Based on @kudaba PR.
4 years ago
ocornut
68faa16e1d
Tables: report auto-fit width in EndTable(), extracted TableGetColumnWidthAuto(). fix minor flickering with IsPreserveWidthAuto (which is a debug feature still), moved some code.
4 years ago
ocornut
7b53551032
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
4 years ago
ocornut
972ca8166f
Tables: extracted code for TableGetMaxColumnWidth(), fixing "stuck" resize being lossy as it used an older calculation for it and didn't honor e.g. _NoKeepColumnsVisible
4 years ago
ocornut
4d8e839ddf
Renamed ImDrawList::AddBezierCurve() to ImDrawList::AddBezierCubic(), ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). ( #3127 , #3664 , #3665 )
...
Renamed corresponding internal functions as well.
4 years ago
ocornut
550bfcfc59
Amend defce31
Add ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() ( #3127 , #3664 , #3665 )
4 years ago
ocornut
532aa5a69b
Tables: (breaking) change outer_size.x default value to -FLT_MIN, make outer_size.x == 0.0f act as ImGuiTableFlags_NoHostExtendX ( #3605 , ad83976b
) when no scrolling and no stretch column. Which is more consistent.
...
Demo: moved "Compact table" to "Padding" section, makes more sense. Tweaked demo.
4 years ago
ocornut
22ace4438c
Tables: clarify assumption that rendering of bg/borders in bg0/bg1 are cpu-clipped allowing frozen/unfrozen to share drawcmd + remove offset on outer borders of scrolling tables.
4 years ago
ocornut
30468829c2
Tables: Internal: Maintain InnerRect to further clarify some code. Renamed Bg1 fields to Bg2 (used by Selectable) as the other handles Bg0+Bg1.
4 years ago
ocornut
ad83976b35
Tables: Added ImGuiTableFlags_NoHostExtendX ( #3605 ) marked as WIP, will probably rename.
...
Moved some code from BeginTable() to TableUpdateLayout() to late latch some of the required data.
4 years ago
ocornut
892b48e2d6
Tables: Lock contents width while resizing down an horizontal scrolling table. Headers declare ideal width regardless of clipping. Misc comments.
4 years ago
ocornut
bd899efbd0
Tables: fixed "resize to default" of multiple stretch column (added 3b3503e
, broken 7a61f340
).
...
Fixed a warning.
Storing RightMostStretchedColumn column for resizing code.
Avoid clearing RightMostEnabledColumn in BeginTable() so resizing code can potentially use it.
(Added regression tests for resize all to default imgui_dev)
4 years ago
ocornut
06e87014f2
Merge branch 'master' into docking
...
# Conflicts:
# imgui.h
# imgui_internal.h
4 years ago
ocornut
738606a294
Tables: added ImGuiTableFlags_SortTristate. Renamed ImGuiTableFlags_MultiSortable to ImGuiTableFlags_SortMulti. Removed now unused FlagsIn storage.
4 years ago
ocornut
bff1836922
Internals: added facility to hide windows from render without interfering with the HiddenFramesCanSkipItems/HiddenFramesCannotSkipItems fields which have effects on layout. Compact some fields.
...
Ideally we'd have a simpler system but it's not easy to make the capture system change to hook at the right spot. Will rework.
4 years ago
ocornut
1ad5502f18
Tables: Closer to zero-clear constructor. Lazily clearing name offsets to avoid an iteration in BeginTable(). Removed unused TableSetColumnIsEnabled(), signature went faulty anyway.
4 years ago
ocornut
e6b875c09b
Tables: Ditch old columns flags/setting if not called again. Displaying right-most border when using _SameWidths. Moving Width-related functions to their own section.
...
Effectively removed the TableFixColumnFlags() in first loop of TableUpdateLayout() to replace it with similar one but only when column not declared. I think this should be the right thing.
4 years ago
ocornut
17536f9add
Tables: more consistent use of CellPadding.x*2 and clip-rect on right-most side of non-bordered column + fix cellbg for standalone TableHeader call.
...
Using CellPadding.x on both sides when BorderV is off, generally most consistent and with default value (4,2) promotes at-glance visible spacing between non-bordered columns. Effectively double horizontal padding on non-bordered columns.
Made ClipRect.Max.x matches WorkMaxX which is where we'd like to go for windows themselves.
TableHeader() submit single cell bg color if not already submitted as a full header row.
Misc comments/docs updates.
4 years ago
ocornut
dd4ca70b0d
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_win32.cpp
# imgui.cpp
# imgui_demo.cpp
4 years ago
ocornut
0b14dd9e55
Tables: fixed propagation of line height from outside the table. Added outer-width demo.
4 years ago
ocornut
6e38026627
Tables: changelog. removed TableGetHoveredColumn() from public API in favor of using TableGetColumnFlags(). renamed ImGuiTableSortSpecsColumn to ImGuiTableColumnSortSpecs.
4 years ago
ocornut
7a61f3407b
Tables: support internal TableResetSettings(), clarify lifetime, fixed missing auto-fit on column unhidden after first run, fixed resize assert when changing column sizing policy to stretch mid-frame (before of -1.0f weight)
4 years ago
ocornut
b194df413c
Tables: exposed status flags via TableGetColumnFlags(), removed TableGetColumnIsSorted()
...
Scoped width auto calc.
4 years ago
ocornut
984c4cb5f8
Tables: distinguishing per-column IsVisible from IsRequestOutput which is returned to user. Clarified clipping rules/requirements. Comments.
4 years ago
ocornut
f70bf69e3b
Tables: comments and tweaks on TableUpdateLayout(). changed "apply final width" loop to use natural column order.
4 years ago
ocornut
155b8bb816
Tables: Shared menu item id for "Size all" variations. Avoid allocation on single sort specs. Fix TableGetColumnIsEnabled(). Massage TableHeaderRows().
4 years ago
ocornut
e126a64782
Tables: using a typedef in internal code to specify column/draw channel index storage.
4 years ago
ocornut
6aa8388e9f
Tables: index tweaks, fixed some inconsistent spacings.
4 years ago
ocornut
5180025de5
Tables: moved + renamed TableSetupDrawChannels(), TableMergeDrawChannels() to their own section.
4 years ago
ocornut
b7c83e4bac
Tables: moved TableGetSortSpecs(), TableGetColumnIsSorted(), TableFixColumnSortDirection(), TableSetColumnSortDirection() to their own section.
4 years ago
ocornut
082f1d10d0
Tables: renamed TableBeginUpdateColumns to TableBeginApplyRequests, moved code to TableUpdateLayout, in order to ensure that enable state is not inconsistent due to TableSetupColumn column hiding requests.
...
All the fields moved from TableBeginUpdateColumns to TableUpdateLayout are not used before.
4 years ago
ocornut
79c9eaa78e
Tables: Internals: renamed Visible to Enabled to avoid confusion with visibility checks.
4 years ago
ocornut
5ef7b831c2
Tables: removed ImGuiTableSortSpecs::ColumnsMask because it needlessly exposes our 64-columns limitation which we'd eventually would like to lift
...
+ shuffle declarations in internals
4 years ago
ocornut
e09454aec4
Tables: removed TableGetColumnIsVisible from public api, re-specced as TableGetColumnIsHidden() returning same flag as setter, clipper increase CurrentRow.
4 years ago
ocornut
0c9ab0acdd
Tables: setup and maintain ItemWidth per column.
4 years ago
ocornut
3b3503e60f
Tables: decent support for auto-resize of stretch columns (trickier than it sounds)
...
Four cases:
1. visible columns are all stretch, resize all : "size all to default" reset to default weight
2. visible columns are all stretch, resize one: "size one to fit" set weight, reapply weight (todo: improve weight redistribution in case of >1 siblings)
3. visible columns are mixed, resize all: "size all to fit/default" reset stretchs to default weight, set fixed to auto width
4. visible columns are mixed, resize one: "size one to fit", redistribute weight the same way as a manual resize
+ TableSetupColumn() more consistently clear AutoFitQueue.
+ zero-clear RowCellData buffer.
4 years ago
ocornut
197e9c085b
Tables: separate bg0 and bg1 draw channels, selectable above bg color + will facilitate drawing of borders in EndTable().
...
+ unused code to strip out dummy draw channel calls.
4 years ago
ocornut
52f24df668
Tables: comments, tweaks, added internal TableSetColumnVisible(), merged the two TableSetColumnWidth().
4 years ago
ocornut
bf197c74f6
Tables: storing WorkMaxX, made offset_x == MinX to be clearer, clip rect merge uses ClipRect.max.x directly, removed unused ShrinkWidth code, metrics.
4 years ago
ocornut
10db896813
Tables: store RawData in a simple void* pointer, rename ContentMinX > WorkMinX, misc tidying up.
...
Removed unnecessary casts when using CheckboxFlags().
4 years ago
ocornut
82cf41d804
Tables: tooltip on clipped TableHeader() (amended)
4 years ago
ocornut
507db499e4
Tables: work on background draw channel handling (amend "create a separate background draw channel") + Selectable disable spacing when spanning.
4 years ago
ocornut
fe6131168a
Tables: Additionally commentary about clipper in the demo + minor padding tweak.
4 years ago
ocornut
24a7c45b02
Tables: Fix for 64 columns (maximum of 131 temporary draw channels).
4 years ago
ocornut
e5a5256971
Tables: Garbage collection to relieve draw splitter buffers + for test engine: compact settings, remove table.
4 years ago
ocornut
f80097ca96
Tables: Fix applying WorkRect in non-scrolling tables. Fix inverted BackgroundClipRect being passed to ImDrawCmd.
4 years ago
ocornut
557253e776
Tables: create a separate background draw channel for rows below the frozen line.
4 years ago
ocornut
d3222086f0
Tables: Moved TableSetupScrollFreeze(), TableUpdateDrawChannels() lower in more adequate spots.
...
+ rename IsFreezeRowsPassed to IsUnfrozen.
4 years ago
ocornut
51abdd53e3
Tables: renamed somehow-duplicate ContentWidth members (implicitly == Max - Min), renamed StartX to ContentMinX for consistency.
4 years ago
ocornut
1731ae5a09
Tables: Reworked padding/spacing/width.
...
All widths are stored without padding.
Decorelate padding from presence of border.
Added ImGuiTableFlags_Pad/NoPad flags.
Added demo.
Merge StartXHeaders and StartXRows into StartX.
Distinguish CellSpacingX1 and CellSpacingX2 for clarity and to avoid loss of width on non-even spacing values.
4 years ago
ocornut
ac5b1648e6
Tables: Various internal renaming + merge StartXHeaders/StartXRows into StartX.
4 years ago
ocornut
2ee20fdb7c
Tables: Frozen rows/columns in nav menu layer, fixed conflict between column id and holding child id.
4 years ago
ocornut
e66b28693a
Tables: Added ImGuiTableFlags_ContextMenuInBody flag.
...
Worked to get TableOpenContextMenu() in public API but kept it internal.
4 years ago
ocornut
cc12ea084b
Tables: Added TableSetColumnSortDirection() + added in default context menu code (disabled, feels unnecessary, but work is done to ensure programmatic access)
4 years ago
omar
8ec05fc034
Tables: Fixed holding on table pointers accross resize/invalidation of the pool buffer.
4 years ago
omar
931829f701
Tables: (Breaking change) Sorting: Made it users responsability to clear SpecsDirty back to false, so TableGetSortSpecs() doesn't have side-effect any more. + comments
4 years ago
omar
8e97cdf8e8
Tables: Fix for calling TableSetBgColor(ImGuiTableBgTarget_CellBg) multiple times on the same cell.
4 years ago
ocornut
45a80716b1
Tables: Fixed three bugs + metrics tweaks.
...
- Fixed bug when ending a table within another (outer table column offset was overwritten instead of restored).
- Fixed assert when settings data has mismatching column count.
- Fixed restoring g.CurrentTable when calling EndChild() from inside table inner window.
- Made inactive tables grey in metrics.
- Fix warning.
(amended twice)
4 years ago
omar
eb18636e02
Tables: Fix settings not being saved in child window (issue 3367) + fix for change in master.
4 years ago
omar
9d8b40414a
Tables: Added TableSetBgColor() api with color for RowBg and CellBg colors.
4 years ago
omar
0847373b98
Tables: Comments on Sizing Policies + Rename border V/H flags HInner -> InnerH + offset every flags by two.
4 years ago
omar
c96c84b6dc
Tables: Store submitted column width and avoid saving default default widths.
4 years ago
ocornut
798aed729a
Tables: Added TableGetHoveredColumn(), extracted some context menu code out, simplifying TableAutoHeaders() toward aim of it being a user-land function.
4 years ago
ocornut
4c4882ffe4
Tables: Fixed channel merge when resizing columns with headers. Disable unnecessary and broken merge when using _NoClipX.
4 years ago
omar
363eae94e6
Tables: Further fix #3293 , #3163 + fixed for row unfreezing border not always showing due to unset clip rect.
4 years ago
ocornut
58411f27cb
Tables: Avoid TableGetSortSpecs() having a side-effect on sort specs sanitization.
4 years ago
ocornut
af992d1321
Tables: Tweak settings functions to more prominently clarify the two levels of function.
4 years ago
omar
fec9d7d226
Tables: Rescale fixed widths when font size change to support varying dpi scale at runtime and on .ini reload.
4 years ago
omar
6bc0bbccf3
Tables: Restore width/weight saving/loading code. Non-weighted width currently not font/DPI change friendly.
4 years ago
omar
af52a0cea2
Tables: Resizing weighted column preserve sum of weights. Fix ResizedColumn init leading to undesirable TableSetColumnWidth() on first run. Rework TableSettingsHandler_ReadLine() structure to allow other types of line.
4 years ago
omar
bc170e7325
Tables: Renamed ResizeWeight->WidthStretchWeight, WidthRequested->WidthFixedRequest, clarififications, comments.
4 years ago
omar
23c60b2814
Tables: Renamed internal fields: Active->Visible, Visible->VisibleUnclipped to be less misleading.
4 years ago
omar
dff26191bd
Tables: Try to report contents width to outer window, generally better auto-fit.
4 years ago
omar
95c273618e
Tables: Allow hot-reload of settings (merge policy), tidying up settings code
4 years ago
omar
9b6d0fdb7a
Tables: Fixed ignoring DefaultHide or DefaultSort data from flags when loading settings that don't have them.
4 years ago
omar
9f43aae226
Tables: Calculating ideal total width, some renaming, comments. Clarify that inner_width is unused with ScrollX=0. Clip many comments to 120 columns.
4 years ago
omar
b7ff85d9ad
Tables: Browse settings list in Metrics (outside of Table entry).
4 years ago
omar
8eb1c925f0
Tables: Internals: Added FindTableByID(), removing trailing spaces.
...
# Conflicts:
# imgui_internal.h
4 years ago
omar
e60b5a3f75
Tables: Internals: Added TableGetColumnResizeID(), renamed InstanceNo > InstanceCurrent.
4 years ago
omar
104b11051f
Tables: Added ImGuiTableColumnFlags_NoReorder.
4 years ago
omar
b7fa96679e
Tables: Locking IndentX per-row so multiple columns with IndentEnabled don't get indent shearing.
4 years ago
omar
5ffc9e0846
Tables: Renaming Table's DisplayOrder[] -> DisplayOrderToIndex[], Columns's IndexDisplayOrder -> DisplayOrder
4 years ago
omar
a956629b40
Tables: Using same allocation for our Columns and DisplayOrder array. Mostly designed to facilitate adding new arrays.
4 years ago
omar
6dff061309
Internals: added ImSpanAllocator<> helper.
4 years ago