Tables: @native TableUpdateLayout(), TableSetupDrawChannels(), TableSetupColumnFlags() (once per table per frame, the largest interpreted cost of table-heavy windows: demo_all -2.5% instructions; +176 KB native code, paid for by the stb_truetype trim; draw data identical)
This commit is contained in:
1 parent
b87012f08f
commit
ff7a04187c
1 file changed
+3
@@ -934,6 +934,7 @@ function ImGui.TableQueueSetColumnDisplayOrder(table_, column_n, dst_order)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Adjust flags: default width mode + stretch columns are not allowed when auto extending
|
-- Adjust flags: default width mode + stretch columns are not allowed when auto extending
|
||||||
|
@native
|
||||||
local function TableSetupColumnFlags(table_, column, column_n, flags_in)
|
local function TableSetupColumnFlags(table_, column, column_n, flags_in)
|
||||||
local flags = flags_in
|
local flags = flags_in
|
||||||
|
|
||||||
@@ -993,6 +994,7 @@ end
|
|||||||
-- Runs on the first call to TableNextRow(), to give a chance for TableSetupColumn() and other TableSetupXXXXX() functions to be called first.
|
-- Runs on the first call to TableNextRow(), to give a chance for TableSetupColumn() and other TableSetupXXXXX() functions to be called first.
|
||||||
-- FIXME-TABLE: Our width (and therefore our WorkRect) will be minimal in the first frame for _WidthAuto columns.
|
-- FIXME-TABLE: Our width (and therefore our WorkRect) will be minimal in the first frame for _WidthAuto columns.
|
||||||
-- Increase feedback side-effect with widgets relying on WorkRect.Max.x... Maybe provide a default distribution for _WidthAuto columns?
|
-- Increase feedback side-effect with widgets relying on WorkRect.Max.x... Maybe provide a default distribution for _WidthAuto columns?
|
||||||
|
@native
|
||||||
function ImGui.TableUpdateLayout(table_)
|
function ImGui.TableUpdateLayout(table_)
|
||||||
local g = GImGui
|
local g = GImGui
|
||||||
local temp_data = table_.TempData
|
local temp_data = table_.TempData
|
||||||
@@ -2961,6 +2963,7 @@ end
|
|||||||
-- - FreezeRows --> 2+D+N*2 (unless scrolling value is zero)
|
-- - FreezeRows --> 2+D+N*2 (unless scrolling value is zero)
|
||||||
-- - FreezeRows || FreezeColumns --> 3+D+N*2 (unless scrolling value is zero)
|
-- - FreezeRows || FreezeColumns --> 3+D+N*2 (unless scrolling value is zero)
|
||||||
-- Where D is 1 if any column is clipped or hidden (dummy channel) otherwise 0.
|
-- Where D is 1 if any column is clipped or hidden (dummy channel) otherwise 0.
|
||||||
|
@native
|
||||||
function ImGui.TableSetupDrawChannels(table_)
|
function ImGui.TableSetupDrawChannels(table_)
|
||||||
local freeze_row_multiplier = (table_.FreezeRowsCount > 0) and 2 or 1
|
local freeze_row_multiplier = (table_.FreezeRowsCount > 0) and 2 or 1
|
||||||
local channels_for_row = (band(table_.Flags, ImGuiTableFlags.NoClip) ~= 0) and 1 or table_.ColumnsEnabledCount
|
local channels_for_row = (band(table_.Flags, ImGuiTableFlags.NoClip) ~= 0) and 1 or table_.ColumnsEnabledCount
|
||||||
|
|||||||
Reference in new issue
Block a user