mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Internals: remove obsolete variants of RenderArrow(), RenderBullet(), ImHash() + misc comments.
This commit is contained in:
38
imgui.h
38
imgui.h
@ -704,11 +704,10 @@ namespace ImGui
|
||||
|
||||
// Tables
|
||||
// - Full-featured replacement for old Columns API.
|
||||
// - See Demo->Tables for demo code.
|
||||
// - See top of imgui_tables.cpp for general commentary.
|
||||
// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary.
|
||||
// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
|
||||
// The typical call flow is:
|
||||
// - 1. Call BeginTable().
|
||||
// - 1. Call BeginTable(), early out if returning false.
|
||||
// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
|
||||
// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
|
||||
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
|
||||
@ -727,10 +726,10 @@ namespace ImGui
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// - 5. Call EndTable()
|
||||
IMGUI_API bool BeginTable(const char* str_id, int column, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f);
|
||||
IMGUI_API void EndTable(); // only call EndTable() if BeginTable() returns true!
|
||||
IMGUI_API void EndTable(); // only call EndTable() if BeginTable() returns true!
|
||||
IMGUI_API void TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f); // append into the first cell of a new row.
|
||||
IMGUI_API bool TableNextColumn(); // append into the next column (or first column of next row if currently in last column). Return true when column is visible.
|
||||
IMGUI_API bool TableSetColumnIndex(int column_n); // append into the specified column. Return true when column is visible.
|
||||
IMGUI_API bool TableNextColumn(); // append into the next column (or first column of next row if currently in last column). Return true when column is visible.
|
||||
IMGUI_API bool TableSetColumnIndex(int column_n); // append into the specified column. Return true when column is visible.
|
||||
|
||||
// Tables: Headers & Columns declaration
|
||||
// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
|
||||
@ -741,20 +740,17 @@ namespace ImGui
|
||||
// some advanced use cases (e.g. adding custom widgets in header row).
|
||||
// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled.
|
||||
IMGUI_API void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0);
|
||||
IMGUI_API void TableSetupScrollFreeze(int cols, int rows); // lock columns/rows so they stay visible when scrolled.
|
||||
IMGUI_API void TableHeadersRow(); // submit all headers cells based on data provided to TableSetupColumn() + submit context menu
|
||||
IMGUI_API void TableHeader(const char* label); // submit one header cell manually (rarely used)
|
||||
IMGUI_API void TableSetupScrollFreeze(int cols, int rows); // lock columns/rows so they stay visible when scrolled.
|
||||
IMGUI_API void TableHeadersRow(); // submit all headers cells based on data provided to TableSetupColumn() + submit context menu
|
||||
IMGUI_API void TableHeader(const char* label); // submit one header cell manually (rarely used)
|
||||
|
||||
// Tables: Sorting
|
||||
// - Call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
|
||||
// - When 'SpecsDirty == true' you should sort your data. It will be true when sorting specs have changed
|
||||
// since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, else you may
|
||||
// wastefully sort your data every frame!
|
||||
// - Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
|
||||
IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs(); // get latest sort specs for the table (NULL if not sorting).
|
||||
|
||||
// Tables: Miscellaneous functions
|
||||
// Tables: Sorting & Miscellaneous functions
|
||||
// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
|
||||
// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have
|
||||
// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
|
||||
// else you may wastefully sort your data every frame!
|
||||
// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
|
||||
IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs(); // get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
|
||||
IMGUI_API int TableGetColumnCount(); // return number of columns (value passed to BeginTable)
|
||||
IMGUI_API int TableGetColumnIndex(); // return current column index.
|
||||
IMGUI_API int TableGetRowIndex(); // return current row index.
|
||||
@ -849,13 +845,15 @@ namespace ImGui
|
||||
// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
|
||||
IMGUI_API ImGuiViewport* GetMainViewport(); // return primary/default viewport. This can never be NULL.
|
||||
|
||||
// Background/Foreground Draw Lists
|
||||
IMGUI_API ImDrawList* GetBackgroundDrawList(); // this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
IMGUI_API ImDrawList* GetForegroundDrawList(); // this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
|
||||
|
||||
// Miscellaneous Utilities
|
||||
IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle (of given size, starting from cursor position) is visible / not clipped.
|
||||
IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
|
||||
IMGUI_API double GetTime(); // get global imgui time. incremented by io.DeltaTime every frame.
|
||||
IMGUI_API int GetFrameCount(); // get global imgui frame count. incremented by 1 every frame.
|
||||
IMGUI_API ImDrawList* GetBackgroundDrawList(); // this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
IMGUI_API ImDrawList* GetForegroundDrawList(); // this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
|
||||
IMGUI_API ImDrawListSharedData* GetDrawListSharedData(); // you may use this when creating your own ImDrawList instances.
|
||||
IMGUI_API const char* GetStyleColorName(ImGuiCol idx); // get a string corresponding to the enum value (for display, saving, etc.).
|
||||
IMGUI_API void SetStateStorage(ImGuiStorage* storage); // replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
|
||||
|
Reference in New Issue
Block a user