Lines Matching refs:DC

139     const ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrentLineTextBaseOffset);
140 const float wrap_pos_x = window->DC.TextWrapPos;
220 const float wrap_width = wrap_enabled ? CalcWrapWidthForPos(window->DC.CursorPos, wrap_pos_x) : 0.0f;
293 bool need_backup = (GImGui->CurrentWindow->DC.TextWrapPos < 0.0f); // Keep existing wrap position if one is already set
321 const ImRect value_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2));
322 const ImRect total_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w + (label_size.x > 0.0f ? style.ItemInnerSpacing.x : 0.0f), style.FramePadding.y*2) + label_size);
356 const float text_base_offset_y = ImMax(0.0f, window->DC.CurrentLineTextBaseOffset); // Latch before ItemSize changes it
357 const float line_height = ImMax(ImMin(window->DC.CurrentLineSize.y, g.FontSize + g.Style.FramePadding.y*2), g.FontSize);
358 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize + (label_size.x > 0.0f ? (label_size.x + style.FramePadding.x*2) : 0.0f), ImMax(line_height, label_size.y))); // Empty text doesn't add padding
410 if (id != 0 && window->DC.LastItemId != id)
555 ImVec2 pos = window->DC.CursorPos;
556 if ((flags & ImGuiButtonFlags_AlignTextBaseLine) && style.FramePadding.y < window->DC.CurrentLineTextBaseOffset) // 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)
557 pos.y += window->DC.CurrentLineTextBaseOffset - style.FramePadding.y;
565 if (window->DC.ItemFlags & ImGuiItemFlags_ButtonRepeat)
582 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
615 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
634 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
640 if (window->DC.ItemFlags & ImGuiItemFlags_ButtonRepeat)
848 ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
886 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size + padding * 2);
887 const ImRect image_bb(window->DC.CursorPos + padding, window->DC.CursorPos + padding + size);
918 const ImVec2 pos = window->DC.CursorPos;
946 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
977 const ImVec2 pos = window->DC.CursorPos;
1034 ImVec2 pos = window->DC.CursorPos;
1068 const float line_height = ImMax(ImMin(window->DC.CurrentLineSize.y, g.FontSize + g.Style.FramePadding.y*2), g.FontSize);
1069 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize, line_height));
1108 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
1120 const ImGuiLayoutType backup_layout_type = window->DC.LayoutType;
1121 window->DC.LayoutType = ImGuiLayoutType_Vertical;
1122 if (window->DC.CurrentLineSize.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.
1126 window->DC.LayoutType = backup_layout_type;
1136 window->DC.CurrentLineSize.y = ImMax(window->DC.CurrentLineSize.y, g.FontSize + g.Style.FramePadding.y * 2);
1137 window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.CurrentLineTextBaseOffset, g.Style.FramePadding.y);
1149 ImGuiSeparatorFlags flags = (window->DC.LayoutType == ImGuiLayoutType_Horizontal) ? ImGuiSeparatorFlags_Vertical : ImGuiSeparatorFlags_Horizontal;
1158 if (window->DC.ColumnsSet)
1163 if (!window->DC.GroupStack.empty())
1164 x1 += window->DC.Indent.x;
1166 const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y+1.0f));
1170 if (window->DC.ColumnsSet)
1180 if (window->DC.ColumnsSet)
1183 window->DC.ColumnsSet->LineMinY = window->DC.CursorPos.y;
1194 float y1 = window->DC.CursorPos.y;
1195 float y2 = window->DC.CursorPos.y + window->DC.CurrentLineSize.y;
1196 const ImRect bb(ImVec2(window->DC.CursorPos.x, y1), ImVec2(window->DC.CursorPos.x + 1.0f, y2));
1212 const ImGuiItemFlags item_flags_backup = window->DC.ItemFlags;
1213 window->DC.ItemFlags |= ImGuiItemFlags_NoNav | ImGuiItemFlags_NoNavDefaultFocus;
1215 window->DC.ItemFlags = item_flags_backup;
1299 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f));
1327 if (window->DC.NavLayerCurrent == 0)
1876 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f));
1910 window->DC.CursorPos = frame_bb.Min;
1933 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
2309 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f));
2342 window->DC.CursorPos = frame_bb.Min;
2369 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
2463 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + size);
3155 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + size);
3174 draw_window->DC.NavLayerActiveMaskNext |= draw_window->DC.NavLayerCurrentMask; // This is to ensure that EndChild() will display a navigation highlight
3299 const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y - style.FramePadding.y) : (g.FontSize*0.5f));
3622 ImVec2 render_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding;
3707 draw_window->DC.CursorPos.y += (draw_window->Scroll.y - scroll_y); // To avoid a frame of lag
3709 render_pos.y = draw_window->DC.CursorPos.y;
3798 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags);
3959 SetNextWindowPos(window->DC.LastItemRect.GetBL() + ImVec2(-1,style.ItemSpacing.y));
4011 if ((window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_HoveredRect) && !(flags & ImGuiColorEditFlags_NoDragDrop) && BeginDragDropTarget())
4028 window->DC.LastItemId = g.ActiveId;
4031 MarkItemEdited(window->DC.LastItemId);
4131 ImVec2 picker_pos = window->DC.CursorPos;
4400 MarkItemEdited(window->DC.LastItemId);
4423 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
4720 ImGuiStorage* storage = window->DC.StateStorage;
4753 if (g.LogEnabled && !(flags & ImGuiTreeNodeFlags_NoAutoOpenOnLog) && window->DC.TreeDepth < g.LogAutoExpandMaxDepth)
4775 const float text_base_offset_y = ImMax(padding.y, window->DC.CurrentLineTextBaseOffset); // Latch before ItemSize changes it
4776 const float frame_height = ImMax(ImMin(window->DC.CurrentLineSize.y, g.FontSize + style.FramePadding.y*2), label_size.y + padding.y*2);
4777 ImRect frame_bb = ImRect(window->DC.CursorPos, ImVec2(window->Pos.x + GetContentRegionMax().x, window->DC.CursorPos.y + frame_height));
4799 window->DC.TreeDepthMayJumpToParentOnPop |= (1 << window->DC.TreeDepth);
4802 window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_HasDisplayRect;
4803 window->DC.LastItemDisplayRect = frame_bb;
4809 IMGUI_TEST_ENGINE_ITEM_INFO(window->DC.LastItemId, label, window->DC.ItemFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0));
4857 window->DC.StateStorage->SetInt(id, is_open);
4907 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0));
4915 window->DC.TreeDepth++;
4923 window->DC.TreeDepth++;
4931 window->DC.TreeDepth++;
4941 window->DC.TreeDepth--;
4943 if (g.NavIdIsAlive && (window->DC.TreeDepthMayJumpToParentOnPop & (1 << window->DC.TreeDepth)))
4948 window->DC.TreeDepthMayJumpToParentOnPop &= (1 << window->DC.TreeDepth) - 1;
4957 g.CurrentWindow->DC.CursorPos.x += GetTreeNodeToLabelSpacing();
5004 ImVec2 button_center = ImVec2(ImMin(window->DC.LastItemRect.Max.x, window->ClipRect.Max.x) - g.Style.FramePadding.x - button_radius, window->DC.LastItemRect.GetCenter().y);
5030 if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsSet) // FIXME-OPT: Avoid if vertically clipped.
5036 ImVec2 pos = window->DC.CursorPos;
5037 pos.y += window->DC.CurrentLineTextBaseOffset;
5061 if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsSet)
5080 if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerCurrent)
5083 SetNavID(id, window->DC.NavLayerCurrent);
5096 if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsSet)
5107 if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(window->DC.ItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
5146 ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size);
5148 window->DC.LastItemRect = bb; // Forward storage for ListBoxFooter.. dodgy.
5188 const ImRect bb = parent_window->DC.LastItemRect;
5194 // We call SameLine() to restore DC.CurrentLine* data
5196 parent_window->DC.CursorPos = bb.Min;
5236 MarkItemEdited(g.CurrentWindow->DC.LastItemId);
5265 const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size);
5529 IM_ASSERT(!window->DC.MenuBarAppending);
5540 window->DC.CursorPos = ImVec2(bar_rect.Min.x + window->DC.MenuBarOffset.x, bar_rect.Min.y + window->DC.MenuBarOffset.y);
5541 window->DC.LayoutType = ImGuiLayoutType_Horizontal;
5542 window->DC.NavLayerCurrent = ImGuiNavLayer_Menu;
5543 window->DC.NavLayerCurrentMask = (1 << ImGuiNavLayer_Menu);
5544 window->DC.MenuBarAppending = true;
5562 if (nav_earliest_child->ParentWindow == window && nav_earliest_child->DC.ParentLayoutType == ImGuiLayoutType_Horizontal && g.NavMoveRequestForward == ImGuiNavForward_None)
5566 IM_ASSERT(window->DC.NavLayerActiveMaskNext & 0x02); // Sanity check
5577 IM_ASSERT(window->DC.MenuBarAppending);
5580 window->DC.MenuBarOffset.x = window->DC.CursorPos.x - window->MenuBarRect().Min.x; // Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.
5581 window->DC.GroupStack.back().AdvanceCursor = false;
5583 window->DC.LayoutType = ImGuiLayoutType_Vertical;
5584 window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
5585 window->DC.NavLayerCurrentMask = (1 << ImGuiNavLayer_Main);
5586 window->DC.MenuBarAppending = false;
5611 ImVec2 popup_pos, pos = window->DC.CursorPos;
5612 if (window->DC.LayoutType == ImGuiLayoutType_Horizontal)
5618 window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * 0.5f);
5623 window->DC.CursorPos.x += (float)(int)(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().
5637 const bool hovered = enabled && ItemHoverable(window->DC.LastItemRect, id);
5642 if (window->DC.LayoutType == ImGuiLayoutType_Vertical) // (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu))
5702 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Openable | (menu_is_open ? ImGuiItemStatusFlags_Opened : 0));
5735 if (g.NavWindow && g.NavWindow->ParentWindow == window && g.NavMoveDir == ImGuiDir_Left && NavMoveRequestButNoResultYet() && window->DC.LayoutType == ImGuiLayoutType_Vertical)
5752 ImVec2 pos = window->DC.CursorPos;
5757 if (window->DC.LayoutType == ImGuiLayoutType_Horizontal)
5762 window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * 0.5f);
5766 window->DC.CursorPos.x += (float)(int)(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().
5784 IMGUI_TEST_ENGINE_ITEM_INFO(window->DC.LastItemId, label, window->DC.ItemFlags | ImGuiItemStatusFlags_Checkable | (selected ? ImGuiItemStatusFlags_Checked : 0));
5872 ImRect tab_bar_bb = ImRect(window->DC.CursorPos.x, window->DC.CursorPos.y, window->InnerClipRect.Max.x, window->DC.CursorPos.y + g.FontSize + g.Style.FramePadding.y * 2);
5913 window->DC.CursorPos.x = tab_bar->BarRect.Min.x;
5941 tab_bar->ContentsHeight = ImMax(window->DC.CursorPos.y - tab_bar->BarRect.Max.y, 0.0f);
5943 window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->ContentsHeight;
6212 const ImVec2 backup_cursor_pos = window->DC.CursorPos;
6216 bool want_clip_rect = !avail_bar_rect.Contains(ImRect(window->DC.CursorPos, window->DC.CursorPos + ImVec2(scrolling_buttons_width, 0.0f)));
6232 window->DC.CursorPos = ImVec2(tab_bar->BarRect.Max.x - scrolling_buttons_width, tab_bar->BarRect.Min.y);
6235 window->DC.CursorPos = ImVec2(tab_bar->BarRect.Max.x - scrolling_buttons_width + arrow_button_size.x, tab_bar->BarRect.Min.y);
6252 window->DC.CursorPos = backup_cursor_pos;
6265 const ImVec2 backup_cursor_pos = window->DC.CursorPos;
6266 window->DC.CursorPos = ImVec2(tab_bar->BarRect.Min.x - g.Style.FramePadding.y, tab_bar->BarRect.Min.y);
6289 window->DC.CursorPos = backup_cursor_pos;
6427 const ImVec2 backup_main_cursor_pos = window->DC.CursorPos;
6431 window->DC.CursorPos = tab_bar->BarRect.Min + ImVec2((float)(int)tab->Offset - tab_bar->ScrollingAnim, 0.0f);
6432 ImVec2 pos = window->DC.CursorPos;
6445 window->DC.CursorPos = backup_main_cursor_pos;
6518 window->DC.CursorPos = backup_main_cursor_pos;