Package imgui.flag

Class ImGuiTableFlags

java.lang.Object
imgui.flag.ImGuiTableFlags

public final class ImGuiTableFlags extends Object
Flags for ImGui::BeginTable() [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out! - Important! Sizing policies have complex and subtle side effects, more so than you would expect. Read comments/demos carefully + experiment with live demos to get acquainted with them. - The DEFAULT sizing policies are: - Default to SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize. - Default to SizingStretchSame if ScrollX is off. - When ScrollX is off: - Table defaults to SizingStretchSame -> 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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Draw all borders.
    static final int
    Draw horizontal borders.
    static final int
    Draw inner borders.
    static final int
    Draw horizontal borders between rows.
    static final int
    Draw vertical borders between columns.
    static final int
    Draw outer borders.
    static final int
    Draw horizontal borders at the top and bottom.
    static final int
    Draw vertical borders on the left and right sides.
    static final int
    Draw vertical borders.
    static final int
    Right-click on columns body/contents will also display table context menu.
    static final int
    Enable hiding/disabling columns in context menu.
    static final int
    Highlight column headers when hovered (may evolve into a fuller highlight)
    static final int
    [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers).
    static final int
    [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers).
    static final int
    Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns).
    static final int
    Make outer width auto-fit to columns, overriding outer_size.x value.
    static final int
    Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit).
    static final int
    Disable keeping column always minimally visible when ScrollX is off and table gets too small.
    static final int
    Features
    static final int
    Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
    static final int
    Default if BordersOuterV is off.
    static final int
    Disable persisting columns order, width, visibility and sort settings in the .ini file.
    static final int
    Default if BordersOuterV is on.
    static final int
    Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34.
    static final int
    Enable reordering columns in header row.
    static final int
    Enable resizing columns.
    static final int
    Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
    static final int
    Enable horizontal scrolling.
    static final int
    Enable vertical scrolling.
    static final int
    Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
    static final int
    Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns.
    static final int
    [Internal] Combinations and masks
    static final int
    Columns default to _WidthStretch with default weights proportional to each columns contents widths.
    static final int
    Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
    static final int
    Enable sorting.
    static final int
    Hold shift when clicking headers to sort on multiple column.
    static final int
    Allow no sorting, disable default sorting.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • None

      public static final int None
      Features

      Definition: 0

      See Also:
    • Resizable

      public static final int Resizable
      Enable resizing columns.

      Definition: 1 << 0

      See Also:
    • Reorderable

      public static final int Reorderable
      Enable reordering columns in header row. (Need calling TableSetupColumn() + TableHeadersRow() to display headers, or using ImGuiTableFlags_ContextMenuInBody to access context-menu without headers).

      Definition: 1 << 1

      See Also:
    • Hideable

      public static final int Hideable
      Enable hiding/disabling columns in context menu.

      Definition: 1 << 2

      See Also:
    • Sortable

      public static final int Sortable
      Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.

      Definition: 1 << 3

      See Also:
    • NoSavedSettings

      public static final int NoSavedSettings
      Disable persisting columns order, width, visibility and sort settings in the .ini file.

      Definition: 1 << 4

      See Also:
    • ContextMenuInBody

      public static final int ContextMenuInBody
      Right-click on columns body/contents will also display table context menu. By default it is available in TableHeadersRow().

      Definition: 1 << 5

      See Also:
    • RowBg

      public static final int RowBg
      Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)

      Definition: 1 << 6

      See Also:
    • BordersInnerH

      public static final int BordersInnerH
      Draw horizontal borders between rows.

      Definition: 1 << 7

      See Also:
    • BordersOuterH

      public static final int BordersOuterH
      Draw horizontal borders at the top and bottom.

      Definition: 1 << 8

      See Also:
    • BordersInnerV

      public static final int BordersInnerV
      Draw vertical borders between columns.

      Definition: 1 << 9

      See Also:
    • BordersOuterV

      public static final int BordersOuterV
      Draw vertical borders on the left and right sides.

      Definition: 1 << 10

      See Also:
    • BordersH

      public static final int BordersH
      Draw horizontal borders.

      Definition: ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH

      See Also:
    • BordersV

      public static final int BordersV
      Draw vertical borders.

      Definition: ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV

      See Also:
    • BordersInner

      public static final int BordersInner
      Draw inner borders.

      Definition: ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH

      See Also:
    • BordersOuter

      public static final int BordersOuter
      Draw outer borders.

      Definition: ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH

      See Also:
    • Borders

      public static final int Borders
      Draw all borders.

      Definition: ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter

      See Also:
    • NoBordersInBody

      public static final int NoBordersInBody
      [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style

      Definition: 1 << 11

      See Also:
    • NoBordersInBodyUntilResize

      public static final int NoBordersInBodyUntilResize
      [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style

      Definition: 1 << 12

      See Also:
    • SizingFixedFit

      public static final int SizingFixedFit
      Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.

      Definition: 1 << 13

      See Also:
    • SizingFixedSame

      public static final int SizingFixedSame
      Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.

      Definition: 2 << 13

      See Also:
    • SizingStretchProp

      public static final int SizingStretchProp
      Columns default to _WidthStretch with default weights proportional to each columns contents widths.

      Definition: 3 << 13

      See Also:
    • SizingStretchSame

      public static final int SizingStretchSame
      Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().

      Definition: 4 << 13

      See Also:
    • NoHostExtendX

      public static final int NoHostExtendX
      Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.

      Definition: 1 << 16

      See Also:
    • NoHostExtendY

      public static final int NoHostExtendY
      Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.

      Definition: 1 << 17

      See Also:
    • NoKeepColumnsVisible

      public static final int NoKeepColumnsVisible
      Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.

      Definition: 1 << 18

      See Also:
    • PreciseWidths

      public static final 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. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.

      Definition: 1 << 19

      See Also:
    • NoClip

      public static final int NoClip
      Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().

      Definition: 1 << 20

      See Also:
    • PadOuterX

      public static final int PadOuterX
      Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.

      Definition: 1 << 21

      See Also:
    • NoPadOuterX

      public static final int NoPadOuterX
      Default if BordersOuterV is off. Disable outermost padding.

      Definition: 1 << 22

      See Also:
    • NoPadInnerX

      public static final int NoPadInnerX
      Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).

      Definition: 1 << 23

      See Also:
    • ScrollX

      public static final int ScrollX
      Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.

      Definition: 1 << 24

      See Also:
    • ScrollY

      public static final int ScrollY
      Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.

      Definition: 1 << 25

      See Also:
    • SortMulti

      public static final int SortMulti
      Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount>1).

      Definition: 1 << 26

      See Also:
    • SortTristate

      public static final int SortTristate
      Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).

      Definition: 1 << 27

      See Also:
    • HighlightHoveredColumn

      public static final int HighlightHoveredColumn
      Highlight column headers when hovered (may evolve into a fuller highlight)

      Definition: 1 << 28

      See Also:
    • SizingMask_

      public static final int SizingMask_
      [Internal] Combinations and masks

      Definition: ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame

      See Also: