Lines Matching refs:ImVec2

43   - How can I use my own math types instead of ImVec2/ImVec4?
150 - C++: ImVec2/ImVec4 do not expose math operators by default, because it is expected that you use your own math types.
151 See FAQ "How can I use my own math types instead of ImVec2/ImVec4?" for details about setting up imconfig.h for that.
152 However, imgui_internal.h can optionally export math operators for ImVec2/ImVec4, which we use in this codebase.
303 ImVec2 pos = draw_data->DisplayPos;
441 - 2017/08/25 (1.52) - io.MousePos needs to be set to ImVec2(-FLT_MAX,-FLT_MAX) when mouse is unavailable/missing. Previously ImVec2(-1,-1) was enough but we now accept negative mouse coordinates. In your binding if you need to support unavailable mouse, make sure to replace "io.MousePos = ImVec2(-1,-1)" with "io.MousePos = ImVec2(-FLT_MAX,-FLT_MAX)".
454 - changed prototype of rarely used 'ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)' to 'ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))'
455 - 2017/07/20 (1.51) - removed IsPosHoveringAnyWindow(ImVec2), which was partly broken and misleading. ASSERT + redirect user to io.WantCaptureMouse
460 - 2016/09/25 (1.50) - style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f) for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc.
475 - 2016/04/26 (1.49) - changed ImDrawList::PushClipRect(ImVec4 rect) to ImDrawList::PushClipRect(Imvec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false). Note that higher-level ImGui::PushClipRect() is preferable because it will clip at logic/widget level, whereas ImDrawList::PushClipRect() only affect your renderer.
605 ImGui::Image((void*)texture, ImVec2(texture->Width, texture->Height));
636 ImGui::Image((void*)(intptr_t)my_opengl_texture, ImVec2(my_image_width, my_image_height));
770 Q: How can I use my own math types instead of ImVec2/ImVec4?
772 This way you'll be able to use your own types everywhere, e.g. passsing glm::vec2 to ImGui functions instead of ImVec2.
995 static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags);
997 static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window, bool snap_on_edges);
1016 static bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags);
1026 static ImVec2 NavCalcPreferredRefPos();
1033 static void UpdateManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4]);
1082 WindowPadding = ImVec2(8,8); // Padding within a window
1085 WindowMinSize = ImVec2(32,32); // Minimum window size
1086 WindowTitleAlign = ImVec2(0.0f,0.5f);// Alignment for title bar text
1091 FramePadding = ImVec2(4,3); // Padding within a framed rectangle (used by most widgets)
1094 ItemSpacing = ImVec2(8,4); // Horizontal and vertical spacing between widgets/lines
1095 ItemInnerSpacing = ImVec2(4,4); // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
1096 TouchExtraPadding = ImVec2(0,0); // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
1105 ButtonTextAlign = ImVec2(0.5f,0.5f);// Alignment of button text when button is larger than text.
1106 SelectableTextAlign = ImVec2(0.0f,0.0f);// Alignment of selectable text when button is larger than text.
1107 DisplayWindowPadding = ImVec2(19,19); // Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
1108 DisplaySafeAreaPadding = ImVec2(3,3); // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
1152 DisplaySize = ImVec2(-1.0f, -1.0f);
1169 DisplayFramebufferScale = ImVec2(1.0f, 1.0f);
1196 MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
1197 MousePosPrev = ImVec2(-FLT_MAX, -FLT_MAX);
1232 ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p)
1234 ImVec2 ap = p - a;
1235 ImVec2 ab_dir = b - a;
1245 bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p)
1253 void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w)
1255 ImVec2 v0 = b - a;
1256 ImVec2 v1 = c - a;
1257 ImVec2 v2 = p - a;
1264 ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p)
1266 ImVec2 proj_ab = ImLineClosestPoint(a, b, p);
1267 ImVec2 proj_bc = ImLineClosestPoint(b, c, p);
1268 ImVec2 proj_ca = ImLineClosestPoint(c, a, p);
2285 void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
2311 void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
2329 void ImGui::RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_display_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect)
2332 ImVec2 pos = pos_min;
2333 const ImVec2 text_size = text_size_if_known ? *text_size_if_known : CalcTextSize(text, text_display_end, false, 0.0f);
2335 const ImVec2* clip_min = clip_rect ? &clip_rect->Min : &pos_min;
2336 const ImVec2* clip_max = clip_rect ? &clip_rect->Max : &pos_max;
2357 void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect)
2373 void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding)
2381 window->DrawList->AddRect(p_min+ImVec2(1,1), p_max+ImVec2(1,1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size);
2386 void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding)
2393 window->DrawList->AddRect(p_min+ImVec2(1,1), p_max+ImVec2(1,1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size);
2399 void ImGui::RenderArrow(ImVec2 p_min, ImGuiDir dir, float scale)
2405 ImVec2 center = p_min + ImVec2(h * 0.50f, h * 0.50f * scale);
2407 ImVec2 a, b, c;
2413 a = ImVec2(+0.000f,+0.750f) * r;
2414 b = ImVec2(-0.866f,-0.750f) * r;
2415 c = ImVec2(+0.866f,-0.750f) * r;
2420 a = ImVec2(+0.750f,+0.000f) * r;
2421 b = ImVec2(-0.750f,+0.866f) * r;
2422 c = ImVec2(-0.750f,-0.866f) * r;
2433 void ImGui::RenderBullet(ImVec2 pos)
2440 void ImGui::RenderCheckMark(ImVec2 pos, ImU32 col, float sz)
2447 pos += ImVec2(thickness*0.25f, thickness*0.25f);
2452 window->DrawList->PathLineTo(ImVec2(bx - third, by - third));
2453 window->DrawList->PathLineTo(ImVec2(bx, by));
2454 window->DrawList->PathLineTo(ImVec2(bx + third*2, by - third*2));
2476 display_rect.Expand(ImVec2(DISTANCE,DISTANCE));
2480 window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS*0.5f,THICKNESS*0.5f), display_rect.Max - ImVec2(THICKNESS*0.5f,THICKNESS*0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, ImDrawCornerFlags_All, THICKNESS);
2502 Pos = ImVec2(0.0f, 0.0f);
2503 Size = SizeFull = ImVec2(0.0f, 0.0f);
2504 SizeContents = SizeContentsExplicit = ImVec2(0.0f, 0.0f);
2505 WindowPadding = ImVec2(0.0f, 0.0f);
2511 Scroll = ImVec2(0.0f, 0.0f);
2512 ScrollTarget = ImVec2(FLT_MAX, FLT_MAX);
2513 ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f);
2514 ScrollbarSizes = ImVec2(0.0f, 0.0f);
2535 SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX);
2743 void ImGui::ItemSize(const ImVec2& size, float text_offset_y)
2753 //if (g.IO.KeyAlt) window->DrawList->AddRect(window->DC.CursorPos, window->DC.CursorPos + ImVec2(size.x, line_height), IM_COL32(255,0,0,200)); // [DEBUG]
2754 window->DC.CursorPosPrevLine = ImVec2(window->DC.CursorPos.x + size.x, window->DC.CursorPos.y);
2926 ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_x, float default_y)
2929 ImVec2 content_max;
2939 float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x)
3008 if (sz_vec2 != sizeof(ImVec2)) { error = true; IM_ASSERT(sz_vec2 == sizeof(ImVec2) && "Mismatched struct layout!"); }
3117 ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
3211 g.IO.MouseDelta = ImVec2(0.0f, 0.0f);
3227 ImVec2 delta_from_click_pos = IsMousePosValid(&g.IO.MousePos) ? (g.IO.MousePos - g.IO.MouseClickedPos[i]) : ImVec2(0.0f, 0.0f);
3237 g.IO.MouseDragMaxDistanceAbs[i] = ImVec2(0.0f, 0.0f);
3243 ImVec2 delta_from_click_pos = IsMousePosValid(&g.IO.MousePos) ? (g.IO.MousePos - g.IO.MouseClickedPos[i]) : ImVec2(0.0f, 0.0f);
3277 const ImVec2 offset = window->Size * (1.0f - scale) * (g.IO.MousePos - window->Pos) / window->Size;
3496 g.PlatformImePos = ImVec2(1.0f, 1.0f); // OS Input Method Editor showing on top-left of our window by default
3534 SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver);
3734 draw_data->DisplayPos = ImVec2(0.0f, 0.0f);
3745 void ImGui::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect)
3897 // CalcTextSize("") should return ImVec2(0.0f, GImGui->FontSize)
3898 ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_text_after_double_hash, float wrap_width)
3911 return ImVec2(0.0f, font_size);
3912 ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL);
3945 const ImVec2 pos = window->DC.CursorPos;
3973 ImVec2 padding_regular = g.Style.TouchExtraPadding;
3974 ImVec2 padding_for_resize_from_edges = g.IO.ConfigWindowsResizeFromEdges ? ImMax(g.Style.TouchExtraPadding, ImVec2(WINDOWS_RESIZE_FROM_EDGES_HALF_THICKNESS, WINDOWS_RESIZE_FROM_EDGES_HALF_THICKNESS)) : padding_regular;
4007 bool ImGui::IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip)
4138 ImVec2 ImGui::GetMousePos()
4144 ImVec2 ImGui::GetMousePosOnOpeningCurrentPopup()
4152 // We typically use ImVec2(-FLT_MAX,-FLT_MAX) to denote an invalid mouse position.
4153 bool ImGui::IsMousePosValid(const ImVec2* mouse_pos)
4159 ImVec2 p = mouse_pos ? *mouse_pos : GImGui->IO.MousePos;
4166 ImVec2 ImGui::GetMouseDragDelta(int button, float lock_threshold)
4175 return ImVec2(0.0f, 0.0f);
4297 ImVec2 ImGui::GetItemRectMin()
4303 ImVec2 ImGui::GetItemRectMax()
4309 ImVec2 ImGui::GetItemRectSize()
4321 static bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags)
4330 const ImVec2 content_avail = GetContentRegionAvail();
4331 ImVec2 size = ImFloor(size_arg);
4372 bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags)
4378 bool ImGui::BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags)
4396 ImVec2 sz = window->Size;
4413 RenderNavHighlight(ImRect(bb.Min - ImVec2(2,2), bb.Max + ImVec2(2,2)), g.NavId, ImGuiNavHighlightFlags_TypeThin);
4424 bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags extra_flags)
4478 static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags)
4488 window->Pos = ImVec2(60, 60);
4527 static ImVec2 CalcSizeAfterConstraint(ImGuiWindow* window, ImVec2 new_size)
4557 static ImVec2 CalcSizeContents(ImGuiWindow* window)
4565 ImVec2 sz;
4571 static ImVec2 CalcSizeAutoFit(ImGuiWindow* window, const ImVec2& size_contents)
4585 ImVec2 size_min = style.WindowMinSize;
4587 size_min = ImMin(size_min, ImVec2(4.0f, 4.0f));
4588 ImVec2 size_auto_fit = ImClamp(size_contents, size_min, ImMax(size_min, g.IO.DisplaySize - style.DisplaySafeAreaPadding * 2.0f));
4592 ImVec2 size_auto_fit_after_constraint = CalcSizeAfterConstraint(window, size_auto_fit);
4601 ImVec2 ImGui::CalcWindowExpectedSize(ImGuiWindow* window)
4603 ImVec2 size_contents = CalcSizeContents(window);
4617 static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window, bool snap_on_edges)
4620 ImVec2 scroll = window->Scroll;
4637 scroll = ImMax(scroll, ImVec2(0.0f, 0.0f));
4655 static void CalcResizePosSizeFromAnyCorner(ImGuiWindow* window, const ImVec2& corner_target, const ImVec2& corner_norm, ImVec2* out_pos, ImVec2* out_size)
4657 ImVec2 pos_min = ImLerp(corner_target, window->Pos, corner_norm); // Expected window upper-left
4658 ImVec2 pos_max = ImLerp(window->Pos + window->Size, corner_target, corner_norm); // Expected window lower-right
4659 ImVec2 size_expected = pos_max - pos_min;
4660 ImVec2 size_constrained = CalcSizeAfterConstraint(window, size_expected);
4671 ImVec2 CornerPosN;
4672 ImVec2 InnerDir;
4678 { ImVec2(1,1), ImVec2(-1,-1), 0, 3 }, // Lower right
4679 { ImVec2(0,1), ImVec2(+1,-1), 3, 6 }, // Lower left
4680 { ImVec2(0,0), ImVec2(+1,+1), 6, 9 }, // Upper left
4681 { ImVec2(1,0), ImVec2(-1,+1), 9,12 }, // Upper right
4687 if (thickness == 0.0f) rect.Max -= ImVec2(1,1);
4697 static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4])
4711 ImVec2 pos_target(FLT_MAX, FLT_MAX);
4712 ImVec2 size_target(FLT_MAX, FLT_MAX);
4719 const ImVec2 corner = ImLerp(window->Pos, window->Pos + window->Size, grip.CornerPosN);
4741 ImVec2 corner_target = g.IO.MousePos - g.ActiveIdClickOffset + ImLerp(grip.InnerDir * grip_hover_outer_size, grip.InnerDir * -grip_hover_inner_size, grip.CornerPosN); // Corner of the window corresponding to our corner grip
4761 ImVec2 border_target = window->Pos;
4762 ImVec2 border_posn;
4763 if (border_n == 0) { border_posn = ImVec2(0, 0); border_target.y = (g.IO.MousePos.y - g.ActiveIdClickOffset.y + WINDOWS_RESIZE_FROM_EDGES_HALF_THICKNESS); } // Top
4764 if (border_n == 1) { border_posn = ImVec2(1, 0); border_target.x = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + WINDOWS_RESIZE_FROM_EDGES_HALF_THICKNESS); } // Right
4765 if (border_n == 2) { border_posn = ImVec2(0, 1); border_target.y = (g.IO.MousePos.y - g.ActiveIdClickOffset.y + WINDOWS_RESIZE_FROM_EDGES_HALF_THICKNESS); } // Bottom
4766 if (border_n == 3) { border_posn = ImVec2(0, 0); border_target.x = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + WINDOWS_RESIZE_FROM_EDGES_HALF_THICKNESS); } // Left
4775 ImVec2 nav_resize_delta;
4820 ImVec2 InnerDir;
4821 ImVec2 CornerPosN1, CornerPosN2;
4826 { ImVec2(0,+1), ImVec2(0,0), ImVec2(1,0), IM_PI*1.50f }, // Top
4827 { ImVec2(-1,0), ImVec2(1,0), ImVec2(1,1), IM_PI*0.00f }, // Right
4828 { ImVec2(0,-1), ImVec2(1,1), ImVec2(0,1), IM_PI*0.50f }, // Bottom
4829 { ImVec2(+1,0), ImVec2(0,1), ImVec2(0,0), IM_PI*1.00f } // Left
4833 window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.CornerPosN1) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle - IM_PI*0.25f, def.OuterAngle);
4834 window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.CornerPosN2) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle, def.OuterAngle + IM_PI*0.25f);
4840 window->DrawList->AddLine(ImVec2(window->Pos.x + border_size, y), ImVec2(window->Pos.x + window->Size.x - border_size, y), GetColorU32(ImGuiCol_Border), g.Style.FrameBorderSize);
4879 ImVec2 size_on_first_use = (g.NextWindowData.SizeCond != 0) ? g.NextWindowData.SizeVal : ImVec2(0.0f, 0.0f); // Any condition flag will do since we are creating a new window here.
4967 window->SizeContentsExplicit = ImVec2(0.0f, 0.0f);
5027 window->SizeContents = ImVec2(0.f, 0.f);
5037 window->WindowPadding = ImVec2(0.0f, (flags & ImGuiWindowFlags_MenuBar) ? style.WindowPadding.y : 0.0f);
5065 const ImVec2 size_auto_fit = CalcSizeAutoFit(window, window->SizeContents);
5066 ImVec2 size_full_modified(FLT_MAX, FLT_MAX);
5103 window->ScrollbarSizes = ImVec2(window->ScrollbarY ? style.ScrollbarSize : 0.0f, window->ScrollbarX ? style.ScrollbarSize : 0.0f);
5142 ImVec2 padding = ImMax(style.DisplayWindowPadding, style.DisplaySafeAreaPadding);
5143 ImVec2 size_for_clamping = ((g.IO.ConfigWindowsMoveFromTitleBarOnly) && !(window->Flags & ImGuiWindowFlags_NoTitleBar)) ? ImVec2(window->Size.x, window->TitleBarHeight()) : window->Size;
5161 window->ScrollTarget = ImVec2(FLT_MAX, FLT_MAX);
5245 window->DrawList->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight()), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImDrawCornerFlags_All : ImDrawCornerFlags_Bot);
5278 const ImVec2 corner = ImLerp(window->Pos, window->Pos + window->Size, grip.CornerPosN);
5279 window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(window_border_size, grip_draw_size) : ImVec2(grip_draw_size, window_border_size)));
5280 window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(grip_draw_size, window_border_size) : ImVec2(window_border_size, grip_draw_size)));
5281 window->DrawList->PathArcToFast(ImVec2(corner.x + grip.InnerDir.x * (window_rounding + window_border_size), corner.y + grip.InnerDir.y * (window_rounding + window_border_size)), window_rounding, grip.AngleMin12, grip.AngleMax12);
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);
5323 window->DC.CurrentLineSize = window->DC.PrevLineSize = ImVec2(0.0f, 0.0f);
5384 if (CloseButton(window->GetID("#CLOSE"), window->Rect().GetTR() + ImVec2(-pad - rad, pad + rad), rad + 1))
5396 ImVec2 text_size = CalcTextSize(name, NULL, true) + ImVec2(marker_size_x, 0.0f);
5409 ImVec2 marker_pos = ImVec2(ImMax(text_r.Min.x, text_r.Min.x + (text_r.GetWidth() - text_size.x) * style.WindowTitleAlign.x) + text_size.x, text_r.Min.y) + ImVec2(2 - marker_size_x, 0.0f);
5410 ImVec2 off = ImVec2(0.0f, (float)(int)(-g.FontSize * 0.25f));
5411 RenderTextClipped(marker_pos + off, text_r.Max + off, UNSAVED_DOCUMENT_MARKER, NULL, NULL, ImVec2(0, style.WindowTitleAlign.y), &clip_rect);
5489 bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_first_use, float bg_alpha_override, ImGuiWindowFlags flags)
5844 void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
5850 ImVec2* pvar = (ImVec2*)var_info->GetVarPtr(&g.Style);
5855 IM_ASSERT(0); // Called function with wrong-type? Variable is not a ImVec2.
6027 ImVec2 ImGui::GetWindowPos()
6048 void ImGui::SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond)
6056 window->SetWindowPosVal = ImVec2(FLT_MAX, FLT_MAX);
6059 const ImVec2 old_pos = window->Pos;
6065 void ImGui::SetWindowPos(const ImVec2& pos, ImGuiCond cond)
6071 void ImGui::SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond)
6077 ImVec2 ImGui::GetWindowSize()
6083 void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond)
6115 void ImGui::SetWindowSize(const ImVec2& size, ImGuiCond cond)
6120 void ImGui::SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond)
6178 void ImGui::SetNextWindowPos(const ImVec2& pos, ImGuiCond cond, const ImVec2& pivot)
6187 void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond)
6195 void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback, void* custom_callback_user_data)
6204 void ImGui::SetNextWindowContentSize(const ImVec2& size)
6233 ImVec2 ImGui::GetContentRegionMax()
6236 ImVec2 mx = window->ContentsRegionRect.Max - window->Pos;
6242 ImVec2 ImGui::GetContentRegionAvail()
6254 ImVec2 ImGui::GetWindowContentRegionMin()
6260 ImVec2 ImGui::GetWindowContentRegionMax()
6312 ImVec2 ImGui::GetFontTexUvWhitePixel()
6327 ImVec2 ImGui::GetCursorPos()
6345 void ImGui::SetCursorPos(const ImVec2& local_pos)
6366 ImVec2 ImGui::GetCursorStartPos()
6372 ImVec2 ImGui::GetCursorScreenPos()
6378 void ImGui::SetCursorScreenPos(const ImVec2& pos)
6529 bool ImGui::IsRectVisible(const ImVec2& size)
6535 bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
6563 window->DC.CurrentLineSize = ImVec2(0.0f, 0.0f);
6663 //ImVec2 tooltip_pos = g.IO.MousePos - g.ActiveIdClickOffset - g.Style.WindowPadding;
6664 ImVec2 tooltip_pos = g.IO.MousePos + ImVec2(16 * g.Style.MouseCursorScale, 8 * g.Style.MouseCursorScale);
6952 SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
7014 ImVec2 padding = GImGui->Style.DisplaySafeAreaPadding;
7016 r_screen.Expand(ImVec2((r_screen.GetWidth() > padding.x * 2) ? -padding.x : 0.0f, (r_screen.GetHeight() > padding.y * 2) ? -padding.y : 0.0f));
7022 ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy)
7024 ImVec2 base_pos_clamped = ImClamp(ref_pos, r_outer.Min, r_outer.Max - size);
7037 ImVec2 pos;
7038 if (dir == ImGuiDir_Down) pos = ImVec2(r_avoid.Min.x, r_avoid.Max.y); // Below, Toward Right (default)
7039 if (dir == ImGuiDir_Right) pos = ImVec2(r_avoid.Min.x, r_avoid.Min.y - size.y); // Above, Toward Right
7040 if (dir == ImGuiDir_Left) pos = ImVec2(r_avoid.Max.x - size.x, r_avoid.Max.y); // Below, Toward Left
7041 if (dir == ImGuiDir_Up) pos = ImVec2(r_avoid.Max.x - size.x, r_avoid.Min.y - size.y); // Above, Toward Left
7060 ImVec2 pos;
7069 ImVec2 pos = ref_pos;
7075 ImVec2 ImGui::FindBestWindowPosForPopup(ImGuiWindow* window)
7103 ImVec2 ref_pos = NavCalcPreferredRefPos();
7109 ImVec2 pos = FindBestWindowPosForPopupEx(ref_pos, window->Size, &window->AutoPosLastDirection, r_outer, r_avoid);
7111 pos = ref_pos + ImVec2(2, 2); // If there's not enough room, for tooltip we prefer avoiding the cursor at all cost even if it means that part of the tooltip won't be visible.
7228 draw_list->AddRectFilled(cand.Max-ImVec2(4,4), cand.Max+ImGui::CalcTextSize(buf)+ImVec2(4,4), IM_COL32(40,0,0,150));
7480 static ImVec2 ImGui::NavCalcPreferredRefPos()
7494 ImVec2 pos = g.NavWindow->Pos + ImVec2(rect_rel.Min.x + ImMin(g.Style.FramePadding.x * 4, rect_rel.GetWidth()), rect_rel.Max.y - ImMin(g.Style.FramePadding.y, rect_rel.GetHeight()));
7522 ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor, float fast_factor)
7524 ImVec2 delta(0.0f, 0.0f);
7526 delta += ImVec2(GetNavInputAmount(ImGuiNavInput_KeyRight_, mode) - GetNavInputAmount(ImGuiNavInput_KeyLeft_, mode), GetNavInputAmount(ImGuiNavInput_KeyDown_, mode) - GetNavInputAmount(ImGuiNavInput_KeyUp_, mode));
7528 delta += ImVec2(GetNavInputAmount(ImGuiNavInput_DpadRight, mode) - GetNavInputAmount(ImGuiNavInput_DpadLeft, mode), GetNavInputAmount(ImGuiNavInput_DpadDown, mode) - GetNavInputAmount(ImGuiNavInput_DpadUp, mode));
7530 delta += ImVec2(GetNavInputAmount(ImGuiNavInput_LStickRight, mode) - GetNavInputAmount(ImGuiNavInput_LStickLeft, mode), GetNavInputAmount(ImGuiNavInput_LStickDown, mode) - GetNavInputAmount(ImGuiNavInput_LStickUp, mode));
7542 ImRect window_rect(window->InnerMainRect.Min - ImVec2(1, 1), window->InnerMainRect.Max + ImVec2(1, 1));
7790 ImVec2 scroll_dir = GetNavInputAmount2d(ImGuiNavDirSourceFlags_PadLStick, ImGuiInputReadMode_Down, 1.0f/10.0f, 10.0f);
7812 ImRect window_rect_rel(window->InnerMainRect.Min - window->Pos - ImVec2(1,1), window->InnerMainRect.Max - window->Pos + ImVec2(1,1));
7816 window_rect_rel.Expand(ImVec2(-ImMin(window_rect_rel.GetWidth(), pad), -ImMin(window_rect_rel.GetHeight(), pad))); // Terrible approximation for the intent of starting navigation from first fully visible item
7834 if (g.NavWindow) { ImU32 col = (!g.NavWindow->Hidden) ? IM_COL32(255,0,255,255) : IM_COL32(255,0,0,255); ImVec2 p = NavCalcPreferredRefPos(); char buf[32]; ImFormatString(buf, 32, "%d", g.NavLayer); GetOverlayDrawList(g.NavWindow)->AddCircleFilled(p, 3.0f, col); GetOverlayDrawList(g.NavWindow)->AddText(NULL, 13.0f, p + ImVec2(8,-4), col, buf); }
7874 ImVec2 next_scroll = CalcNextScrollFromScrollTargetAndClamp(result->Window, false);
7875 ImVec2 delta_scroll = result->Window->Scroll - next_scroll;
8054 ImVec2 move_delta;
8129 SetNextWindowSizeConstraints(ImVec2(g.IO.DisplaySize.x * 0.20f, g.IO.DisplaySize.y * 0.20f), ImVec2(FLT_MAX, FLT_MAX));
8130 SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
8179 window->DC.CurrentLineSize = ImVec2(0.0f, 0.0f);
8413 const ImRect column_rect(ImVec2(x - column_hw, y1), ImVec2(x + column_hw, y2));
8431 window->DrawList->AddLine(ImVec2(xi, ImMax(y1 + 1.0f, window->ClipRect.Min.y)), ImVec2(xi, ImMin(y2, window->ClipRect.Max.y)), col);
8735 if (push_clip_rect) window->DrawList->PushClipRect(r.Min-ImVec2(1,1), r.Max+ImVec2(1,1));
8794 void ImGui::LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end)
9113 if (sscanf(line, "Pos=%f,%f", &x, &y) == 2) settings->Pos = ImVec2(x, y);
9114 else if (sscanf(line, "Size=%f,%f", &x, &y) == 2) settings->Size = ImMax(ImVec2(x, y), GImGui->Style.WindowMinSize);
9349 ImVec2 triangles_pos[3];
9502 overlay_draw_list->AddRectFilled(window->Pos, window->Pos + ImVec2(font_size, font_size), IM_COL32(200, 100, 100, 255));