public final class ImGuiChildFlags
extends java.lang.Object
Demo->Child->Auto-resize with Constraints
).
- Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.
- This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped.
While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch.
- You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.
HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping.Modifier and Type | Field and Description |
---|---|
static int |
AlwaysAutoResize
Combined with AutoResizeX/AutoResizeY.
|
static int |
AlwaysUseWindowPadding
Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)
|
static int |
AutoResizeX
Enable auto-resizing width.
|
static int |
AutoResizeY
Enable auto-resizing height.
|
static int |
Border
Show an outer border and enable WindowPadding.
|
static int |
FrameStyle
Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
|
static int |
NavFlattened
Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
|
static int |
None
Definition:
0 |
static int |
ResizeX
Allow resize from right border (layout direction).
|
static int |
ResizeY
Allow resize from bottom border (layout direction).
|
public static final int None
0
public static final int Border
Definition: 1 << 0
public static final int AlwaysUseWindowPadding
Definition: 1 << 1
public static final int ResizeX
Definition: 1 << 2
public static final int ResizeY
Definition: 1 << 3
public static final int AutoResizeX
Definition: 1 << 4
public static final int AutoResizeY
Definition: 1 << 5
public static final int AlwaysAutoResize
Definition: 1 << 6
public static final int FrameStyle
Definition: 1 << 7
public static final int NavFlattened
Definition: 1 << 8