Began improvements to columns API by splitting the Columns() function into BeginColumns() and EndColumns() and adding additional flags. The columns data still needs to be placed into a stack.
constfloatt=window->DC.StateStorage->GetFloat(column_id,default_t);// Cheaply store our floating point value inside the integer (could store a union into the map?)
floatt=window->DC.StateStorage->GetFloat(column_id,default_t);// Cheaply store our floating point value inside the integer (could store a union into the map?)
@ -73,6 +73,7 @@ typedef int ImGuiKey; // a key identifier (ImGui-side enum) // e
typedefintImGuiColorEditMode;// color edit mode for ColorEdit*() // enum ImGuiColorEditMode_
typedefintImGuiMouseCursor;// a mouse cursor identifier // enum ImGuiMouseCursor_
typedefintImGuiWindowFlags;// window flags for Begin*() // enum ImGuiWindowFlags_
typedefintImGuiColumnsFlags;// column flags for Columns() // enum ImGuiColumnsFlags_
typedefintImGuiSetCond;// condition flags for Set*() // enum ImGuiSetCond_
typedefintImGuiInputTextFlags;// flags for InputText*() // enum ImGuiInputTextFlags_
typedefintImGuiSelectableFlags;// flags for Selectable() // enum ImGuiSelectableFlags_
@ -221,13 +222,16 @@ namespace ImGui
// Columns
// You can also use SameLine(pos_x) for simplified columning. The columns API is still work-in-progress and rather lacking.
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_APIvoidBeginColumns(constchar*id,intcount,ImGuiColumnsFlagsflags=0);// setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
IMGUI_APIvoidEndColumns();// close columns
IMGUI_APIvoidNextColumn();// next column, defaults to current row or next row if the current row is finished
IMGUI_APIintGetColumnIndex();// get current column index
IMGUI_APIfloatGetColumnWidth(intcolumn_index=-1);// get column width (in pixels). pass -1 to use current column
IMGUI_APIvoidSetColumnWidth(intcolumn_index,floatwidth);// set column width (in pixels). pass -1 to use current column
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_APIvoidCalcListClipping(intitems_count,floatitems_height,int*out_items_display_start,int*out_items_display_end);// calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can.
IMGUI_APIboolBeginChildFrame(ImGuiIDid,constImVec2&size,ImGuiWindowFlagsextra_flags=0);// helper to create a child window / scrolling region that looks like a normal widget frame
IMGUI_APIboolBeginChildFrame(ImGuiIDid,constImVec2&size,ImGuiWindowFlagsextra_flags=0);// helper to create a child window / scrolling region that looks like a normal widget frame
IMGUI_APIvoidEndChildFrame();
IMGUI_APIImVec4ColorConvertU32ToFloat4(ImU32in);
@ -506,6 +510,15 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_ChildMenu=1<<27// Don't use! For internal use by BeginMenu()