Internal: Nav,MultiSelect: import ImGuiSelectionUserData, SetNextItemSelectionUserData() from MultiSelect. Track NavLastValidSelectionUserData as a convenience.
result->SelectionUserData=g.NextItemData.SelectionUserData;// INTENTIONAL: At this point this field is not cleared in NextItemData. Avoid unnecessary copy to LastItemData.
}
}
// True when current work location may be scrolled horizontally when moving left / right.
g.NavLastValidSelectionUserData=g.NextItemData.SelectionUserData;// INTENTIONAL: At this point this field is not cleared in NextItemData. Avoid unnecessary copy to LastItemData.
}
window->NavRectRel[window->DC.NavLayerCurrent]=WindowRectAbsToRel(window,nav_bb);// Store item bounding box (relative to window position)
// Note that the ImXXX helpers functions are lower-level than ImGui functions.
@ -810,6 +822,7 @@ enum ImGuiItemFlags_
// Controlled by widget code
ImGuiItemFlags_Inputable=1<<10,// false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
ImGuiItemFlags_HasSelectionUserData=1<<11,// false // Set by SetNextItemSelectionUserData()
ImGuiItemFlagsItemFlags;// Currently only tested/used for ImGuiItemFlags_AllowOverlap.
floatWidth;// Set by SetNextItemWidth()
ImGuiIDFocusScopeId;// Set by SetNextItemMultiSelectData() (!= 0 signify value has been set, so it's an alternate version of HasSelectionData, we don't use Flags for this because they are cleared too early. This is mostly used for debugging)
ImGuiItemFlagsItemFlags;// Currently only tested/used for ImGuiItemFlags_AllowOverlap.
// Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem()
floatWidth;// Set by SetNextItemWidth()
ImGuiSelectionUserDataSelectionUserData;// Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
ImGuiInputSourceNavInputSource;// Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse
ImGuiNavLayerNavLayer;// Layer we are navigating on. For now the system is hard-coded for 0=main contents and 1=menu/title bar, may expose layers later.
ImGuiSelectionUserDataNavLastValidSelectionUserData;// Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn't have selection data.
boolNavIdIsAlive;// Nav widget has been seen this frame ~~ NavRectRel is valid
boolNavMousePosDirty;// When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
boolNavDisableHighlight;// When user starts using mouse, we hide gamepad/keyboard highlight (NB: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
IMGUI_APIboolTreeNodeUpdateNextOpen(ImGuiIDid,ImGuiTreeNodeFlagsflags);// Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging.
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
// To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).