From 35fb7efcbd3760a0e0f034507104c708f1438ebb Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Mon, 24 Jun 2024 00:22:52 +0200 Subject: [PATCH] Add TreeView.insertColumn to APILookupGtk.txt (#357) One missing convenience function for adding columns managed by CellRenderer. --- src/APILookupGtk.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/APILookupGtk.txt b/src/APILookupGtk.txt index 0b3c2aacc..ece805943 100644 --- a/src/APILookupGtk.txt +++ b/src/APILookupGtk.txt @@ -4243,6 +4243,23 @@ code: start return iters; } + /** + * Creates a View column containing the CellRenderer, and inserts it + * Params: + * position = The position at which the CellRenderer should be inserted + * title = The text to be used in the title header of this column + * renderer = The CellRenderer + * Returns: number of columns including the new one + */ + int insertColumn(int position, string title, CellRenderer renderer) + { + return gtk_tree_view_insert_column_with_attributes( + gtkTreeView, + position, + Str.toStringz(title), + renderer.getCellRendererStruct(), null); + } + /** * Inserts a column and sets it's attributes * Params: