Lines Matching defs:result

835       builder.BuildRanges(&ranges);                          // Build the final result (ordered ranges with all the unique characters submitted)
1963 // FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame)
3744 // When using this function it is sane to ensure that float are perfectly rounded to integer values, to that e.g. (int)(max.x-min.x) in user's render produce correct result.
3922 // NB: 'items_count' is only used to clamp the result, if you don't know your count you can use INT_MAX
5438 // Force round operator last to ensure that e.g. (int)(max.x-min.x) in user's render code produce correct result.
7159 static bool NavScoreItem(ImGuiNavMoveResult* result, ImRect cand)
7249 if (dist_box < result->DistBox)
7251 result->DistBox = dist_box;
7252 result->DistCenter = dist_center;
7255 if (dist_box == result->DistBox)
7258 if (dist_center < result->DistCenter)
7260 result->DistCenter = dist_center;
7263 else if (dist_center == result->DistCenter)
7279 if (result->DistBox == FLT_MAX && dist_axial < result->DistAxial) // Check axial match
7283 result->DistAxial = dist_axial;
7320 ImGuiNavMoveResult* result = (window == g.NavWindow) ? &g.NavMoveResultLocal : &g.NavMoveResultOther;
7325 bool new_best = NavScoreItem(result, nav_bb) && g.NavMoveRequest;
7327 bool new_best = g.NavMoveRequest && NavScoreItem(result, nav_bb);
7331 result->ID = id;
7332 result->SelectScopeId = g.MultiSelectScopeId;
7333 result->Window = window;
7334 result->RectRel = nav_bb_rel;
7342 result = &g.NavMoveResultLocalVisibleSet;
7343 result->ID = id;
7344 result->SelectScopeId = g.MultiSelectScopeId;
7345 result->Window = window;
7346 result->RectRel = nav_bb_rel;
7496 return ImFloor(ImClamp(pos, visible_rect.Min, visible_rect.Max)); // ImFloor() is important because non-integer mouse position application in back-end might be lossy and result in undesirable non-zero delta.
7608 // Apply result from previous navigation init request (will typically select the first item, unless SetItemDefaultFocus() has been called)
7634 // Apply application mouse position movement, after we had a chance to process move request result.
7838 // Apply result from previous frame navigation directional move request
7844 // In a situation when there is no results but NavId != 0, re-enable the Navigation highlight (because g.NavId is not considered as a possible result)
7853 // Select which result to use
7854 ImGuiNavMoveResult* result = (g.NavMoveResultLocal.ID != 0) ? &g.NavMoveResultLocal : &g.NavMoveResultOther;
7856 // PageUp/PageDown behavior first jumps to the bottom/top mostly visible item, _otherwise_ use the result from the previous/next page.
7859 result = &g.NavMoveResultLocalVisibleSet;
7862 if (result != &g.NavMoveResultOther && g.NavMoveResultOther.ID != 0 && g.NavMoveResultOther.Window->ParentWindow == g.NavWindow)
7863 if ((g.NavMoveResultOther.DistBox < result->DistBox) || (g.NavMoveResultOther.DistBox == result->DistBox && g.NavMoveResultOther.DistCenter < result->DistCenter))
7864 result = &g.NavMoveResultOther;
7865 IM_ASSERT(g.NavWindow && result->Window);
7870 ImRect rect_abs = ImRect(result->RectRel.Min + result->Window->Pos, result->RectRel.Max + result->Window->Pos);
7871 NavScrollToBringItemIntoView(result->Window, rect_abs);
7873 // Estimate upcoming scroll so we can offset our result position so mouse position can be applied immediately after in NavUpdate()
7874 ImVec2 next_scroll = CalcNextScrollFromScrollTargetAndClamp(result->Window, false);
7875 ImVec2 delta_scroll = result->Window->Scroll - next_scroll;
7876 result->RectRel.Translate(delta_scroll);
7879 if (result->Window->Flags & ImGuiWindowFlags_ChildWindow)
7880 NavScrollToBringItemIntoView(result->Window->ParentWindow, ImRect(rect_abs.Min + delta_scroll, rect_abs.Max + delta_scroll));
7884 g.NavWindow = result->Window;
7885 if (g.NavId != result->ID)
7888 g.NavJustMovedToId = result->ID;
7889 g.NavJustMovedToSelectScopeId = result->SelectScopeId;
7891 SetNavIDWithRectRel(result->ID, g.NavLayer, result->RectRel);