Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
imgui.cpp File Reference
#include "imgui.h"
#include "imgui_internal.h"
#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
+ Include dependency graph for imgui.cpp:

Go to the source code of this file.

Classes

struct  ImGuiStyleVarInfo
 
struct  ImGuiResizeGripDef
 
struct  ImGuiResizeBorderDef
 

Namespaces

namespace  ImGui
 

Macros

#define IMGUI_DEFINE_MATH_OPERATORS
 
#define IMGUI_DEBUG_NAV_SCORING   0
 
#define IMGUI_DEBUG_NAV_RECTS   0
 
#define IMGUI_DEBUG_INI_SETTINGS   0
 
#define va_copy(dest, src)   (dest = src)
 
#define NAV_MAP_KEY(_KEY, _NAV_INPUT)   do { if (IsKeyDown(io.KeyMap[_KEY])) { io.NavInputs[_NAV_INPUT] = 1.0f; g.NavInputSource = ImGuiInputSource_Keyboard; } } while (0)
 

Functions

static void SetCurrentWindow (ImGuiWindow *window)
 
static void FindHoveredWindow ()
 
static ImGuiWindowCreateNewWindow (const char *name, ImGuiWindowFlags flags)
 
static ImVec2 CalcNextScrollFromScrollTargetAndClamp (ImGuiWindow *window)
 
static void AddDrawListToDrawData (ImVector< ImDrawList * > *out_list, ImDrawList *draw_list)
 
static void AddWindowToSortBuffer (ImVector< ImGuiWindow * > *out_sorted_windows, ImGuiWindow *window)
 
static void WindowSettingsHandler_ClearAll (ImGuiContext *, ImGuiSettingsHandler *)
 
static voidWindowSettingsHandler_ReadOpen (ImGuiContext *, ImGuiSettingsHandler *, const char *name)
 
static void WindowSettingsHandler_ReadLine (ImGuiContext *, ImGuiSettingsHandler *, void *entry, const char *line)
 
static void WindowSettingsHandler_ApplyAll (ImGuiContext *, ImGuiSettingsHandler *)
 
static void WindowSettingsHandler_WriteAll (ImGuiContext *, ImGuiSettingsHandler *, ImGuiTextBuffer *buf)
 
static const char * GetClipboardTextFn_DefaultImpl (void *user_data)
 
static void SetClipboardTextFn_DefaultImpl (void *user_data, const char *text)
 
static void ImeSetInputScreenPosFn_DefaultImpl (int x, int y)
 
static void ImGui::NavUpdate ()
 
static void ImGui::NavUpdateWindowing ()
 
static void ImGui::NavUpdateWindowingOverlay ()
 
static void ImGui::NavUpdateMoveResult ()
 
static void ImGui::NavUpdateInitResult ()
 
static float ImGui::NavUpdatePageUpPageDown ()
 
static void ImGui::NavUpdateAnyRequestFlag ()
 
static void ImGui::NavEndFrame ()
 
static bool ImGui::NavScoreItem (ImGuiNavItemData *result, ImRect cand)
 
static void ImGui::NavApplyItemToResult (ImGuiNavItemData *result, ImGuiWindow *window, ImGuiID id, const ImRect &nav_bb_rel)
 
static void ImGui::NavProcessItem (ImGuiWindow *window, const ImRect &nav_bb, ImGuiID id)
 
static ImVec2 ImGui::NavCalcPreferredRefPos ()
 
static void ImGui::NavSaveLastChildNavWindowIntoParent (ImGuiWindow *nav_window)
 
static ImGuiWindowImGui::NavRestoreLastChildNavWindow (ImGuiWindow *window)
 
static void ImGui::NavRestoreLayer (ImGuiNavLayer layer)
 
static int ImGui::FindWindowFocusIndex (ImGuiWindow *window)
 
static void ImGui::ErrorCheckNewFrameSanityChecks ()
 
static void ImGui::ErrorCheckEndFrameSanityChecks ()
 
static void ImGui::UpdateSettings ()
 
static void ImGui::UpdateMouseInputs ()
 
static void ImGui::UpdateMouseWheel ()
 
static void ImGui::UpdateTabFocus ()
 
static void ImGui::UpdateDebugToolItemPicker ()
 
static bool ImGui::UpdateWindowManualResize (ImGuiWindow *window, const ImVec2 &size_auto_fit, int *border_held, int resize_grip_count, ImU32 resize_grip_col[4], const ImRect &visibility_rect)
 
static void ImGui::RenderWindowOuterBorders (ImGuiWindow *window)
 
static void ImGui::RenderWindowDecorations (ImGuiWindow *window, const ImRect &title_bar_rect, bool title_bar_is_highlight, int resize_grip_count, const ImU32 resize_grip_col[4], float resize_grip_draw_size)
 
static void ImGui::RenderWindowTitleBarContents (ImGuiWindow *window, const ImRect &title_bar_rect, const char *name, bool *p_open)
 
static void ImGui::UpdateViewportsNewFrame ()
 
static voidMallocWrapper (size_t size, void *user_data)
 
static void FreeWrapper (void *ptr, void *user_data)
 
ImVec2 ImBezierCubicClosestPoint (const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, const ImVec2 &p, int num_segments)
 
static void ImBezierCubicClosestPointCasteljauStep (const ImVec2 &p, ImVec2 &p_closest, ImVec2 &p_last, float &p_closest_dist2, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float tess_tol, int level)
 
ImVec2 ImBezierCubicClosestPointCasteljau (const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, const ImVec2 &p, float tess_tol)
 
ImVec2 ImLineClosestPoint (const ImVec2 &a, const ImVec2 &b, const ImVec2 &p)
 
bool ImTriangleContainsPoint (const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
 
void ImTriangleBarycentricCoords (const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p, float &out_u, float &out_v, float &out_w)
 
ImVec2 ImTriangleClosestPoint (const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
 
int ImStricmp (const char *str1, const char *str2)
 
int ImStrnicmp (const char *str1, const char *str2, size_t count)
 
void ImStrncpy (char *dst, const char *src, size_t count)
 
char * ImStrdup (const char *str)
 
char * ImStrdupcpy (char *dst, size_t *p_dst_size, const char *src)
 
const char * ImStrchrRange (const char *str, const char *str_end, char c)
 
int ImStrlenW (const ImWchar *str)
 
const char * ImStreolRange (const char *str, const char *str_end)
 
const ImWcharImStrbolW (const ImWchar *buf_mid_line, const ImWchar *buf_begin)
 
const char * ImStristr (const char *haystack, const char *haystack_end, const char *needle, const char *needle_end)
 
void ImStrTrimBlanks (char *buf)
 
const char * ImStrSkipBlank (const char *str)
 
int ImFormatString (char *buf, size_t buf_size, const char *fmt,...)
 
int ImFormatStringV (char *buf, size_t buf_size, const char *fmt, va_list args)
 
ImGuiID ImHashData (const void *data_p, size_t data_size, ImU32 seed)
 
ImGuiID ImHashStr (const char *data_p, size_t data_size, ImU32 seed)
 
ImFileHandle ImFileOpen (const char *filename, const char *mode)
 
bool ImFileClose (ImFileHandle f)
 
ImU64 ImFileGetSize (ImFileHandle f)
 
ImU64 ImFileRead (void *data, ImU64 sz, ImU64 count, ImFileHandle f)
 
ImU64 ImFileWrite (const void *data, ImU64 sz, ImU64 count, ImFileHandle f)
 
voidImFileLoadToMemory (const char *filename, const char *mode, size_t *out_file_size, int padding_bytes)
 
int ImTextCharFromUtf8 (unsigned int *out_char, const char *in_text, const char *in_text_end)
 
int ImTextStrFromUtf8 (ImWchar *buf, int buf_size, const char *in_text, const char *in_text_end, const char **in_text_remaining)
 
int ImTextCountCharsFromUtf8 (const char *in_text, const char *in_text_end)
 
static int ImTextCharToUtf8 (char *buf, int buf_size, unsigned int c)
 
int ImTextCountUtf8BytesFromChar (const char *in_text, const char *in_text_end)
 
static int ImTextCountUtf8BytesFromChar (unsigned int c)
 
int ImTextStrToUtf8 (char *buf, int buf_size, const ImWchar *in_text, const ImWchar *in_text_end)
 
int ImTextCountUtf8BytesFromStr (const ImWchar *in_text, const ImWchar *in_text_end)
 
IMGUI_API ImU32 ImAlphaBlendColors (ImU32 col_a, ImU32 col_b)
 
static ImGuiStorage::ImGuiStoragePairLowerBound (ImVector< ImGuiStorage::ImGuiStoragePair > &data, ImGuiID key)
 
static bool GetSkipItemForListClipping ()
 
static void SetCursorPosYAndSetupForPrevLine (float pos_y, float line_height)
 
static const ImGuiStyleVarInfoGetStyleVarInfo (ImGuiStyleVar idx)
 
static bool IsWindowContentHoverable (ImGuiWindow *window, ImGuiHoveredFlags flags)
 
static ImDrawListGetViewportDrawList (ImGuiViewportP *viewport, size_t drawlist_no, const char *drawlist_name)
 
static bool IsWindowActiveAndVisible (ImGuiWindow *window)
 
static void StartLockWheelingWindow (ImGuiWindow *window)
 
static int IMGUI_CDECL ChildWindowComparer (const void *lhs, const void *rhs)
 
static void AddWindowToDrawData (ImGuiWindow *window, int layer)
 
static void AddRootWindowToDrawData (ImGuiWindow *window)
 
static void SetupViewportDrawData (ImGuiViewportP *viewport, ImVector< ImDrawList * > *draw_lists)
 
static void SetWindowConditionAllowFlags (ImGuiWindow *window, ImGuiCond flags, bool enabled)
 
static void ApplyWindowSettings (ImGuiWindow *window, ImGuiWindowSettings *settings)
 
static ImVec2 CalcWindowSizeAfterConstraint (ImGuiWindow *window, const ImVec2 &size_desired)
 
static void CalcWindowContentSizes (ImGuiWindow *window, ImVec2 *content_size_current, ImVec2 *content_size_ideal)
 
static ImVec2 CalcWindowAutoFitSize (ImGuiWindow *window, const ImVec2 &size_contents)
 
static ImGuiCol GetWindowBgColorIdxFromFlags (ImGuiWindowFlags flags)
 
static void CalcResizePosSizeFromAnyCorner (ImGuiWindow *window, const ImVec2 &corner_target, const ImVec2 &corner_norm, ImVec2 *out_pos, ImVec2 *out_size)
 
static ImRect GetResizeBorderRect (ImGuiWindow *window, int border_n, float perp_padding, float thickness)
 
static void ClampWindowRect (ImGuiWindow *window, const ImRect &visibility_rect)
 
static float CalcScrollEdgeSnap (float target, float snap_min, float snap_max, float snap_threshold, float center_ratio)
 
ImGuiDir ImGetDirQuadrantFromDelta (float dx, float dy)
 
static float NavScoreItemDistInterval (float a0, float a1, float b0, float b1)
 
static void NavClampRectToVisibleAreaForMoveDir (ImGuiDir move_dir, ImRect &r, const ImRect &clip_rect)
 
static ImGuiWindowFindWindowNavFocusable (int i_start, int i_stop, int dir)
 
static void NavUpdateWindowingHighlightWindow (int focus_change_dir)
 
static const char * GetFallbackWindowNameForWindowingList (ImGuiWindow *window)
 
static void LogTextV (ImGuiContext &g, const char *fmt, va_list args)
 
static void RenderViewportsThumbnails ()
 
static void MetricsHelpMarker (const char *desc)
 
void ImGui::ShowFontAtlas (ImFontAtlas *atlas)
 

Variables

static const float NAV_WINDOWING_HIGHLIGHT_DELAY = 0.20f
 
static const float NAV_WINDOWING_LIST_APPEAR_DELAY = 0.15f
 
static const float WINDOWS_HOVER_PADDING = 4.0f
 
static const float WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER = 0.04f
 
static const float WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER = 2.00f
 
ImGuiContextGImGui = NULL
 
static ImGuiMemAllocFunc GImAllocatorAllocFunc = MallocWrapper
 
static ImGuiMemFreeFunc GImAllocatorFreeFunc = FreeWrapper
 
static voidGImAllocatorUserData = NULL
 
static const ImU32 GCrc32LookupTable [256]
 
static const ImGuiStyleVarInfo GStyleVarInfo []
 
static const ImGuiResizeGripDef resize_grip_def [4]
 
static const ImGuiResizeBorderDef resize_border_def [4]
 

Class Documentation

◆ ImGuiResizeGripDef

struct ImGuiResizeGripDef
+ Collaboration diagram for ImGuiResizeGripDef:
Class Members
int AngleMax12
int AngleMin12
ImVec2 CornerPosN
ImVec2 InnerDir

◆ ImGuiResizeBorderDef

struct ImGuiResizeBorderDef
+ Collaboration diagram for ImGuiResizeBorderDef:
Class Members
ImVec2 InnerDir
float OuterAngle
ImVec2 SegmentN1
ImVec2 SegmentN2

Macro Definition Documentation

◆ IMGUI_DEBUG_INI_SETTINGS

#define IMGUI_DEBUG_INI_SETTINGS   0

◆ IMGUI_DEBUG_NAV_RECTS

#define IMGUI_DEBUG_NAV_RECTS   0

◆ IMGUI_DEBUG_NAV_SCORING

#define IMGUI_DEBUG_NAV_SCORING   0

◆ IMGUI_DEFINE_MATH_OPERATORS

#define IMGUI_DEFINE_MATH_OPERATORS

◆ NAV_MAP_KEY

#define NAV_MAP_KEY (   _KEY,
  _NAV_INPUT 
)    do { if (IsKeyDown(io.KeyMap[_KEY])) { io.NavInputs[_NAV_INPUT] = 1.0f; g.NavInputSource = ImGuiInputSource_Keyboard; } } while (0)

◆ va_copy

#define va_copy (   dest,
  src 
)    (dest = src)

Function Documentation

◆ AddDrawListToDrawData()

static void AddDrawListToDrawData ( ImVector< ImDrawList * > *  out_list,
ImDrawList draw_list 
)
static
4267{
4268 // Remove trailing command if unused.
4269 // Technically we could return directly instead of popping, but this make things looks neat in Metrics/Debugger window as well.
4270 draw_list->_PopUnusedDrawCmd();
4271 if (draw_list->CmdBuffer.Size == 0)
4272 return;
4273
4274 // Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc.
4275 // May trigger for you if you are using PrimXXX functions incorrectly.
4276 IM_ASSERT(draw_list->VtxBuffer.Size == 0 || draw_list->_VtxWritePtr == draw_list->VtxBuffer.Data + draw_list->VtxBuffer.Size);
4277 IM_ASSERT(draw_list->IdxBuffer.Size == 0 || draw_list->_IdxWritePtr == draw_list->IdxBuffer.Data + draw_list->IdxBuffer.Size);
4278 if (!(draw_list->Flags & ImDrawListFlags_AllowVtxOffset))
4279 IM_ASSERT((int)draw_list->_VtxCurrentIdx == draw_list->VtxBuffer.Size);
4280
4281 // Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = unsigned short = 2 bytes = 64K vertices per ImDrawList = per window)
4282 // If this assert triggers because you are drawing lots of stuff manually:
4283 // - First, make sure you are coarse clipping yourself and not trying to draw many things outside visible bounds.
4284 // Be mindful that the ImDrawList API doesn't filter vertices. Use the Metrics/Debugger window to inspect draw list contents.
4285 // - If you want large meshes with more than 64K vertices, you can either:
4286 // (A) Handle the ImDrawCmd::VtxOffset value in your renderer backend, and set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset'.
4287 // Most example backends already support this from 1.71. Pre-1.71 backends won't.
4288 // Some graphics API such as GL ES 1/2 don't have a way to offset the starting vertex so it is not supported for them.
4289 // (B) Or handle 32-bit indices in your renderer backend, and uncomment '#define ImDrawIdx unsigned int' line in imconfig.h.
4290 // Most example backends already support this. For example, the OpenGL example code detect index size at compile-time:
4291 // glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer_offset);
4292 // Your own engine or render API may use different parameters or function calls to specify index sizes.
4293 // 2 and 4 bytes indices are generally supported by most graphics API.
4294 // - If for some reason neither of those solutions works for you, a workaround is to call BeginChild()/EndChild() before reaching
4295 // the 64K limit to split your draw commands in multiple draw lists.
4296 if (sizeof(ImDrawIdx) == 2)
4297 IM_ASSERT(draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above");
4298
4299 out_list->push_back(draw_list);
4300}
@ ImDrawListFlags_AllowVtxOffset
Definition imgui.h:2335
#define IM_ASSERT(_EXPR)
Definition imgui.h:81
unsigned short ImDrawIdx
Definition imgui.h:2255
unsigned int _VtxCurrentIdx
Definition imgui.h:2356
IMGUI_API void _PopUnusedDrawCmd()
Definition imgui_draw.cpp:467
ImVector< ImDrawCmd > CmdBuffer
Definition imgui.h:2350
ImDrawVert * _VtxWritePtr
Definition imgui.h:2359
ImDrawIdx * _IdxWritePtr
Definition imgui.h:2360
ImVector< ImDrawVert > VtxBuffer
Definition imgui.h:2352
ImDrawListFlags Flags
Definition imgui.h:2353
ImVector< ImDrawIdx > IdxBuffer
Definition imgui.h:2351
void push_back(const T &v)
Definition imgui.h:1696
int Size
Definition imgui.h:1655
T * Data
Definition imgui.h:1657

References ImDrawList::_IdxWritePtr, ImDrawList::_PopUnusedDrawCmd(), ImDrawList::_VtxCurrentIdx, ImDrawList::_VtxWritePtr, ImDrawList::CmdBuffer, ImVector< T >::Data, ImDrawList::Flags, ImDrawList::IdxBuffer, IM_ASSERT, ImDrawListFlags_AllowVtxOffset, ImVector< T >::push_back(), ImVector< T >::Size, and ImDrawList::VtxBuffer.

Referenced by AddWindowToDrawData(), and ImGui::Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddRootWindowToDrawData()

static void AddRootWindowToDrawData ( ImGuiWindow window)
static
4318{
4319 int layer = (window->Flags & ImGuiWindowFlags_Tooltip) ? 1 : 0;
4320 AddWindowToDrawData(window, layer);
4321}
static void AddWindowToDrawData(ImGuiWindow *window, int layer)
Definition imgui.cpp:4302
@ ImGuiWindowFlags_Tooltip
Definition imgui.h:943
ImGuiWindowFlags Flags
Definition imgui_internal.h:1810

References AddWindowToDrawData(), ImGuiWindow::Flags, and ImGuiWindowFlags_Tooltip.

Referenced by ImGui::Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddWindowToDrawData()

static void AddWindowToDrawData ( ImGuiWindow window,
int  layer 
)
static
4303{
4304 ImGuiContext& g = *GImGui;
4305 ImGuiViewportP* viewport = g.Viewports[0];
4307 AddDrawListToDrawData(&viewport->DrawDataBuilder.Layers[layer], window->DrawList);
4308 for (int i = 0; i < window->DC.ChildWindows.Size; i++)
4309 {
4310 ImGuiWindow* child = window->DC.ChildWindows[i];
4311 if (IsWindowActiveAndVisible(child)) // Clipped children may have been marked not active
4312 AddWindowToDrawData(child, layer);
4313 }
4314}
static bool IsWindowActiveAndVisible(ImGuiWindow *window)
Definition imgui.cpp:3630
ImGuiContext * GImGui
Definition imgui.cpp:960
static void AddDrawListToDrawData(ImVector< ImDrawList * > *out_list, ImDrawList *draw_list)
Definition imgui.cpp:4266
ImVector< ImGuiWindow * > ChildWindows
Definition imgui_internal.h:1787
ImVector< ImDrawList * > Layers[2]
Definition imgui_internal.h:706
Definition imgui_internal.h:1351
ImVector< ImGuiViewportP * > Viewports
Definition imgui_internal.h:1437
ImGuiIO IO
Definition imgui_internal.h:1354
int MetricsRenderWindows
Definition imgui.h:1870
Definition imgui_internal.h:1228
ImDrawDataBuilder DrawDataBuilder
Definition imgui_internal.h:1232
Definition imgui_internal.h:1807
ImDrawList * DrawList
Definition imgui_internal.h:1883
ImGuiWindowTempData DC
Definition imgui_internal.h:1861

References AddDrawListToDrawData(), AddWindowToDrawData(), ImGuiWindowTempData::ChildWindows, ImGuiWindow::DC, ImGuiViewportP::DrawDataBuilder, ImGuiWindow::DrawList, GImGui, ImGuiContext::IO, IsWindowActiveAndVisible(), ImDrawDataBuilder::Layers, ImGuiIO::MetricsRenderWindows, ImVector< T >::Size, and ImGuiContext::Viewports.

Referenced by AddRootWindowToDrawData(), and AddWindowToDrawData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddWindowToSortBuffer()

static void AddWindowToSortBuffer ( ImVector< ImGuiWindow * > *  out_sorted_windows,
ImGuiWindow window 
)
static
4250{
4251 out_sorted_windows->push_back(window);
4252 if (window->Active)
4253 {
4254 int count = window->DC.ChildWindows.Size;
4255 if (count > 1)
4256 ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer);
4257 for (int i = 0; i < count; i++)
4258 {
4259 ImGuiWindow* child = window->DC.ChildWindows[i];
4260 if (child->Active)
4261 AddWindowToSortBuffer(out_sorted_windows, child);
4262 }
4263 }
4264}
static int IMGUI_CDECL ChildWindowComparer(const void *lhs, const void *rhs)
Definition imgui.cpp:4238
static void AddWindowToSortBuffer(ImVector< ImGuiWindow * > *out_sorted_windows, ImGuiWindow *window)
Definition imgui.cpp:4249
#define ImQsort
Definition imgui_internal.h:292
IGL_INLINE void count(const Eigen::SparseMatrix< XType > &X, const int dim, Eigen::SparseVector< SType > &S)
Definition count.cpp:12
bool Active
Definition imgui_internal.h:1830

References ImGuiWindow::Active, AddWindowToSortBuffer(), ChildWindowComparer(), ImGuiWindowTempData::ChildWindows, ImVector< T >::Data, ImGuiWindow::DC, ImQsort, ImVector< T >::push_back(), and ImVector< T >::Size.

Referenced by AddWindowToSortBuffer(), and ImGui::EndFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApplyWindowSettings()

static void ApplyWindowSettings ( ImGuiWindow window,
ImGuiWindowSettings settings 
)
static
5117{
5118 window->Pos = ImFloor(ImVec2(settings->Pos.x, settings->Pos.y));
5119 if (settings->Size.x > 0 && settings->Size.y > 0)
5120 window->Size = window->SizeFull = ImFloor(ImVec2(settings->Size.x, settings->Size.y));
5121 window->Collapsed = settings->Collapsed;
5122}
static float ImFloor(float f)
Definition imgui_internal.h:427
bool Collapsed
Definition imgui_internal.h:1833
ImVec2 Pos
Definition imgui_internal.h:1811
ImVec2 Size
Definition imgui_internal.h:1812
ImVec2 SizeFull
Definition imgui_internal.h:1813
bool Collapsed
Definition imgui_internal.h:1265
ImVec2ih Size
Definition imgui_internal.h:1264
ImVec2ih Pos
Definition imgui_internal.h:1263
Definition imgui.h:245
short x
Definition imgui_internal.h:462
short y
Definition imgui_internal.h:462

References ImGuiWindowSettings::Collapsed, ImGuiWindow::Collapsed, ImFloor(), ImGuiWindowSettings::Pos, ImGuiWindow::Pos, ImGuiWindowSettings::Size, ImGuiWindow::Size, ImGuiWindow::SizeFull, ImVec2ih::x, and ImVec2ih::y.

Referenced by CreateNewWindow(), and WindowSettingsHandler_ApplyAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcNextScrollFromScrollTargetAndClamp()

static ImVec2 CalcNextScrollFromScrollTargetAndClamp ( ImGuiWindow window)
static
7820{
7821 ImVec2 scroll = window->Scroll;
7822 if (window->ScrollTarget.x < FLT_MAX)
7823 {
7824 float decoration_total_width = window->ScrollbarSizes.x;
7825 float center_x_ratio = window->ScrollTargetCenterRatio.x;
7826 float scroll_target_x = window->ScrollTarget.x;
7827 if (window->ScrollTargetEdgeSnapDist.x > 0.0f)
7828 {
7829 float snap_x_min = 0.0f;
7830 float snap_x_max = window->ScrollMax.x + window->SizeFull.x - decoration_total_width;
7831 scroll_target_x = CalcScrollEdgeSnap(scroll_target_x, snap_x_min, snap_x_max, window->ScrollTargetEdgeSnapDist.x, center_x_ratio);
7832 }
7833 scroll.x = scroll_target_x - center_x_ratio * (window->SizeFull.x - decoration_total_width);
7834 }
7835 if (window->ScrollTarget.y < FLT_MAX)
7836 {
7837 float decoration_total_height = window->TitleBarHeight() + window->MenuBarHeight() + window->ScrollbarSizes.y;
7838 float center_y_ratio = window->ScrollTargetCenterRatio.y;
7839 float scroll_target_y = window->ScrollTarget.y;
7840 if (window->ScrollTargetEdgeSnapDist.y > 0.0f)
7841 {
7842 float snap_y_min = 0.0f;
7843 float snap_y_max = window->ScrollMax.y + window->SizeFull.y - decoration_total_height;
7844 scroll_target_y = CalcScrollEdgeSnap(scroll_target_y, snap_y_min, snap_y_max, window->ScrollTargetEdgeSnapDist.y, center_y_ratio);
7845 }
7846 scroll.y = scroll_target_y - center_y_ratio * (window->SizeFull.y - decoration_total_height);
7847 }
7848 scroll.x = IM_FLOOR(ImMax(scroll.x, 0.0f));
7849 scroll.y = IM_FLOOR(ImMax(scroll.y, 0.0f));
7850 if (!window->Collapsed && !window->SkipItems)
7851 {
7852 scroll.x = ImMin(scroll.x, window->ScrollMax.x);
7853 scroll.y = ImMin(scroll.y, window->ScrollMax.y);
7854 }
7855 return scroll;
7856}
static float CalcScrollEdgeSnap(float target, float snap_min, float snap_max, float snap_threshold, float center_ratio)
Definition imgui.cpp:7810
static T ImMax(T lhs, T rhs)
Definition imgui_internal.h:410
static T ImMin(T lhs, T rhs)
Definition imgui_internal.h:409
#define IM_FLOOR(_VAL)
Definition imgui_internal.h:232
ImVec2 ScrollbarSizes
Definition imgui_internal.h:1828
ImVec2 ScrollTargetCenterRatio
Definition imgui_internal.h:1826
ImVec2 ScrollTarget
Definition imgui_internal.h:1825
ImVec2 ScrollTargetEdgeSnapDist
Definition imgui_internal.h:1827
ImVec2 Scroll
Definition imgui_internal.h:1823
bool SkipItems
Definition imgui_internal.h:1835
float MenuBarHeight() const
Definition imgui_internal.h:1915
float TitleBarHeight() const
Definition imgui_internal.h:1913
ImVec2 ScrollMax
Definition imgui_internal.h:1824
float y
Definition imgui.h:246
float x
Definition imgui.h:246

References CalcScrollEdgeSnap(), ImGuiWindow::Collapsed, IM_FLOOR, ImMax(), ImMin(), ImGuiWindow::MenuBarHeight(), ImGuiWindow::Scroll, ImGuiWindow::ScrollbarSizes, ImGuiWindow::ScrollMax, ImGuiWindow::ScrollTarget, ImGuiWindow::ScrollTargetCenterRatio, ImGuiWindow::ScrollTargetEdgeSnapDist, ImGuiWindow::SizeFull, ImGuiWindow::SkipItems, ImGuiWindow::TitleBarHeight(), ImVec2::x, and ImVec2::y.

Referenced by ImGui::Begin(), and ImGui::ScrollToBringRectIntoView().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcResizePosSizeFromAnyCorner()

static void CalcResizePosSizeFromAnyCorner ( ImGuiWindow window,
const ImVec2 corner_target,
const ImVec2 corner_norm,
ImVec2 out_pos,
ImVec2 out_size 
)
static
5289{
5290 ImVec2 pos_min = ImLerp(corner_target, window->Pos, corner_norm); // Expected window upper-left
5291 ImVec2 pos_max = ImLerp(window->Pos + window->Size, corner_target, corner_norm); // Expected window lower-right
5292 ImVec2 size_expected = pos_max - pos_min;
5293 ImVec2 size_constrained = CalcWindowSizeAfterConstraint(window, size_expected);
5294 *out_pos = pos_min;
5295 if (corner_norm.x == 0.0f)
5296 out_pos->x -= (size_constrained.x - size_expected.x);
5297 if (corner_norm.y == 0.0f)
5298 out_pos->y -= (size_constrained.y - size_expected.y);
5299 *out_size = size_constrained;
5300}
static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow *window, const ImVec2 &size_desired)
Definition imgui.cpp:5176
static T ImLerp(T a, T b, float t)
Definition imgui_internal.h:412

References CalcWindowSizeAfterConstraint(), ImLerp(), ImGuiWindow::Pos, ImGuiWindow::Size, ImVec2::x, and ImVec2::y.

Referenced by ImGui::UpdateWindowManualResize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcScrollEdgeSnap()

static float CalcScrollEdgeSnap ( float  target,
float  snap_min,
float  snap_max,
float  snap_threshold,
float  center_ratio 
)
static
7811{
7812 if (target <= snap_min + snap_threshold)
7813 return ImLerp(snap_min, target, center_ratio);
7814 if (target >= snap_max - snap_threshold)
7815 return ImLerp(target, snap_max, center_ratio);
7816 return target;
7817}

References ImLerp().

Referenced by CalcNextScrollFromScrollTargetAndClamp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcWindowAutoFitSize()

static ImVec2 CalcWindowAutoFitSize ( ImGuiWindow window,
const ImVec2 size_contents 
)
static
5232{
5233 ImGuiContext& g = *GImGui;
5234 ImGuiStyle& style = g.Style;
5235 const float decoration_up_height = window->TitleBarHeight() + window->MenuBarHeight();
5236 ImVec2 size_pad = window->WindowPadding * 2.0f;
5237 ImVec2 size_desired = size_contents + size_pad + ImVec2(0.0f, decoration_up_height);
5238 if (window->Flags & ImGuiWindowFlags_Tooltip)
5239 {
5240 // Tooltip always resize
5241 return size_desired;
5242 }
5243 else
5244 {
5245 // Maximum window size is determined by the viewport size or monitor size
5246 const bool is_popup = (window->Flags & ImGuiWindowFlags_Popup) != 0;
5247 const bool is_menu = (window->Flags & ImGuiWindowFlags_ChildMenu) != 0;
5248 ImVec2 size_min = style.WindowMinSize;
5249 if (is_popup || is_menu) // Popups and menus bypass style.WindowMinSize by default, but we give then a non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups)
5250 size_min = ImMin(size_min, ImVec2(4.0f, 4.0f));
5251
5252 // FIXME-VIEWPORT-WORKAREA: May want to use GetWorkSize() instead of Size depending on the type of windows?
5253 ImVec2 avail_size = ImGui::GetMainViewport()->Size;
5254 ImVec2 size_auto_fit = ImClamp(size_desired, size_min, ImMax(size_min, avail_size - style.DisplaySafeAreaPadding * 2.0f));
5255
5256 // When the window cannot fit all contents (either because of constraints, either because screen is too small),
5257 // we are growing the size on the other axis to compensate for expected scrollbar. FIXME: Might turn bigger than ViewportSize-WindowPadding.
5258 ImVec2 size_auto_fit_after_constraint = CalcWindowSizeAfterConstraint(window, size_auto_fit);
5259 bool will_have_scrollbar_x = (size_auto_fit_after_constraint.x - size_pad.x - 0.0f < size_contents.x && !(window->Flags & ImGuiWindowFlags_NoScrollbar) && (window->Flags & ImGuiWindowFlags_HorizontalScrollbar)) || (window->Flags & ImGuiWindowFlags_AlwaysHorizontalScrollbar);
5260 bool will_have_scrollbar_y = (size_auto_fit_after_constraint.y - size_pad.y - decoration_up_height < size_contents.y && !(window->Flags & ImGuiWindowFlags_NoScrollbar)) || (window->Flags & ImGuiWindowFlags_AlwaysVerticalScrollbar);
5261 if (will_have_scrollbar_x)
5262 size_auto_fit.y += style.ScrollbarSize;
5263 if (will_have_scrollbar_y)
5264 size_auto_fit.x += style.ScrollbarSize;
5265 return size_auto_fit;
5266 }
5267}
#define style
Definition WipeTowerDialog.cpp:68
@ ImGuiWindowFlags_HorizontalScrollbar
Definition imgui.h:927
@ ImGuiWindowFlags_AlwaysVerticalScrollbar
Definition imgui.h:930
@ ImGuiWindowFlags_Popup
Definition imgui.h:944
@ ImGuiWindowFlags_ChildMenu
Definition imgui.h:946
@ ImGuiWindowFlags_AlwaysHorizontalScrollbar
Definition imgui.h:931
@ ImGuiWindowFlags_NoScrollbar
Definition imgui.h:919
static T ImClamp(T v, T mn, T mx)
Definition imgui_internal.h:411
IMGUI_API ImGuiViewport * GetMainViewport()
Definition imgui.cpp:10630
ImGuiStyle Style
Definition imgui_internal.h:1355
Definition imgui.h:1721
ImVec2 Size
Definition imgui.h:2764
ImVec2 WindowPadding
Definition imgui_internal.h:1817

References CalcWindowSizeAfterConstraint(), ImGuiWindow::Flags, ImGui::GetMainViewport(), GImGui, ImClamp(), ImGuiWindowFlags_AlwaysHorizontalScrollbar, ImGuiWindowFlags_AlwaysVerticalScrollbar, ImGuiWindowFlags_ChildMenu, ImGuiWindowFlags_HorizontalScrollbar, ImGuiWindowFlags_NoScrollbar, ImGuiWindowFlags_Popup, ImGuiWindowFlags_Tooltip, ImMax(), ImMin(), ImGuiWindow::MenuBarHeight(), ImGuiViewport::Size, ImGuiContext::Style, style, ImGuiWindow::TitleBarHeight(), ImGuiWindow::WindowPadding, ImVec2::x, and ImVec2::y.

Referenced by ImGui::Begin(), and ImGui::CalcWindowNextAutoFitSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcWindowContentSizes()

static void CalcWindowContentSizes ( ImGuiWindow window,
ImVec2 content_size_current,
ImVec2 content_size_ideal 
)
static
5212{
5213 bool preserve_old_content_sizes = false;
5214 if (window->Collapsed && window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0)
5215 preserve_old_content_sizes = true;
5216 else if (window->Hidden && window->HiddenFramesCannotSkipItems == 0 && window->HiddenFramesCanSkipItems > 0)
5217 preserve_old_content_sizes = true;
5218 if (preserve_old_content_sizes)
5219 {
5220 *content_size_current = window->ContentSize;
5221 *content_size_ideal = window->ContentSizeIdeal;
5222 return;
5223 }
5224
5225 content_size_current->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_FLOOR(window->DC.CursorMaxPos.x - window->DC.CursorStartPos.x);
5226 content_size_current->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_FLOOR(window->DC.CursorMaxPos.y - window->DC.CursorStartPos.y);
5227 content_size_ideal->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_FLOOR(ImMax(window->DC.CursorMaxPos.x, window->DC.IdealMaxPos.x) - window->DC.CursorStartPos.x);
5228 content_size_ideal->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_FLOOR(ImMax(window->DC.CursorMaxPos.y, window->DC.IdealMaxPos.y) - window->DC.CursorStartPos.y);
5229}
const Scalar & y
Definition MathFunctions.h:552
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297
ImS8 AutoFitFramesY
Definition imgui_internal.h:1846
bool Hidden
Definition imgui_internal.h:1837
ImVec2 ContentSize
Definition imgui_internal.h:1814
ImS8 AutoFitFramesX
Definition imgui_internal.h:1846
ImS8 HiddenFramesCannotSkipItems
Definition imgui_internal.h:1851
ImVec2 ContentSizeExplicit
Definition imgui_internal.h:1816
ImVec2 ContentSizeIdeal
Definition imgui_internal.h:1815
ImS8 HiddenFramesCanSkipItems
Definition imgui_internal.h:1850

References ImGuiWindow::AutoFitFramesX, ImGuiWindow::AutoFitFramesY, ImGuiWindow::Collapsed, ImGuiWindow::ContentSize, ImGuiWindow::ContentSizeExplicit, ImGuiWindow::ContentSizeIdeal, ImGuiWindowTempData::CursorMaxPos, ImGuiWindowTempData::CursorStartPos, ImGuiWindow::DC, ImGuiWindow::Hidden, ImGuiWindow::HiddenFramesCannotSkipItems, ImGuiWindow::HiddenFramesCanSkipItems, ImGuiWindowTempData::IdealMaxPos, IM_FLOOR, ImMax(), ImVec2::x, and ImVec2::y.

Referenced by ImGui::Begin(), and ImGui::CalcWindowNextAutoFitSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcWindowSizeAfterConstraint()

static ImVec2 CalcWindowSizeAfterConstraint ( ImGuiWindow window,
const ImVec2 size_desired 
)
static
5177{
5178 ImGuiContext& g = *GImGui;
5179 ImVec2 new_size = size_desired;
5181 {
5182 // Using -1,-1 on either X/Y axis to preserve the current size.
5184 new_size.x = (cr.Min.x >= 0 && cr.Max.x >= 0) ? ImClamp(new_size.x, cr.Min.x, cr.Max.x) : window->SizeFull.x;
5185 new_size.y = (cr.Min.y >= 0 && cr.Max.y >= 0) ? ImClamp(new_size.y, cr.Min.y, cr.Max.y) : window->SizeFull.y;
5187 {
5190 data.Pos = window->Pos;
5191 data.CurrentSize = window->SizeFull;
5192 data.DesiredSize = new_size;
5194 new_size = data.DesiredSize;
5195 }
5196 new_size.x = IM_FLOOR(new_size.x);
5197 new_size.y = IM_FLOOR(new_size.y);
5198 }
5199
5200 // Minimum size
5202 {
5203 ImGuiWindow* window_for_height = window;
5204 const float decoration_up_height = window_for_height->TitleBarHeight() + window_for_height->MenuBarHeight();
5205 new_size = ImMax(new_size, g.Style.WindowMinSize);
5206 new_size.y = ImMax(new_size.y, decoration_up_height + ImMax(0.0f, g.Style.WindowRounding - 1.0f)); // Reduce artifacts with very small windows
5207 }
5208 return new_size;
5209}
@ ImGuiWindowFlags_AlwaysAutoResize
Definition imgui.h:922
@ ImGuiWindowFlags_ChildWindow
Definition imgui.h:942
Definition imgui.h:1948
@ ImGuiNextWindowDataFlags_HasSizeConstraint
Definition imgui_internal.h:1086
constexpr auto data(C &c) -> decltype(c.data())
Definition span.hpp:195
ImGuiNextWindowData NextWindowData
Definition imgui_internal.h:1423
void * SizeCallbackUserData
Definition imgui_internal.h:1107
ImRect SizeConstraintRect
Definition imgui_internal.h:1105
ImGuiNextWindowDataFlags Flags
Definition imgui_internal.h:1095
ImGuiSizeCallback SizeCallback
Definition imgui_internal.h:1106
ImVec2 WindowMinSize
Definition imgui.h:1726
float WindowRounding
Definition imgui.h:1724
Definition imgui_internal.h:471
ImVec2 Max
Definition imgui_internal.h:473
ImVec2 Min
Definition imgui_internal.h:472

References ImGuiNextWindowData::Flags, ImGuiWindow::Flags, GImGui, IM_FLOOR, ImClamp(), ImGuiNextWindowDataFlags_HasSizeConstraint, ImGuiWindowFlags_AlwaysAutoResize, ImGuiWindowFlags_ChildWindow, ImMax(), ImRect::Max, ImGuiWindow::MenuBarHeight(), ImRect::Min, ImGuiContext::NextWindowData, ImGuiWindow::Pos, ImGuiNextWindowData::SizeCallback, ImGuiNextWindowData::SizeCallbackUserData, ImGuiNextWindowData::SizeConstraintRect, ImGuiWindow::SizeFull, ImGuiContext::Style, ImGuiWindow::TitleBarHeight(), ImGuiStyle::WindowMinSize, ImGuiStyle::WindowRounding, ImVec2::x, and ImVec2::y.

Referenced by ImGui::Begin(), CalcResizePosSizeFromAnyCorner(), CalcWindowAutoFitSize(), ImGui::CalcWindowNextAutoFitSize(), and ImGui::UpdateWindowManualResize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChildWindowComparer()

static int IMGUI_CDECL ChildWindowComparer ( const void lhs,
const void rhs 
)
static
4239{
4240 const ImGuiWindow* const a = *(const ImGuiWindow* const *)lhs;
4241 const ImGuiWindow* const b = *(const ImGuiWindow* const *)rhs;
4242 if (int d = (a->Flags & ImGuiWindowFlags_Popup) - (b->Flags & ImGuiWindowFlags_Popup))
4243 return d;
4244 if (int d = (a->Flags & ImGuiWindowFlags_Tooltip) - (b->Flags & ImGuiWindowFlags_Tooltip))
4245 return d;
4246 return (a->BeginOrderWithinParent - b->BeginOrderWithinParent);
4247}

References ImGuiWindowFlags_Popup, and ImGuiWindowFlags_Tooltip.

Referenced by AddWindowToSortBuffer().

+ Here is the caller graph for this function:

◆ ClampWindowRect()

static void ClampWindowRect ( ImGuiWindow window,
const ImRect visibility_rect 
)
inlinestatic
5499{
5500 ImGuiContext& g = *GImGui;
5501 ImVec2 size_for_clamping = window->Size;
5503 size_for_clamping.y = window->TitleBarHeight();
5504 window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max);
5505}
@ ImGuiWindowFlags_NoTitleBar
Definition imgui.h:916
bool ConfigWindowsMoveFromTitleBarOnly
Definition imgui.h:1807

References ImGuiIO::ConfigWindowsMoveFromTitleBarOnly, ImGuiWindow::Flags, GImGui, ImClamp(), ImGuiWindowFlags_NoTitleBar, ImGuiContext::IO, ImRect::Max, ImRect::Min, ImGuiWindow::Pos, ImGuiWindow::Size, ImGuiWindow::TitleBarHeight(), and ImVec2::y.

Referenced by ImGui::Begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateNewWindow()

static ImGuiWindow * CreateNewWindow ( const char *  name,
ImGuiWindowFlags  flags 
)
static
5125{
5126 ImGuiContext& g = *GImGui;
5127 //IMGUI_DEBUG_LOG("CreateNewWindow '%s', flags = 0x%08X\n", name, flags);
5128
5129 // Create window the first time
5130 ImGuiWindow* window = IM_NEW(ImGuiWindow)(&g, name);
5131 window->Flags = flags;
5132 g.WindowsById.SetVoidPtr(window->ID, window);
5133
5134 // Default/arbitrary window position. Use SetNextWindowPos() with the appropriate condition flag to change the initial position of a window.
5135 const ImGuiViewport* main_viewport = ImGui::GetMainViewport();
5136 window->Pos = main_viewport->Pos + ImVec2(60, 60);
5137
5138 // User can disable loading and saving of settings. Tooltip and child windows also don't store settings.
5139 if (!(flags & ImGuiWindowFlags_NoSavedSettings))
5140 if (ImGuiWindowSettings* settings = ImGui::FindWindowSettings(window->ID))
5141 {
5142 // Retrieve settings from .ini file
5143 window->SettingsOffset = g.SettingsWindows.offset_from_ptr(settings);
5145 ApplyWindowSettings(window, settings);
5146 }
5147 window->DC.CursorStartPos = window->DC.CursorMaxPos = window->Pos; // So first call to CalcContentSize() doesn't return crazy values
5148
5149 if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0)
5150 {
5151 window->AutoFitFramesX = window->AutoFitFramesY = 2;
5152 window->AutoFitOnlyGrows = false;
5153 }
5154 else
5155 {
5156 if (window->Size.x <= 0.0f)
5157 window->AutoFitFramesX = 2;
5158 if (window->Size.y <= 0.0f)
5159 window->AutoFitFramesY = 2;
5160 window->AutoFitOnlyGrows = (window->AutoFitFramesX > 0) || (window->AutoFitFramesY > 0);
5161 }
5162
5163 if (!(flags & ImGuiWindowFlags_ChildWindow))
5164 {
5165 g.WindowsFocusOrder.push_back(window);
5166 window->FocusOrder = (short)(g.WindowsFocusOrder.Size - 1);
5167 }
5168
5170 g.Windows.push_front(window); // Quite slow but rare and only once
5171 else
5172 g.Windows.push_back(window);
5173 return window;
5174}
static void ApplyWindowSettings(ImGuiWindow *window, ImGuiWindowSettings *settings)
Definition imgui.cpp:5116
static void SetWindowConditionAllowFlags(ImGuiWindow *window, ImGuiCond flags, bool enabled)
Definition imgui.cpp:5097
#define IM_NEW(_TYPE)
Definition imgui.h:1637
@ ImGuiWindowFlags_NoSavedSettings
Definition imgui.h:924
@ ImGuiWindowFlags_NoBringToFrontOnFocus
Definition imgui.h:929
@ ImGuiCond_FirstUseEver
Definition imgui.h:1617
ImVec2 CursorMaxPos
Definition imgui_internal.h:1757
ImVec2 CursorStartPos
Definition imgui_internal.h:1756
IMGUI_API ImGuiWindowSettings * FindWindowSettings(ImGuiID id)
Definition imgui.cpp:10395
int offset_from_ptr(const T *p)
Definition imgui_internal.h:646
ImVector< ImGuiWindow * > Windows
Definition imgui_internal.h:1373
ImChunkStream< ImGuiWindowSettings > SettingsWindows
Definition imgui_internal.h:1563
ImVector< ImGuiWindow * > WindowsFocusOrder
Definition imgui_internal.h:1374
ImGuiStorage WindowsById
Definition imgui_internal.h:1377
IMGUI_API void SetVoidPtr(ImGuiID key, void *val)
Definition imgui.cpp:2002
Definition imgui.h:2761
ImVec2 Pos
Definition imgui.h:2763
int SettingsOffset
Definition imgui_internal.h:1881
bool AutoFitOnlyGrows
Definition imgui_internal.h:1848
ImGuiID ID
Definition imgui_internal.h:1809
short FocusOrder
Definition imgui_internal.h:1844
Definition imgui_internal.h:1261
void push_front(const T &v)
Definition imgui.h:1698

References ApplyWindowSettings(), ImGuiWindow::AutoFitFramesX, ImGuiWindow::AutoFitFramesY, ImGuiWindow::AutoFitOnlyGrows, ImGuiWindowTempData::CursorMaxPos, ImGuiWindowTempData::CursorStartPos, ImGuiWindow::DC, ImGui::FindWindowSettings(), ImGuiWindow::Flags, ImGuiWindow::FocusOrder, ImGui::GetMainViewport(), GImGui, ImGuiWindow::ID, IM_NEW, ImGuiCond_FirstUseEver, ImGuiWindowFlags_AlwaysAutoResize, ImGuiWindowFlags_ChildWindow, ImGuiWindowFlags_NoBringToFrontOnFocus, ImGuiWindowFlags_NoSavedSettings, ImChunkStream< T >::offset_from_ptr(), ImGuiViewport::Pos, ImGuiWindow::Pos, ImVector< T >::push_back(), ImVector< T >::push_front(), ImGuiWindow::SettingsOffset, ImGuiContext::SettingsWindows, ImGuiStorage::SetVoidPtr(), SetWindowConditionAllowFlags(), ImVector< T >::Size, ImGuiWindow::Size, ImGuiContext::Windows, ImGuiContext::WindowsById, ImGuiContext::WindowsFocusOrder, ImVec2::x, and ImVec2::y.

Referenced by ImGui::Begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindHoveredWindow()

static void FindHoveredWindow ( )
static
4555{
4556 ImGuiContext& g = *GImGui;
4557
4558 ImGuiWindow* hovered_window = NULL;
4559 ImGuiWindow* hovered_window_ignoring_moving_window = NULL;
4561 hovered_window = g.MovingWindow;
4562
4563 ImVec2 padding_regular = g.Style.TouchExtraPadding;
4564 ImVec2 padding_for_resize = g.IO.ConfigWindowsResizeFromEdges ? g.WindowsHoverPadding : padding_regular;
4565 for (int i = g.Windows.Size - 1; i >= 0; i--)
4566 {
4567 ImGuiWindow* window = g.Windows[i];
4568 IM_MSVC_WARNING_SUPPRESS(28182); // [Static Analyzer] Dereferencing NULL pointer.
4569 if (!window->Active || window->Hidden)
4570 continue;
4572 continue;
4573
4574 // Using the clipped AABB, a child window will typically be clipped by its parent (not always)
4575 ImRect bb(window->OuterRectClipped);
4577 bb.Expand(padding_regular);
4578 else
4579 bb.Expand(padding_for_resize);
4580 if (!bb.Contains(g.IO.MousePos))
4581 continue;
4582
4583 // Support for one rectangular hole in any given window
4584 // FIXME: Consider generalizing hit-testing override (with more generic data, callback, etc.) (#1512)
4585 if (window->HitTestHoleSize.x != 0)
4586 {
4587 ImVec2 hole_pos(window->Pos.x + (float)window->HitTestHoleOffset.x, window->Pos.y + (float)window->HitTestHoleOffset.y);
4588 ImVec2 hole_size((float)window->HitTestHoleSize.x, (float)window->HitTestHoleSize.y);
4589 if (ImRect(hole_pos, hole_pos + hole_size).Contains(g.IO.MousePos))
4590 continue;
4591 }
4592
4593 if (hovered_window == NULL)
4594 hovered_window = window;
4595 IM_MSVC_WARNING_SUPPRESS(28182); // [Static Analyzer] Dereferencing NULL pointer.
4596 if (hovered_window_ignoring_moving_window == NULL && (!g.MovingWindow || window->RootWindow != g.MovingWindow->RootWindow))
4597 hovered_window_ignoring_moving_window = window;
4598 if (hovered_window && hovered_window_ignoring_moving_window)
4599 break;
4600 }
4601
4602 g.HoveredWindow = hovered_window;
4603 g.HoveredWindowUnderMovingWindow = hovered_window_ignoring_moving_window;
4604}
@ ImGuiWindowFlags_NoMouseInputs
Definition imgui.h:925
@ ImGuiWindowFlags_NoResize
Definition imgui.h:917
#define IM_MSVC_WARNING_SUPPRESS(XXXX)
Definition imgui_internal.h:246
ImVec2 WindowsHoverPadding
Definition imgui_internal.h:1379
ImGuiWindow * MovingWindow
Definition imgui_internal.h:1383
ImGuiWindow * HoveredWindow
Definition imgui_internal.h:1381
ImGuiWindow * HoveredWindowUnderMovingWindow
Definition imgui_internal.h:1382
bool ConfigWindowsResizeFromEdges
Definition imgui.h:1806
ImVec2 MousePos
Definition imgui.h:1837
ImVec2 TouchExtraPadding
Definition imgui.h:1739
ImVec2ih HitTestHoleOffset
Definition imgui_internal.h:1873
ImVec2ih HitTestHoleSize
Definition imgui_internal.h:1872
ImRect OuterRectClipped
Definition imgui_internal.h:1865
ImGuiWindow * RootWindow
Definition imgui_internal.h:1886

References ImGuiWindow::Active, ImGuiIO::ConfigWindowsResizeFromEdges, ImRect::Contains(), ImRect::Expand(), ImGuiWindow::Flags, GImGui, ImGuiWindow::Hidden, ImGuiWindow::HitTestHoleOffset, ImGuiWindow::HitTestHoleSize, ImGuiContext::HoveredWindow, ImGuiContext::HoveredWindowUnderMovingWindow, IM_MSVC_WARNING_SUPPRESS, ImGuiWindowFlags_AlwaysAutoResize, ImGuiWindowFlags_ChildWindow, ImGuiWindowFlags_NoMouseInputs, ImGuiWindowFlags_NoResize, ImGuiContext::IO, ImGuiIO::MousePos, ImGuiContext::MovingWindow, ImGuiWindow::OuterRectClipped, ImGuiWindow::Pos, ImGuiWindow::RootWindow, ImVector< T >::Size, ImGuiContext::Style, ImGuiStyle::TouchExtraPadding, ImGuiContext::Windows, ImGuiContext::WindowsHoverPadding, ImVec2::x, ImVec2ih::x, ImVec2::y, and ImVec2ih::y.

Referenced by ImGui::UpdateHoveredWindowAndCaptureFlags().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindWindowNavFocusable()

static ImGuiWindow * FindWindowNavFocusable ( int  i_start,
int  i_stop,
int  dir 
)
static
9531{
9532 ImGuiContext& g = *GImGui;
9533 for (int i = i_start; i >= 0 && i < g.WindowsFocusOrder.Size && i != i_stop; i += dir)
9535 return g.WindowsFocusOrder[i];
9536 return NULL;
9537}
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow *window)
Definition imgui.cpp:6696

References GImGui, ImGui::IsWindowNavFocusable(), ImVector< T >::Size, and ImGuiContext::WindowsFocusOrder.

Referenced by ImGui::NavUpdateWindowing(), and NavUpdateWindowingHighlightWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FreeWrapper()

static void FreeWrapper ( void ptr,
void user_data 
)
static
968{ IM_UNUSED(user_data); free(ptr); }
void free(void *)
#define IM_UNUSED(_VAR)
Definition imgui.h:84

References free(), and IM_UNUSED.

+ Here is the call graph for this function:

◆ GetClipboardTextFn_DefaultImpl()

static const char * GetClipboardTextFn_DefaultImpl ( void user_data)
static
10781{
10782 ImGuiContext& g = *GImGui;
10783 return g.ClipboardHandlerData.empty() ? NULL : g.ClipboardHandlerData.begin();
10784}
ImVector< char > ClipboardHandlerData
Definition imgui_internal.h:1550
bool empty() const
Definition imgui.h:1670
T * begin()
Definition imgui.h:1679

References ImVector< T >::begin(), ImGuiContext::ClipboardHandlerData, ImVector< T >::empty(), and GImGui.

Referenced by ImGuiIO::ImGuiIO().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFallbackWindowNameForWindowingList()

static const char * GetFallbackWindowNameForWindowingList ( ImGuiWindow window)
static
9710{
9711 if (window->Flags & ImGuiWindowFlags_Popup)
9712 return "(Popup)";
9713 if ((window->Flags & ImGuiWindowFlags_MenuBar) && strcmp(window->Name, "##MainMenuBar") == 0)
9714 return "(Main menu bar)";
9715 return "(Untitled)";
9716}
@ ImGuiWindowFlags_MenuBar
Definition imgui.h:926
char * Name
Definition imgui_internal.h:1808

References ImGuiWindow::Flags, ImGuiWindowFlags_MenuBar, ImGuiWindowFlags_Popup, and ImGuiWindow::Name.

Referenced by ImGui::NavUpdateWindowingOverlay().

+ Here is the caller graph for this function:

◆ GetResizeBorderRect()

static ImRect GetResizeBorderRect ( ImGuiWindow window,
int  border_n,
float  perp_padding,
float  thickness 
)
static
5333{
5334 ImRect rect = window->Rect();
5335 if (thickness == 0.0f)
5336 rect.Max -= ImVec2(1, 1);
5337 if (border_n == ImGuiDir_Left) { return ImRect(rect.Min.x - thickness, rect.Min.y + perp_padding, rect.Min.x + thickness, rect.Max.y - perp_padding); }
5338 if (border_n == ImGuiDir_Right) { return ImRect(rect.Max.x - thickness, rect.Min.y + perp_padding, rect.Max.x + thickness, rect.Max.y - perp_padding); }
5339 if (border_n == ImGuiDir_Up) { return ImRect(rect.Min.x + perp_padding, rect.Min.y - thickness, rect.Max.x - perp_padding, rect.Min.y + thickness); }
5340 if (border_n == ImGuiDir_Down) { return ImRect(rect.Min.x + perp_padding, rect.Max.y - thickness, rect.Max.x - perp_padding, rect.Max.y + thickness); }
5341 IM_ASSERT(0);
5342 return ImRect();
5343}
@ ImGuiDir_Down
Definition imgui.h:1299
@ ImGuiDir_Right
Definition imgui.h:1297
@ ImGuiDir_Up
Definition imgui.h:1298
@ ImGuiDir_Left
Definition imgui.h:1296
ImRect Rect() const
Definition imgui_internal.h:1911

References IM_ASSERT, ImGuiDir_Down, ImGuiDir_Left, ImGuiDir_Right, ImGuiDir_Up, ImRect::Max, ImRect::Min, ImGuiWindow::Rect(), ImVec2::x, and ImVec2::y.

Referenced by ImGui::RenderWindowOuterBorders(), and ImGui::UpdateWindowManualResize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSkipItemForListClipping()

static bool GetSkipItemForListClipping ( )
static
2199{
2200 ImGuiContext& g = *GImGui;
2201 return (g.CurrentTable ? g.CurrentTable->HostSkipItems : g.CurrentWindow->SkipItems);
2202}
ImGuiTable * CurrentTable
Definition imgui_internal.h:1519
bool HostSkipItems
Definition imgui_internal.h:2197

References ImGuiContext::CurrentTable, ImGuiContext::CurrentWindow, GImGui, ImGuiTable::HostSkipItems, and ImGuiWindow::SkipItems.

Referenced by ImGui::CalcListClipping(), and ImGuiListClipper::Step().

+ Here is the caller graph for this function:

◆ GetStyleVarInfo()

static const ImGuiStyleVarInfo * GetStyleVarInfo ( ImGuiStyleVar  idx)
static
2531{
2532 IM_ASSERT(idx >= 0 && idx < ImGuiStyleVar_COUNT);
2534 return &GStyleVarInfo[idx];
2535}
static const ImGuiStyleVarInfo GStyleVarInfo[]
Definition imgui.cpp:2502
@ ImGuiStyleVar_COUNT
Definition imgui.h:1503
#define IM_ARRAYSIZE(_ARR)
Definition imgui.h:83

References GStyleVarInfo, IM_ARRAYSIZE, IM_ASSERT, and ImGuiStyleVar_COUNT.

Referenced by ImGui::PopStyleVar(), ImGui::PushStyleVar(), and ImGui::PushStyleVar().

+ Here is the caller graph for this function:

◆ GetViewportDrawList()

static ImDrawList * GetViewportDrawList ( ImGuiViewportP viewport,
size_t  drawlist_no,
const char *  drawlist_name 
)
static
3464{
3465 // Create the draw list on demand, because they are not frequently used for all viewports
3466 ImGuiContext& g = *GImGui;
3467 IM_ASSERT(drawlist_no < IM_ARRAYSIZE(viewport->DrawLists));
3468 ImDrawList* draw_list = viewport->DrawLists[drawlist_no];
3469 if (draw_list == NULL)
3470 {
3471 draw_list = IM_NEW(ImDrawList)(&g.DrawListSharedData);
3472 draw_list->_OwnerName = drawlist_name;
3473 viewport->DrawLists[drawlist_no] = draw_list;
3474 }
3475
3476 // Our ImDrawList system requires that there is always a command
3477 if (viewport->DrawListsLastFrame[drawlist_no] != g.FrameCount)
3478 {
3479 draw_list->_ResetForNewFrame();
3480 draw_list->PushTextureID(g.IO.Fonts->TexID);
3481 draw_list->PushClipRect(viewport->Pos, viewport->Pos + viewport->Size, false);
3482 viewport->DrawListsLastFrame[drawlist_no] = g.FrameCount;
3483 }
3484 return draw_list;
3485}
Definition imgui.h:2348
IMGUI_API void _ResetForNewFrame()
Definition imgui_draw.cpp:404
const char * _OwnerName
Definition imgui.h:2358
IMGUI_API void PushTextureID(ImTextureID texture_id)
Definition imgui_draw.cpp:599
IMGUI_API void PushClipRect(ImVec2 clip_rect_min, ImVec2 clip_rect_max, bool intersect_with_current_clip_rect=false)
Definition imgui_draw.cpp:568
ImTextureID TexID
Definition imgui.h:2654
ImDrawListSharedData DrawListSharedData
Definition imgui_internal.h:1359
int FrameCount
Definition imgui_internal.h:1361
ImFontAtlas * Fonts
Definition imgui.h:1795
ImDrawList * DrawLists[2]
Definition imgui_internal.h:1230
int DrawListsLastFrame[2]
Definition imgui_internal.h:1229

References ImDrawList::_OwnerName, ImDrawList::_ResetForNewFrame(), ImGuiViewportP::DrawLists, ImGuiContext::DrawListSharedData, ImGuiViewportP::DrawListsLastFrame, ImGuiIO::Fonts, ImGuiContext::FrameCount, GImGui, IM_ARRAYSIZE, IM_ASSERT, IM_NEW, ImGuiContext::IO, ImGuiViewport::Pos, ImDrawList::PushClipRect(), ImDrawList::PushTextureID(), ImGuiViewport::Size, and ImFontAtlas::TexID.

Referenced by ImGui::GetBackgroundDrawList(), and ImGui::GetForegroundDrawList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWindowBgColorIdxFromFlags()

static ImGuiCol GetWindowBgColorIdxFromFlags ( ImGuiWindowFlags  flags)
static
5280{
5282 return ImGuiCol_PopupBg;
5283 if (flags & ImGuiWindowFlags_ChildWindow)
5284 return ImGuiCol_ChildBg;
5285 return ImGuiCol_WindowBg;
5286}
@ ImGuiCol_WindowBg
Definition imgui.h:1415
@ ImGuiCol_ChildBg
Definition imgui.h:1416
@ ImGuiCol_PopupBg
Definition imgui.h:1417

References ImGuiCol_ChildBg, ImGuiCol_PopupBg, ImGuiCol_WindowBg, ImGuiWindowFlags_ChildWindow, ImGuiWindowFlags_Popup, and ImGuiWindowFlags_Tooltip.

Referenced by ImGui::RenderWindowDecorations().

+ Here is the caller graph for this function:

◆ ImAlphaBlendColors()

IMGUI_API ImU32 ImAlphaBlendColors ( ImU32  col_a,
ImU32  col_b 
)
1791{
1792 float t = ((col_b >> IM_COL32_A_SHIFT) & 0xFF) / 255.f;
1793 int r = ImLerp((int)(col_a >> IM_COL32_R_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_R_SHIFT) & 0xFF, t);
1794 int g = ImLerp((int)(col_a >> IM_COL32_G_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_G_SHIFT) & 0xFF, t);
1795 int b = ImLerp((int)(col_a >> IM_COL32_B_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_B_SHIFT) & 0xFF, t);
1796 return IM_COL32(r, g, b, 0xFF);
1797}
#define IM_COL32(R, G, B, A)
Definition imgui.h:2177
#define IM_COL32_G_SHIFT
Definition imgui.h:2172
#define IM_COL32_R_SHIFT
Definition imgui.h:2171
#define IM_COL32_B_SHIFT
Definition imgui.h:2173
#define IM_COL32_A_SHIFT
Definition imgui.h:2174

References IM_COL32, IM_COL32_A_SHIFT, IM_COL32_B_SHIFT, IM_COL32_G_SHIFT, IM_COL32_R_SHIFT, and ImLerp().

Referenced by ImGui::RenderColorRectWithAlphaCheckerboard().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImBezierCubicClosestPoint()

ImVec2 ImBezierCubicClosestPoint ( const ImVec2 p1,
const ImVec2 p2,
const ImVec2 p3,
const ImVec2 p4,
const ImVec2 p,
int  num_segments 
)
1180{
1181 IM_ASSERT(num_segments > 0); // Use ImBezierCubicClosestPointCasteljau()
1182 ImVec2 p_last = p1;
1183 ImVec2 p_closest;
1184 float p_closest_dist2 = FLT_MAX;
1185 float t_step = 1.0f / (float)num_segments;
1186 for (int i_step = 1; i_step <= num_segments; i_step++)
1187 {
1188 ImVec2 p_current = ImBezierCubicCalc(p1, p2, p3, p4, t_step * i_step);
1189 ImVec2 p_line = ImLineClosestPoint(p_last, p_current, p);
1190 float dist2 = ImLengthSqr(p - p_line);
1191 if (dist2 < p_closest_dist2)
1192 {
1193 p_closest = p_line;
1194 p_closest_dist2 = dist2;
1195 }
1196 p_last = p_current;
1197 }
1198 return p_closest;
1199}
ImVec2 ImLineClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &p)
Definition imgui.cpp:1247
ImVec2 ImBezierCubicCalc(const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, float t)
Definition imgui_draw.cpp:1213
static float ImLengthSqr(const ImVec2 &lhs)
Definition imgui_internal.h:424

References IM_ASSERT, ImBezierCubicCalc(), ImLengthSqr(), and ImLineClosestPoint().

+ Here is the call graph for this function:

◆ ImBezierCubicClosestPointCasteljau()

ImVec2 ImBezierCubicClosestPointCasteljau ( const ImVec2 p1,
const ImVec2 p2,
const ImVec2 p3,
const ImVec2 p4,
const ImVec2 p,
float  tess_tol 
)
1238{
1239 IM_ASSERT(tess_tol > 0.0f);
1240 ImVec2 p_last = p1;
1241 ImVec2 p_closest;
1242 float p_closest_dist2 = FLT_MAX;
1243 ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, tess_tol, 0);
1244 return p_closest;
1245}
static void ImBezierCubicClosestPointCasteljauStep(const ImVec2 &p, ImVec2 &p_closest, ImVec2 &p_last, float &p_closest_dist2, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float tess_tol, int level)
Definition imgui.cpp:1202

References IM_ASSERT, ImBezierCubicClosestPointCasteljauStep(), ImVec2::x, and ImVec2::y.

+ Here is the call graph for this function:

◆ ImBezierCubicClosestPointCasteljauStep()

static void ImBezierCubicClosestPointCasteljauStep ( const ImVec2 p,
ImVec2 p_closest,
ImVec2 p_last,
float &  p_closest_dist2,
float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
float  x4,
float  y4,
float  tess_tol,
int  level 
)
static
1203{
1204 float dx = x4 - x1;
1205 float dy = y4 - y1;
1206 float d2 = ((x2 - x4) * dy - (y2 - y4) * dx);
1207 float d3 = ((x3 - x4) * dy - (y3 - y4) * dx);
1208 d2 = (d2 >= 0) ? d2 : -d2;
1209 d3 = (d3 >= 0) ? d3 : -d3;
1210 if ((d2 + d3) * (d2 + d3) < tess_tol * (dx * dx + dy * dy))
1211 {
1212 ImVec2 p_current(x4, y4);
1213 ImVec2 p_line = ImLineClosestPoint(p_last, p_current, p);
1214 float dist2 = ImLengthSqr(p - p_line);
1215 if (dist2 < p_closest_dist2)
1216 {
1217 p_closest = p_line;
1218 p_closest_dist2 = dist2;
1219 }
1220 p_last = p_current;
1221 }
1222 else if (level < 10)
1223 {
1224 float x12 = (x1 + x2)*0.5f, y12 = (y1 + y2)*0.5f;
1225 float x23 = (x2 + x3)*0.5f, y23 = (y2 + y3)*0.5f;
1226 float x34 = (x3 + x4)*0.5f, y34 = (y3 + y4)*0.5f;
1227 float x123 = (x12 + x23)*0.5f, y123 = (y12 + y23)*0.5f;
1228 float x234 = (x23 + x34)*0.5f, y234 = (y23 + y34)*0.5f;
1229 float x1234 = (x123 + x234)*0.5f, y1234 = (y123 + y234)*0.5f;
1230 ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, x1, y1, x12, y12, x123, y123, x1234, y1234, tess_tol, level + 1);
1231 ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, x1234, y1234, x234, y234, x34, y34, x4, y4, tess_tol, level + 1);
1232 }
1233}

References ImBezierCubicClosestPointCasteljauStep(), ImLengthSqr(), and ImLineClosestPoint().

Referenced by ImBezierCubicClosestPointCasteljau(), and ImBezierCubicClosestPointCasteljauStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImeSetInputScreenPosFn_DefaultImpl()

static void ImeSetInputScreenPosFn_DefaultImpl ( int  x,
int  y 
)
static
10824{}

Referenced by ImGuiIO::ImGuiIO().

+ Here is the caller graph for this function:

◆ ImFileClose()

bool ImFileClose ( ImFileHandle  f)
1564{ return fclose(f) == 0; }

Referenced by ImFileLoadToMemory(), ImGui::LogFinish(), ImGui::SaveIniSettingsToDisk(), and ImGui::Shutdown().

+ Here is the caller graph for this function:

◆ ImFileGetSize()

ImU64 ImFileGetSize ( ImFileHandle  f)
1565{ long off = 0, sz = 0; return ((off = ftell(f)) != -1 && !fseek(f, 0, SEEK_END) && (sz = ftell(f)) != -1 && !fseek(f, off, SEEK_SET)) ? (ImU64)sz : (ImU64)-1; }
unsigned long long ImU64
Definition imgui.h:239
#define SEEK_SET

References SEEK_SET.

Referenced by ImFileLoadToMemory().

+ Here is the caller graph for this function:

◆ ImFileLoadToMemory()

void * ImFileLoadToMemory ( const char *  filename,
const char *  mode,
size_t *  out_file_size,
int  padding_bytes 
)
1574{
1575 IM_ASSERT(filename && mode);
1576 if (out_file_size)
1577 *out_file_size = 0;
1578
1579 ImFileHandle f;
1580 if ((f = ImFileOpen(filename, mode)) == NULL)
1581 return NULL;
1582
1583 size_t file_size = (size_t)ImFileGetSize(f);
1584 if (file_size == (size_t)-1)
1585 {
1586 ImFileClose(f);
1587 return NULL;
1588 }
1589
1590 void* file_data = IM_ALLOC(file_size + padding_bytes);
1591 if (file_data == NULL)
1592 {
1593 ImFileClose(f);
1594 return NULL;
1595 }
1596 if (ImFileRead(file_data, 1, file_size, f) != file_size)
1597 {
1598 ImFileClose(f);
1599 IM_FREE(file_data);
1600 return NULL;
1601 }
1602 if (padding_bytes > 0)
1603 memset((void*)(((char*)file_data) + file_size), 0, (size_t)padding_bytes);
1604
1605 ImFileClose(f);
1606 if (out_file_size)
1607 *out_file_size = file_size;
1608
1609 return file_data;
1610}
ImU64 ImFileRead(void *data, ImU64 sz, ImU64 count, ImFileHandle f)
Definition imgui.cpp:1566
bool ImFileClose(ImFileHandle f)
Definition imgui.cpp:1564
ImU64 ImFileGetSize(ImFileHandle f)
Definition imgui.cpp:1565
ImFileHandle ImFileOpen(const char *filename, const char *mode)
Definition imgui.cpp:1546
#define IM_ALLOC(_SIZE)
Definition imgui.h:1634
#define IM_FREE(_PTR)
Definition imgui.h:1635
FILE * ImFileHandle
Definition imgui_internal.h:366

References IM_ALLOC, IM_ASSERT, IM_FREE, ImFileClose(), ImFileGetSize(), ImFileOpen(), and ImFileRead().

Referenced by ImFontAtlas::AddFontFromFileTTF(), and ImGui::LoadIniSettingsFromDisk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImFileOpen()

ImFileHandle ImFileOpen ( const char *  filename,
const char *  mode 
)
1547{
1548#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(__CYGWIN__) && !defined(__GNUC__)
1549 // We need a fopen() wrapper because MSVC/Windows fopen doesn't handle UTF-8 filenames.
1550 // Previously we used ImTextCountCharsFromUtf8/ImTextStrFromUtf8 here but we now need to support ImWchar16 and ImWchar32!
1551 const int filename_wsize = ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
1552 const int mode_wsize = ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, NULL, 0);
1554 buf.resize(filename_wsize + mode_wsize);
1555 ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, (wchar_t*)&buf[0], filename_wsize);
1556 ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, (wchar_t*)&buf[filename_wsize], mode_wsize);
1557 return ::_wfopen((const wchar_t*)&buf[0], (const wchar_t*)&buf[filename_wsize]);
1558#else
1559 return fopen(filename, mode);
1560#endif
1561}
Definition imgui.h:1654
void resize(int new_size)
Definition imgui.h:1690

References ImVector< T >::resize().

Referenced by ImFileLoadToMemory(), ImGui::LogToFile(), and ImGui::SaveIniSettingsToDisk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImFileRead()

ImU64 ImFileRead ( void data,
ImU64  sz,
ImU64  count,
ImFileHandle  f 
)
1566{ return fread(data, (size_t)sz, (size_t)count, f); }

Referenced by ImFileLoadToMemory().

+ Here is the caller graph for this function:

◆ ImFileWrite()

ImU64 ImFileWrite ( const void data,
ImU64  sz,
ImU64  count,
ImFileHandle  f 
)
1567{ return fwrite(data, (size_t)sz, (size_t)count, f); }

Referenced by LogTextV(), and ImGui::SaveIniSettingsToDisk().

+ Here is the caller graph for this function:

◆ ImFormatString()

int ImFormatString ( char *  buf,
size_t  buf_size,
const char *  fmt,
  ... 
)
1436{
1437 va_list args;
1438 va_start(args, fmt);
1439#ifdef IMGUI_USE_STB_SPRINTF
1440 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
1441#else
1442 int w = vsnprintf(buf, buf_size, fmt, args);
1443#endif
1444 va_end(args);
1445 if (buf == NULL)
1446 return w;
1447 if (w == -1 || w >= (int)buf_size)
1448 w = (int)buf_size - 1;
1449 buf[w] = 0;
1450 return w;
1451}

Referenced by ImFontAtlas::AddFontDefault(), ImFontAtlas::AddFontFromFileTTF(), ImGui::BeginChildEx(), ImGui::BeginCombo(), ImGui::BeginPopupEx(), ImGui::BeginTooltipEx(), ImGui::ColorEdit4(), ImGui::ColorEditOptionsPopup(), ImGui::DataTypeFormatString(), ImGui::DebugNodeDrawList(), ImGui::DebugNodeTabBar(), ImGui::DebugNodeTable(), ImGui::NavScoreItem(), ImGui::NavUpdate(), PatchFormatStringFloatToInt(), ImGui::ProgressBar(), ImGui::ShowMetricsWindow(), ImGui::TableHeader(), ImGui::TableMergeDrawChannels(), and ImGui::Value().

+ Here is the caller graph for this function:

◆ ImFormatStringV()

int ImFormatStringV ( char *  buf,
size_t  buf_size,
const char *  fmt,
va_list  args 
)
1454{
1455#ifdef IMGUI_USE_STB_SPRINTF
1456 int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
1457#else
1458 int w = vsnprintf(buf, buf_size, fmt, args);
1459#endif
1460 if (buf == NULL)
1461 return w;
1462 if (w == -1 || w >= (int)buf_size)
1463 w = (int)buf_size - 1;
1464 buf[w] = 0;
1465 return w;
1466}

Referenced by ImGuiTextBuffer::appendfv(), ImGui::BulletTextV(), ImGui::LabelTextV(), ImGui::TextV(), ImGui::TreeNodeExV(), and ImGui::TreeNodeExV().

+ Here is the caller graph for this function:

◆ ImGetDirQuadrantFromDelta()

ImGuiDir ImGetDirQuadrantFromDelta ( float  dx,
float  dy 
)
8619{
8620 if (ImFabs(dx) > ImFabs(dy))
8621 return (dx > 0.0f) ? ImGuiDir_Right : ImGuiDir_Left;
8622 return (dy > 0.0f) ? ImGuiDir_Down : ImGuiDir_Up;
8623}
#define ImFabs(X)
Definition imgui_internal.h:381

References ImFabs, ImGuiDir_Down, ImGuiDir_Left, ImGuiDir_Right, and ImGuiDir_Up.

Referenced by ImGui::NavScoreItem().

+ Here is the caller graph for this function:

◆ ImHashData()

ImGuiID ImHashData ( const void data_p,
size_t  data_size,
ImU32  seed 
)
1496{
1497 ImU32 crc = ~seed;
1498 const unsigned char* data = (const unsigned char*)data_p;
1499 const ImU32* crc32_lut = GCrc32LookupTable;
1500 while (data_size-- != 0)
1501 crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ *data++];
1502 return ~crc;
1503}
static const ImU32 GCrc32LookupTable[256]
Definition imgui.cpp:1472
unsigned int ImU32
Definition imgui.h:229

References GCrc32LookupTable.

Referenced by ImGuiWindow::GetID(), ImGuiWindow::GetID(), ImGuiWindow::GetIDFromRectangle(), ImGuiWindow::GetIDNoKeepAlive(), ImGuiWindow::GetIDNoKeepAlive(), ImGui::GetWindowResizeBorderID(), ImGui::GetWindowResizeCornerID(), and ImHash().

+ Here is the caller graph for this function:

◆ ImHashStr()

ImGuiID ImHashStr ( const char *  data_p,
size_t  data_size,
ImU32  seed 
)
1512{
1513 seed = ~seed;
1514 ImU32 crc = seed;
1515 const unsigned char* data = (const unsigned char*)data_p;
1516 const ImU32* crc32_lut = GCrc32LookupTable;
1517 if (data_size != 0)
1518 {
1519 while (data_size-- != 0)
1520 {
1521 unsigned char c = *data++;
1522 if (c == '#' && data_size >= 2 && data[0] == '#' && data[1] == '#')
1523 crc = seed;
1524 crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
1525 }
1526 }
1527 else
1528 {
1529 while (unsigned char c = *data++)
1530 {
1531 if (c == '#' && data[0] == '#' && data[1] == '#')
1532 crc = seed;
1533 crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
1534 }
1535 }
1536 return ~crc;
1537}

References GCrc32LookupTable.

Referenced by ImGuiWindow::ImGuiWindow(), ImGui::BeginCombo(), ImGui::BeginDragDropSource(), ImGui::CreateNewWindowSettings(), ImGui::FindOrCreateWindowSettings(), ImGui::FindSettingsHandler(), ImGui::FindWindowByName(), ImGuiWindow::GetID(), ImGuiWindow::GetIDNoKeepAlive(), ImGui::GetIDWithSeed(), ImGui::GetWindowResizeBorderID(), ImGui::GetWindowResizeCornerID(), ImHash(), ImGui::Initialize(), ImGui::TabBarCalcTabID(), ImGui::TableOpenContextMenu(), ImGui::TableSettingsInstallHandler(), and ImGui::TableUpdateLayout().

+ Here is the caller graph for this function:

◆ ImLineClosestPoint()

ImVec2 ImLineClosestPoint ( const ImVec2 a,
const ImVec2 b,
const ImVec2 p 
)
1248{
1249 ImVec2 ap = p - a;
1250 ImVec2 ab_dir = b - a;
1251 float dot = ap.x * ab_dir.x + ap.y * ab_dir.y;
1252 if (dot < 0.0f)
1253 return a;
1254 float ab_len_sqr = ab_dir.x * ab_dir.x + ab_dir.y * ab_dir.y;
1255 if (dot > ab_len_sqr)
1256 return b;
1257 return a + ab_dir * dot / ab_len_sqr;
1258}
IGL_INLINE double dot(const double *a, const double *b)
Definition dot.cpp:11

References ImVec2::x, and ImVec2::y.

Referenced by ImBezierCubicClosestPoint(), ImBezierCubicClosestPointCasteljauStep(), and ImTriangleClosestPoint().

+ Here is the caller graph for this function:

◆ ImStrbolW()

const ImWchar * ImStrbolW ( const ImWchar buf_mid_line,
const ImWchar buf_begin 
)
1366{
1367 while (buf_mid_line > buf_begin && buf_mid_line[-1] != '\n')
1368 buf_mid_line--;
1369 return buf_mid_line;
1370}

Referenced by ImGui::InputTextEx().

+ Here is the caller graph for this function:

◆ ImStrchrRange()

const char * ImStrchrRange ( const char *  str,
const char *  str_end,
char  c 
)
1345{
1346 const char* p = (const char*)memchr(str, (int)c, str_end - str);
1347 return p;
1348}

Referenced by ImGui::LoadIniSettingsFromMemory().

+ Here is the caller graph for this function:

◆ ImStrdup()

char * ImStrdup ( const char *  str)
1324{
1325 size_t len = strlen(str);
1326 void* buf = IM_ALLOC(len + 1);
1327 return (char*)memcpy(buf, (const void*)str, len + 1);
1328}

References IM_ALLOC.

Referenced by ImGuiWindow::ImGuiWindow().

+ Here is the caller graph for this function:

◆ ImStrdupcpy()

char * ImStrdupcpy ( char *  dst,
size_t *  p_dst_size,
const char *  src 
)
1331{
1332 size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
1333 size_t src_size = strlen(src) + 1;
1334 if (dst_buf_size < src_size)
1335 {
1336 IM_FREE(dst);
1337 dst = (char*)IM_ALLOC(src_size);
1338 if (p_dst_size)
1339 *p_dst_size = src_size;
1340 }
1341 return (char*)memcpy(dst, (const void*)src, src_size);
1342}

References IM_ALLOC, and IM_FREE.

Referenced by ImGui::Begin().

+ Here is the caller graph for this function:

◆ ImStreolRange()

const char * ImStreolRange ( const char *  str,
const char *  str_end 
)
1360{
1361 const char* p = (const char*)memchr(str, '\n', str_end - str);
1362 return p ? p : str_end;
1363}

Referenced by ImGui::LogRenderedText().

+ Here is the caller graph for this function:

◆ ImStricmp()

int ImStricmp ( const char *  str1,
const char *  str2 
)
1301{
1302 int d;
1303 while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; }
1304 return d;
1305}

◆ ImStristr()

const char * ImStristr ( const char *  haystack,
const char *  haystack_end,
const char *  needle,
const char *  needle_end 
)
1373{
1374 if (!needle_end)
1375 needle_end = needle + strlen(needle);
1376
1377 const char un0 = (char)toupper(*needle);
1378 while ((!haystack_end && *haystack) || (haystack_end && haystack < haystack_end))
1379 {
1380 if (toupper(*haystack) == un0)
1381 {
1382 const char* b = needle + 1;
1383 for (const char* a = haystack + 1; b < needle_end; a++, b++)
1384 if (toupper(*a) != toupper(*b))
1385 break;
1386 if (b == needle_end)
1387 return haystack;
1388 }
1389 haystack++;
1390 }
1391 return NULL;
1392}

Referenced by ImGuiTextFilter::PassFilter().

+ Here is the caller graph for this function:

◆ ImStrlenW()

int ImStrlenW ( const ImWchar str)
1351{
1352 //return (int)wcslen((const wchar_t*)str); // FIXME-OPT: Could use this when wchar_t are 16-bit
1353 int n = 0;
1354 while (*str++) n++;
1355 return n;
1356}

◆ ImStrncpy()

void ImStrncpy ( char *  dst,
const char *  src,
size_t  count 
)
1315{
1316 if (count < 1)
1317 return;
1318 if (count > 1)
1319 strncpy(dst, src, count - 1);
1320 dst[count - 1] = 0;
1321}

Referenced by ImGuiTextFilter::ImGuiTextFilter(), ImParseFormatTrimDecorations(), ImGui::InputTextEx(), and ImGui::SetDragDropPayload().

+ Here is the caller graph for this function:

◆ ImStrnicmp()

int ImStrnicmp ( const char *  str1,
const char *  str2,
size_t  count 
)
1308{
1309 int d = 0;
1310 while (count > 0 && (d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; count--; }
1311 return d;
1312}

◆ ImStrSkipBlank()

const char * ImStrSkipBlank ( const char *  str)
1411{
1412 while (str[0] == ' ' || str[0] == '\t')
1413 str++;
1414 return str;
1415}

Referenced by TableSettingsHandler_ReadLine().

+ Here is the caller graph for this function:

◆ ImStrTrimBlanks()

void ImStrTrimBlanks ( char *  buf)
1396{
1397 char* p = buf;
1398 while (p[0] == ' ' || p[0] == '\t') // Leading blanks
1399 p++;
1400 char* p_start = p;
1401 while (*p != 0) // Find end of string
1402 p++;
1403 while (p > p_start && (p[-1] == ' ' || p[-1] == '\t')) // Trailing blanks
1404 p--;
1405 if (p_start != buf) // Copy memory if we had leading blanks
1406 memmove(buf, p_start, p - p_start);
1407 buf[p - p_start] = 0; // Zero terminate
1408}

Referenced by ImGui::TempInputScalar().

+ Here is the caller graph for this function:

◆ ImTextCharFromUtf8()

int ImTextCharFromUtf8 ( unsigned int *  out_char,
const char *  in_text,
const char *  in_text_end 
)
1620{
1621 static const char lengths[32] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 4, 0 };
1622 static const int masks[] = { 0x00, 0x7f, 0x1f, 0x0f, 0x07 };
1623 static const uint32_t mins[] = { 0x400000, 0, 0x80, 0x800, 0x10000 };
1624 static const int shiftc[] = { 0, 18, 12, 6, 0 };
1625 static const int shifte[] = { 0, 6, 4, 2, 0 };
1626 int len = lengths[*(const unsigned char*)in_text >> 3];
1627 int wanted = len + !len;
1628
1629 if (in_text_end == NULL)
1630 in_text_end = in_text + wanted; // Max length, nulls will be taken into account.
1631
1632 // Copy at most 'len' bytes, stop copying at 0 or past in_text_end. Branch predictor does a good job here,
1633 // so it is fast even with excessive branching.
1634 unsigned char s[4];
1635 s[0] = in_text + 0 < in_text_end ? in_text[0] : 0;
1636 s[1] = in_text + 1 < in_text_end ? in_text[1] : 0;
1637 s[2] = in_text + 2 < in_text_end ? in_text[2] : 0;
1638 s[3] = in_text + 3 < in_text_end ? in_text[3] : 0;
1639
1640 // Assume a four-byte character and load four bytes. Unused bits are shifted out.
1641 *out_char = (uint32_t)(s[0] & masks[len]) << 18;
1642 *out_char |= (uint32_t)(s[1] & 0x3f) << 12;
1643 *out_char |= (uint32_t)(s[2] & 0x3f) << 6;
1644 *out_char |= (uint32_t)(s[3] & 0x3f) << 0;
1645 *out_char >>= shiftc[len];
1646
1647 // Accumulate the various error conditions.
1648 int e = 0;
1649 e = (*out_char < mins[len]) << 6; // non-canonical encoding
1650 e |= ((*out_char >> 11) == 0x1b) << 7; // surrogate half?
1651 e |= (*out_char > IM_UNICODE_CODEPOINT_MAX) << 8; // out of range?
1652 e |= (s[1] & 0xc0) >> 2;
1653 e |= (s[2] & 0xc0) >> 4;
1654 e |= (s[3] ) >> 6;
1655 e ^= 0x2a; // top two bits of each tail byte correct?
1656 e >>= shifte[len];
1657
1658 if (e)
1659 {
1660 // No bytes are consumed when *in_text == 0 || in_text == in_text_end.
1661 // One byte is consumed in case of invalid first byte of in_text.
1662 // All available bytes (at most `len` bytes) are consumed on incomplete/invalid second to last bytes.
1663 // Invalid or incomplete input may consume less bytes than wanted, therefore every byte has to be inspected in s.
1664 wanted = ImMin(wanted, !!s[0] + !!s[1] + !!s[2] + !!s[3]);
1665 *out_char = IM_UNICODE_CODEPOINT_INVALID;
1666 }
1667
1668 return wanted;
1669}
#define IM_UNICODE_CODEPOINT_INVALID
Definition imgui.h:2006
#define IM_UNICODE_CODEPOINT_MAX
Definition imgui.h:2010
unsigned __int32 uint32_t
Definition unistd.h:79

References IM_UNICODE_CODEPOINT_INVALID, IM_UNICODE_CODEPOINT_MAX, and ImMin().

Referenced by ImGuiIO::AddInputCharactersUTF8(), ImFontGlyphRangesBuilder::AddText(), ImFont::CalcTextSizeA(), ImFont::CalcWordWrapPositionA(), ImTextCountCharsFromUtf8(), ImTextCountUtf8BytesFromChar(), ImTextStrFromUtf8(), ImGui::InputTextEx(), Slic3r::GUI::ImGuiWrapper::is_chars_in_ranges(), and ImFont::RenderText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTextCharToUtf8()

static int ImTextCharToUtf8 ( char *  buf,
int  buf_size,
unsigned int  c 
)
inlinestatic
1705{
1706 if (c < 0x80)
1707 {
1708 buf[0] = (char)c;
1709 return 1;
1710 }
1711 if (c < 0x800)
1712 {
1713 if (buf_size < 2) return 0;
1714 buf[0] = (char)(0xc0 + (c >> 6));
1715 buf[1] = (char)(0x80 + (c & 0x3f));
1716 return 2;
1717 }
1718 if (c < 0x10000)
1719 {
1720 if (buf_size < 3) return 0;
1721 buf[0] = (char)(0xe0 + (c >> 12));
1722 buf[1] = (char)(0x80 + ((c >> 6) & 0x3f));
1723 buf[2] = (char)(0x80 + ((c ) & 0x3f));
1724 return 3;
1725 }
1726 if (c <= 0x10FFFF)
1727 {
1728 if (buf_size < 4) return 0;
1729 buf[0] = (char)(0xf0 + (c >> 18));
1730 buf[1] = (char)(0x80 + ((c >> 12) & 0x3f));
1731 buf[2] = (char)(0x80 + ((c >> 6) & 0x3f));
1732 buf[3] = (char)(0x80 + ((c ) & 0x3f));
1733 return 4;
1734 }
1735 // Invalid code point, the max unicode is 0x10FFFF
1736 return 0;
1737}

Referenced by ImTextStrToUtf8().

+ Here is the caller graph for this function:

◆ ImTextCountCharsFromUtf8()

int ImTextCountCharsFromUtf8 ( const char *  in_text,
const char *  in_text_end 
)
1690{
1691 int char_count = 0;
1692 while ((!in_text_end || in_text < in_text_end) && *in_text)
1693 {
1694 unsigned int c;
1695 in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
1696 if (c == 0)
1697 break;
1698 char_count++;
1699 }
1700 return char_count;
1701}
int ImTextCharFromUtf8(unsigned int *out_char, const char *in_text, const char *in_text_end)
Definition imgui.cpp:1619

References ImTextCharFromUtf8().

Referenced by ImGui::InputTextEx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTextCountUtf8BytesFromChar() [1/2]

int ImTextCountUtf8BytesFromChar ( const char *  in_text,
const char *  in_text_end 
)
1741{
1742 unsigned int unused = 0;
1743 return ImTextCharFromUtf8(&unused, in_text, in_text_end);
1744}

References ImTextCharFromUtf8().

Referenced by ImTextCountUtf8BytesFromStr(), and ImGui::RenderTextEllipsis().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTextCountUtf8BytesFromChar() [2/2]

static int ImTextCountUtf8BytesFromChar ( unsigned int  c)
inlinestatic
1747{
1748 if (c < 0x80) return 1;
1749 if (c < 0x800) return 2;
1750 if (c < 0x10000) return 3;
1751 if (c <= 0x10FFFF) return 4;
1752 return 3;
1753}

◆ ImTextCountUtf8BytesFromStr()

int ImTextCountUtf8BytesFromStr ( const ImWchar in_text,
const ImWchar in_text_end 
)
1772{
1773 int bytes_count = 0;
1774 while ((!in_text_end || in_text < in_text_end) && *in_text)
1775 {
1776 unsigned int c = (unsigned int)(*in_text++);
1777 if (c < 0x80)
1778 bytes_count++;
1779 else
1780 bytes_count += ImTextCountUtf8BytesFromChar(c);
1781 }
1782 return bytes_count;
1783}
int ImTextCountUtf8BytesFromChar(const char *in_text, const char *in_text_end)
Definition imgui.cpp:1740

References ImTextCountUtf8BytesFromChar().

Referenced by ImGui::InputTextEx(), ImStb::STB_TEXTEDIT_DELETECHARS(), and ImStb::STB_TEXTEDIT_INSERTCHARS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTextStrFromUtf8()

int ImTextStrFromUtf8 ( ImWchar buf,
int  buf_size,
const char *  in_text,
const char *  in_text_end,
const char **  in_text_remaining 
)
1672{
1673 ImWchar* buf_out = buf;
1674 ImWchar* buf_end = buf + buf_size;
1675 while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
1676 {
1677 unsigned int c;
1678 in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
1679 if (c == 0)
1680 break;
1681 *buf_out++ = (ImWchar)c;
1682 }
1683 *buf_out = 0;
1684 if (in_text_remaining)
1685 *in_text_remaining = in_text;
1686 return (int)(buf_out - buf);
1687}
ImWchar16 ImWchar
Definition imgui.h:220

References ImTextCharFromUtf8().

Referenced by ImGui::InputTextEx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTextStrToUtf8()

int ImTextStrToUtf8 ( char *  buf,
int  buf_size,
const ImWchar in_text,
const ImWchar in_text_end 
)
1756{
1757 char* buf_out = buf;
1758 const char* buf_end = buf + buf_size;
1759 while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
1760 {
1761 unsigned int c = (unsigned int)(*in_text++);
1762 if (c < 0x80)
1763 *buf_out++ = (char)c;
1764 else
1765 buf_out += ImTextCharToUtf8(buf_out, (int)(buf_end - buf_out - 1), c);
1766 }
1767 *buf_out = 0;
1768 return (int)(buf_out - buf);
1769}
static int ImTextCharToUtf8(char *buf, int buf_size, unsigned int c)
Definition imgui.cpp:1704

References ImTextCharToUtf8().

Referenced by ImGui::InputTextEx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTriangleBarycentricCoords()

void ImTriangleBarycentricCoords ( const ImVec2 a,
const ImVec2 b,
const ImVec2 c,
const ImVec2 p,
float &  out_u,
float &  out_v,
float &  out_w 
)
1269{
1270 ImVec2 v0 = b - a;
1271 ImVec2 v1 = c - a;
1272 ImVec2 v2 = p - a;
1273 const float denom = v0.x * v1.y - v1.x * v0.y;
1274 out_v = (v2.x * v1.y - v1.x * v2.y) / denom;
1275 out_w = (v0.x * v2.y - v2.x * v0.y) / denom;
1276 out_u = 1.0f - out_v - out_w;
1277}

References ImVec2::x, and ImVec2::y.

Referenced by ImGui::ColorPicker4().

+ Here is the caller graph for this function:

◆ ImTriangleClosestPoint()

ImVec2 ImTriangleClosestPoint ( const ImVec2 a,
const ImVec2 b,
const ImVec2 c,
const ImVec2 p 
)
1280{
1281 ImVec2 proj_ab = ImLineClosestPoint(a, b, p);
1282 ImVec2 proj_bc = ImLineClosestPoint(b, c, p);
1283 ImVec2 proj_ca = ImLineClosestPoint(c, a, p);
1284 float dist2_ab = ImLengthSqr(p - proj_ab);
1285 float dist2_bc = ImLengthSqr(p - proj_bc);
1286 float dist2_ca = ImLengthSqr(p - proj_ca);
1287 float m = ImMin(dist2_ab, ImMin(dist2_bc, dist2_ca));
1288 if (m == dist2_ab)
1289 return proj_ab;
1290 if (m == dist2_bc)
1291 return proj_bc;
1292 return proj_ca;
1293}

References ImLengthSqr(), ImLineClosestPoint(), and ImMin().

Referenced by ImGui::ColorPicker4().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ImTriangleContainsPoint()

bool ImTriangleContainsPoint ( const ImVec2 a,
const ImVec2 b,
const ImVec2 c,
const ImVec2 p 
)
1261{
1262 bool b1 = ((p.x - b.x) * (a.y - b.y) - (p.y - b.y) * (a.x - b.x)) < 0.0f;
1263 bool b2 = ((p.x - c.x) * (b.y - c.y) - (p.y - c.y) * (b.x - c.x)) < 0.0f;
1264 bool b3 = ((p.x - a.x) * (c.y - a.y) - (p.y - a.y) * (c.x - a.x)) < 0.0f;
1265 return ((b1 == b2) && (b2 == b3));
1266}

References ImVec2::x, and ImVec2::y.

Referenced by ImGui::BeginMenu(), and ImGui::ColorPicker4().

+ Here is the caller graph for this function:

◆ IsWindowActiveAndVisible()

static bool IsWindowActiveAndVisible ( ImGuiWindow window)
static
3631{
3632 return (window->Active) && (!window->Hidden);
3633}

References ImGuiWindow::Active, and ImGuiWindow::Hidden.

Referenced by AddWindowToDrawData(), and ImGui::Render().

+ Here is the caller graph for this function:

◆ IsWindowContentHoverable()

static bool IsWindowContentHoverable ( ImGuiWindow window,
ImGuiHoveredFlags  flags 
)
inlinestatic
3128{
3129 // An active popup disable hovering on other windows (apart from its own children)
3130 // FIXME-OPT: This could be cached/stored within the window.
3131 ImGuiContext& g = *GImGui;
3132 if (g.NavWindow)
3133 if (ImGuiWindow* focused_root_window = g.NavWindow->RootWindow)
3134 if (focused_root_window->WasActive && focused_root_window != window->RootWindow)
3135 {
3136 // For the purpose of those flags we differentiate "standard popup" from "modal popup"
3137 // NB: The order of those two tests is important because Modal windows are also Popups.
3138 if (focused_root_window->Flags & ImGuiWindowFlags_Modal)
3139 return false;
3140 if ((focused_root_window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiHoveredFlags_AllowWhenBlockedByPopup))
3141 return false;
3142 }
3143 return true;
3144}
@ ImGuiHoveredFlags_AllowWhenBlockedByPopup
Definition imgui.h:1245
@ ImGuiWindowFlags_Modal
Definition imgui.h:945
ImGuiWindow * NavWindow
Definition imgui_internal.h:1440

References GImGui, ImGuiHoveredFlags_AllowWhenBlockedByPopup, ImGuiWindowFlags_Modal, ImGuiWindowFlags_Popup, ImGuiContext::NavWindow, and ImGuiWindow::RootWindow.

Referenced by ImGui::IsItemHovered(), ImGui::IsWindowHovered(), and ImGui::ItemHoverable().

+ Here is the caller graph for this function:

◆ LogTextV()

static void LogTextV ( ImGuiContext g,
const char *  fmt,
va_list  args 
)
inlinestatic
10075{
10076 if (g.LogFile)
10077 {
10078 g.LogBuffer.Buf.resize(0);
10079 g.LogBuffer.appendfv(fmt, args);
10080 ImFileWrite(g.LogBuffer.c_str(), sizeof(char), (ImU64)g.LogBuffer.size(), g.LogFile);
10081 }
10082 else
10083 {
10084 g.LogBuffer.appendfv(fmt, args);
10085 }
10086}
ImU64 ImFileWrite(const void *data, ImU64 sz, ImU64 count, ImFileHandle f)
Definition imgui.cpp:1567
ImGuiTextBuffer LogBuffer
Definition imgui_internal.h:1572
ImFileHandle LogFile
Definition imgui_internal.h:1571
int size() const
Definition imgui.h:2059
ImVector< char > Buf
Definition imgui.h:2052
const char * c_str() const
Definition imgui.h:2063
IMGUI_API void appendfv(const char *fmt, va_list args) IM_FMTLIST(2)
Definition imgui.cpp:2164

References ImGuiTextBuffer::appendfv(), ImGuiTextBuffer::Buf, ImGuiTextBuffer::c_str(), ImFileWrite(), ImGuiContext::LogBuffer, ImGuiContext::LogFile, ImVector< T >::resize(), and ImGuiTextBuffer::size().

Referenced by ImGui::LogText(), and ImGui::LogTextV().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LowerBound()

static ImGuiStorage::ImGuiStoragePair * LowerBound ( ImVector< ImGuiStorage::ImGuiStoragePair > &  data,
ImGuiID  key 
)
static
1877{
1879 ImGuiStorage::ImGuiStoragePair* last = data.Data + data.Size;
1880 size_t count = (size_t)(last - first);
1881 while (count > 0)
1882 {
1883 size_t count2 = count >> 1;
1884 ImGuiStorage::ImGuiStoragePair* mid = first + count2;
1885 if (mid->key < key)
1886 {
1887 first = ++mid;
1888 count -= count2 + 1;
1889 }
1890 else
1891 {
1892 count = count2;
1893 }
1894 }
1895 return first;
1896}
Definition imgui.h:2081
ImGuiID key
Definition imgui.h:2082

References ImGuiStorage::ImGuiStoragePair::key.

Referenced by ImGuiStorage::GetFloat(), ImGuiStorage::GetFloatRef(), ImGuiStorage::GetInt(), ImGuiStorage::GetIntRef(), ImGuiStorage::GetVoidPtr(), ImGuiStorage::GetVoidPtrRef(), ImGuiStorage::SetFloat(), ImGuiStorage::SetInt(), and ImGuiStorage::SetVoidPtr().

+ Here is the caller graph for this function:

◆ MallocWrapper()

static void * MallocWrapper ( size_t  size,
void user_data 
)
static
967{ IM_UNUSED(user_data); return malloc(size); }
void * malloc(YYSIZE_T)

References IM_UNUSED, and malloc().

+ Here is the call graph for this function:

◆ MetricsHelpMarker()

static void MetricsHelpMarker ( const char *  desc)
static
10901{
10902 ImGui::TextDisabled("(?)");
10904 {
10910 }
10911}
IMGUI_API void PopTextWrapPos()
Definition imgui.cpp:6599
IMGUI_API void BeginTooltip()
Definition imgui.cpp:8008
IMGUI_API void PushTextWrapPos(float wrap_local_pos_x=0.0f)
Definition imgui.cpp:6592
IMGUI_API void TextUnformatted(const char *text, const char *text_end=NULL)
Definition imgui_widgets.cpp:255
IMGUI_API void TextDisabled(const char *fmt,...) IM_FMTARGS(1)
Definition imgui_widgets.cpp:297
IMGUI_API float GetFontSize()
Definition imgui.cpp:6937
IMGUI_API void EndTooltip()
Definition imgui.cpp:8045
IMGUI_API bool IsItemHovered(ImGuiHoveredFlags flags=0)
Definition imgui.cpp:3149

References ImGui::BeginTooltip(), ImGui::EndTooltip(), ImGui::GetFontSize(), ImGui::IsItemHovered(), ImGui::PopTextWrapPos(), ImGui::PushTextWrapPos(), ImGui::TextDisabled(), and ImGui::TextUnformatted().

Referenced by ImGui::ShowMetricsWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NavClampRectToVisibleAreaForMoveDir()

static void NavClampRectToVisibleAreaForMoveDir ( ImGuiDir  move_dir,
ImRect r,
const ImRect clip_rect 
)
inlinestatic
8635{
8636 if (move_dir == ImGuiDir_Left || move_dir == ImGuiDir_Right)
8637 {
8638 r.Min.y = ImClamp(r.Min.y, clip_rect.Min.y, clip_rect.Max.y);
8639 r.Max.y = ImClamp(r.Max.y, clip_rect.Min.y, clip_rect.Max.y);
8640 }
8641 else
8642 {
8643 r.Min.x = ImClamp(r.Min.x, clip_rect.Min.x, clip_rect.Max.x);
8644 r.Max.x = ImClamp(r.Max.x, clip_rect.Min.x, clip_rect.Max.x);
8645 }
8646}

References ImClamp(), ImGuiDir_Left, ImGuiDir_Right, ImRect::Max, ImRect::Min, ImVec2::x, and ImVec2::y.

Referenced by ImGui::NavScoreItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NavScoreItemDistInterval()

static float NavScoreItemDistInterval ( float  a0,
float  a1,
float  b0,
float  b1 
)
inlinestatic
8626{
8627 if (a1 < b0)
8628 return a1 - b0;
8629 if (b1 < a0)
8630 return a0 - b1;
8631 return 0.0f;
8632}

Referenced by ImGui::NavScoreItem().

+ Here is the caller graph for this function:

◆ NavUpdateWindowingHighlightWindow()

static void NavUpdateWindowingHighlightWindow ( int  focus_change_dir)
static
9540{
9541 ImGuiContext& g = *GImGui;
9544 return;
9545
9546 const int i_current = ImGui::FindWindowFocusIndex(g.NavWindowingTarget);
9547 ImGuiWindow* window_target = FindWindowNavFocusable(i_current + focus_change_dir, -INT_MAX, focus_change_dir);
9548 if (!window_target)
9549 window_target = FindWindowNavFocusable((focus_change_dir < 0) ? (g.WindowsFocusOrder.Size - 1) : 0, i_current, focus_change_dir);
9550 if (window_target) // Don't reset windowing target if there's a single window in the list
9551 g.NavWindowingTarget = g.NavWindowingTargetAnim = window_target;
9552 g.NavWindowingToggleLayer = false;
9553}
static ImGuiWindow * FindWindowNavFocusable(int i_start, int i_stop, int dir)
Definition imgui.cpp:9530
static int FindWindowFocusIndex(ImGuiWindow *window)
Definition imgui.cpp:9521
bool NavWindowingToggleLayer
Definition imgui_internal.h:1484
ImGuiWindow * NavWindowingTarget
Definition imgui_internal.h:1479
ImGuiWindow * NavWindowingTargetAnim
Definition imgui_internal.h:1480

References ImGui::FindWindowFocusIndex(), FindWindowNavFocusable(), ImGuiWindow::Flags, GImGui, IM_ASSERT, ImGuiWindowFlags_Modal, ImGuiContext::NavWindowingTarget, ImGuiContext::NavWindowingTargetAnim, ImGuiContext::NavWindowingToggleLayer, ImVector< T >::Size, and ImGuiContext::WindowsFocusOrder.

Referenced by ImGui::NavUpdateWindowing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderViewportsThumbnails()

static void RenderViewportsThumbnails ( )
static
10879{
10880 ImGuiContext& g = *GImGui;
10881 ImGuiWindow* window = g.CurrentWindow;
10882
10883 // We don't display full monitor bounds (we could, but it often looks awkward), instead we display just enough to cover all of our viewports.
10884 float SCALE = 1.0f / 8.0f;
10885 ImRect bb_full(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX);
10886 for (int n = 0; n < g.Viewports.Size; n++)
10887 bb_full.Add(g.Viewports[n]->GetMainRect());
10888 ImVec2 p = window->DC.CursorPos;
10889 ImVec2 off = p - bb_full.Min * SCALE;
10890 for (int n = 0; n < g.Viewports.Size; n++)
10891 {
10892 ImGuiViewportP* viewport = g.Viewports[n];
10893 ImRect viewport_draw_bb(off + (viewport->Pos) * SCALE, off + (viewport->Pos + viewport->Size) * SCALE);
10894 ImGui::DebugRenderViewportThumbnail(window->DrawList, viewport, viewport_draw_bb);
10895 }
10896 ImGui::Dummy(bb_full.GetSize() * SCALE);
10897}
ImVec2 CursorPos
Definition imgui_internal.h:1754
IMGUI_API void Dummy(const ImVec2 &size)
Definition imgui_widgets.cpp:1320
IMGUI_API void DebugRenderViewportThumbnail(ImDrawList *draw_list, ImGuiViewportP *viewport, const ImRect &bb)
Definition imgui.cpp:10848
ImGuiWindow * CurrentWindow
Definition imgui_internal.h:1380

References ImRect::Add(), ImGuiContext::CurrentWindow, ImGuiWindowTempData::CursorPos, ImGuiWindow::DC, ImGui::DebugRenderViewportThumbnail(), ImGuiWindow::DrawList, ImGui::Dummy(), ImRect::GetSize(), GImGui, ImRect::Min, ImGuiViewport::Pos, ImVector< T >::Size, ImGuiViewport::Size, and ImGuiContext::Viewports.

Referenced by ImGui::ShowMetricsWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetClipboardTextFn_DefaultImpl()

static void SetClipboardTextFn_DefaultImpl ( void user_data,
const char *  text 
)
static
10787{
10788 ImGuiContext& g = *GImGui;
10790 const char* text_end = text + strlen(text);
10791 g.ClipboardHandlerData.resize((int)(text_end - text) + 1);
10792 memcpy(&g.ClipboardHandlerData[0], text, (size_t)(text_end - text));
10793 g.ClipboardHandlerData[(int)(text_end - text)] = 0;
10794}
void clear()
Definition imgui.h:1678

References ImVector< T >::clear(), ImGuiContext::ClipboardHandlerData, GImGui, and ImVector< T >::resize().

Referenced by ImGuiIO::ImGuiIO().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCurrentWindow()

static void SetCurrentWindow ( ImGuiWindow window)
static
3007{
3008 ImGuiContext& g = *GImGui;
3009 g.CurrentWindow = window;
3010 g.CurrentTable = window && window->DC.CurrentTableIdx != -1 ? g.Tables.GetByIndex(window->DC.CurrentTableIdx) : NULL;
3011 if (window)
3013}
int CurrentTableIdx
Definition imgui_internal.h:1790
float FontSize
Definition imgui_internal.h:688
float FontSize
Definition imgui_internal.h:1357
ImPool< ImGuiTable > Tables
Definition imgui_internal.h:1521
float CalcFontSize() const
Definition imgui_internal.h:1912
T * GetByIndex(ImPoolIdx n)
Definition imgui_internal.h:616

References ImGuiWindow::CalcFontSize(), ImGuiContext::CurrentTable, ImGuiWindowTempData::CurrentTableIdx, ImGuiContext::CurrentWindow, ImGuiWindow::DC, ImGuiContext::DrawListSharedData, ImDrawListSharedData::FontSize, ImGuiContext::FontSize, ImPool< T >::GetByIndex(), GImGui, and ImGuiContext::Tables.

Referenced by ImGui::Begin(), and ImGui::End().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCursorPosYAndSetupForPrevLine()

static void SetCursorPosYAndSetupForPrevLine ( float  pos_y,
float  line_height 
)
static
2248{
2249 // Set cursor position and a few other things so that SetScrollHereY() and Columns() can work when seeking cursor.
2250 // FIXME: It is problematic that we have to do that here, because custom/equivalent end-user code would stumble on the same issue.
2251 // The clipper should probably have a 4th step to display the last item in a regular manner.
2252 ImGuiContext& g = *GImGui;
2253 ImGuiWindow* window = g.CurrentWindow;
2254 float off_y = pos_y - window->DC.CursorPos.y;
2255 window->DC.CursorPos.y = pos_y;
2256 window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, pos_y);
2257 window->DC.CursorPosPrevLine.y = window->DC.CursorPos.y - line_height; // Setting those fields so that SetScrollHereY() can properly function after the end of our clipper usage.
2258 window->DC.PrevLineSize.y = (line_height - g.Style.ItemSpacing.y); // If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list.
2259 if (ImGuiOldColumns* columns = window->DC.CurrentColumns)
2260 columns->LineMinY = window->DC.CursorPos.y; // Setting this so that cell Y position are set properly
2261 if (ImGuiTable* table = g.CurrentTable)
2262 {
2263 if (table->IsInsideRow)
2264 ImGui::TableEndRow(table);
2265 table->RowPosY2 = window->DC.CursorPos.y;
2266 const int row_increase = (int)((off_y / line_height) + 0.5f);
2267 //table->CurrentRow += row_increase; // Can't do without fixing TableEndRow()
2268 table->RowBgColorCounter += row_increase;
2269 }
2270}
ImVec2 PrevLineSize
Definition imgui_internal.h:1760
ImGuiOldColumns * CurrentColumns
Definition imgui_internal.h:1789
ImVec2 CursorPosPrevLine
Definition imgui_internal.h:1755
IMGUI_API void TableEndRow(ImGuiTable *table)
Definition imgui_tables.cpp:1715
Definition imgui_internal.h:1185
ImVec2 ItemSpacing
Definition imgui.h:1736
Definition imgui_internal.h:2096

References ImGuiWindowTempData::CurrentColumns, ImGuiContext::CurrentTable, ImGuiContext::CurrentWindow, ImGuiWindowTempData::CursorMaxPos, ImGuiWindowTempData::CursorPos, ImGuiWindowTempData::CursorPosPrevLine, ImGuiWindow::DC, GImGui, ImMax(), ImGuiStyle::ItemSpacing, ImGuiWindowTempData::PrevLineSize, ImGuiContext::Style, ImGui::TableEndRow(), and ImVec2::y.

Referenced by ImGuiListClipper::End(), and ImGuiListClipper::Step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetupViewportDrawData()

static void SetupViewportDrawData ( ImGuiViewportP viewport,
ImVector< ImDrawList * > *  draw_lists 
)
static
4342{
4343 ImGuiIO& io = ImGui::GetIO();
4344 ImDrawData* draw_data = &viewport->DrawDataP;
4345 draw_data->Valid = true;
4346 draw_data->CmdLists = (draw_lists->Size > 0) ? draw_lists->Data : NULL;
4347 draw_data->CmdListsCount = draw_lists->Size;
4348 draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0;
4349 draw_data->DisplayPos = viewport->Pos;
4350 draw_data->DisplaySize = viewport->Size;
4352 for (int n = 0; n < draw_lists->Size; n++)
4353 {
4354 draw_data->TotalVtxCount += draw_lists->Data[n]->VtxBuffer.Size;
4355 draw_data->TotalIdxCount += draw_lists->Data[n]->IdxBuffer.Size;
4356 }
4357}
IMGUI_API ImGuiIO & GetIO()
Definition imgui.cpp:3439
Definition imgui.h:2473
int TotalIdxCount
Definition imgui.h:2476
ImVec2 DisplayPos
Definition imgui.h:2479
ImVec2 DisplaySize
Definition imgui.h:2480
ImDrawList ** CmdLists
Definition imgui.h:2478
bool Valid
Definition imgui.h:2474
ImVec2 FramebufferScale
Definition imgui.h:2481
int CmdListsCount
Definition imgui.h:2475
int TotalVtxCount
Definition imgui.h:2477
Definition imgui.h:1775
ImVec2 DisplayFramebufferScale
Definition imgui.h:1799
ImDrawData DrawDataP
Definition imgui_internal.h:1231

References ImDrawData::CmdLists, ImDrawData::CmdListsCount, ImVector< T >::Data, ImGuiIO::DisplayFramebufferScale, ImDrawData::DisplayPos, ImDrawData::DisplaySize, ImGuiViewportP::DrawDataP, ImDrawData::FramebufferScale, ImGui::GetIO(), ImGuiViewport::Pos, ImVector< T >::Size, ImGuiViewport::Size, ImDrawData::TotalIdxCount, ImDrawData::TotalVtxCount, and ImDrawData::Valid.

Referenced by ImGui::Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWindowConditionAllowFlags()

static void SetWindowConditionAllowFlags ( ImGuiWindow window,
ImGuiCond  flags,
bool  enabled 
)
static
5098{
5099 window->SetWindowPosAllowFlags = enabled ? (window->SetWindowPosAllowFlags | flags) : (window->SetWindowPosAllowFlags & ~flags);
5100 window->SetWindowSizeAllowFlags = enabled ? (window->SetWindowSizeAllowFlags | flags) : (window->SetWindowSizeAllowFlags & ~flags);
5101 window->SetWindowCollapsedAllowFlags = enabled ? (window->SetWindowCollapsedAllowFlags | flags) : (window->SetWindowCollapsedAllowFlags & ~flags);
5102}
ImGuiCond SetWindowSizeAllowFlags
Definition imgui_internal.h:1855
ImGuiCond SetWindowCollapsedAllowFlags
Definition imgui_internal.h:1856
ImGuiCond SetWindowPosAllowFlags
Definition imgui_internal.h:1854

References ImGuiWindow::SetWindowCollapsedAllowFlags, ImGuiWindow::SetWindowPosAllowFlags, and ImGuiWindow::SetWindowSizeAllowFlags.

Referenced by ImGui::Begin(), and CreateNewWindow().

+ Here is the caller graph for this function:

◆ StartLockWheelingWindow()

static void StartLockWheelingWindow ( ImGuiWindow window)
static
3693{
3694 ImGuiContext& g = *GImGui;
3695 if (g.WheelingWindow == window)
3696 return;
3697 g.WheelingWindow = window;
3700}
static const float WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER
Definition imgui.cpp:869
ImGuiWindow * WheelingWindow
Definition imgui_internal.h:1384
float WheelingWindowTimer
Definition imgui_internal.h:1386
ImVec2 WheelingWindowRefMousePos
Definition imgui_internal.h:1385

References GImGui, ImGuiContext::IO, ImGuiIO::MousePos, ImGuiContext::WheelingWindow, ImGuiContext::WheelingWindowRefMousePos, ImGuiContext::WheelingWindowTimer, and WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER.

Referenced by ImGui::UpdateMouseWheel().

+ Here is the caller graph for this function:

◆ WindowSettingsHandler_ApplyAll()

static void WindowSettingsHandler_ApplyAll ( ImGuiContext ctx,
ImGuiSettingsHandler  
)
static
10574{
10575 ImGuiContext& g = *ctx;
10576 for (ImGuiWindowSettings* settings = g.SettingsWindows.begin(); settings != NULL; settings = g.SettingsWindows.next_chunk(settings))
10577 if (settings->WantApply)
10578 {
10579 if (ImGuiWindow* window = ImGui::FindWindowByID(settings->ID))
10580 ApplyWindowSettings(window, settings);
10581 settings->WantApply = false;
10582 }
10583}
IMGUI_API ImGuiWindow * FindWindowByID(ImGuiID id)
Definition imgui.cpp:5104
T * begin()
Definition imgui_internal.h:642
T * next_chunk(T *p)
Definition imgui_internal.h:643

References ApplyWindowSettings(), ImChunkStream< T >::begin(), ImGui::FindWindowByID(), ImChunkStream< T >::next_chunk(), and ImGuiContext::SettingsWindows.

Referenced by ImGui::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WindowSettingsHandler_ClearAll()

static void WindowSettingsHandler_ClearAll ( ImGuiContext ctx,
ImGuiSettingsHandler  
)
static
10545{
10546 ImGuiContext& g = *ctx;
10547 for (int i = 0; i != g.Windows.Size; i++)
10548 g.Windows[i]->SettingsOffset = -1;
10550}
void clear()
Definition imgui_internal.h:638

References ImChunkStream< T >::clear(), ImGuiContext::SettingsWindows, ImVector< T >::Size, and ImGuiContext::Windows.

Referenced by ImGui::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WindowSettingsHandler_ReadLine()

static void WindowSettingsHandler_ReadLine ( ImGuiContext ,
ImGuiSettingsHandler ,
void entry,
const char *  line 
)
static
10563{
10564 ImGuiWindowSettings* settings = (ImGuiWindowSettings*)entry;
10565 int x, y;
10566 int i;
10567 if (sscanf(line, "Pos=%i,%i", &x, &y) == 2) { settings->Pos = ImVec2ih((short)x, (short)y); }
10568 else if (sscanf(line, "Size=%i,%i", &x, &y) == 2) { settings->Size = ImVec2ih((short)x, (short)y); }
10569 else if (sscanf(line, "Collapsed=%d", &i) == 1) { settings->Collapsed = (i != 0); }
10570}
Definition imgui_internal.h:461

References ImGuiWindowSettings::Collapsed, ImGuiWindowSettings::Pos, and ImGuiWindowSettings::Size.

Referenced by ImGui::Initialize().

+ Here is the caller graph for this function:

◆ WindowSettingsHandler_ReadOpen()

static void * WindowSettingsHandler_ReadOpen ( ImGuiContext ,
ImGuiSettingsHandler ,
const char *  name 
)
static
10553{
10555 ImGuiID id = settings->ID;
10556 *settings = ImGuiWindowSettings(); // Clear existing if recycling previous entry
10557 settings->ID = id;
10558 settings->WantApply = true;
10559 return (void*)settings;
10560}
unsigned int ImGuiID
Definition imgui.h:207
IMGUI_API ImGuiWindowSettings * FindOrCreateWindowSettings(const char *name)
Definition imgui.cpp:10404
bool WantApply
Definition imgui_internal.h:1266
ImGuiID ID
Definition imgui_internal.h:1262

References ImGui::FindOrCreateWindowSettings(), ImGuiWindowSettings::ID, and ImGuiWindowSettings::WantApply.

Referenced by ImGui::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WindowSettingsHandler_WriteAll()

static void WindowSettingsHandler_WriteAll ( ImGuiContext ctx,
ImGuiSettingsHandler handler,
ImGuiTextBuffer buf 
)
static
10586{
10587 // Gather data from windows that were active during this session
10588 // (if a window wasn't opened in this session we preserve its settings)
10589 ImGuiContext& g = *ctx;
10590 for (int i = 0; i != g.Windows.Size; i++)
10591 {
10592 ImGuiWindow* window = g.Windows[i];
10594 continue;
10595
10597 if (!settings)
10598 {
10599 settings = ImGui::CreateNewWindowSettings(window->Name);
10600 window->SettingsOffset = g.SettingsWindows.offset_from_ptr(settings);
10601 }
10602 IM_ASSERT(settings->ID == window->ID);
10603 settings->Pos = ImVec2ih((short)window->Pos.x, (short)window->Pos.y);
10604 settings->Size = ImVec2ih((short)window->SizeFull.x, (short)window->SizeFull.y);
10605 settings->Collapsed = window->Collapsed;
10606 }
10607
10608 // Write to text buffer
10609 buf->reserve(buf->size() + g.SettingsWindows.size() * 6); // ballpark reserve
10610 for (ImGuiWindowSettings* settings = g.SettingsWindows.begin(); settings != NULL; settings = g.SettingsWindows.next_chunk(settings))
10611 {
10612 const char* settings_name = settings->GetName();
10613 buf->appendf("[%s][%s]\n", handler->TypeName, settings_name);
10614 buf->appendf("Pos=%d,%d\n", settings->Pos.x, settings->Pos.y);
10615 buf->appendf("Size=%d,%d\n", settings->Size.x, settings->Size.y);
10616 buf->appendf("Collapsed=%d\n", settings->Collapsed);
10617 buf->append("\n");
10618 }
10619}
IMGUI_API ImGuiWindowSettings * CreateNewWindowSettings(const char *name)
Definition imgui.cpp:10373
int size() const
Definition imgui_internal.h:640
T * ptr_from_offset(int off)
Definition imgui_internal.h:647
const char * TypeName
Definition imgui_internal.h:1274
IMGUI_API void appendf(const char *fmt,...) IM_FMTARGS(2)
Definition imgui.cpp:2155
void reserve(int capacity)
Definition imgui.h:2062
IMGUI_API void append(const char *str, const char *str_end=NULL)
Definition imgui.cpp:2137
char * GetName()
Definition imgui_internal.h:1269

References ImGuiTextBuffer::append(), ImGuiTextBuffer::appendf(), ImChunkStream< T >::begin(), ImGuiWindowSettings::Collapsed, ImGuiWindow::Collapsed, ImGui::CreateNewWindowSettings(), ImGui::FindWindowSettings(), ImGuiWindow::Flags, ImGuiWindowSettings::ID, ImGuiWindow::ID, IM_ASSERT, ImGuiWindowFlags_NoSavedSettings, ImGuiWindow::Name, ImChunkStream< T >::next_chunk(), ImChunkStream< T >::offset_from_ptr(), ImGuiWindowSettings::Pos, ImGuiWindow::Pos, ImChunkStream< T >::ptr_from_offset(), ImGuiTextBuffer::reserve(), ImGuiWindow::SettingsOffset, ImGuiContext::SettingsWindows, ImVector< T >::Size, ImGuiTextBuffer::size(), ImChunkStream< T >::size(), ImGuiWindowSettings::Size, ImGuiWindow::SizeFull, ImGuiSettingsHandler::TypeName, ImGuiContext::Windows, ImVec2::x, and ImVec2::y.

Referenced by ImGui::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ GCrc32LookupTable

const ImU32 GCrc32LookupTable[256]
static
Initial value:
=
{
0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,0x9E6495A3,0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91,
0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D385C7,0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5,
0x3B6E20C8,0x4C69105E,0xD56041E4,0xA2677172,0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,0x35B5A8FA,0x42B2986C,0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,
0x26D930AC,0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F,0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,0x2F6F7C87,0x58684C11,0xC1611DAB,0xB6662D3D,
0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,0x9FBFE4A5,0xE8B8D433,0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,0x086D3D2D,0x91646C97,0xE6635C01,
0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,0x65B0D9C6,0x12B7E950,0x8BBEB8EA,0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,
0x4DB26158,0x3AB551CE,0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB,0x4369E96A,0x346ED9FC,0xAD678846,0xDA60B8D0,0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,
0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,0xCE61E49F,0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4,0x59B33D17,0x2EB40D81,0xB7BD5C3B,0xC0BA6CAD,
0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,0xEAD54739,0x9DD277AF,0x04DB2615,0x73DC1683,0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8,0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,
0xF00F9344,0x8708A3D2,0x1E01F268,0x6906C2FE,0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7,0xFED41B76,0x89D32BE0,0x10DA7A5A,0x67DD4ACC,0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,
0xD6D6A3E8,0xA1D1937E,0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,0x316E8EEF,0x4669BE79,
0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,0xCC0C7795,0xBB0B4703,0x220216B9,0x5505262F,0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04,0xC2D7FFA7,0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,
0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,0x9C0906A9,0xEB0E363F,0x72076785,0x05005713,0x95BF4A82,0xE2B87A14,0x7BB12BAE,0x0CB61B38,0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,
0x86D3D2D4,0xF1D4E242,0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,0x88085AE6,0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45,
0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,0xA7672661,0xD06016F7,0x4969474D,0x3E6E77DB,0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,0x47B2CF7F,0x30B5FFE9,
0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,0xCDD70693,0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D,
}

Referenced by ImHashData(), and ImHashStr().

◆ GImAllocatorAllocFunc

◆ GImAllocatorFreeFunc

◆ GImAllocatorUserData

◆ GImGui

ImGuiContext* GImGui = NULL

Referenced by ImGui::AcceptDragDropPayload(), ImGui::ActivateItem(), AddWindowToDrawData(), ImGui::AlignTextToFramePadding(), ImGui::ArrowButtonEx(), ImGuiLastItemDataBackup::Backup(), ImGui::Begin(), ImGuiListClipper::Begin(), ImGui::BeginChildEx(), ImGui::BeginChildFrame(), ImGui::BeginColumns(), ImGui::BeginCombo(), ImGui::BeginDragDropSource(), ImGui::BeginDragDropTarget(), ImGui::BeginDragDropTargetCustom(), ImGui::BeginGroup(), ImGui::BeginListBox(), ImGui::BeginMainMenuBar(), ImGui::BeginMenu(), ImGui::BeginPopup(), ImGui::BeginPopupContextItem(), ImGui::BeginPopupContextVoid(), ImGui::BeginPopupContextWindow(), ImGui::BeginPopupEx(), ImGui::BeginPopupModal(), ImGui::BeginTabBar(), ImGui::BeginTabBarEx(), ImGui::BeginTabItem(), ImGui::BeginTableEx(), ImGui::BeginTooltipEx(), ImGui::BringWindowToDisplayBack(), ImGui::BringWindowToDisplayFront(), ImGui::BringWindowToFocusFront(), ImGui::Bullet(), ImGui::BulletTextV(), ImGui::ButtonBehavior(), ImGui::ButtonEx(), Slic3r::GUI::ImGuiWrapper::calc_button_size(), ImGuiWindow::CalcFontSize(), ImGui::CalcItemSize(), ImGui::CalcItemWidth(), ImGui::CalcListClipping(), CalcMaxPopupHeightFromItemCount(), ImGui::CalcTextSize(), CalcWindowAutoFitSize(), CalcWindowSizeAfterConstraint(), ImGui::CalcWrapWidthForPos(), ImGui::CaptureKeyboardFromApp(), ImGui::CaptureMouseFromApp(), ImGui::Checkbox(), ClampWindowRect(), ImGui::ClearDragDrop(), ImGui::ClearIniSettings(), ImGui::CloseButton(), ImGui::CloseCurrentPopup(), ImGui::ClosePopupsOverWindow(), ImGui::ClosePopupToLevel(), ImGui::CollapseButton(), ImGui::CollapsingHeader(), ImGui::ColorButton(), ImGui::ColorEdit4(), ImGui::ColorEditOptionsPopup(), ImGui::ColorPicker4(), ImGui::ColorPickerOptionsPopup(), ImGui::ColorTooltip(), ImGuiStackSizes::CompareWithCurrentState(), ImGui::CreateContext(), CreateNewWindow(), ImGui::CreateNewWindowSettings(), ImGui::DebugDrawItemRect(), ImGui::DebugNodeDrawList(), ImGui::DebugNodeWindow(), ImGui::DebugRenderViewportThumbnail(), ImGui::DebugStartItemPicker(), ImGui::DestroyContext(), Slic3r::GUI::ImGuiWrapper::disable_background_fadeout_animation(), ImGui::DragBehavior(), ImGui::DragFloatRange2(), ImGui::DragIntRange2(), ImGui::DragScalar(), ImGui::DragScalarN(), Slic3r::GUI::ImGuiWrapper::draw_radio_button(), ImGui::End(), ImGui::EndChild(), ImGui::EndColumns(), ImGui::EndDragDropSource(), ImGui::EndDragDropTarget(), ImGui::EndFrame(), ImGui::EndGroup(), ImGui::EndListBox(), ImGui::EndMainMenuBar(), ImGui::EndMenu(), ImGui::EndMenuBar(), ImGui::EndPopup(), ImGui::EndTabBar(), ImGui::EndTabItem(), ImGui::EndTable(), ImGui::ErrorCheckEndFrameRecover(), ImGui::ErrorCheckEndFrameSanityChecks(), ImGui::ErrorCheckNewFrameSanityChecks(), ImGui::FindBestWindowPosForPopup(), FindHoveredWindow(), ImGui::FindSettingsHandler(), ImGui::FindWindowByID(), ImGui::FindWindowFocusIndex(), FindWindowNavFocusable(), ImGui::FindWindowSettings(), ImGui::FocusTopMostWindowUnderOne(), ImGui::FocusWindow(), ImGui::GcCompactTransientMiscBuffers(), Slic3r::GUI::ImGuiWrapper::get_item_spacing(), Slic3r::GUI::ImGuiWrapper::get_slider_float_height(), ImGui::GetActiveID(), ImGui::GetBackgroundDrawList(), ImGui::GetClipboardText(), GetClipboardTextFn_DefaultImpl(), ImGui::GetColorU32(), ImGui::GetColorU32(), ImGui::GetColorU32(), ImGui::GetColumnWidth(), ImGui::GetContentRegionAvail(), ImGui::GetContentRegionMax(), ImGui::GetContentRegionMaxAbs(), ImGui::GetCurrentContext(), ImGui::GetCurrentTable(), ImGui::GetCurrentWindow(), ImGui::GetCurrentWindowRead(), ImGui::GetDefaultFont(), ImGui::GetDragDropPayload(), GetDraggedColumnOffset(), ImGui::GetDrawData(), ImGui::GetDrawListSharedData(), ImGui::GetFocusedFocusScope(), ImGui::GetFocusID(), ImGui::GetFocusScope(), ImGui::GetFont(), ImGui::GetFontSize(), ImGui::GetFontTexUvWhitePixel(), ImGui::GetForegroundDrawList(), ImGui::GetFrameCount(), ImGui::GetFrameHeight(), ImGui::GetFrameHeightWithSpacing(), ImGui::GetHoveredID(), ImGuiWindow::GetID(), ImGui::GetID(), ImGui::GetID(), ImGuiWindow::GetID(), ImGui::GetID(), ImGuiWindow::GetID(), ImGuiWindow::GetIDNoKeepAlive(), ImGuiWindow::GetIDNoKeepAlive(), ImGuiWindow::GetIDNoKeepAlive(), ImGui::GetIDWithSeed(), ImGui::GetInputTextState(), ImGui::GetIO(), ImGui::GetItemFlags(), ImGui::GetItemID(), ImGui::GetItemStatusFlags(), ImGui::GetKeyIndex(), ImGui::GetKeyPressedAmount(), ImGui::GetMainViewport(), ImGui::GetMergedKeyModFlags(), ImGui::GetMouseCursor(), ImGui::GetMouseDragDelta(), ImGui::GetMousePos(), ImGui::GetMousePosOnOpeningCurrentPopup(), ImGui::GetNavInputAmount(), ImGui::GetScrollMaxX(), ImGui::GetScrollMaxY(), ImGui::GetScrollX(), ImGui::GetScrollY(), GetSkipItemForListClipping(), ImGui::GetStateStorage(), ImGui::GetStyle(), ImGui::GetStyleColorVec4(), GetTabBarFromTabBarRef(), GetTabBarRefFromTabBar(), ImGui::GetTextLineHeight(), ImGui::GetTextLineHeightWithSpacing(), ImGui::GetTime(), ImGui::GetTopMostPopupModal(), ImGui::GetTreeNodeToLabelSpacing(), GetViewportDrawList(), ImGui::GetWindowAllowedExtentRect(), ImGui::GetWindowContentRegionMax(), ImGui::GetWindowContentRegionMin(), ImGui::GetWindowContentRegionWidth(), ImGui::GetWindowHeight(), ImGui::GetWindowPos(), ImGui::GetWindowWidth(), Slic3r::GUI::ImGuiWrapper::image_button(), Slic3r::GUI::image_button_ex(), ImGui::ImageButton(), ImGui::ImageButtonEx(), ImGui::Indent(), ImGui::InputScalar(), ImGui::InputScalarN(), InputTextCalcTextSizeW(), ImGui::InputTextEx(), InputTextFilterCharacter(), ImGuiInputTextCallbackData::InsertChars(), ImGui::IsActiveIdUsingKey(), ImGui::IsActiveIdUsingNavDir(), ImGui::IsActiveIdUsingNavInput(), ImGui::IsAnyItemActive(), ImGui::IsAnyItemFocused(), ImGui::IsAnyItemHovered(), ImGui::IsAnyMouseDown(), ImGui::IsClippedEx(), ImGui::IsDragDropPayloadBeingAccepted(), ImGui::IsItemActivated(), ImGui::IsItemActive(), ImGui::IsItemDeactivated(), ImGui::IsItemDeactivatedAfterEdit(), ImGui::IsItemFocused(), ImGui::IsItemHovered(), ImGui::IsItemToggledOpen(), ImGui::IsItemToggledSelection(), ImGui::IsKeyDown(), ImGui::IsKeyPressed(), ImGui::IsKeyPressedMap(), ImGui::IsKeyReleased(), ImGui::IsMouseClicked(), ImGui::IsMouseDoubleClicked(), ImGui::IsMouseDown(), ImGui::IsMouseDragging(), ImGui::IsMouseDragPastThreshold(), ImGui::IsMouseHoveringRect(), ImGui::IsMousePosValid(), ImGui::IsMouseReleased(), ImGui::IsNavInputDown(), ImGui::IsPopupOpen(), ImGui::IsPopupOpen(), ImGui::IsRectVisible(), ImGui::IsRectVisible(), ImGui::IsWindowAbove(), IsWindowContentHoverable(), ImGui::IsWindowFocused(), ImGui::IsWindowHovered(), ImGui::ItemAdd(), ImGui::ItemFocusable(), ImGui::ItemHoverable(), ImGui::ItemSize(), ImGui::KeepAliveID(), ImGui::LabelTextV(), ImGui::ListBoxHeader(), ImGui::LoadIniSettingsFromMemory(), ImGui::LogBegin(), ImGui::LogButtons(), ImGui::LogFinish(), ImGui::LogRenderedText(), ImGui::LogSetNextTextDecoration(), ImGui::LogText(), ImGui::LogTextV(), ImGui::LogToBuffer(), ImGui::LogToClipboard(), ImGui::LogToFile(), ImGui::LogToTTY(), ImGui::MarkIniSettingsDirty(), ImGui::MarkIniSettingsDirty(), ImGui::MarkItemEdited(), ImGui::MemAlloc(), ImGui::MemFree(), ImGuiWindow::MenuBarHeight(), ImGui::MenuItem(), ImGui::NavCalcPreferredRefPos(), ImGui::NavEndFrame(), ImGui::NavInitWindow(), ImGui::NavMoveRequestButNoResultYet(), ImGui::NavMoveRequestCancel(), ImGui::NavMoveRequestForward(), ImGui::NavMoveRequestTryWrapping(), ImGui::NavProcessItem(), ImGui::NavRestoreLayer(), ImGui::NavScoreItem(), ImGui::NavUpdate(), ImGui::NavUpdateAnyRequestFlag(), ImGui::NavUpdateInitResult(), ImGui::NavUpdateMoveResult(), ImGui::NavUpdatePageUpPageDown(), ImGui::NavUpdateWindowing(), NavUpdateWindowingHighlightWindow(), ImGui::NavUpdateWindowingOverlay(), ImGui::NewFrame(), ImGui::NewLine(), ImGui::NextColumn(), ImGui::OpenPopup(), ImGui::OpenPopupEx(), ImGui::OpenPopupOnItemClick(), PatchFormatStringFloatToInt(), ImGui::PlotEx(), ImGui::PopFocusScope(), ImGui::PopFont(), ImGui::PopID(), ImGui::PopItemFlag(), ImGui::PopStyleColor(), ImGui::PopStyleVar(), Slic3r::GUI::process_key_down(), ImGui::ProgressBar(), ImGui::PushFocusScope(), ImGui::PushFont(), ImGui::PushID(), ImGui::PushID(), ImGui::PushID(), ImGui::PushID(), ImGui::PushItemFlag(), ImGui::PushItemWidth(), ImGui::PushMultiItemsWidths(), ImGui::PushOverrideID(), ImGui::PushStyleColor(), ImGui::PushStyleColor(), ImGui::PushStyleVar(), ImGui::PushStyleVar(), ImGui::RadioButton(), ImGui::Render(), ImGui::RenderFrame(), ImGui::RenderFrameBorder(), ImGui::RenderNavHighlight(), ImGui::RenderText(), ImGui::RenderTextClipped(), ImGui::RenderTextEllipsis(), ImGui::RenderTextWrapped(), RenderViewportsThumbnails(), ImGui::RenderWindowDecorations(), ImGui::RenderWindowOuterBorders(), ImGui::RenderWindowTitleBarContents(), ImGui::ResetMouseDragDelta(), ImGuiLastItemDataBackup::Restore(), ImGui::SameLine(), ImGui::SaveIniSettingsToDisk(), ImGui::SaveIniSettingsToMemory(), Slic3r::GUI::scroll_down(), Slic3r::GUI::scroll_up(), Slic3r::GUI::scroll_y(), ImGui::Scrollbar(), ImGui::ScrollbarEx(), ImGui::ScrollToBringRectIntoView(), Slic3r::GUI::ImGuiWrapper::search_list(), Slic3r::GUI::selectable(), ImGui::Selectable(), ImGui::Separator(), ImGui::SeparatorEx(), ImGui::SetActiveID(), ImGui::SetClipboardText(), SetClipboardTextFn_DefaultImpl(), ImGui::SetColorEditOptions(), ImGui::SetColumnOffset(), ImGui::SetCurrentContext(), ImGui::SetCurrentFont(), SetCurrentWindow(), SetCursorPosYAndSetupForPrevLine(), ImGui::SetDragDropPayload(), ImGui::SetFocusID(), ImGui::SetHoveredID(), ImGui::SetItemAllowOverlap(), ImGui::SetItemDefaultFocus(), ImGui::SetItemUsingMouseWheel(), ImGui::SetKeyboardFocusHere(), ImGui::SetMouseCursor(), ImGui::SetNavID(), ImGui::SetNextItemOpen(), ImGui::SetNextItemWidth(), ImGui::SetNextWindowBgAlpha(), ImGui::SetNextWindowCollapsed(), ImGui::SetNextWindowContentSize(), ImGui::SetNextWindowFocus(), ImGui::SetNextWindowPos(), ImGui::SetNextWindowScroll(), ImGui::SetNextWindowSize(), ImGui::SetNextWindowSizeConstraints(), ImGui::SetScrollFromPosX(), ImGui::SetScrollFromPosY(), ImGui::SetScrollHereX(), ImGui::SetScrollHereY(), ImGui::SetScrollX(), ImGui::SetScrollY(), ImGui::SetStateStorage(), ImGui::SetTabItemClosed(), ImGuiStackSizes::SetToCurrentState(), ImGui::SetWindowCollapsed(), ImGui::SetWindowFocus(), ImGui::SetWindowFontScale(), ImGui::SetWindowSize(), ImGui::ShowMetricsWindow(), ImGui::Shutdown(), ImGui::SliderBehavior(), ImGui::SliderScalar(), ImGui::SliderScalarN(), ImGui::SmallButton(), ImGui::SplitterBehavior(), StartLockWheelingWindow(), ImGui::StartMouseMovingWindow(), ImStb::STB_TEXTEDIT_GETWIDTH(), ImGuiListClipper::Step(), ImGui::TabBarCalcMaxTabWidth(), ImGui::TabBarCalcTabID(), ImGui::TabBarLayout(), ImGui::TabBarQueueReorderFromMousePos(), ImGui::TabBarScrollingButtons(), ImGui::TabBarScrollToTab(), ImGui::TabBarTabListPopupButton(), ImGui::TabItemBackground(), ImGui::TabItemButton(), ImGui::TabItemCalcSize(), ImGui::TabItemEx(), ImGui::TabItemLabelAndCloseButton(), ImGui::TableBeginCell(), ImGui::TableDrawContextMenu(), ImGui::TableEndRow(), ImGui::TableFindByID(), ImGui::TableGcCompactSettings(), ImGui::TableGcCompactTransientBuffers(), ImGui::TableGetBoundSettings(), ImGui::TableGetColumnCount(), ImGui::TableGetColumnFlags(), ImGui::TableGetColumnIndex(), ImGui::TableGetColumnName(), ImGui::TableGetHoveredColumn(), ImGui::TableGetRowIndex(), ImGui::TableGetSortSpecs(), ImGui::TableHeader(), ImGui::TableHeadersRow(), ImGui::TableLoadSettings(), ImGui::TableMergeDrawChannels(), ImGui::TableNextColumn(), ImGui::TableNextRow(), ImGui::TableOpenContextMenu(), ImGui::TablePopBackgroundChannel(), ImGui::TablePushBackgroundChannel(), ImGui::TableRemove(), ImGui::TableSaveSettings(), ImGui::TableSetBgColor(), ImGui::TableSetColumnEnabled(), ImGui::TableSetColumnIndex(), ImGui::TableSetColumnSortDirection(), ImGui::TableSetColumnWidth(), ImGui::TableSettingsCreate(), ImGui::TableSettingsFindByID(), ImGui::TableSetupColumn(), ImGui::TableSetupScrollFreeze(), ImGui::TableUpdateBorders(), ImGui::TableUpdateLayout(), ImGui::TempInputIsActive(), ImGui::TempInputScalar(), ImGui::TempInputText(), ImGui::TextDisabledV(), ImGui::TextEx(), ImGui::TextV(), ImGui::TextWrappedV(), ImGuiWindow::TitleBarHeight(), ImGui::TreeNodeBehavior(), ImGui::TreeNodeBehaviorIsOpen(), ImGui::TreeNodeExV(), ImGui::TreeNodeExV(), ImGui::TreePop(), ImGui::TreePushOverrideID(), ImGui::Unindent(), ImGui::UpdateDebugToolItemPicker(), ImGui::UpdateHoveredWindowAndCaptureFlags(), ImGui::UpdateMouseInputs(), ImGui::UpdateMouseMovingWindowEndFrame(), ImGui::UpdateMouseMovingWindowNewFrame(), ImGui::UpdateMouseWheel(), ImGui::UpdateSettings(), ImGui::UpdateTabFocus(), ImGui::UpdateViewportsNewFrame(), ImGui::UpdateWindowManualResize(), and ImGui::VSliderScalar().

◆ GStyleVarInfo

const ImGuiStyleVarInfo GStyleVarInfo[]
static
Initial value:
=
{
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowPadding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowRounding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowBorderSize) },
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowMinSize) },
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowTitleAlign) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildRounding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildBorderSize) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, PopupRounding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, PopupBorderSize) },
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, FramePadding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameRounding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameBorderSize) },
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemInnerSpacing) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, IndentSpacing) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ScrollbarSize) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ScrollbarRounding) },
{ ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, GrabRounding) },
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, ButtonTextAlign) },
{ ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, SelectableTextAlign) },
}
@ ImGuiDataType_Float
Definition imgui.h:1287
#define IM_OFFSETOF(_TYPE, _MEMBER)
Definition imgui.h:88

Referenced by GetStyleVarInfo().

◆ NAV_WINDOWING_HIGHLIGHT_DELAY

const float NAV_WINDOWING_HIGHLIGHT_DELAY = 0.20f
static

◆ NAV_WINDOWING_LIST_APPEAR_DELAY

const float NAV_WINDOWING_LIST_APPEAR_DELAY = 0.15f
static

◆ resize_border_def

const ImGuiResizeBorderDef resize_border_def[4]
static
Initial value:
=
{
{ ImVec2(+1, 0), ImVec2(0, 1), ImVec2(0, 0), IM_PI * 1.00f },
{ ImVec2(-1, 0), ImVec2(1, 0), ImVec2(1, 1), IM_PI * 0.00f },
{ ImVec2(0, +1), ImVec2(0, 0), ImVec2(1, 0), IM_PI * 1.50f },
{ ImVec2(0, -1), ImVec2(1, 1), ImVec2(0, 1), IM_PI * 0.50f }
}
#define IM_PI
Definition imgui_internal.h:222

Referenced by ImGui::RenderWindowOuterBorders(), and ImGui::UpdateWindowManualResize().

◆ resize_grip_def

const ImGuiResizeGripDef resize_grip_def[4]
static
Initial value:
=
{
{ ImVec2(1, 1), ImVec2(-1, -1), 0, 3 },
{ ImVec2(0, 1), ImVec2(+1, -1), 3, 6 },
{ ImVec2(0, 0), ImVec2(+1, +1), 6, 9 },
{ ImVec2(1, 0), ImVec2(-1, +1), 9, 12 }
}

Referenced by ImGui::RenderWindowDecorations(), and ImGui::UpdateWindowManualResize().

◆ WINDOWS_HOVER_PADDING

const float WINDOWS_HOVER_PADDING = 4.0f
static

◆ WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER

const float WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER = 2.00f
static

Referenced by StartLockWheelingWindow().

◆ WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER

const float WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER = 0.04f
static