public final class ImGuiTableFlags
extends java.lang.Object
->
all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
- Columns sizing policy allowed: Stretch (default), Fixed/Auto.
- Fixed Columns will generally obtain their requested width (unless the table cannot fit them all).
- Stretch Columns will share the remaining width.
- Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
(this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
- When ScrollX is on:
- Table defaults to SizingFixedFit ->
all Columns defaults to ImGuiTableColumnFlags_WidthFixed
- Columns sizing policy allowed: Fixed/Auto mostly.
- Fixed Columns can be enlarged as needed. Table will show an horizontal scrollbar if needed.
- When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop.
- Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again.
- Read on documentation at the top of imgui_tables.cpp for details.Modifier and Type | Field and Description |
---|---|
static int |
Borders
Draw all borders.
|
static int |
BordersH
Draw horizontal borders.
|
static int |
BordersInner
Draw inner borders.
|
static int |
BordersInnerH
Draw horizontal borders between rows.
|
static int |
BordersInnerV
Draw vertical borders between columns.
|
static int |
BordersOuter
Draw outer borders.
|
static int |
BordersOuterH
Draw horizontal borders at the top and bottom.
|
static int |
BordersOuterV
Draw vertical borders on the left and right sides.
|
static int |
BordersV
Draw vertical borders.
|
static int |
ContextMenuInBody
Right-click on columns body/contents will display table context menu.
|
static int |
Hideable
Enable hiding/disabling columns in context menu.
|
static int |
NoBordersInBody
[ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers).
|
static int |
NoBordersInBodyUntilResize
[ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers).
|
static int |
NoClip
Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns).
|
static int |
NoHostExtendX
Make outer width auto-fit to columns, overriding outer_size.x value.
|
static int |
NoHostExtendY
Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit).
|
static int |
NoKeepColumnsVisible
Disable keeping column always minimally visible when ScrollX is off and table gets too small.
|
static int |
None
Features
|
static int |
NoPadInnerX
Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
|
static int |
NoPadOuterX
Default if BordersOuterV is off.
|
static int |
NoSavedSettings
Disable persisting columns order, width and sort settings in the .ini file.
|
static int |
PadOuterX
Default if BordersOuterV is on.
|
static int |
PreciseWidths
Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34.
|
static int |
Reorderable
Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
|
static int |
Resizable
Enable resizing columns.
|
static int |
RowBg
Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
|
static int |
ScrollX
Enable horizontal scrolling.
|
static int |
ScrollY
Enable vertical scrolling.
|
static int |
SizingFixedFit
Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
|
static int |
SizingFixedSame
Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns.
|
static int |
SizingMask_
[Internal] Combinations and masks
|
static int |
SizingStretchProp
Columns default to _WidthStretch with default weights proportional to each columns contents widths.
|
static int |
SizingStretchSame
Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
|
static int |
Sortable
Enable sorting.
|
static int |
SortMulti
Hold shift when clicking headers to sort on multiple column.
|
static int |
SortTristate
Allow no sorting, disable default sorting.
|
public static final int None
Definition: 0
public static final int Resizable
Definition: 1 << 0
public static final int Reorderable
Definition: 1 << 1
public static final int Hideable
Definition: 1 << 2
public static final int Sortable
Definition: 1 << 3
public static final int NoSavedSettings
Definition: 1 << 4
public static final int ContextMenuInBody
Definition: 1 << 5
public static final int RowBg
Definition: 1 << 6
public static final int BordersInnerH
Definition: 1 << 7
public static final int BordersOuterH
Definition: 1 << 8
public static final int BordersInnerV
Definition: 1 << 9
public static final int BordersOuterV
Definition: 1 << 10
public static final int BordersH
Definition: ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH
public static final int BordersV
Definition: ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV
public static final int BordersInner
Definition: ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH
public static final int BordersOuter
Definition: ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH
public static final int Borders
Definition: ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter
public static final int NoBordersInBody
->
May move to style
Definition: 1 << 11
public static final int NoBordersInBodyUntilResize
->
May move to style
Definition: 1 << 12
public static final int SizingFixedFit
Definition: 1 << 13
public static final int SizingFixedSame
Definition: 2 << 13
public static final int SizingStretchProp
Definition: 3 << 13
public static final int SizingStretchSame
Definition: 4 << 13
public static final int NoHostExtendX
Definition: 1 << 16
public static final int NoHostExtendY
Definition: 1 << 17
public static final int NoKeepColumnsVisible
Definition: 1 << 18
public static final int PreciseWidths
Definition: 1 << 19
public static final int NoClip
Definition: 1 << 20
public static final int PadOuterX
Definition: 1 << 21
public static final int NoPadOuterX
Definition: 1 << 22
public static final int NoPadInnerX
Definition: 1 << 23
public static final int ScrollX
Definition: 1 << 24
public static final int ScrollY
Definition: 1 << 25
public static final int SortMulti
>
1).
Definition: 1 << 26
public static final int SortTristate
Definition: 1 << 27
public static final int SizingMask_
Definition: ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame