- Renamed GetOverlayDrawList() to GetForegroundDrawList(). Kept redirection function (will obsolete). (#2391)
Other Changes:
@ -453,7 +463,7 @@ Breaking Changes:
side-effect because the window would have ID zero. In particular it is causing problems in viewport/docking branches.
- Renamed io.ConfigResizeWindowsFromEdges to io.ConfigWindowsResizeFromEdges and removed its [Beta] mark.
The addition of new configuration options in the Docking branch is pushing for a little reorganization of those names.
- Renamed ImFontAtlas::GlyphRangesBuilder to ImFontGlyphRangesBuilder. Keep redirection typedef (will obsolete).
- Renamed ImFontAtlas::GlyphRangesBuilder to ImFontGlyphRangesBuilder. Kept redirection typedef (will obsolete).
Other Changes:
@ -1195,7 +1205,7 @@ Breaking Changes:
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
- Renamed ImFont::Glyph to ImFontGlyph. Keep redirection typedef (will obsolete).
- Renamed ImFont::Glyph to ImFontGlyph. Kept redirection typedef (will obsolete).
You should be able to build the examples from sources (tested on Windows/Mac/Linux). If you don't, let me know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
The demo applications are unfortunately not yet DPI aware so expect some blurriness on a 4K screen. For DPI awareness in your application, you can load/reload your font at different scale, and scale your Style with `style.ScaleAllSizes()`.
@ -33,12 +33,13 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- window/child: allow SetNextWindowContentSize() to work on child windows.
- window/clipping: some form of clipping when DisplaySize (or corresponding viewport) is zero.
- window/tab: add a way to signify that a window or docked window requires attention (e.g. blinking title bar).
! scrolling: exposing horizontal scrolling with Shift+Wheel even when scrollbar is disabled expose lots of issues (#2424, #1463)
- scrolling: while holding down a scrollbar, try to keep the same contents visible (at least while not moving mouse)
- scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
- scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y). (2017-08-20: can't repro)
- scrolling/style: shadows on scrollable areas to denote that there is more contents
- drawdata: make it easy to clone (or swap?) a ImDrawData so user can easily save that data if they use threaded rendering.
- drawdata: make it easy to clone (or swap?) a full ImDrawData so user can easily save that data if they use threaded rendering. (e.g. #2646)
! drawlist: add calctextsize func to facilitate consistent code from user pov (currently need to use ImGui or ImFont alternatives!)
- drawlist: end-user probably can't call Clear() directly because we expect a texture to be pushed in the stack.
- drawlist: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command).
@ -231,23 +232,24 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- menus: menu-bar: main menu-bar could affect clamping of windows position (~ akin to modifying DisplayMin)
- menus: hovering from menu to menu on a menu-bar has 1 frame without any menu, which is a little annoying. ideally either 0 either longer.
- menus: could merge draw call in most cases (how about storing an optional aabb in ImDrawCmd to move the burden of merging in a single spot).
- text: selectable text (for copy) as a generic feature (ItemFlags?)
- text: proper alignment options in imgui_internal.h
- text wrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (#249)
- text: it's currently impossible to have a window title with "##". perhaps an official workaround would be nice. \ style inhibitor? non-visible ascii code to insert between #?
- text: provided a framed text helper, e.g. https://pastebin.com/1Laxy8bT
- text: refactor TextUnformatted (or underlying function) to more explicitly request if we need width measurement or not
- text link/url button: underlined. should api expose an ID or use text contents as ID? which colors enum to use?
- text/wrapped: should be a more first-class citizen, e.g. wrapped text within a Selectable with known width
- text/wrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (#249)
- tree node / optimization: avoid formatting when clipped.
- tree node: tree-node/header right-most side doesn't take account of horizontal scrolling.
- tree node: add treenode/treepush int variants? not there because (void*) cast from int warns on some platforms/settings?
- tree node: try to apply scrolling at time of TreePop() if node was just opened and end of node is past scrolling limits?
- tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer)
- tree node: tweak color scheme to distinguish headers from selected tree node (#581)
- tree node: leaf/non-leaf highlight mismatch.
- tree node: _NoIndentOnOpen flag? would require to store a per-depth bit mask to store info for pop (or whatever is cheaper)
- tree node/opt: could avoid formatting when clipped (flag assuming we don't care about width/height, assume single line height?)
- settings: write more decent code to allow saving/loading new fields: columns, selected tree nodes?
- settings: api for per-tool simple persistent data (bool,int,float,columns sizes,etc.) in .ini file (#437)
GrabRounding=0.0f;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
TabRounding=4.0f;// Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
TabBorderSize=0.0f;// Thickness of border around tabs.
ColorButtonPosition=ImGuiDir_Right;// Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
ButtonTextAlign=ImVec2(0.5f,0.5f);// Alignment of button text when button is larger than text.
SelectableTextAlign=ImVec2(0.0f,0.0f);// Alignment of selectable text when button is larger than text.
DisplayWindowPadding=ImVec2(19,19);// Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows.
// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame)
IMGUI_APIvoidTreePush(constchar*str_id);// ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
IMGUI_APIvoidTreePush(constvoid*ptr_id=NULL);// "
IMGUI_APIvoidTreePop();// ~ Unindent()+PopId()
IMGUI_APIvoidTreeAdvanceToLabelPos();// advance cursor x position by GetTreeNodeToLabelSpacing()
IMGUI_APIfloatGetTreeNodeToLabelSpacing();// horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
IMGUI_APIboolCollapsingHeader(constchar*label,ImGuiTreeNodeFlagsflags=0);// if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
IMGUI_APIboolCollapsingHeader(constchar*label,bool*p_open,ImGuiTreeNodeFlagsflags=0);// when 'p_open' isn't NULL, display an additional small close button on upper right of the header
@ -926,7 +924,7 @@ enum ImGuiHoveredFlags_
ImGuiHoveredFlags_AllowWhenBlockedByPopup=1<<3,// Return true even if a popup window is normally blocking access to this item/window
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem=1<<5,// Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
ImGuiHoveredFlags_AllowWhenOverlapped=1<<6,// Return true even if the position is overlapped by another window
ImGuiHoveredFlags_AllowWhenOverlapped=1<<6,// Return true even if the position is obstructed or overlapped by another window
ImGuiHoveredFlags_AllowWhenDisabled=1<<7,// Return true even if the item is disabled
ImGuiDataType_S8,// signed char / char (with sensible compilers)
ImGuiDataType_U8,// unsigned char
ImGuiDataType_S16,// short
ImGuiDataType_U16,// unsigned short
@ -1111,7 +1109,7 @@ enum ImGuiCol_
ImGuiCol_Button,
ImGuiCol_ButtonHovered,
ImGuiCol_ButtonActive,
ImGuiCol_Header,
ImGuiCol_Header,// Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem
ImGuiCol_HeaderHovered,
ImGuiCol_HeaderActive,
ImGuiCol_Separator,
@ -1375,6 +1373,7 @@ struct ImGuiStyle
floatGrabRounding;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
floatTabRounding;// Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
floatTabBorderSize;// Thickness of border around tabs.
ImGuiDirColorButtonPosition;// Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
ImVec2ButtonTextAlign;// Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered).
ImVec2SelectableTextAlign;// Alignment of selectable text when selectable is larger than text. Defaults to (0.0f, 0.0f) (top-left aligned).
ImVec2DisplayWindowPadding;// Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows.
@ -1416,7 +1415,7 @@ struct ImGuiIO
floatKeyRepeatRate;// = 0.050f // When holding a key/button, rate at which it repeats, in seconds.
void*UserData;// = NULL // Store your own data for retrieval by callbacks.
ImFontAtlas*Fonts;// <auto> // Load, rasterize and pack one or more fonts into a single texture.
ImFontAtlas*Fonts;// <auto> // Font atlas: load, rasterize and pack one or more fonts into a single texture.
floatFontGlobalScale;// = 1.0f // Global scale all fonts
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].
IMGUI_APIconstImWchar*GetGlyphRangesChineseSimplifiedCommon();// Default + Half-Width + Japanese Hiragana/Katakana + set of 2500 CJK Unified Ideographs for common simplified Chinese
IMGUI_APIconstImWchar*GetGlyphRangesCyrillic();// Default + about 400 Cyrillic characters
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_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.
ImVec2TexUvWhitePixel;// Texture coordinates to a white pixel
ImVector<ImFont*>Fonts;// Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
ImVector<CustomRect>CustomRects;// Rectangles for packing custom texture data into the atlas.
ImVector<ImFontAtlasCustomRect>CustomRects;// Rectangles for packing custom texture data into the atlas.
ImVector<ImFontConfig>ConfigData;// Internal data
intCustomRectIds[1];// Identifiers of custom texture rectangle used by ImFontAtlas/ImDrawList
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
typedefImFontAtlasCustomRectCustomRect;// OBSOLETED in 1.72+
typedefImFontGlyphRangesBuilderGlyphRangesBuilder;// OBSOLETED in 1.67+
ImGui::SliderFloat2("ButtonTextAlign",(float*)&style.ButtonTextAlign,0.0f,1.0f,"%.2f");ImGui::SameLine();HelpMarker("Alignment applies when a button is larger than its text content.");
ImGui::SliderFloat2("SelectableTextAlign",(float*)&style.SelectableTextAlign,0.0f,1.0f,"%.2f");ImGui::SameLine();HelpMarker("Alignment applies when a selectable is larger than its text content.");
ImGui::Text("Safe Area Padding");ImGui::SameLine();HelpMarker("Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured).");