MCPcopy Create free account
hub / github.com/cinder/Cinder / TableOpenContextMenu

Method TableOpenContextMenu

src/imgui/imgui_tables.cpp:3479–3496  ·  view source on GitHub ↗

Use -1 to open menu not specific to a given column.

Source from the content-addressed store, hash-verified

3477
3478// Use -1 to open menu not specific to a given column.
3479void ImGui::TableOpenContextMenu(int column_n)
3480{
3481 ImGuiContext& g = *GImGui;
3482 ImGuiTable* table = g.CurrentTable;
3483 if (column_n == -1 && table->CurrentColumn != -1) // When called within a column automatically use this one (for consistency)
3484 column_n = table->CurrentColumn;
3485 if (column_n == table->ColumnsCount) // To facilitate using with TableGetHoveredColumn()
3486 column_n = -1;
3487 IM_ASSERT(column_n >= -1 && column_n < table->ColumnsCount);
3488 if (table->Flags & (ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable))
3489 {
3490 table->IsContextPopupOpen = true;
3491 table->ContextPopupColumn = (ImGuiTableColumnIdx)column_n;
3492 table->InstanceInteracted = table->InstanceCurrent;
3493 const ImGuiID context_menu_id = ImHashStr("##ContextMenu", 0, table->ID);
3494 OpenPopupEx(context_menu_id, ImGuiPopupFlags_None);
3495 }
3496}
3497
3498bool ImGui::TableBeginContextMenuPopup(ImGuiTable* table)
3499{

Callers

nothing calls this directly

Calls 1

ImHashStrFunction · 0.85

Tested by

no test coverage detected