floatFontGlobalScale;// = 1.0f // Global scale all fonts
floatFontGlobalScale;// = 1.0f // Global scale all fonts
boolFontAllowUserScaling;// = false // Allow user scaling text of individual window with CTRL+Wheel.
boolFontAllowUserScaling;// = false // Allow user scaling text of individual window with CTRL+Wheel.
ImFont*FontDefault;// = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
ImFont*FontDefault;// = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
ImVec2DisplayFramebufferScale;// = (1.0f,1.0f) // For hi-dpi/retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
ImVec2DisplayFramebufferScale;// = (1,1)// For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale.
// Docking options (when ImGuiConfigFlags_DockingEnable is set)
// Docking options (when ImGuiConfigFlags_DockingEnable is set)
boolConfigDockingNoSplit;// = false // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
boolConfigDockingNoSplit;// = false // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
@ -1983,13 +1983,14 @@ struct ImDrawData
intTotalVtxCount;// For convenience, sum of all ImDrawList's VtxBuffer.Size
intTotalVtxCount;// For convenience, sum of all ImDrawList's VtxBuffer.Size
ImVec2DisplayPos;// Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
ImVec2DisplayPos;// Upper-left position of the viewport to render (== upper-left of the orthogonal projection matrix to use)
ImVec2DisplaySize;// Size of the viewport to render (== io.DisplaySize for the main viewport) (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
ImVec2DisplaySize;// Size of the viewport to render (== io.DisplaySize for the main viewport) (DisplayPos + DisplaySize == lower-right of the orthogonal projection matrix to use)
ImVec2FramebufferScale;// Amount of pixels for each unit of DisplaySize. Based on io.DisplayFramebufferScale. Generally (1,1) on normal display, (2,2) on OSX with Retina display.
// Functions
// Functions
ImDrawData(){Valid=false;Clear();}
ImDrawData(){Valid=false;Clear();}
~ImDrawData(){Clear();}
~ImDrawData(){Clear();}
voidClear(){Valid=false;CmdLists=NULL;CmdListsCount=TotalVtxCount=TotalIdxCount=0;DisplayPos=DisplaySize=ImVec2(0.f,0.f);}// The ImDrawList are owned by ImGuiContext!
voidClear(){Valid=false;CmdLists=NULL;CmdListsCount=TotalVtxCount=TotalIdxCount=0;DisplayPos=DisplaySize=FramebufferScale=ImVec2(0.f,0.f);}// The ImDrawList are owned by ImGuiContext!
IMGUI_APIvoidDeIndexAllBuffers();// Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
IMGUI_APIvoidDeIndexAllBuffers();// Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!
IMGUI_APIvoidScaleClipRects(constImVec2& sc);// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
IMGUI_APIvoidScaleClipRects(constImVec2&fb_scale);// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
structImFont
structImFont
{
{
// Members: Hot ~62/78 bytes
// Members: Hot ~24/32 bytes (for CalcTextSize)
floatFontSize;// <user set> // Height of characters, set during loading (don't change after loading)
ImVector<float>IndexAdvanceX;// 12/16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI).
floatScale;// = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
floatFontSize;// 4 // in // <user set> // Height of characters, set during loading (don't change after loading)
ImVec2DisplayOffset;// = (0.f,0.f) // Offset font rendering by xx pixels
floatFallbackAdvanceX;// 4 // out // = FallbackGlyph->AdvanceX
ImVector<ImFontGlyph>Glyphs;// // All glyphs.
ImWcharFallbackChar;// 2 // in // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
ImVector<float>IndexAdvanceX;// // Sparse. Glyphs->AdvanceX in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI).
ImVector<ImWchar>IndexLookup;// // Sparse. Index glyphs by Unicode code-point.
// Members: Hot ~36/48 bytes (for CalcTextSize + render loop)
ImVector<ImFontGlyph>Glyphs;// 12-16 // out // // All glyphs.
ImWcharFallbackChar;// = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
ImVec2DisplayOffset;// 8 // in // = (0,0) // Offset font rendering by xx pixels
constImFontGlyph*FallbackGlyph;// 4-8 // out // = FindGlyph(FontFallbackChar)
// Members: Cold ~18/26 bytes
shortConfigDataCount;// ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
// Members: Cold ~28/40 bytes
ImFontConfig*ConfigData;// // Pointer within ContainerAtlas->ConfigData
ImFontAtlas*ContainerAtlas;// 4-8 // out // // What we has been loaded into
ImFontAtlas*ContainerAtlas;// // What we has been loaded into
ImFontConfig*ConfigData;// 4-8 // in // // Pointer within ContainerAtlas->ConfigData
floatAscent,Descent;// // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
shortConfigDataCount;// 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
boolDirtyLookupTables;
boolDirtyLookupTables;// 1 // out //
intMetricsTotalSurface;// // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
floatScale;// 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
floatAscent,Descent;// 8 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
intMetricsTotalSurface;// 4 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
// Helper to scale the ClipRect field of each ImDrawCmd.
voidImDrawData::ScaleClipRects(constImVec2&scale)
// Use if your final output buffer is at a different scale than draw_data->DisplaySize,
// or if there is a difference between your window resolution and framebuffer resolution.
// [ImGui] this is a slightly modified version of stb_textedit.h 1.12. Those changes would need to be pushed into nothings/stb
// [DEAR IMGUI]
// [ImGui] - 2018-06: fixed undo/redo after pasting large amount of text (over 32 kb). Redo will still fail when undo buffers are exhausted, but text won't be corrupted (see nothings/stb issue #620)
// This is a slightly modified version of stb_textedit.h 1.13.
// [ImGui] - 2018-06: fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321)
// Those changes would need to be pushed into nothings/stb:
// [ImGui] - fixed some minor warnings
// - Fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321)
// Grep for [DEAR IMGUI] to find the changes.
// stb_textedit.h - v1.12 - public domain - Sean Barrett
// stb_textedit.h - v1.13 - public domain - Sean Barrett
// Development of this library was sponsored by RAD Game Tools
// Development of this library was sponsored by RAD Game Tools
//
//
// This C header file implements the guts of a multi-line text-editing
// This C header file implements the guts of a multi-line text-editing
@ -34,6 +35,7 @@
//
//
// VERSION HISTORY
// VERSION HISTORY
//
//
// 1.13 (2019-02-07) fix bug in undo size management
// 1.12 (2018-01-29) user can change STB_TEXTEDIT_KEYTYPE, fix redo to avoid crash
// 1.12 (2018-01-29) user can change STB_TEXTEDIT_KEYTYPE, fix redo to avoid crash
// 1.11 (2017-03-03) fix HOME on last line, dragging off single-line textfield
// 1.11 (2017-03-03) fix HOME on last line, dragging off single-line textfield
// 1.10 (2016-10-25) supress warnings about casting away const with -Wcast-qual
// 1.10 (2016-10-25) supress warnings about casting away const with -Wcast-qual