1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = GtkTreeSortable.html 27 * outPack = gtk 28 * outFile = TreeSortableIF 29 * strct = GtkTreeSortable 30 * realStrct= 31 * ctorStrct= 32 * clss = TreeSortableT 33 * interf = TreeSortableIF 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_tree_sortable_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * structWrap: 47 * module aliases: 48 * local aliases: 49 * overrides: 50 */ 51 52 module gtk.TreeSortableIF; 53 54 public import gtkc.gtktypes; 55 56 private import gtkc.gtk; 57 private import glib.ConstructionException; 58 private import gobject.ObjectG; 59 60 private import gobject.Signals; 61 public import gtkc.gdktypes; 62 63 64 65 66 67 /** 68 * GtkTreeSortable is an interface to be implemented by tree models which 69 * support sorting. The GtkTreeView uses the methods provided by this interface 70 * to sort the model. 71 */ 72 public interface TreeSortableIF 73 { 74 75 76 public GtkTreeSortable* getTreeSortableTStruct(); 77 78 /** the main Gtk struct as a void* */ 79 protected void* getStruct(); 80 81 82 /** 83 */ 84 85 @property void delegate(TreeSortableIF)[] onSortColumnChangedListeners(); 86 /** 87 * The ::sort-column-changed signal is emitted when the sort column 88 * or sort order of sortable is changed. The signal is emitted before 89 * the contents of sortable are resorted. 90 * See Also 91 * GtkTreeModel, GtkTreeView 92 */ 93 void addOnSortColumnChanged(void delegate(TreeSortableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 94 95 /** 96 * Emits a "sort-column-changed" signal on sortable. 97 */ 98 public void sortColumnChanged(); 99 100 /** 101 * Fills in sort_column_id and order with the current sort column and the 102 * order. It returns TRUE unless the sort_column_id is 103 * GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or 104 * GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID. 105 * Params: 106 * sortColumnId = The sort column id to be filled in. [out] 107 * order = The GtkSortType to be filled in. [out] 108 * Returns: TRUE if the sort column is not one of the special sort column ids. 109 */ 110 public int getSortColumnId(out int sortColumnId, out GtkSortType order); 111 112 /** 113 * Sets the current sort column to be sort_column_id. The sortable will 114 * resort itself to reflect this change, after emitting a 115 * "sort-column-changed" signal. sort_column_id may either be 116 * Params: 117 * sortColumnId = the sort column id to set 118 * order = The sort order of the column 119 */ 120 public void setSortColumnId(int sortColumnId, GtkSortType order); 121 122 /** 123 * Sets the comparison function used when sorting to be sort_func. If the 124 * current sort column id of sortable is the same as sort_column_id, then 125 * the model will sort using this function. 126 * Params: 127 * sortColumnId = the sort column id to set the function for 128 * sortFunc = The comparison function 129 * userData = User data to pass to sort_func, or NULL. [allow-none] 130 * destroy = Destroy notifier of user_data, or NULL. [allow-none] 131 */ 132 public void setSortFunc(int sortColumnId, GtkTreeIterCompareFunc sortFunc, void* userData, GDestroyNotify destroy); 133 134 /** 135 * Sets the default comparison function used when sorting to be sort_func. 136 * If the current sort column id of sortable is 137 * GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using 138 * this function. 139 * If sort_func is NULL, then there will be no default comparison function. 140 * This means that once the model has been sorted, it can't go back to the 141 * default state. In this case, when the current sort column id of sortable 142 * is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted. 143 * Params: 144 * sortFunc = The comparison function 145 * userData = User data to pass to sort_func, or NULL. [allow-none] 146 * destroy = Destroy notifier of user_data, or NULL. [allow-none] 147 */ 148 public void setDefaultSortFunc(GtkTreeIterCompareFunc sortFunc, void* userData, GDestroyNotify destroy); 149 150 /** 151 * Returns TRUE if the model has a default sort function. This is used 152 * primarily by GtkTreeViewColumns in order to determine if a model can 153 * go back to the default state, or not. 154 * Returns: TRUE, if the model has a default sort function Signal Details The "sort-column-changed" signal void user_function (GtkTreeSortable *sortable, gpointer user_data) : Run Last The ::sort-column-changed signal is emitted when the sort column or sort order of sortable is changed. The signal is emitted before the contents of sortable are resorted. 155 */ 156 public int hasDefaultSortFunc(); 157 }