ocornut
7aed4b152b
Tables: improve index, file structure tweaks.
2020-12-04 19:15:26 +01:00
ocornut
a70c6aae9f
Tables: demo synced tables + fix resizing indented synced tables.
2020-12-04 19:15:26 +01:00
ocornut
0c9ab0acdd
Tables: setup and maintain ItemWidth per column.
2020-12-04 19:15:26 +01:00
ocornut
8f126d5d95
Tables: rename ImGuiTableFlags_SizingPolicyStretchX to ImGuiTableFlags_ColumnsWidthStretch, ImGuiTableFlags_SizingPolicyFixedX to ImGuiTableFlags_ColumnsWidthFixed.
2020-12-04 19:15:26 +01:00
ocornut
41f89e0f59
Tables: added ImGuiTableFlags_SameWidths, used in demo. Reordered columns flags and exposed them all in Columns Flags section.
2020-12-04 19:15:26 +01:00
ocornut
3a2f0bfc04
Tables: demo inner_size + scrollx + stretch, added TableGetRowIndex(), renamed _WidthAlwaysAutoResize to _WidthAutoResize.
2020-12-04 19:15:25 +01:00
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.
2020-12-04 19:15:25 +01:00
ocornut
c5dcf2fde1
Tables: rework keep-visible/max-width code to be less incorrect, but right-most column may effectively has few pixels less of visible cliprect width.
...
See table_width_distrib and table_width_keep_visible tests.
+ fix minor left-side clipping on post-frozen column
+ made TableHeader() use reliable column->MaxX
2020-12-04 19:15:25 +01:00
ocornut
52f24df668
Tables: comments, tweaks, added internal TableSetColumnVisible(), merged the two TableSetColumnWidth().
2020-12-04 19:15:25 +01:00
ocornut
bf197c74f6
Tables: storing WorkMaxX, made offset_x == MinX to be clearer, clip rect merge uses ClipRect.max.x directly, removed unused ShrinkWidth code, metrics.
2020-12-04 19:15:25 +01:00
ocornut
5465d30d67
Tables: added ImGuiTableFlags_PreciseStretchWidths.
2020-12-04 19:15:25 +01:00
ocornut
10db896813
Tables: store RawData in a simple void* pointer, rename ContentMinX > WorkMinX, misc tidying up.
...
Removed unnecessary casts when using CheckboxFlags().
2020-12-04 19:15:25 +01:00
ocornut
fe6131168a
Tables: Additionally commentary about clipper in the demo + minor padding tweak.
2020-12-04 19:15:25 +01:00
ocornut
557253e776
Tables: create a separate background draw channel for rows below the frozen line.
2020-12-04 19:15:24 +01:00
ocornut
d9ca3939e1
Tables: Tidy up comments. Replaced some Columns by Tables in demo. Removed ImGuiTableFlags_Scroll (combining ScrollX/ScrollY) because each axis inccur different requirements/constraints.
2020-12-04 19:15:24 +01:00
ocornut
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.
2020-12-04 19:15:24 +01:00
ocornut
77e561aaf3
Tables: Made demo options consistently compact, replaced constants with font-based sizes, added comments on memory allocations.
2020-12-04 19:15:24 +01:00
ocornut
02b27b75a4
Tables: Added ImGuiTableFlags_NoBordersInBody, ImGuiTableFlags_NoBordersInBodyUntilResize, removed ImGuiTableFlags_BordersFullHeightV.
2020-12-04 19:15:24 +01:00
ocornut
172704c079
Tables: Add demo code. Remove dead code + seemingly duplicate border in TableDrawBorders().
2020-12-04 19:15:24 +01:00
ocornut
e66b28693a
Tables: Added ImGuiTableFlags_ContextMenuInBody flag.
...
Worked to get TableOpenContextMenu() in public API but kept it internal.
2020-12-04 19:15:24 +01:00
ocornut
6182973bde
Tables: (Breaking) Rename TableNextCell() to TableNextColumn(), made TableNextRow() NOT enter into first column.
2020-12-04 19:15:24 +01:00
ocornut
9b37087fbe
Tables: (Breaking) Rename TableAutoHeaders() to TableHeadersRow() + added TableGetColumnCount().
2020-12-04 19:15:23 +01:00
ocornut
3021608392
Tables: (Breaking) Add TableSetupScrollFreeze() api, remove ImGuiTableFlags_ScrollFreezeXXX flags, tweak comments, move columns block.
...
Avoid awkwardly named ScrollFreeze flags, raise limit over 3, and will allow for future api maybe freezing bottom/right side.
2020-12-04 19:15:23 +01:00
ocornut
36b2f3b4f1
Tables: renamed ImGuiTableFlags_NoClipX to ImGuiTableFlags_NoClip, clarified purpose, moved lower in the list as it doesn't need to be so prominent.
2020-12-04 19:15:23 +01:00
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
2020-12-04 19:15:23 +01:00
omar
9d8b40414a
Tables: Added TableSetBgColor() api with color for RowBg and CellBg colors.
2020-12-04 19:15:23 +01:00
omar
0847373b98
Tables: Comments on Sizing Policies + Rename border V/H flags HInner -> InnerH + offset every flags by two.
2020-12-04 19:15:23 +01:00
omar
a0e6aa1766
Tables: Fix calculation of auto-fit (remove padding). Demo setting a width in columns setup + ImGuiTableFlags_NoKeepColumnsVisible.
2020-12-04 19:15:22 +01:00
omar
03c8bfaf23
Tables: Removed extra +1.0f pixels initially allocated to make right-most column visible, fix visible padding asymmetry. Tweaked debug code in demo.
...
Seems visible enough without. Whole thing is/was fishy, may return to it but right cleaning up seems viable.
2020-12-04 19:15:22 +01:00
omar
353bb68e90
Tables: Demo custom per-popup popups, demonstrate TableGetHoveredColumn() and ImGuiPopupFlags_NoOpenOverExistingPopup.
2020-12-04 19:15:22 +01:00
omar
745d8cdb49
Tables: Made TableHeader() responsible for opening per-column context menu to move responsibility away from TableAutoHeaders().
2020-12-04 19:15:22 +01:00
omar
363eae94e6
Tables: Further fix #3293 , #3163 + fixed for row unfreezing border not always showing due to unset clip rect.
2020-12-04 19:15:22 +01:00
omar
bc170e7325
Tables: Renamed ResizeWeight->WidthStretchWeight, WidthRequested->WidthFixedRequest, clarififications, comments.
2020-12-04 19:15:21 +01:00
omar
dff26191bd
Tables: Try to report contents width to outer window, generally better auto-fit.
2020-12-04 19:15:21 +01:00
omar
9f43aae226
Tables: Calculating ideal total width, some renaming, comments. Clarify that inner_width is unused with ScrollX=0. Clip many comments to 120 columns.
2020-12-04 19:15:21 +01:00
omar
104b11051f
Tables: Added ImGuiTableColumnFlags_NoReorder.
2020-12-04 19:15:21 +01:00
ocornut
0190b619cf
Tables: Fixed demo layout when clipped. Fixed warnings.
2020-12-04 19:15:20 +01:00
Omar
ae6fc48f60
Tables: Fix sort direction (issue 3023). Remove SortOrder from ImGuiTableSortSpecsColumn. Made sort arrow smaller. Added debug stuff in metrics.
2020-12-04 19:15:20 +01:00
omar
104ec408a8
Tables: Fixed content size calculation creating feedback loops. Fixed handling of _DefaultSort with _PreferSortXXXflags (@parbo). Comments.
2020-12-04 19:15:20 +01:00
omar
f5eee210a0
Tables: TableHeader() uses provided row min header rather than incremental one to allow multi-item multi-line in header cells. Demo TableHeader() - will caveat, comments.
2020-12-04 19:15:20 +01:00
omar
5431cbd3f0
Tables: Honor width/weight passed to TableSetupColumn() after .ini load since we don't actually restore that data currently.
...
Demo: Remove filter from Advanced Table demo since it's breaking with clipping.
2020-12-04 19:15:20 +01:00
omar
0e7b3f2f2f
Tables: Made only first column honor Indent by default (like Columns api) and exposed flags. Added simple Tree demo.
2020-12-04 19:15:20 +01:00
omar
2958e37310
Tables: Storing per-column SkipItems as a shortcut. Comments, Spacings.
...
# Conflicts:
# imgui_internal.h
2020-12-04 19:15:20 +01:00
omar
164caa2db7
Tables: Support for multi-line columns name. Renaming of some fields from BackupXXX to HostXXX. Comments.
2020-12-04 19:15:20 +01:00
omar
416e9bb38d
Tables: Clarify internal calculations of row height so that TableGetCellRect() include expected paddings. Add demo code. Comments.
...
Remove misleading commented-out flags for now.
2020-12-04 19:15:20 +01:00
omar
325b4c69ba
Tables: Moved border colors to the Style (maybe temporarily?) instead of hardcoding them.
2020-12-04 19:15:19 +01:00
omar
17578e215a
Tables: Separating inner/outer borders flags per axis so it is possible to remove outer vertical borders to mimic old columns.
...
VInner or VOuter only don't have correct padding/spacing.
2020-12-04 19:15:19 +01:00
omar
47b39f6371
Tables: Demo: Moved Columns section into Tables & Columns section under a Legacy section.
2020-12-04 19:15:19 +01:00
omar
883c236eda
Tables: Handle columns clipped due to host rect
...
Return false in user functions, set SkipItems in window, redirect to dummy draw channel.
2020-12-04 19:15:19 +01:00
omar
a09954bdaf
Tables: Initial demo code.
2020-12-04 19:15:19 +01:00