IMGUI_APIImDrawData*GetDrawData();// same value as passed to your RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame()
IMGUI_APIImDrawData*GetDrawData();// same value as passed to your io.RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame().
IMGUI_APIvoidNewFrame();
IMGUI_APIvoidRender();
IMGUI_APIvoidRender();// finalize rendering data, then call your io.RenderDrawListsFn() function if set.
IMGUI_APIImVec2GetWindowContentRegionMax();// content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
IMGUI_APIfloatGetWindowContentRegionWidth();//
IMGUI_APIImDrawList*GetWindowDrawList();// get rendering command-list if you want to append your own draw primitives
IMGUI_APIImFont*GetWindowFont();
IMGUI_APIfloatGetWindowFontSize();// size (also height in pixels) of current font with current scale applied
IMGUI_APIvoidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows
IMGUI_APIImVec2GetWindowPos();// get current window position in screen space (useful if you want to do your own drawing via the DrawList api)
IMGUI_APIImVec2GetWindowSize();// get current window size
IMGUI_APIfloatGetWindowWidth();
IMGUI_APIfloatGetWindowHeight();
IMGUI_APIboolIsWindowCollapsed();
IMGUI_APIvoidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows
IMGUI_APIvoidSetNextWindowPos(constImVec2&pos,ImGuiSetCondcond=0);// set next window position. call before Begin()
IMGUI_APIvoidSetNextWindowPosCenter(ImGuiSetCondcond=0);// set next window position to be centered on screen. call before Begin()
IMGUI_APIfloatGetFontSize();// get current font size (= height in pixels) of current font with current scale applied
IMGUI_APIImVec2GetFontTexUvWhitePixel();// get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
IMGUI_APIImU32GetColorU32(ImGuiColidx,floatalpha_mul=1.0f);// retrieve given style color with style alpha applied and optional extra alpha multiplier
IMGUI_APIImU32GetColorU32(constImVec4&col);// retrieve given color with style alpha applied
@ -189,18 +190,11 @@ namespace ImGui
IMGUI_APIvoidBeginGroup();// lock horizontal starting position. once closing a group it is seen as a single item (so you can use IsItemHovered() on a group, SameLine() between groups, etc.
IMGUI_APIvoidEndGroup();
IMGUI_APIvoidSeparator();// horizontal line
IMGUI_APIvoidSameLine(floatlocal_pos_x =0.0f,floatspacing_w=-1.0f);// call between widgets or groups to layout them horizontally
IMGUI_APIvoidSameLine(float pos_x =0.0f,floatspacing_w=-1.0f);// call between widgets or groups to layout them horizontally
IMGUI_APIvoidSpacing();// add spacing
IMGUI_APIvoidDummy(constImVec2&size);// add a dummy item of given size
IMGUI_APIvoidIndent();// move content position toward the right by style.IndentSpacing pixels
IMGUI_APIvoidUnindent();// move content position back to the left (cancel Indent)
IMGUI_APIvoidColumns(intcount=1,constchar*id=NULL,boolborder=true);// setup number of columns. use an identifier to distinguish multiple column sets. close with Columns(1).
IMGUI_APIvoidNextColumn();// next column
IMGUI_APIintGetColumnIndex();// get current column index
IMGUI_APIfloatGetColumnOffset(intcolumn_index=-1);// get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetcolumnsCount() inclusive. column 0 is usually 0.0f and not resizable unless you call this
IMGUI_APIvoidSetColumnOffset(intcolumn_index,floatoffset_x);// set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column
IMGUI_APIintGetColumnsCount();// number of columns (what was passed to Columns())
IMGUI_APIImVec2GetCursorPos();// cursor position is relative to window position
IMGUI_APIfloatGetCursorPosX();// "
IMGUI_APIfloatGetCursorPosY();// "
@ -215,6 +209,16 @@ namespace ImGui
IMGUI_APIfloatGetTextLineHeightWithSpacing();// distance (in pixels) between 2 consecutive lines of text == GetWindowFontSize() + GetStyle().ItemSpacing.y
IMGUI_APIfloatGetItemsLineHeightWithSpacing();// distance (in pixels) between 2 consecutive lines of standard height widgets == GetWindowFontSize() + GetStyle().FramePadding.y*2 + GetStyle().ItemSpacing.y
// Columns
// You can also use SameLine(pos_x) for simplified columning. The columns API is still work-in-progress.
IMGUI_APIvoidColumns(intcount=1,constchar*id=NULL,boolborder=true);// setup number of columns. use an identifier to distinguish multiple column sets. close with Columns(1).
IMGUI_APIvoidNextColumn();// next column
IMGUI_APIintGetColumnIndex();// get current column index
IMGUI_APIfloatGetColumnOffset(intcolumn_index=-1);// get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetcolumnsCount() inclusive. column 0 is usually 0.0f and not resizable unless you call this
IMGUI_APIvoidSetColumnOffset(intcolumn_index,floatoffset_x);// set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column
IMGUI_APIintGetColumnsCount();// number of columns (what was passed to Columns())
// ID scopes
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them.
// You can also use the "##foobar" syntax within widget label to distinguish them from each others. Read "A primer on the use of labels/IDs" in the FAQ for more details.
@ -239,7 +243,7 @@ namespace ImGui
IMGUI_APIvoidTextUnformatted(constchar*text,constchar*text_end=NULL);// doesn't require null terminated string if 'text_end' is specified. no copy done to any bounded stack buffer, recommended for long chunks of text
IMGUI_APIvoidLabelText(constchar*label,constchar*fmt,...)IM_PRINTFARGS(2);// display text+label aligned the same way as value+label widgets
IMGUI_APIboolTreeNode(constchar*str_label_id);// if returning 'true' the node is open and the user is responsible for calling TreePop().
IMGUI_APIboolTreeNode(constchar*str_id,constchar*fmt,...)IM_PRINTFARGS(2);// read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
IMGUI_APIvoidBeginTooltip();// use to create full-featured tooltip windows that aren't just text
@ -347,7 +351,7 @@ namespace ImGui
IMGUI_APIboolMenuItem(constchar*label,constchar*shortcut=NULL,boolselected=false,boolenabled=true);// return true when activated. shortcuts are displayed for convenience but not processed by ImGui at the moment
IMGUI_APIboolMenuItem(constchar*label,constchar*shortcut,bool*p_selected,boolenabled=true);// return true when activated + toggle (*p_selected) if p_selected != NULL
// Popup
// Popups
IMGUI_APIvoidOpenPopup(constchar*str_id);// mark popup as open. popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level).
IMGUI_APIboolBeginPopup(constchar*str_id);// return true if popup if opened and start outputting to it. only call EndPopup() if BeginPopup() returned true!
IMGUI_APIboolBeginPopupModal(constchar*name,bool*p_opened=NULL,ImGuiWindowFlagsextra_flags=0);// modal dialog (can't close them by clicking outside)
@ -408,7 +412,7 @@ namespace ImGui
IMGUI_APIboolIsMouseReleased(intbutton);// did mouse button released (went from Down to !Down)
IMGUI_APIboolIsMouseHoveringWindow();// is mouse hovering current window ("window" in API names always refer to current window). disregarding of any consideration of being blocked by a popup. (unlike IsWindowHovered() this will return true even if the window is blocked because of a popup)
IMGUI_APIboolIsMouseHoveringAnyWindow();// is mouse hovering any visible window
IMGUI_APIboolIsMouseHoveringRect(constImVec2&pos_min,constImVec2&pos_max,boolclip=true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings. disregarding of consideration of focus/window ordering/blocked by a popup.
IMGUI_APIboolIsMouseHoveringRect(constImVec2&r_min,constImVec2&r_max,boolclip=true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings. disregarding of consideration of focus/window ordering/blocked by a popup.
IMGUI_APIboolIsMouseDragging(intbutton=0,floatlock_threshold=-1.0f);// is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold
IMGUI_APIImVec2GetMousePos();// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
IMGUI_APIImVec2GetMousePosOnOpeningCurrentPopup();// retrieve backup of mouse positioning at the time of opening popup we have BeginPopup() into
intTexWidth;// Texture width calculated during Build().
intTexHeight;// Texture height calculated during Build().
intTexDesiredWidth;// 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.
ImVec2TexUvWhitePixel;// Texture coordinates to a white pixel (part of the TexExtraData block)
ImVector<ImFont*>Fonts;
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.
// Note: This is one of the few instance of breaking the encapsulation of ImDrawList, as we pull this from ImGui state, but it is just SO useful.
// Might just move Font/FontSize to ImDrawList?
if(font==NULL)
font=GImGui->Font;
if(font_size==0.0f)
font_size=GImGui->FontSize;
IM_ASSERT(font->ContainerAtlas->TexID==_TextureIdStack.back());// Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font.
// reserve vertices for worse case (over-reserving is useful and easily amortized)