Lines Matching refs:DC

166     const ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
167 const float wrap_pos_x = window->DC.TextWrapPos;
244 const float wrap_width = wrap_enabled ? CalcWrapWidthForPos(window->DC.CursorPos, wrap_pos_x) : 0.0f;
330 bool need_backup = (g.CurrentWindow->DC.TextWrapPos < 0.0f); // Keep existing wrap position if one is already set
365 const ImVec2 pos = window->DC.CursorPos;
400 ImVec2 pos = window->DC.CursorPos;
401 pos.y += window->DC.CurrLineTextBaseOffset;
681 ImVec2 pos = window->DC.CursorPos;
682 if ((flags & ImGuiButtonFlags_AlignTextBaseLine) && style.FramePadding.y < window->DC.CurrLineTextBaseOffset) // Try to vertically align buttons that are smaller/have no padding so that text baseline matches (bit hacky, since it shouldn't be a flag)
683 pos.y += window->DC.CurrLineTextBaseOffset - style.FramePadding.y;
743 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
762 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
1005 ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
1032 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size + padding * 2);
1082 const ImVec2 pos = window->DC.CursorPos;
1188 const ImVec2 pos = window->DC.CursorPos;
1248 ImVec2 pos = window->DC.CursorPos;
1283 const float line_height = ImMax(ImMin(window->DC.CurrLineSize.y, g.FontSize + g.Style.FramePadding.y * 2), g.FontSize);
1284 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize, line_height));
1325 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
1337 const ImGuiLayoutType backup_layout_type = window->DC.LayoutType;
1338 window->DC.LayoutType = ImGuiLayoutType_Vertical;
1339 if (window->DC.CurrLineSize.y > 0.0f) // In the event that we are on a line with items that is smaller that FontSize high, we will preserve its height.
1343 window->DC.LayoutType = backup_layout_type;
1353 window->DC.CurrLineSize.y = ImMax(window->DC.CurrLineSize.y, g.FontSize + g.Style.FramePadding.y * 2);
1354 window->DC.CurrLineTextBaseOffset = ImMax(window->DC.CurrLineTextBaseOffset, g.Style.FramePadding.y);
1372 float y1 = window->DC.CursorPos.y;
1373 float y2 = window->DC.CursorPos.y + window->DC.CurrLineSize.y;
1374 const ImRect bb(ImVec2(window->DC.CursorPos.x, y1), ImVec2(window->DC.CursorPos.x + thickness_draw, y2));
1392 x1 += window->DC.Indent.x;
1394 ImGuiOldColumns* columns = (flags & ImGuiSeparatorFlags_SpanAllColumns) ? window->DC.CurrentColumns : NULL;
1399 const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y + thickness_draw));
1413 columns->LineMinY = window->DC.CursorPos.y;
1426 ImGuiSeparatorFlags flags = (window->DC.LayoutType == ImGuiLayoutType_Horizontal) ? ImGuiSeparatorFlags_Vertical : ImGuiSeparatorFlags_Horizontal;
1577 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y * 2.0f));
1714 preview_data->BackupCursorPos = window->DC.CursorPos;
1715 preview_data->BackupCursorMaxPos = window->DC.CursorMaxPos;
1716 preview_data->BackupCursorPosPrevLine = window->DC.CursorPosPrevLine;
1717 preview_data->BackupPrevLineTextBaseOffset = window->DC.PrevLineTextBaseOffset;
1718 preview_data->BackupLayout = window->DC.LayoutType;
1719 window->DC.CursorPos = preview_data->PreviewRect.Min + g.Style.FramePadding;
1720 window->DC.CursorMaxPos = window->DC.CursorPos;
1721 window->DC.LayoutType = ImGuiLayoutType_Horizontal;
1735 if (window->DC.CursorMaxPos.x < preview_data->PreviewRect.Max.x && window->DC.CursorMaxPos.y < preview_data->PreviewRect.Max.y)
1742 window->DC.CursorPos = preview_data->BackupCursorPos;
1743 window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, preview_data->BackupCursorMaxPos);
1744 window->DC.CursorPosPrevLine = preview_data->BackupCursorPosPrevLine;
1745 window->DC.PrevLineTextBaseOffset = preview_data->BackupPrevLineTextBaseOffset;
1746 window->DC.LayoutType = preview_data->BackupLayout;
2391 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y * 2.0f));
3009 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y * 2.0f));
3174 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + size);
3363 g.CurrentWindow->DC.CursorPos = bb.Min;
3974 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size);
3982 ImVec2 backup_pos = window->DC.CursorPos;
3990 window->DC.CursorPos = backup_pos;
4007 draw_window->DC.NavLayersActiveMaskNext |= (1 << draw_window->DC.NavLayerCurrent); // This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it.
4008 draw_window->DC.CursorPos += style.FramePadding;
4176 const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y) : (g.FontSize * 0.5f));
4545 ImVec2 draw_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding;
4875 const ImVec2 pos = window->DC.CursorPos;
4877 window->DC.CursorPos.x = pos.x + inputs_offset_x;
4953 window->DC.CursorPos = ImVec2(pos.x + button_offset_x, pos.y);
4988 window->DC.CursorPos = ImVec2(pos.x + text_offset_x, pos.y + style.FramePadding.y);
5110 ImVec2 picker_pos = window->DC.CursorPos;
5457 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
5778 ImGuiStorage* storage = window->DC.StateStorage;
5810 if (g.LogEnabled && !(flags & ImGuiTreeNodeFlags_NoAutoOpenOnLog) && (window->DC.TreeDepth - g.LogDepthRef) < g.LogDepthToExpand)
5825 const ImVec2 padding = (display_frame || (flags & ImGuiTreeNodeFlags_FramePadding)) ? style.FramePadding : ImVec2(style.FramePadding.x, ImMin(window->DC.CurrLineTextBaseOffset, style.FramePadding.y));
5832 const float frame_height = ImMax(ImMin(window->DC.CurrLineSize.y, g.FontSize + style.FramePadding.y * 2), label_size.y + padding.y * 2);
5834 frame_bb.Min.x = (flags & ImGuiTreeNodeFlags_SpanFullWidth) ? window->WorkRect.Min.x : window->DC.CursorPos.x;
5835 frame_bb.Min.y = window->DC.CursorPos.y;
5837 frame_bb.Max.y = window->DC.CursorPos.y + frame_height;
5847 const float text_offset_y = ImMax(padding.y, window->DC.CurrLineTextBaseOffset); // Latch before ItemSize changes it
5849 ImVec2 text_pos(window->DC.CursorPos.x + text_offset_x, window->DC.CursorPos.y + text_offset_y);
5863 window->DC.TreeJumpToParentOnPopMask |= (1 << window->DC.TreeDepth);
5946 window->DC.StateStorage->SetInt(id, is_open);
6007 window->DC.TreeDepth++;
6015 window->DC.TreeDepth++;
6024 window->DC.TreeDepth++;
6034 window->DC.TreeDepth--;
6035 ImU32 tree_depth_mask = (1 << window->DC.TreeDepth);
6039 if (g.NavIdIsAlive && (window->DC.TreeJumpToParentOnPopMask & tree_depth_mask))
6044 window->DC.TreeJumpToParentOnPopMask &= tree_depth_mask - 1;
6139 ImVec2 pos = window->DC.CursorPos;
6140 pos.y += window->DC.CurrLineTextBaseOffset;
6196 if (span_all_columns && window->DC.CurrentColumns)
6220 if ((flags & ImGuiSelectableFlags_SelectOnNav) && g.NavJustMovedToId != 0 && g.NavJustMovedToFocusScopeId == window->DC.NavFocusScopeIdCurrent)
6227 if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerCurrent)
6229 SetNavID(id, window->DC.NavLayerCurrent, window->DC.NavFocusScopeIdCurrent, ImRect(bb.Min - window->Pos, bb.Max - window->Pos)); // (bb == NavRect)
6253 if (span_all_columns && window->DC.CurrentColumns)
6306 ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size);
6323 window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, label_pos + label_size);
6436 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size);
6680 IM_ASSERT(!window->DC.MenuBarAppending);
6692 window->DC.CursorPos = window->DC.CursorMaxPos = ImVec2(bar_rect.Min.x + window->DC.MenuBarOffset.x, bar_rect.Min.y + window->DC.MenuBarOffset.y);
6693 window->DC.LayoutType = ImGuiLayoutType_Horizontal;
6694 window->DC.NavLayerCurrent = ImGuiNavLayer_Menu;
6695 window->DC.MenuBarAppending = true;
6714 if (nav_earliest_child->ParentWindow == window && nav_earliest_child->DC.ParentLayoutType == ImGuiLayoutType_Horizontal && (g.NavMoveFlags & ImGuiNavMoveFlags_Forwarded) == 0)
6719 IM_ASSERT(window->DC.NavLayersActiveMaskNext & (1 << layer)); // Sanity check
6730 IM_ASSERT(window->DC.MenuBarAppending);
6733 window->DC.MenuBarOffset.x = window->DC.CursorPos.x - window->Pos.x; // Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.
6736 window->DC.LayoutType = ImGuiLayoutType_Vertical;
6737 window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
6738 window->DC.MenuBarAppending = false;
6785 // FIXME: This could be generalized as an opt-in way to clamp window->DC.CursorStartPos to avoid SafeArea?
6854 ImVec2 popup_pos, pos = window->DC.CursorPos;
6858 const ImGuiMenuColumns* offsets = &window->DC.MenuColumns;
6859 if (window->DC.LayoutType == ImGuiLayoutType_Horizontal)
6865 window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * 0.5f);
6868 ImVec2 text_pos(window->DC.CursorPos.x + offsets->OffsetLabel, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
6872 window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar().
6882 float min_w = window->DC.MenuColumns.DeclColumns(icon_w, label_size.x, 0.0f, checkmark_w); // Feedback to next frame
6884 ImVec2 text_pos(window->DC.CursorPos.x + offsets->OffsetLabel, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
6900 if (window->DC.LayoutType == ImGuiLayoutType_Vertical) // (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu))
6997 if (g.NavMoveDir == ImGuiDir_Left && NavMoveRequestButNoResultYet() && window->DC.LayoutType == ImGuiLayoutType_Vertical)
7015 ImVec2 pos = window->DC.CursorPos;
7025 const ImGuiMenuColumns* offsets = &window->DC.MenuColumns;
7026 if (window->DC.LayoutType == ImGuiLayoutType_Horizontal)
7031 window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * 0.5f);
7032 ImVec2 text_pos(window->DC.CursorPos.x + offsets->OffsetLabel, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
7037 window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar().
7047 float min_w = window->DC.MenuColumns.DeclColumns(icon_w, label_size.x, shortcut_w, checkmark_w); // Feedback for next frame
7178 ImRect tab_bar_bb = ImRect(window->DC.CursorPos.x, window->DC.CursorPos.y, window->WorkRect.Max.x, window->DC.CursorPos.y + g.FontSize + g.Style.FramePadding.y * 2);
7198 tab_bar->BackupCursorPos = window->DC.CursorPos;
7201 window->DC.CursorPos = ImVec2(tab_bar->BarRect.Min.x, tab_bar->BarRect.Max.y + tab_bar->ItemSpacingY);
7229 window->DC.CursorPos = ImVec2(tab_bar->BarRect.Min.x, tab_bar->BarRect.Max.y + tab_bar->ItemSpacingY);
7264 tab_bar->CurrTabsContentsHeight = ImMax(window->DC.CursorPos.y - tab_bar->BarRect.Max.y, tab_bar->CurrTabsContentsHeight);
7265 window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->CurrTabsContentsHeight;
7269 window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->PrevTabsContentsHeight;
7272 window->DC.CursorPos = tab_bar->BackupCursorPos;
7507 window->DC.CursorPos = tab_bar->BarRect.Min;
7509 window->DC.IdealMaxPos.x = ImMax(window->DC.IdealMaxPos.x, tab_bar->BarRect.Min.x + tab_bar->WidthAllTabsIdeal);
7700 const ImVec2 backup_cursor_pos = window->DC.CursorPos;
7714 window->DC.CursorPos = ImVec2(x, tab_bar->BarRect.Min.y);
7717 window->DC.CursorPos = ImVec2(x + arrow_button_size.x, tab_bar->BarRect.Min.y);
7747 window->DC.CursorPos = backup_cursor_pos;
7760 const ImVec2 backup_cursor_pos = window->DC.CursorPos;
7761 window->DC.CursorPos = ImVec2(tab_bar->BarRect.Min.x - g.Style.FramePadding.y, tab_bar->BarRect.Min.y);
7787 window->DC.CursorPos = backup_cursor_pos;
7959 const ImVec2 backup_main_cursor_pos = window->DC.CursorPos;
7965 window->DC.CursorPos = tab_bar->BarRect.Min + ImVec2(IM_FLOOR(tab->Offset - tab_bar->ScrollingAnim), 0.0f);
7967 window->DC.CursorPos = tab_bar->BarRect.Min + ImVec2(tab->Offset, 0.0f);
7968 ImVec2 pos = window->DC.CursorPos;
7976 ImVec2 backup_cursor_max_pos = window->DC.CursorMaxPos;
7978 window->DC.CursorMaxPos = backup_cursor_max_pos;
7984 window->DC.CursorPos = backup_main_cursor_pos;
8057 window->DC.CursorPos = backup_main_cursor_pos;