@@ -1351,7 +1351,7 @@ void ImGui::SeparatorEx(ImGuiSeparatorFlags flags)
1351
1351
if (g.GroupStack.Size > 0 && g.GroupStack.back().WindowID == window->ID)
1352
1352
x1 += window->DC.Indent.x;
1353
1353
1354
- ImGuiColumns * columns = (flags & ImGuiSeparatorFlags_SpanAllColumns) ? window->DC.CurrentColumns : NULL;
1354
+ ImGuiOldColumns * columns = (flags & ImGuiSeparatorFlags_SpanAllColumns) ? window->DC.CurrentColumns : NULL;
1355
1355
if (columns)
1356
1356
PushColumnsBackground();
1357
1357
@@ -7907,19 +7907,19 @@ int ImGui::GetColumnsCount()
7907
7907
return window->DC.CurrentColumns ? window->DC.CurrentColumns->Count : 1;
7908
7908
}
7909
7909
7910
- float ImGui::GetColumnOffsetFromNorm(const ImGuiColumns * columns, float offset_norm)
7910
+ float ImGui::GetColumnOffsetFromNorm(const ImGuiOldColumns * columns, float offset_norm)
7911
7911
{
7912
7912
return offset_norm * (columns->OffMaxX - columns->OffMinX);
7913
7913
}
7914
7914
7915
- float ImGui::GetColumnNormFromOffset(const ImGuiColumns * columns, float offset)
7915
+ float ImGui::GetColumnNormFromOffset(const ImGuiOldColumns * columns, float offset)
7916
7916
{
7917
7917
return offset / (columns->OffMaxX - columns->OffMinX);
7918
7918
}
7919
7919
7920
7920
static const float COLUMNS_HIT_RECT_HALF_WIDTH = 4.0f;
7921
7921
7922
- static float GetDraggedColumnOffset(ImGuiColumns * columns, int column_index)
7922
+ static float GetDraggedColumnOffset(ImGuiOldColumns * columns, int column_index)
7923
7923
{
7924
7924
// Active (dragged) column always follow mouse. The reason we need this is that dragging a column to the right edge of an auto-resizing
7925
7925
// window creates a feedback loop because we store normalized positions. So while dragging we enforce absolute positioning.
@@ -7939,7 +7939,7 @@ static float GetDraggedColumnOffset(ImGuiColumns* columns, int column_index)
7939
7939
float ImGui::GetColumnOffset(int column_index)
7940
7940
{
7941
7941
ImGuiWindow* window = GetCurrentWindowRead();
7942
- ImGuiColumns * columns = window->DC.CurrentColumns;
7942
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
7943
7943
if (columns == NULL)
7944
7944
return 0.0f;
7945
7945
@@ -7952,7 +7952,7 @@ float ImGui::GetColumnOffset(int column_index)
7952
7952
return x_offset;
7953
7953
}
7954
7954
7955
- static float GetColumnWidthEx(ImGuiColumns * columns, int column_index, bool before_resize = false)
7955
+ static float GetColumnWidthEx(ImGuiOldColumns * columns, int column_index, bool before_resize = false)
7956
7956
{
7957
7957
if (column_index < 0)
7958
7958
column_index = columns->Current;
@@ -7969,7 +7969,7 @@ float ImGui::GetColumnWidth(int column_index)
7969
7969
{
7970
7970
ImGuiContext& g = *GImGui;
7971
7971
ImGuiWindow* window = g.CurrentWindow;
7972
- ImGuiColumns * columns = window->DC.CurrentColumns;
7972
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
7973
7973
if (columns == NULL)
7974
7974
return GetContentRegionAvail().x;
7975
7975
@@ -7982,7 +7982,7 @@ void ImGui::SetColumnOffset(int column_index, float offset)
7982
7982
{
7983
7983
ImGuiContext& g = *GImGui;
7984
7984
ImGuiWindow* window = g.CurrentWindow;
7985
- ImGuiColumns * columns = window->DC.CurrentColumns;
7985
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
7986
7986
IM_ASSERT(columns != NULL);
7987
7987
7988
7988
if (column_index < 0)
@@ -8003,7 +8003,7 @@ void ImGui::SetColumnOffset(int column_index, float offset)
8003
8003
void ImGui::SetColumnWidth(int column_index, float width)
8004
8004
{
8005
8005
ImGuiWindow* window = GetCurrentWindowRead();
8006
- ImGuiColumns * columns = window->DC.CurrentColumns;
8006
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8007
8007
IM_ASSERT(columns != NULL);
8008
8008
8009
8009
if (column_index < 0)
@@ -8014,19 +8014,19 @@ void ImGui::SetColumnWidth(int column_index, float width)
8014
8014
void ImGui::PushColumnClipRect(int column_index)
8015
8015
{
8016
8016
ImGuiWindow* window = GetCurrentWindowRead();
8017
- ImGuiColumns * columns = window->DC.CurrentColumns;
8017
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8018
8018
if (column_index < 0)
8019
8019
column_index = columns->Current;
8020
8020
8021
- ImGuiColumnData * column = &columns->Columns[column_index];
8021
+ ImGuiOldColumnData * column = &columns->Columns[column_index];
8022
8022
PushClipRect(column->ClipRect.Min, column->ClipRect.Max, false);
8023
8023
}
8024
8024
8025
8025
// Get into the columns background draw command (which is generally the same draw command as before we called BeginColumns)
8026
8026
void ImGui::PushColumnsBackground()
8027
8027
{
8028
8028
ImGuiWindow* window = GetCurrentWindowRead();
8029
- ImGuiColumns * columns = window->DC.CurrentColumns;
8029
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8030
8030
if (columns->Count == 1)
8031
8031
return;
8032
8032
@@ -8039,7 +8039,7 @@ void ImGui::PushColumnsBackground()
8039
8039
void ImGui::PopColumnsBackground()
8040
8040
{
8041
8041
ImGuiWindow* window = GetCurrentWindowRead();
8042
- ImGuiColumns * columns = window->DC.CurrentColumns;
8042
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8043
8043
if (columns->Count == 1)
8044
8044
return;
8045
8045
@@ -8048,15 +8048,15 @@ void ImGui::PopColumnsBackground()
8048
8048
columns->Splitter.SetCurrentChannel(window->DrawList, columns->Current + 1);
8049
8049
}
8050
8050
8051
- ImGuiColumns * ImGui::FindOrCreateColumns(ImGuiWindow* window, ImGuiID id)
8051
+ ImGuiOldColumns * ImGui::FindOrCreateColumns(ImGuiWindow* window, ImGuiID id)
8052
8052
{
8053
8053
// We have few columns per window so for now we don't need bother much with turning this into a faster lookup.
8054
8054
for (int n = 0; n < window->ColumnsStorage.Size; n++)
8055
8055
if (window->ColumnsStorage[n].ID == id)
8056
8056
return &window->ColumnsStorage[n];
8057
8057
8058
- window->ColumnsStorage.push_back(ImGuiColumns ());
8059
- ImGuiColumns * columns = &window->ColumnsStorage.back();
8058
+ window->ColumnsStorage.push_back(ImGuiOldColumns ());
8059
+ ImGuiOldColumns * columns = &window->ColumnsStorage.back();
8060
8060
columns->ID = id;
8061
8061
return columns;
8062
8062
}
@@ -8084,7 +8084,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiOldColumnFl
8084
8084
8085
8085
// Acquire storage for the columns set
8086
8086
ImGuiID id = GetColumnsID(str_id, columns_count);
8087
- ImGuiColumns * columns = FindOrCreateColumns(window, id);
8087
+ ImGuiOldColumns * columns = FindOrCreateColumns(window, id);
8088
8088
IM_ASSERT(columns->ID == id);
8089
8089
columns->Current = 0;
8090
8090
columns->Count = columns_count;
@@ -8118,7 +8118,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiOldColumnFl
8118
8118
columns->Columns.reserve(columns_count + 1);
8119
8119
for (int n = 0; n < columns_count + 1; n++)
8120
8120
{
8121
- ImGuiColumnData column;
8121
+ ImGuiOldColumnData column;
8122
8122
column.OffsetNorm = n / (float)columns_count;
8123
8123
columns->Columns.push_back(column);
8124
8124
}
@@ -8127,7 +8127,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiOldColumnFl
8127
8127
for (int n = 0; n < columns_count; n++)
8128
8128
{
8129
8129
// Compute clipping rectangle
8130
- ImGuiColumnData * column = &columns->Columns[n];
8130
+ ImGuiOldColumnData * column = &columns->Columns[n];
8131
8131
float clip_x1 = IM_ROUND(window->Pos.x + GetColumnOffset(n));
8132
8132
float clip_x2 = IM_ROUND(window->Pos.x + GetColumnOffset(n + 1) - 1.0f);
8133
8133
column->ClipRect = ImRect(clip_x1, -FLT_MAX, clip_x2, +FLT_MAX);
@@ -8158,7 +8158,7 @@ void ImGui::NextColumn()
8158
8158
return;
8159
8159
8160
8160
ImGuiContext& g = *GImGui;
8161
- ImGuiColumns * columns = window->DC.CurrentColumns;
8161
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8162
8162
8163
8163
if (columns->Count == 1)
8164
8164
{
@@ -8175,7 +8175,7 @@ void ImGui::NextColumn()
8175
8175
8176
8176
// Optimization: avoid PopClipRect() + SetCurrentChannel() + PushClipRect()
8177
8177
// (which would needlessly attempt to update commands in the wrong channel, then pop or overwrite them),
8178
- ImGuiColumnData * column = &columns->Columns[columns->Current];
8178
+ ImGuiOldColumnData * column = &columns->Columns[columns->Current];
8179
8179
SetWindowClipRectBeforeSetChannel(window, column->ClipRect);
8180
8180
columns->Splitter.SetCurrentChannel(window->DrawList, columns->Current + 1);
8181
8181
@@ -8210,7 +8210,7 @@ void ImGui::EndColumns()
8210
8210
{
8211
8211
ImGuiContext& g = *GImGui;
8212
8212
ImGuiWindow* window = GetCurrentWindow();
8213
- ImGuiColumns * columns = window->DC.CurrentColumns;
8213
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8214
8214
IM_ASSERT(columns != NULL);
8215
8215
8216
8216
PopItemWidth();
@@ -8237,7 +8237,7 @@ void ImGui::EndColumns()
8237
8237
int dragging_column = -1;
8238
8238
for (int n = 1; n < columns->Count; n++)
8239
8239
{
8240
- ImGuiColumnData * column = &columns->Columns[n];
8240
+ ImGuiOldColumnData * column = &columns->Columns[n];
8241
8241
float x = window->Pos.x + GetColumnOffset(n);
8242
8242
const ImGuiID column_id = columns->ID + ImGuiID(n);
8243
8243
const float column_hit_hw = COLUMNS_HIT_RECT_HALF_WIDTH;
@@ -8289,7 +8289,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
8289
8289
8290
8290
ImGuiOldColumnFlags flags = (border ? 0 : ImGuiOldColumnFlags_NoBorder);
8291
8291
//flags |= ImGuiOldColumnFlags_NoPreserveWidths; // NB: Legacy behavior
8292
- ImGuiColumns * columns = window->DC.CurrentColumns;
8292
+ ImGuiOldColumns * columns = window->DC.CurrentColumns;
8293
8293
if (columns != NULL && columns->Count == columns_count && columns->Flags == flags)
8294
8294
return;
8295
8295
0 commit comments