Lines Matching defs:scroll
115 - Use mouse wheel to scroll.
2511 Scroll = ImVec2(0.0f, 0.0f);
2787 // (b) So that we can scroll up/down past clipped items. This adds a small O(N) cost to regular navigation requests unfortunately, but it is still limited to one window.
2948 wrap_pos_x += window->Pos.x - window->Scroll.x; // wrap_pos_x is provided is window local space
3261 // If a child window has the ImGuiWindowFlags_NoScrollWithMouse flag, we give a chance to scroll its parent (unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set).
3287 SetWindowScrollY(scroll_window, scroll_window->Scroll.y - g.IO.MouseWheel * scroll_amount);
3294 SetWindowScrollX(scroll_window, scroll_window->Scroll.x - g.IO.MouseWheelH * scroll_amount);
4411 // When browsing a window that has no activable items (scroll only) we keep a highlight on the child
4566 sz.x = (float)(int)((window->SizeContentsExplicit.x != 0.0f) ? window->SizeContentsExplicit.x : (window->DC.CursorMaxPos.x - window->Pos.x + window->Scroll.x));
4567 sz.y = (float)(int)((window->SizeContentsExplicit.y != 0.0f) ? window->SizeContentsExplicit.y : (window->DC.CursorMaxPos.y - window->Pos.y + window->Scroll.y));
4620 ImVec2 scroll = window->Scroll;
4624 scroll.x = window->ScrollTarget.x - cr_x * (window->SizeFull.x - window->ScrollbarSizes.x);
4628 // 'snap_on_edges' allows for a discontinuity at the edge of scrolling limits to take account of WindowPadding so that scrolling to make the last item visible scroll far enough to see the padding.
4635 scroll.y = target_y - (1.0f - cr_y) * (window->TitleBarHeight() + window->MenuBarHeight()) - cr_y * (window->SizeFull.y - window->ScrollbarSizes.y);
4637 scroll = ImMax(scroll, ImVec2(0.0f, 0.0f));
4640 scroll.x = ImMin(scroll.x, ImGui::GetWindowScrollMaxX(window));
4641 scroll.y = ImMin(scroll.y, ImGui::GetWindowScrollMaxY(window));
4643 return scroll;
5160 window->Scroll = CalcNextScrollFromScrollTargetAndClamp(window, true);
5309 window->ContentsRegionRect.Min.x = window->Pos.x - window->Scroll.x + window->WindowPadding.x;
5310 window->ContentsRegionRect.Min.y = window->Pos.y - window->Scroll.y + window->WindowPadding.y + window->TitleBarHeight() + window->MenuBarHeight();
5311 window->ContentsRegionRect.Max.x = window->Pos.x - window->Scroll.x - window->WindowPadding.x + (window->SizeContentsExplicit.x != 0.0f ? window->SizeContentsExplicit.x : (window->Size.x - window->ScrollbarSizes.x));
5312 window->ContentsRegionRect.Max.y = window->Pos.y - window->Scroll.y - window->WindowPadding.y + (window->SizeContentsExplicit.y != 0.0f ? window->SizeContentsExplicit.y : (window->Size.y - window->ScrollbarSizes.y));
5316 window->DC.Indent.x = 0.0f + window->WindowPadding.x - window->Scroll.x;
5319 window->DC.CursorStartPos = window->Pos + ImVec2(window->DC.Indent.x + window->DC.ColumnsOffset.x, window->TitleBarHeight() + window->MenuBarHeight() + window->WindowPadding.y - window->Scroll.y);
6036 window->DC.CursorMaxPos.x += window->Scroll.x; // SizeContents is generally computed based on CursorMaxPos which is affected by scroll position, so we need to apply our change to it.
6037 window->Scroll.x = new_scroll_x;
6038 window->DC.CursorMaxPos.x -= window->Scroll.x;
6043 window->DC.CursorMaxPos.y += window->Scroll.y; // SizeContents is generally computed based on CursorMaxPos which is affected by scroll position, so we need to apply our change to it.
6044 window->Scroll.y = new_scroll_y;
6045 window->DC.CursorMaxPos.y -= window->Scroll.y;
6330 return window->DC.CursorPos - window->Pos + window->Scroll;
6336 return window->DC.CursorPos.x - window->Pos.x + window->Scroll.x;
6342 return window->DC.CursorPos.y - window->Pos.y + window->Scroll.y;
6348 window->DC.CursorPos = window->Pos - window->Scroll + local_pos;
6355 window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + x;
6362 window->DC.CursorPos.y = window->Pos.y - window->Scroll.y + y;
6387 return GImGui->CurrentWindow->Scroll.x;
6392 return GImGui->CurrentWindow->Scroll.y;
6424 window->ScrollTarget.y = (float)(int)(local_y + window->Scroll.y);
6622 window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + pos_x + spacing_w + window->DC.GroupOffset.x + window->DC.ColumnsOffset.x;
7397 bb_rel.Min.x = bb_rel.Max.x = ImMax(window->SizeFull.x, window->SizeContents.x) - window->Scroll.x;
7403 bb_rel.Min.x = bb_rel.Max.x = -window->Scroll.x;
7409 bb_rel.Min.y = bb_rel.Max.y = ImMax(window->SizeFull.y, window->SizeContents.y) - window->Scroll.y;
7415 bb_rel.Min.y = bb_rel.Max.y = -window->Scroll.y;
7538 // Scroll to keep newly navigated item fully into view
7550 window->ScrollTarget.x = item_rect.Min.x - window->Pos.x + window->Scroll.x - g.Style.ItemSpacing.x;
7555 window->ScrollTarget.x = item_rect.Max.x - window->Pos.x + window->Scroll.x + g.Style.ItemSpacing.x;
7560 window->ScrollTarget.y = item_rect.Min.y - window->Pos.y + window->Scroll.y - g.Style.ItemSpacing.y;
7565 window->ScrollTarget.y = item_rect.Max.y - window->Pos.y + window->Scroll.y + g.Style.ItemSpacing.y;
7755 // Update PageUp/PageDown scroll
7777 // *Fallback* manual-scroll with Nav directional keys when window has no navigable item
7779 const float scroll_speed = ImFloor(window->CalcFontSize() * 100 * g.IO.DeltaTime + 0.5f); // We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
7783 SetWindowScrollX(window, ImFloor(window->Scroll.x + ((g.NavMoveDir == ImGuiDir_Left) ? -1.0f : +1.0f) * scroll_speed));
7785 SetWindowScrollY(window, ImFloor(window->Scroll.y + ((g.NavMoveDir == ImGuiDir_Up) ? -1.0f : +1.0f) * scroll_speed));
7788 // *Normal* Manual scroll with NavScrollXXX keys
7793 SetWindowScrollX(window, ImFloor(window->Scroll.x + scroll_dir.x * scroll_speed));
7798 SetWindowScrollY(window, ImFloor(window->Scroll.y + scroll_dir.y * scroll_speed));
7867 // Scroll to keep newly navigated item fully into view.
7873 // Estimate upcoming scroll so we can offset our result position so mouse position can be applied immediately after in NavUpdate()
7875 ImVec2 delta_scroll = result->Window->Scroll - next_scroll;
7878 // Also scroll parent window to keep us into view if necessary (we could/should technically recurse back the whole the parent hierarchy).
7907 // Fallback manual-scroll when window has no navigable item
7909 SetWindowScrollY(window, window->Scroll.y - window->InnerClipRect.GetHeight());
7911 SetWindowScrollY(window, window->Scroll.y + window->InnerClipRect.GetHeight());
8346 columns->MaxX = ImMax(content_region_width - window->Scroll.x, columns->MinX + 1.0f);
9392 ImGui::BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f)", window->Scroll.x, GetWindowScrollMaxX(window), window->Scroll.y, GetWindowScrollMaxY(window));