mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_opengl2.cpp # backends/imgui_impl_opengl3.cpp # imgui.cpp
This commit is contained in:
@ -1444,9 +1444,11 @@ struct ImGuiContext
|
||||
float WheelingWindowTimer;
|
||||
|
||||
// Item/widgets state and tracking information
|
||||
ImGuiID HoveredId; // Hovered widget
|
||||
ImGuiID HoveredId; // Hovered widget, filled during the frame
|
||||
ImGuiID HoveredIdPreviousFrame;
|
||||
bool HoveredIdAllowOverlap;
|
||||
bool HoveredIdUsingMouseWheel; // Hovered widget will use mouse wheel. Blocks scrolling the underlying window.
|
||||
bool HoveredIdPreviousFrameUsingMouseWheel;
|
||||
bool HoveredIdDisabled; // At least one widget passed the rect test, but has been discarded by disabled flag or popup inhibit. May be true even if HoveredId == 0.
|
||||
float HoveredIdTimer; // Measure contiguous hovering time
|
||||
float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active
|
||||
@ -1459,6 +1461,7 @@ struct ImGuiContext
|
||||
bool ActiveIdHasBeenPressedBefore; // Track whether the active id led to a press (this is to allow changing between PressOnClick and PressOnRelease without pressing twice). Used by range_select branch.
|
||||
bool ActiveIdHasBeenEditedBefore; // Was the value associated to the widget Edited over the course of the Active state.
|
||||
bool ActiveIdHasBeenEditedThisFrame;
|
||||
bool ActiveIdUsingMouseWheel; // Active widget will want to read mouse wheel. Blocks scrolling the underlying window.
|
||||
ImU32 ActiveIdUsingNavDirMask; // Active widget will want to read those nav move requests (e.g. can activate a button and move away from it)
|
||||
ImU32 ActiveIdUsingNavInputMask; // Active widget will want to read those nav inputs.
|
||||
ImU64 ActiveIdUsingKeyInputMask; // Active widget will want to read those key inputs. When we grow the ImGuiKey enum we'll need to either to order the enum to make useful keys come first, either redesign this into e.g. a small array.
|
||||
@ -1681,6 +1684,7 @@ struct ImGuiContext
|
||||
|
||||
HoveredId = HoveredIdPreviousFrame = 0;
|
||||
HoveredIdAllowOverlap = false;
|
||||
HoveredIdUsingMouseWheel = HoveredIdPreviousFrameUsingMouseWheel = false;
|
||||
HoveredIdDisabled = false;
|
||||
HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f;
|
||||
ActiveId = 0;
|
||||
@ -1692,6 +1696,7 @@ struct ImGuiContext
|
||||
ActiveIdHasBeenPressedBefore = false;
|
||||
ActiveIdHasBeenEditedBefore = false;
|
||||
ActiveIdHasBeenEditedThisFrame = false;
|
||||
ActiveIdUsingMouseWheel = false;
|
||||
ActiveIdUsingNavDirMask = 0x00;
|
||||
ActiveIdUsingNavInputMask = 0x00;
|
||||
ActiveIdUsingKeyInputMask = 0x00;
|
||||
@ -2111,7 +2116,7 @@ typedef ImU8 ImGuiTableDrawChannelIdx;
|
||||
|
||||
// [Internal] sizeof() ~ 104
|
||||
// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api.
|
||||
// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping.
|
||||
// We use the terminology "Clipped" to refer to a column that is out of sight because of scrolling/clipping.
|
||||
// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped".
|
||||
struct ImGuiTableColumn
|
||||
{
|
||||
@ -2212,6 +2217,7 @@ struct ImGuiTable
|
||||
float BorderX1;
|
||||
float BorderX2;
|
||||
float HostIndentX;
|
||||
float MinColumnWidth;
|
||||
float OuterPaddingX;
|
||||
float CellPaddingX; // Padding from each borders
|
||||
float CellPaddingY;
|
||||
@ -2220,13 +2226,13 @@ struct ImGuiTable
|
||||
float LastOuterHeight; // Outer height from last frame
|
||||
float LastFirstRowHeight; // Height of first row from last frame
|
||||
float InnerWidth; // User value passed to BeginTable(), see comments at the top of BeginTable() for details.
|
||||
float ColumnsTotalWidth; // Sum of current column width
|
||||
float ColumnsGivenWidth; // Sum of current column width
|
||||
float ColumnsAutoFitWidth; // Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width submission in outer window
|
||||
float ResizedColumnNextWidth;
|
||||
float ResizeLockMinContentsX2; // Lock minimum contents width while resizing down in order to not create feedback loops. But we allow growing the table.
|
||||
float RefScale; // Reference scale to be able to rescale columns on font/dpi changes.
|
||||
ImRect OuterRect; // Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable().
|
||||
ImRect InnerRect; // InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is
|
||||
ImRect InnerRect; // InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is
|
||||
ImRect WorkRect;
|
||||
ImRect InnerClipRect;
|
||||
ImRect BgClipRect; // We use this to cpu-clip cell background color fill
|
||||
@ -2284,7 +2290,7 @@ struct ImGuiTable
|
||||
bool IsDefaultDisplayOrder; // Set when display order is unchanged from default (DisplayOrder contains 0...Count-1)
|
||||
bool IsResetAllRequest;
|
||||
bool IsResetDisplayOrderRequest;
|
||||
bool IsUnfrozen; // Set when we got past the frozen row.
|
||||
bool IsUnfrozenRows; // Set when we got past the frozen row.
|
||||
bool IsOuterRectAutoFitX; // Set when outer_size.x == 0.0f in BeginTable(), scrolling is disabled, and there are stretch columns.
|
||||
bool MemoryCompacted;
|
||||
bool HostSkipItems; // Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis
|
||||
@ -2482,6 +2488,7 @@ namespace ImGui
|
||||
|
||||
// Inputs
|
||||
// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions.
|
||||
IMGUI_API void SetItemUsingMouseWheel();
|
||||
inline bool IsActiveIdUsingNavDir(ImGuiDir dir) { ImGuiContext& g = *GImGui; return (g.ActiveIdUsingNavDirMask & (1 << dir)) != 0; }
|
||||
inline bool IsActiveIdUsingNavInput(ImGuiNavInput input) { ImGuiContext& g = *GImGui; return (g.ActiveIdUsingNavInputMask & (1 << input)) != 0; }
|
||||
inline bool IsActiveIdUsingKey(ImGuiKey key) { ImGuiContext& g = *GImGui; IM_ASSERT(key < 64); return (g.ActiveIdUsingKeyInputMask & ((ImU64)1 << key)) != 0; }
|
||||
@ -2581,6 +2588,7 @@ namespace ImGui
|
||||
IMGUI_API void TableSortSpecsBuild(ImGuiTable* table);
|
||||
IMGUI_API ImGuiSortDirection TableGetColumnNextSortDirection(ImGuiTableColumn* column);
|
||||
IMGUI_API void TableFixColumnSortDirection(ImGuiTable* table, ImGuiTableColumn* column);
|
||||
IMGUI_API float TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column);
|
||||
IMGUI_API void TableBeginRow(ImGuiTable* table);
|
||||
IMGUI_API void TableEndRow(ImGuiTable* table);
|
||||
IMGUI_API void TableBeginCell(ImGuiTable* table, int column_n);
|
||||
@ -2588,7 +2596,6 @@ namespace ImGui
|
||||
IMGUI_API ImRect TableGetCellBgRect(const ImGuiTable* table, int column_n);
|
||||
IMGUI_API const char* TableGetColumnName(const ImGuiTable* table, int column_n);
|
||||
IMGUI_API ImGuiID TableGetColumnResizeID(const ImGuiTable* table, int column_n, int instance_no = 0);
|
||||
IMGUI_API float TableGetMinColumnWidth();
|
||||
IMGUI_API float TableGetMaxColumnWidth(const ImGuiTable* table, int column_n);
|
||||
IMGUI_API void TableSetColumnWidthAutoSingle(ImGuiTable* table, int column_n);
|
||||
IMGUI_API void TableSetColumnWidthAutoAll(ImGuiTable* table);
|
||||
@ -2663,6 +2670,8 @@ namespace ImGui
|
||||
IMGUI_API ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis);
|
||||
IMGUI_API ImGuiID GetWindowResizeID(ImGuiWindow* window, int n); // 0..3: corners, 4..7: borders
|
||||
IMGUI_API void SeparatorEx(ImGuiSeparatorFlags flags);
|
||||
IMGUI_API bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value);
|
||||
IMGUI_API bool CheckboxFlags(const char* label, ImU64* flags, ImU64 flags_value);
|
||||
|
||||
// Widgets low-level behaviors
|
||||
IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
|
||||
|
Reference in New Issue
Block a user