[Internal] Only called by TableNextRow()
| 1942 | |
| 1943 | // [Internal] Only called by TableNextRow() |
| 1944 | void ImGui::TableBeginRow(ImGuiTable* table) |
| 1945 | { |
| 1946 | ImGuiWindow* window = table->InnerWindow; |
| 1947 | IM_ASSERT(!table->IsInsideRow); |
| 1948 | |
| 1949 | // New row |
| 1950 | table->CurrentRow++; |
| 1951 | table->CurrentColumn = -1; |
| 1952 | table->RowBgColor[0] = table->RowBgColor[1] = IM_COL32_DISABLE; |
| 1953 | table->RowCellDataCurrent = -1; |
| 1954 | table->IsInsideRow = true; |
| 1955 | |
| 1956 | // Begin frozen rows |
| 1957 | float next_y1 = table->RowPosY2; |
| 1958 | if (table->CurrentRow == 0 && table->FreezeRowsCount > 0) |
| 1959 | next_y1 = window->DC.CursorPos.y = table->OuterRect.Min.y; |
| 1960 | |
| 1961 | table->RowPosY1 = table->RowPosY2 = next_y1; |
| 1962 | table->RowTextBaseline = 0.0f; |
| 1963 | table->RowIndentOffsetX = window->DC.Indent.x - table->HostIndentX; // Lock indent |
| 1964 | |
| 1965 | window->DC.PrevLineTextBaseOffset = 0.0f; |
| 1966 | window->DC.CursorPosPrevLine = ImVec2(window->DC.CursorPos.x, window->DC.CursorPos.y + table->RowCellPaddingY); // This allows users to call SameLine() to share LineSize between columns. |
| 1967 | window->DC.PrevLineSize = window->DC.CurrLineSize = ImVec2(0.0f, 0.0f); // This allows users to call SameLine() to share LineSize between columns, and to call it from first column too. |
| 1968 | window->DC.IsSameLine = window->DC.IsSetPos = false; |
| 1969 | window->DC.CursorMaxPos.y = next_y1; |
| 1970 | |
| 1971 | // Making the header BG color non-transparent will allow us to overlay it multiple times when handling smooth dragging. |
| 1972 | if (table->RowFlags & ImGuiTableRowFlags_Headers) |
| 1973 | { |
| 1974 | TableSetBgColor(ImGuiTableBgTarget_RowBg0, GetColorU32(ImGuiCol_TableHeaderBg)); |
| 1975 | if (table->CurrentRow == 0) |
| 1976 | table->IsUsingHeaders = true; |
| 1977 | } |
| 1978 | } |
| 1979 | |
| 1980 | // [Internal] Called by TableNextRow() |
| 1981 | void ImGui::TableEndRow(ImGuiTable* table) |