// Simple word-wrapping for English, not full-featured. Please submit failing cases!
// Simple word-wrapping for English, not full-featured. Please submit failing cases!
// FIXME: Much possible improvements (don't cut things like "word !", "word!!!" but cut within "word,,,,", more sensible support for punctuations, support for Unicode punctuations, etc.)
// FIXME: Much possible improvements (don't cut things like "word !", "word!!!" but cut within "word,,,,", more sensible support for punctuations, support for Unicode punctuations, etc.)
// Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
// Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
// Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
// Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
typedefunsignedshortImWchar;// hold a character for display
typedefImU32ImGuiID;
typedefImU32ImGuiID;// hold widget unique ID
typedefintImGuiCol;// enum ImGuiCol_
typedefintImGuiCol;// enum ImGuiCol_
typedefintImGuiStyleVar;// enum ImGuiStyleVar_
typedefintImGuiStyleVar;// enum ImGuiStyleVar_
typedefintImGuiKey;// enum ImGuiKey_
typedefintImGuiKey;// enum ImGuiKey_
@ -160,7 +160,7 @@ namespace ImGui
IMGUI_APIImDrawList*GetWindowDrawList();// get rendering command-list if you want to append your own draw primitives.
IMGUI_APIImDrawList*GetWindowDrawList();// get rendering command-list if you want to append your own draw primitives.
IMGUI_APIImFont*GetWindowFont();
IMGUI_APIImFont*GetWindowFont();
IMGUI_APIfloatGetWindowFontSize();
IMGUI_APIfloatGetWindowFontSize();
IMGUI_APIvoidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontBaseScale if you want to scale all windows together.
IMGUI_APIvoidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows.
IMGUI_APIvoidSetScrollPosHere();// adjust scrolling position to center into the current cursor position.
IMGUI_APIvoidSetScrollPosHere();// adjust scrolling position to center into the current cursor position.
IMGUI_APIvoidSetKeyboardFocusHere(intoffset=0);// focus keyboard on the next widget. Use 'offset' to access sub components of a multiple component widget.
IMGUI_APIvoidSetKeyboardFocusHere(intoffset=0);// focus keyboard on the next widget. Use 'offset' to access sub components of a multiple component widget.
IMGUI_APIvoidSetTreeStateStorage(ImGuiStorage*tree);// replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it).
IMGUI_APIvoidSetTreeStateStorage(ImGuiStorage*tree);// replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it).
@ -454,12 +454,9 @@ struct ImGuiIO
floatMouseDoubleClickTime;// = 0.30f // Time for a double-click, in seconds.
floatMouseDoubleClickTime;// = 0.30f // Time for a double-click, in seconds.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
intKeyMap[ImGuiKey_COUNT];// <unset> // Map of indices into the KeysDown[512] entries array
intKeyMap[ImGuiKey_COUNT];// <unset> // Map of indices into the KeysDown[512] entries array
ImFont*Font;// <auto> // Font
ImFont*Font;// <auto> // Font (also see 'Settings' fields inside ImFont structure for details)
floatFontYOffset;// = 0.0f // Offset font rendering by xx pixels in Y axis.
floatFontGlobalScale;// = 1.0f // Global scale all fonts
ImVec2FontTexUvForWhite;// = (0.0f,0.0f) // Font texture must have a white pixel at this UV coordinate. Adjust if you are using custom texture.
boolFontAllowUserScaling;// = false // Allow user scaling text of individual window with CTRL+Wheel.
floatFontBaseScale;// = 1.0f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
boolFontAllowUserScaling;// = false // Set to allow scaling text with CTRL+Wheel.
ImWcharFontFallbackGlyph;// = '?' // Replacement glyph is one isn't found.
floatPixelCenterOffset;// = 0.0f // Try to set to 0.5f or 0.375f if rendering is blurry
floatPixelCenterOffset;// = 0.0f // Try to set to 0.5f or 0.375f if rendering is blurry
void*UserData;// = NULL // Store your own data for retrieval by callbacks.
void*UserData;// = NULL // Store your own data for retrieval by callbacks.
// Assume valid file data (won't handle invalid/malicious data)
// Assume valid file data (won't handle invalid/malicious data)
// Handle a subset of parameters.
// Handle a subset of the options, namely:
// - kerning pair are not supported (because ImGui code does per-character CalcTextSize calls, need to turn it into something more stateful to allow kerning)
// - kerning pair are not supported (because some ImGui code does per-character CalcTextSize calls, need to turn it into something more state-ful to allow for kerning)
structImFont
structImFont
{
{
structFntInfo;
structFntCommon;
structFntGlyph;
structFntKerning;
// Settings
floatScale;// = 1.0f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
ImVec2DisplayOffset;// = (0.0f,0.0f // Offset font rendering by xx pixels
ImVec2TexUvForWhite;// = (0.0f,0.0f) // Font texture must have a white pixel at this UV coordinate. Adjust if you are using custom texture.
ImWcharFallbackChar;// = '?' // Replacement glyph is one isn't found.
// Data
unsignedchar*Data;// Raw data, content of .fnt file
size_tDataSize;//
boolDataOwned;//
constFntInfo*Info;// (point into raw data)
constFntCommon*Common;// (point into raw data)
constFntGlyph*Glyphs;// (point into raw data)
size_tGlyphsCount;//
constFntKerning*Kerning;// (point into raw data) - NB: kerning is unsupported
size_tKerningCount;//
ImVector<constchar*>Filenames;// (point into raw data)