IMGUI_APIvoidDeIndexAllBuffers();// For backward compatibility: convert all buffers from indexed to de-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.
@ -3,117 +3,78 @@ using System.Runtime.InteropServices;
namespaceImGui
{
// Draw command list
// This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering.
// At the moment, each ImGui window contains its own ImDrawList but they could potentially be merged in the future.
// If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives.
// You can interleave normal ImGui:: calls and adding primitives to the current draw list.
// All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions).
// Note that this only gives you access to rendering polygons. If your intent is to create custom widgets and the publicly exposed functions/data aren't sufficient, you can add code in imgui_user.inl
/// <summary>
/// Draw command list
/// This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering.
/// At the moment, each ImGui window contains its own ImDrawList but they could potentially be merged in the future.
/// If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives.
/// You can interleave normal ImGui:: calls and adding primitives to the current draw list.
/// All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions).
//ImVector<ImVec2> _Path; // [Internal] current path building
publicImVector_ClipRectStack;// [Internal]
publicImVector_TextureIdStack;// [Internal]
publicImVector_Path;// [Internal] current path building
publicint_ChannelsCurrent;// [Internal] current channel number (0)
publicint_ChannelsCount;// [Internal] number of active channels (1+)
//ImVector<ImDrawChannel> _Channels; // [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size)
publicImVector_Channels;// [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size)
/*
ImDrawList(){_OwnerName=NULL;Clear();}
~ImDrawList(){ClearFreeMemory();}
IMGUI_APIvoidClear();
IMGUI_APIvoidClearFreeMemory();
IMGUI_APIvoidPushClipRect(constImVec4&clip_rect);// Scissoring. The values are x1, y1, x2, y2.
/// [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
/// </summary>
publicIntPtr_VtxWritePtr;
/// <summary>
/// [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
/// </summary>
publicIntPtr_IdxWritePtr;
// Channels
// - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
// - Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
IMGUI_APIvoidAddCallback(ImDrawCallbackcallback,void*callback_data);// Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.
IMGUI_APIvoidAddDrawCmd();// This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible
/// <summary>
/// [Internal] current channel number (0)
/// </summary>
publicint_ChannelsCurrent;
/// <summary>
/// [Internal] number of active channels (1+)
/// </summary>
publicint_ChannelsCount;
// Internal helpers
// NB: all primitives needs to be reserved via PrimReserve() beforehand!
//ImVector<float> IndexXAdvance; // Sparse. Glyphs->XAdvance directly indexable (more cache-friendly that reading from Glyphs, for CalcTextSize functions which are often bottleneck in large UI)
//ImVector<int> IndexLookup; // Sparse. Index glyphs by Unicode code-point.
publicImVectorIndexXAdvance;// Sparse. Glyphs->XAdvance directly indexable (more cache-friendly that reading from Glyphs, for CalcTextSize functions which are often bottleneck in large UI)
publicImVectorIndexLookup;// Sparse. Index glyphs by Unicode code-point.
publicImFont*AddFontFromMemoryTTF(void*ttf_data,intttf_size,floatsize_pixels,ImFontConfig*font_cfg=null,ImWchar*glyph_ranges=null);// Transfer ownership of 'ttf_data' to ImFontAtlas, will be deleted after Build()
publicImFont*AddFontFromMemoryCompressedTTF(void*compressed_ttf_data,intcompressed_ttf_size,floatsize_pixels,ImFontConfig*font_cfg=null,ImWchar*glyph_ranges=null);// 'compressed_ttf_data' still owned by caller. Compress with binary_to_compressed_c.cpp
publicImFont*AddFontFromMemoryCompressedBase85TTF(char*compressed_ttf_data_base85,floatsize_pixels,ImFontConfig*font_cfg=null,ImWchar*glyph_ranges=null);// 'compressed_ttf_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 paramaeter
publicvoidClearTexData();// Clear the CPU-side texture data. Saves RAM once the texture has been copied to graphics memory.
publicvoidClearInputData();// Clear the input TTF data (inc sizes, glyph ranges)
publicvoidClearFonts();// Clear the ImGui-side font data (glyphs storage, UV coordinates)
publicvoidClear(){}// Clear all
// Retrieve texture data
// User is in charge of copying the pixels into graphics memory, then call SetTextureUserID()
// After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images)
// RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted.
// Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list)
// (Those functions could be static but aren't so most users don't have to refer to the ImFontAtlas:: name ever if in their code; just using io.Fonts->)
publicImWchar*GetGlyphRangesDefault();// Basic Latin, Extended Latin
publicImWchar*GetGlyphRangesKorean();// Default + Korean characters
publicImWchar*GetGlyphRangesJapanese();// Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs
publicImWchar*GetGlyphRangesChinese();// Japanese + full set of about 21000 CJK Unified Ideographs
publicImWchar*GetGlyphRangesCyrillic();// Default + about 400 Cyrillic characters
*/
// Members
// (Access texture data via GetTexData*() calls which will setup a default font for you.)
publicvoid*TexID;// User data to refer to the texture once it has been uploaded to user's graphic systems. It ia passed back to you during rendering.
publicbyte*TexPixelsAlpha8;// 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
publicUIntPtrTexPixelsRGBA32;// 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
publicIntPtrTexWidth;// Texture width calculated during Build().
publicIntPtrTexHeight;// Texture height calculated during Build().
publicIntPtrTexDesiredWidth;// Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
publicVector2TexUvWhitePixel;// Texture coordinates to a white pixel (part of the TexExtraData block)
/// <summary>
/// User data to refer to the texture once it has been uploaded to user's graphic systems.
/// It ia passed back to you during rendering.
/// </summary>
publicvoid*TexID;
/// <summary>
/// 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
/// </summary>
publicbyte*TexPixelsAlpha8;
/// <summary>
/// 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
/// </summary>
publicUIntPtrTexPixelsRGBA32;
/// <summary>
/// Texture width calculated during Build().
/// </summary>
publicIntPtrTexWidth;
/// <summary>
/// Texture height calculated during Build().
/// </summary>
publicIntPtrTexHeight;
/// <summary>
/// Texture width desired by user before Build(). Must be a power-of-two.
/// If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
/// </summary>
publicIntPtrTexDesiredWidth;
/// <summary>
/// Texture coordinates to a white pixel (part of the TexExtraData block)
/// </summary>
publicVector2TexUvWhitePixel;
/// <summary>
/// (ImVector(ImFont*)
@ -62,11 +56,8 @@ namespace ImGui
// Private
/// <summary>
/// ImVector(ImFontConfig)
/// ImVector(ImFontConfig). Internal data
/// </summary>
publicImVectorConfigData;// Internal data
/*
publicboolBuild();// Build pixels data. This is automatically for you by the GetTexData*** functions.
publicfloatAlpha;// Global alpha applies to everything in ImGui
publicVector2WindowPadding;// Padding within a window
publicVector2WindowMinSize;// Minimum window size
publicfloatWindowRounding;// Radius of window corners rounding. Set to 0.0f to have rectangular windows
publicAlignWindowTitleAlign;// Alignment for title bar text
publicfloatChildWindowRounding;// Radius of child window corners rounding. Set to 0.0f to have rectangular windows
publicVector2FramePadding;// Padding within a framed rectangle (used by most widgets)
publicfloatFrameRounding;// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
publicVector2ItemSpacing;// Horizontal and vertical spacing between widgets/lines
publicVector2ItemInnerSpacing;// Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
publicVector2TouchExtraPadding;// Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
publicfloatWindowFillAlphaDefault;// Default alpha of window background, if not specified in ImGui::Begin()
publicfloatIndentSpacing;// Horizontal indentation when e.g. entering a tree node
publicfloatColumnsMinSpacing;// Minimum horizontal spacing between two columns
publicfloatScrollbarSize;// Width of the vertical scrollbar, Height of the horizontal scrollbar
publicfloatScrollbarRounding;// Radius of grab corners for scrollbar
publicfloatGrabMinSize;// Minimum width/height of a grab box for slider/scrollbar
publicfloatGrabRounding;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
publicVector2DisplayWindowPadding;// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
publicVector2DisplaySafeAreaPadding;// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
publicbyteAntiAliasedLines;// Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
publicbyteAntiAliasedShapes;// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
publicfloatCurveTessellationTol;// Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
/// <summary>
/// Global alpha applies to everything in ImGui.
/// </summary>
publicfloatAlpha;
/// <summary>
/// Padding within a window.
/// </summary>
publicVector2WindowPadding;
/// <summary>
/// Minimum window size.
/// </summary>
publicVector2WindowMinSize;
/// <summary>
/// Radius of window corners rounding. Set to 0.0f to have rectangular windows.
/// </summary>
publicfloatWindowRounding;
/// <summary>
/// Alignment for title bar text.
/// </summary>
publicAlignWindowTitleAlign;
/// <summary>
/// Radius of child window corners rounding. Set to 0.0f to have rectangular windows.
/// </summary>
publicfloatChildWindowRounding;
/// <summary>
/// Padding within a framed rectangle (used by most widgets).
/// </summary>
publicVector2FramePadding;
/// <summary>
/// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
/// </summary>
publicfloatFrameRounding;
/// <summary>
/// Horizontal and vertical spacing between widgets/lines.
/// </summary>
publicVector2ItemSpacing;
/// <summary>
/// Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
/// </summary>
publicVector2ItemInnerSpacing;
/// <summary>
/// Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
/// </summary>
publicVector2TouchExtraPadding;
/// <summary>
/// Default alpha of window background, if not specified in ImGui::Begin().
/// </summary>
publicfloatWindowFillAlphaDefault;
/// <summary>
/// Horizontal indentation when e.g. entering a tree node
/// </summary>
publicfloatIndentSpacing;
/// <summary>
/// Minimum horizontal spacing between two columns
/// </summary>
publicfloatColumnsMinSpacing;
/// <summary>
/// Width of the vertical scrollbar, Height of the horizontal scrollbar
/// </summary>
publicfloatScrollbarSize;
/// <summary>
/// Radius of grab corners for scrollbar
/// </summary>
publicfloatScrollbarRounding;
/// <summary>
/// Minimum width/height of a grab box for slider/scrollbar
/// </summary>
publicfloatGrabMinSize;
/// <summary>
/// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
/// </summary>
publicfloatGrabRounding;
/// <summary>
/// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
/// </summary>
publicVector2DisplayWindowPadding;
/// <summary>
/// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.
/// </summary>
publicVector2DisplaySafeAreaPadding;
/// <summary>
/// Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
/// </summary>
publicbyteAntiAliasedLines;
/// <summary>
/// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
/// </summary>
publicbyteAntiAliasedShapes;
/// <summary>
/// Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.