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?)
g.ActiveIdClickOffset.x-=column_w;// Store from center of column line (we used a 8 wide rect for columns clicking). This is used by GetDraggedColumnOffset().
if(held)
dragging_column=i;
}
// Draw before resize so our items positioning are in sync with the line being drawn
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?)
@ -74,6 +74,7 @@ typedef int ImGuiColorEditFlags; // color edit flags for Color*() // e
typedefintImGuiMouseCursor;// a mouse cursor identifier // enum ImGuiMouseCursor_
typedefintImGuiWindowFlags;// window flags for Begin*() // enum ImGuiWindowFlags_
typedefintImGuiCond;// condition flags for Set*() // enum ImGuiCond_
typedefintImGuiColumnsFlags;// flags for *Columns*() // enum ImGuiColumnsFlags_
typedefintImGuiInputTextFlags;// flags for InputText*() // enum ImGuiInputTextFlags_
typedefintImGuiSelectableFlags;// flags for Selectable() // enum ImGuiSelectableFlags_
typedefintImGuiTreeNodeFlags;// flags for TreeNode*(), Collapsing*() // enum ImGuiTreeNodeFlags_
@ -230,14 +231,15 @@ namespace ImGui
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 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
// You can also use SameLine(pos_x) for simplified columns. The columns API is still work-in-progress and rather lacking.
IMGUI_APIvoidNextColumn();// next column, defaults to current row or next row if the current row is finished
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_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 typically 0.0f
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_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
// NB: All position are in absolute pixels coordinates (never using window coordinates internally)
// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT.