@ -26,6 +26,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- window: using SetWindowPos() inside Begin() and moving the window with the mouse reacts a very ugly glitch. We should just defer the SetWindowPos() call.
- window: using SetWindowPos() inside Begin() and moving the window with the mouse reacts a very ugly glitch. We should just defer the SetWindowPos() call.
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
- window: investigate better auto-positioning for new windows.
- window: investigate better auto-positioning for new windows.
- window: top most window flag? (#2574)
- window/opt: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate. -> this may require enforcing that it is illegal to submit contents if Begin returns false.
- window/opt: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate. -> this may require enforcing that it is illegal to submit contents if Begin returns false.
- window/child: the first draw command of a child window could be moved into the current draw command of the parent window (unless child+tooltip?).
- window/child: the first draw command of a child window could be moved into the current draw command of the parent window (unless child+tooltip?).
- window/child: border could be emitted in parent as well.
- window/child: border could be emitted in parent as well.
@ -67,7 +68,8 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- widgets: a way to represent "mixed" values, so e.g. all values replaced with **, including check-boxes, colors, etc. with support for multi-components widgets (e.g. SliderFloat3, make only "Y" mixed)
- widgets: a way to represent "mixed" values, so e.g. all values replaced with **, including check-boxes, colors, etc. with support for multi-components widgets (e.g. SliderFloat3, make only "Y" mixed)
@ -82,7 +84,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- input text: display bug when clicking a drag/slider after an input text in a different window has all-selected text (order dependent). actually a very old bug but no one appears to have noticed it.
- input text: display bug when clicking a drag/slider after an input text in a different window has all-selected text (order dependent). actually a very old bug but no one appears to have noticed it.
- input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
- input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
- input text: decorrelate layout from inputs - e.g. what's the easiest way to implement a nice IP/Mac address input editor?
- input text: decorrelate layout from inputs - e.g. what's the easiest way to implement a nice IP/Mac address input editor?
- input text: global callback system so user can plug in an expression evaluator easily.
- input text: global callback system so user can plug in an expression evaluator easily. (#1691)
- input text: force scroll to end or scroll to a given line/contents (so user can implement a log or a search feature)
- input text: force scroll to end or scroll to a given line/contents (so user can implement a log or a search feature)
- input text: a side bar that could e.g. preview where errors are. probably left to the user to draw but we'd need to give them the info there.
- input text: a side bar that could e.g. preview where errors are. probably left to the user to draw but we'd need to give them the info there.
- input text: a way for the user to provide syntax coloring.
- input text: a way for the user to provide syntax coloring.
@ -104,9 +106,12 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- layout: horizontal flow until no space left (#404)
- layout: horizontal flow until no space left (#404)
- layout: more generic alignment state (left/right/centered) for single items?
- layout: more generic alignment state (left/right/centered) for single items?
- layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
- layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
- layout: BeginGroup() needs a border option. (~#1496)
- layout: vertical alignment of mixed height items (e.g. buttons) within a same line (#1284)
- layout: vertical alignment of mixed height items (e.g. buttons) within a same line (#1284)
- group: BeginGroup() needs a border option. (~#1496)
- group: IsHovered() after EndGroup() covers whole aabb rather than the intersection of individual items. Is that desirable?
- group: merge deactivation/activation within same group (fwd WasEdited flag). (#2550)
- columns: sizing policy (e.g. for each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
- columns: sizing policy (e.g. for each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
- columns: add a conditional parameter to SetColumnOffset() (#513, #125)
- columns: add a conditional parameter to SetColumnOffset() (#513, #125)
- columns: headers. re-orderable. (#513, #125)
- columns: headers. re-orderable. (#513, #125)
@ -133,6 +138,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- clipper: ability to force display 1 item in the list would be convenient (for patterns where we need to set active id etc.)
- clipper: ability to force display 1 item in the list would be convenient (for patterns where we need to set active id etc.)
- clipper: ability to disable the clipping through a simple flag/bool.
- clipper: ability to disable the clipping through a simple flag/bool.
- clipper: ability to run without knowing full count in advance.
- clipper: ability to run without knowing full count in advance.
- clipper: horizontal clipping support. (#2580)
- separator: expose flags (#759)
- separator: expose flags (#759)
- separator: width, thickness, centering (#1643)
- separator: width, thickness, centering (#1643)
@ -291,6 +297,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- font: a CalcTextHeight() helper could run faster than CalcTextSize().y
- font: a CalcTextHeight() helper could run faster than CalcTextSize().y
- font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
- font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
- font: finish CustomRectRegister() to allow mapping Unicode codepoint to custom texture data
- font: finish CustomRectRegister() to allow mapping Unicode codepoint to custom texture data
- font: make it easier to submit own bitmap font (same texture, another texture?). (#2127, #2575)
- font: PushFontSize API (#1018)
- font: PushFontSize API (#1018)
- font: MemoryTTF taking ownership confusing/not obvious, maybe default should be opposite?
- font: MemoryTTF taking ownership confusing/not obvious, maybe default should be opposite?
- font: storing MinAdvanceX per font would allow us to skip calculating line width (under a threshold of character count) in loops looking for block width
- font: storing MinAdvanceX per font would allow us to skip calculating line width (under a threshold of character count) in loops looking for block width
@ -299,7 +306,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- font/atlas: add a missing Glyphs.reserve()
- font/atlas: add a missing Glyphs.reserve()
- font/atlas: incremental updates
- font/atlas: incremental updates
- font/atlas: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier.
- font/atlas: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier.
- font/atlas: allow user to submit its own primitive to be rectpacked, and allow to map them on a Unicode point.
- font/draw: vertical and/or rotated text renderer (#705) - vertical is easier clipping wise
- font/draw: vertical and/or rotated text renderer (#705) - vertical is easier clipping wise
- font/draw: need to be able to specify wrap start position.
- font/draw: need to be able to specify wrap start position.
- font/draw: better reserve policy for large horizontal block of text (shouldn't reserve for all clipped lines)
- font/draw: better reserve policy for large horizontal block of text (shouldn't reserve for all clipped lines)
@ -307,8 +313,8 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- font: optimization: for monospace font (like the default one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance (need to make sure TAB is still correct), would save on cache line.
- font: optimization: for monospace font (like the default one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance (need to make sure TAB is still correct), would save on cache line.
- font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
- font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
- font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize)
- font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize)
- font: fix AddRemapChar() to work before font has been built.
- font: fix AddRemapChar() to work before atlas has been built.
- font: what would it take to support codepoint higher than 0xFFFF? (smileys, etc.)
- font: what would it take to support codepoint higher than 0xFFFF? (smileys, etc.) (#2538, #2541)
- font: (api breaking) remove "TTF" from symbol names. also because it now supports OTF.
- font: (api breaking) remove "TTF" from symbol names. also because it now supports OTF.
- font/opt: Considering storing standalone AdvanceX table as 16-bit fixed point integer?
- font/opt: Considering storing standalone AdvanceX table as 16-bit fixed point integer?
- font/opt: Glyph currently 40 bytes (2+9*4). Consider storing UV as 16 bits integer? (->32 bytes). X0/Y0/X1/Y1 as 16 fixed-point integers? Or X0/Y0 as float and X1/Y1 as fixed8_8?
- font/opt: Glyph currently 40 bytes (2+9*4). Consider storing UV as 16 bits integer? (->32 bytes). X0/Y0/X1/Y1 as 16 fixed-point integers? Or X0/Y0 as float and X1/Y1 as fixed8_8?
@ -362,6 +368,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
- inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
- inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
- inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
- inputs: add mouse cursor for unavailable/no? IDC_NO/SDL_SYSTEM_CURSOR_NO.
- inputs: add mouse cursor for unavailable/no? IDC_NO/SDL_SYSTEM_CURSOR_NO.
- inputs/scrolling: support for smooth scrolling (#2462, #2569)
- misc: idle: expose "woken up" boolean (set by inputs) and/or animation time (for cursor blink) for back-end to be able stop refreshing easily.
- misc: idle: expose "woken up" boolean (set by inputs) and/or animation time (for cursor blink) for back-end to be able stop refreshing easily.
- misc: idle: if cursor blink if the _only_ visible animation, core imgui could rewrite vertex alpha to avoid CPU pass on ImGui:: calls.
- misc: idle: if cursor blink if the _only_ visible animation, core imgui could rewrite vertex alpha to avoid CPU pass on ImGui:: calls.
@ -610,6 +613,7 @@ bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FO
ImGuiIO&io=ImGui::GetIO();
ImGuiIO&io=ImGui::GetIO();
io.BackendFlags|=ImGuiBackendFlags_RendererHasViewports;// We can create multi-viewports on the Renderer side (optional) // FIXME-VIEWPORT: Actually unfinished..
io.BackendFlags|=ImGuiBackendFlags_RendererHasViewports;// We can create multi-viewports on the Renderer side (optional) // FIXME-VIEWPORT: Actually unfinished..
io.BackendRendererName="imgui_impl_dx12";
io.BackendRendererName="imgui_impl_dx12";
io.BackendFlags|=ImGuiBackendFlags_HasVtxOffset;// We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes.
// Mark rendering data as invalid to prevent user who may have a handle on it to use it.
// Mark rendering data as invalid to prevent user who may have a handle on it to use it.
for(intn=0;n<g.Viewports.Size;n++)
for(intn=0;n<g.Viewports.Size;n++)
@ -3989,19 +3996,28 @@ static void AddDrawListToDrawData(ImVector<ImDrawList*>* out_list, ImDrawList* d
return;
return;
}
}
// Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc. May trigger for you if you are using PrimXXX functions incorrectly.
// Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc.
// May trigger for you if you are using PrimXXX functions incorrectly.
// Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = unsigned short = 2 bytes = 64K vertices per ImDrawList = per window)
// Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = unsigned short = 2 bytes = 64K vertices per ImDrawList = per window)
// If this assert triggers because you are drawing lots of stuff manually:
// If this assert triggers because you are drawing lots of stuff manually:
// A) Make sure you are coarse clipping, because ImDrawList let all your vertices pass. You can use the Metrics window to inspect draw list contents.
// - First, make sure you are coarse clipping yourself and not trying to draw many things outside visible bounds.
// B) If you need/want meshes with more than 64K vertices, uncomment the '#define ImDrawIdx unsigned int' line in imconfig.h to set the index size to 4 bytes.
// Be mindful that the ImDrawList API doesn't filter vertices. Use the Metrics window to inspect draw list contents.
// You'll need to handle the 4-bytes indices to your renderer. For example, the OpenGL example code detect index size at compile-time by doing:
// - If you want large meshes with more than 64K vertices, you can either:
// (A) Handle the ImDrawCmd::VtxOffset value in your renderer back-end, and set 'io.BackendFlags |= ImGuiBackendFlags_HasVtxOffset'.
// Most example back-ends already support this from 1.71. Pre-1.71 back-ends won't.
// 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.
// (B) Or handle 32-bits indices in your renderer back-end, and uncomment '#define ImDrawIdx unsigned int' line in imconfig.h.
// Most example back-ends already support this. For example, the OpenGL example code detect index size at compile-time:
// Your own engine or render API may use different parameters or function calls to specify index sizes. 2 and 4 bytes indices are generally supported by most API.
// Your own engine or render API may use different parameters or function calls to specify index sizes.
// C) If for some reason you cannot use 4 bytes indices or don't want to, a workaround is to call BeginChild()/EndChild() before reaching the 64K limit to split your draw commands in multiple draw lists.
// 2 and 4 bytes indices are generally supported by most graphics API.
// - If for some reason neither of those solutions works for you, a workaround is to call BeginChild()/EndChild() before reaching
// the 64K limit to split your draw commands in multiple draw lists.
if(sizeof(ImDrawIdx)==2)
if(sizeof(ImDrawIdx)==2)
IM_ASSERT(draw_list->_VtxCurrentIdx<(1<<16)&&"Too many vertices in ImDrawList using 16-bit indices. Read comment above");
IM_ASSERT(draw_list->_VtxCurrentIdx<(1<<16)&&"Too many vertices in ImDrawList using 16-bit indices. Read comment above");
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
IMGUI_APIImDrawData*GetDrawData();// valid after Render() and until the next call to NewFrame(). this is what you have to render.
IMGUI_APIImDrawData*GetDrawData();// valid after Render() and until the next call to NewFrame(). this is what you have to render.
// Demo, Debug, Information
// Demo, Debug, Information
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create demo/test window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create Demo window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowAboutWindow(bool*p_open=NULL);// create about window. display Dear ImGui version, credits and build/system information.
IMGUI_APIvoidShowAboutWindow(bool*p_open=NULL);// create About window. display Dear ImGui version, credits and build/system information.
IMGUI_APIvoidShowStyleEditor(ImGuiStyle*ref=NULL);// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
IMGUI_APIvoidShowStyleEditor(ImGuiStyle*ref=NULL);// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
IMGUI_APIboolShowStyleSelector(constchar*label);// add style selector block (not a window), essentially a combo listing the default styles.
IMGUI_APIboolShowStyleSelector(constchar*label);// add style selector block (not a window), essentially a combo listing the default styles.
IMGUI_APIvoidShowFontSelector(constchar*label);// add font selector block (not a window), essentially a combo listing the loaded fonts.
IMGUI_APIvoidShowFontSelector(constchar*label);// add font selector block (not a window), essentially a combo listing the loaded fonts.
@ -864,9 +864,9 @@ enum ImGuiTabBarFlags_
ImGuiTabBarFlags_None=0,
ImGuiTabBarFlags_None=0,
ImGuiTabBarFlags_Reorderable=1<<0,// Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
ImGuiTabBarFlags_Reorderable=1<<0,// Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
ImGuiTabBarFlags_AutoSelectNewTabs=1<<1,// Automatically select new tabs when they appear
ImGuiTabBarFlags_AutoSelectNewTabs=1<<1,// Automatically select new tabs when they appear
ImGuiTabBarFlags_TabListPopupButton=1<<2,
ImGuiTabBarFlags_TabListPopupButton=1<<2,// Disable buttons to open the tab list popup
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton=1<<3,// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton=1<<3,// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
ImGuiTabBarFlags_NoTabListScrollingButtons=1<<4,
ImGuiTabBarFlags_NoTabListScrollingButtons=1<<4,// Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
ImGuiTabBarFlags_NoTooltip=1<<5,// Disable tooltips when hovering a tab
ImGuiTabBarFlags_NoTooltip=1<<5,// Disable tooltips when hovering a tab
ImGuiTabBarFlags_FittingPolicyResizeDown=1<<6,// Resize tabs when they don't fit
ImGuiTabBarFlags_FittingPolicyResizeDown=1<<6,// Resize tabs when they don't fit
ImGuiTabBarFlags_FittingPolicyScroll=1<<7,// Add scroll buttons when tabs don't fit
ImGuiTabBarFlags_FittingPolicyScroll=1<<7,// Add scroll buttons when tabs don't fit
@ -1068,9 +1068,10 @@ enum ImGuiConfigFlags_
enumImGuiBackendFlags_
enumImGuiBackendFlags_
{
{
ImGuiBackendFlags_None=0,
ImGuiBackendFlags_None=0,
ImGuiBackendFlags_HasGamepad=1<<0,// Back-end supports gamepad and currently has one connected.
ImGuiBackendFlags_HasGamepad=1<<0,// Back-end Platform supports gamepad and currently has one connected.
ImGuiBackendFlags_HasMouseCursors=1<<1,// Back-end supports honoring GetMouseCursor() value to change the OS cursor shape.
ImGuiBackendFlags_HasMouseCursors=1<<1,// Back-end Platform supports honoring GetMouseCursor() value to change the OS cursor shape.
ImGuiBackendFlags_HasSetMousePos=1<<2,// Back-end supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).
ImGuiBackendFlags_HasSetMousePos=1<<2,// Back-end Platform supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).
ImGuiBackendFlags_HasVtxOffset=1<<3,// Back-end Renderer supports ImDrawCmd::VtxOffset. This enables output of large meshes (64K+ vertices) while still using 16-bits indices.
// The expected behavior from your rendering function is 'if (cmd.UserCallback != NULL) { cmd.UserCallback(parent_list, cmd); } else { RenderTriangles() }'
// The expected behavior from your rendering function is 'if (cmd.UserCallback != NULL) { cmd.UserCallback(parent_list, cmd); } else { RenderTriangles() }'
// Special Draw Callback value to request renderer back-end to reset the graphics/render state.
// Special Draw callback value to request renderer back-end to reset the graphics/render state.
// The renderer back-end needs to handle this special value, otherwise it will crash trying to call a function at this address.
// The renderer back-end needs to handle this special value, otherwise it will crash trying to call a function at this address.
// This is useful for example if you submitted callbacks which you know have altered the render state and you want it to be restored.
// This is useful for example if you submitted callbacks which you know have altered the render state and you want it to be restored.
// It is not done by default because they are many perfectly useful way of altering render state for imgui contents (e.g. changing shader/blending settings before an Image call).
// It is not done by default because they are many perfectly useful way of altering render state for imgui contents (e.g. changing shader/blending settings before an Image call).
// Typically, 1 command = 1 GPU draw call (unless command is a callback)
// Typically, 1 command = 1 GPU draw call (unless command is a callback)
// Pre 1.71 back-ends will typically ignore the VtxOffset/IdxOffset fields. When (io.BackendFlags & ImGuiBackendFlags_HasVtxOffset)
// is enabled, those fields allow us to render meshes larger than 64K vertices while keeping 16-bits indices.
structImDrawCmd
structImDrawCmd
{
{
unsignedintElemCount;// Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
unsignedintElemCount;// Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
ImVec4ClipRect;// Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
ImVec4ClipRect;// Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
ImTextureIDTextureId;// User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
ImTextureIDTextureId;// User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
unsignedintVtxOffset;// Start offset in vertex buffer. Pre-1.71 or without ImGuiBackendFlags_HasVtxOffset: always 0. With ImGuiBackendFlags_HasVtxOffset: may be >0 to support meshes larger than 64K vertices with 16-bits indices.
unsignedintIdxOffset;// Start offset in index buffer. Always equal to sum of ElemCount drawn so far.
ImDrawCallbackUserCallback;// If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
ImDrawCallbackUserCallback;// If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
void*UserCallbackData;// The draw callback code can access this.
void*UserCallbackData;// The draw callback code can access this.
// Vertex index (override with '#define ImDrawIdx unsigned int' in imconfig.h)
// Vertex index
// (to allow large meshes with 16-bits indices: set 'io.BackendFlags |= ImGuiBackendFlags_HasVtxOffset' and handle ImDrawCmd::VtxOffset in the renderer back-end)
// (to use 32-bits indices: override with '#define ImDrawIdx unsigned int' in imconfig.h)
#ifndef ImDrawIdx
#ifndef ImDrawIdx
typedefunsignedshortImDrawIdx;
typedefunsignedshortImDrawIdx;
#endif
#endif
@ -1928,7 +1935,8 @@ enum ImDrawListFlags_
{
{
ImDrawListFlags_None=0,
ImDrawListFlags_None=0,
ImDrawListFlags_AntiAliasedLines=1<<0,// Lines are anti-aliased (*2 the number of triangles for 1.0f wide line, otherwise *3 the number of triangles)
ImDrawListFlags_AntiAliasedLines=1<<0,// Lines are anti-aliased (*2 the number of triangles for 1.0f wide line, otherwise *3 the number of triangles)
ImDrawListFlags_AntiAliasedFill=1<<1// Filled shapes have anti-aliased edges (*2 the number of vertices)
ImDrawListFlags_AntiAliasedFill=1<<1,// Filled shapes have anti-aliased edges (*2 the number of vertices)
ImDrawListFlags_AllowVtxOffset=1<<2// Can emit 'VtxOffset > 0' to allow large meshes. Set when 'io.BackendFlags & ImGuiBackendFlags_HasVtxOffset' is enabled.
};
};
// Draw command list
// Draw command list
@ -1948,7 +1956,8 @@ struct ImDrawList
// [Internal, used while building lists]
// [Internal, used while building lists]
constImDrawListSharedData*_Data;// Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current ImGui context)
constImDrawListSharedData*_Data;// Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current ImGui context)
constchar*_OwnerName;// Pointer to owner window's name for debugging
constchar*_OwnerName;// Pointer to owner window's name for debugging
// You can request arbitrary rectangles to be packed into the atlas, for your own purposes. After calling Build(), you can query the rectangle position and render your pixels.
// You can request arbitrary rectangles to be packed into the atlas, for your own purposes.
// You can also request your rectangles to be mapped as font glyph (given a font + Unicode point), so you can render e.g. custom colorful icons and use them as regular glyphs.
// After calling Build(), you can query the rectangle position and render your pixels.
// You can also request your rectangles to be mapped as font glyph (given a font + Unicode point),
// so you can render e.g. custom colorful icons and use them as regular glyphs.
// Read misc/fonts/README.txt for more details about using colorful icons.
structCustomRect
structCustomRect
{
{
unsignedintID;// Input // User ID. Use <0x10000 to map into a font glyph, >=0x10000 for other/internal/custom texture data.
unsignedintID;// Input // User ID. Use <0x10000 to map into a font glyph, >=0x10000 for other/internal/custom texture data.
IMGUI_APIintAddCustomRectRegular(unsignedintid,intwidth,intheight);// Id needs to be >= 0x10000. Id >= 0x80000000 are reserved for ImGui and ImDrawList
IMGUI_APIintAddCustomRectRegular(unsignedintid,intwidth,intheight);// Id needs to be >= 0x10000. Id >= 0x80000000 are reserved for ImGui and ImDrawList
IMGUI_APIintAddCustomRectFontGlyph(ImFont*font,ImWcharid,intwidth,intheight,floatadvance_x,constImVec2&offset=ImVec2(0,0));// Id needs to be < 0x10000 to register a rectangle to map into a specific font.
IMGUI_APIintAddCustomRectFontGlyph(ImFont*font,ImWcharid,intwidth,intheight,floatadvance_x,constImVec2&offset=ImVec2(0,0));// Id needs to be < 0x10000 to register a rectangle to map into a specific font.
ImGui::SameLine();HelpMarker("By default, colors are given to ColorEdit and ColorPicker in RGB, but ImGuiColorEditFlags_InputHSV allows you to store colors as HSV and pass them to ColorEdit and ColorPicker as HSV. This comes with the added benefit that you can manipulate hue values with the picker even when saturation or value are zero.");
ImGui::SameLine();HelpMarker("By default, colors are given to ColorEdit and ColorPicker in RGB, but ImGuiColorEditFlags_InputHSV allows you to store colors as HSV and pass them to ColorEdit and ColorPicker as HSV. This comes with the added benefit that you can manipulate hue values with the picker even when saturation or value are zero.");
ImGui::Text("Color widget with InputHSV:");
ImGui::Text("Color widget with InputHSV:");
ImGui::ColorEdit4("HSV shown as HSV##1",(float*)&color_stored_as_hsv,ImGuiColorEditFlags_DisplayRGB|ImGuiColorEditFlags_InputHSV|ImGuiColorEditFlags_Float);
ImGui::ColorEdit4("HSV shown as RGB##1",(float*)&color_stored_as_hsv,ImGuiColorEditFlags_DisplayRGB|ImGuiColorEditFlags_InputHSV|ImGuiColorEditFlags_Float);
ImGui::ColorEdit4("HSV shown as RGB##1",(float*)&color_stored_as_hsv,ImGuiColorEditFlags_DisplayHSV|ImGuiColorEditFlags_InputHSV|ImGuiColorEditFlags_Float);
ImGui::ColorEdit4("HSV shown as HSV##1",(float*)&color_stored_as_hsv,ImGuiColorEditFlags_DisplayHSV|ImGuiColorEditFlags_InputHSV|ImGuiColorEditFlags_Float);
ImGuiColumnsFlags_GrowParentContentsSize=1<<4// (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.
ImGuiColumnsFlags_GrowParentContentsSize=1<<4// (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.
};
};
// Extend ImGuiSelectableFlags_
enumImGuiSelectableFlagsPrivate_
enumImGuiSelectableFlagsPrivate_
{
{
// NB: need to be in sync with last value of ImGuiSelectableFlags_
// NB: need to be in sync with last value of ImGuiSelectableFlags_
ImGuiSelectableFlags_NoHoldingActiveID=1<<10,
ImGuiSelectableFlags_NoHoldingActiveID=1<<20,
ImGuiSelectableFlags_PressedOnClick=1<<11,
ImGuiSelectableFlags_PressedOnClick=1<<21,
ImGuiSelectableFlags_PressedOnRelease=1<<12,
ImGuiSelectableFlags_PressedOnRelease=1<<22,
ImGuiSelectableFlags_DrawFillAvailWidth=1<<13,// FIXME: We may be able to remove this (added in 6251d379 for menus)
ImGuiSelectableFlags_DrawFillAvailWidth=1<<23,// FIXME: We may be able to remove this (added in 6251d379 for menus)
floatFontSize;// Current/default font size (optional, for simplified AddText overload)
floatFontSize;// Current/default font size (optional, for simplified AddText overload)
floatCurveTessellationTol;
floatCurveTessellationTol;
ImVec4ClipRectFullscreen;// Value for PushClipRectFullscreen()
ImVec4ClipRectFullscreen;// Value for PushClipRectFullscreen()
ImDrawListFlagsInitialFlags;// Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)
// Const data
// Const data
// FIXME: Bake rounded corners fill/borders in atlas
// FIXME: Bake rounded corners fill/borders in atlas
@ -1408,8 +1416,8 @@ struct IMGUI_API ImGuiWindow
ImVec2Size;// Current size (==SizeFull or collapsed title bar size)
ImVec2Size;// Current size (==SizeFull or collapsed title bar size)
ImVec2SizeFull;// Size when non collapsed
ImVec2SizeFull;// Size when non collapsed
ImVec2SizeFullAtLastBegin;// Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars.
ImVec2SizeFullAtLastBegin;// Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars.
ImVec2SizeContents;// Size of contents (== extents reach of the drawing cursor) from previous frame. Include decoration, window title, border, menu, etc.
ImVec2SizeContents;// Size of contents (== extents reach of the drawing cursor) from previous frame. FIXME: Include decoration, window title, border, menu, etc. Ideally should remove them from this value?
ImVec2SizeContentsExplicit;// Size of contents explicitly set by the user via SetNextWindowContentSize()
ImVec2SizeContentsExplicit;// Size of contents explicitly set by the user via SetNextWindowContentSize(). EXCLUDE decorations. Making this not consistent with the above!
ImVec2WindowPadding;// Window padding at the time of begin.
ImVec2WindowPadding;// Window padding at the time of begin.
floatWindowRounding;// Window rounding at the time of begin.
floatWindowRounding;// Window rounding at the time of begin.
floatWindowBorderSize;// Window border size at the time of begin.
floatWindowBorderSize;// Window border size at the time of begin.
@ -1453,7 +1461,7 @@ struct IMGUI_API ImGuiWindow
ImVector<ImGuiID>IDStack;// ID stack. ID are hashes seeded with the value at the top of the stack
ImVector<ImGuiID>IDStack;// ID stack. ID are hashes seeded with the value at the top of the stack
ImGuiTabBarFlags_SaveSettings=1<<22// FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty when reordering tabs
ImGuiTabBarFlags_SaveSettings=1<<22// FIXME: Settings are handled by the docking system, this only request the tab bar to mark settings dirty when reordering tabs
};
};
// Extend ImGuiTabItemFlags_
enumImGuiTabItemFlagsPrivate_
enumImGuiTabItemFlagsPrivate_
{
{
ImGuiTabItemFlags_NoCloseButton=1<<20,// Store whether p_open is set or not, which we need to recompute WidthContents during layout.
ImGuiTabItemFlags_NoCloseButton=1<<20,// Store whether p_open is set or not, which we need to recompute WidthContents during layout.
// NB: '##' is normally used to hide text (as a library-wide feature), so we need to specify the text range to make sure the ## aren't stripped out here.
// NB: '##' is normally used to hide text (as a library-wide feature), so we need to specify the text range to make sure the ## aren't stripped out here.