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 module atk.SelectionIF; 26 27 private import atk.ObjectAtk; 28 private import gobject.ObjectG; 29 private import gobject.Signals; 30 private import gtkc.atk; 31 public import gtkc.atktypes; 32 public import gtkc.gdktypes; 33 private import std.algorithm; 34 35 36 /** 37 * #AtkSelection should be implemented by UI components with children 38 * which are exposed by #atk_object_ref_child and 39 * #atk_object_get_n_children, if the use of the parent UI component 40 * ordinarily involves selection of one or more of the objects 41 * corresponding to those #AtkObject children - for example, 42 * selectable lists. 43 * 44 * Note that other types of "selection" (for instance text selection) 45 * are accomplished a other ATK interfaces - #AtkSelection is limited 46 * to the selection/deselection of children. 47 */ 48 public interface SelectionIF{ 49 /** Get the main Gtk struct */ 50 public AtkSelection* getSelectionStruct(); 51 52 /** the main Gtk struct as a void* */ 53 protected void* getStruct(); 54 55 56 /** 57 * Adds the specified accessible child of the object to the 58 * object's selection. 59 * 60 * Params: 61 * i = a #gint specifying the child index. 62 * 63 * Return: TRUE if success, FALSE otherwise. 64 */ 65 public bool addSelection(int i); 66 67 /** 68 * Clears the selection in the object so that no children in the object 69 * are selected. 70 * 71 * Return: TRUE if success, FALSE otherwise. 72 */ 73 public bool clearSelection(); 74 75 /** 76 * Gets the number of accessible children currently selected. 77 * Note: callers should not rely on %NULL or on a zero value for 78 * indication of whether AtkSelectionIface is implemented, they should 79 * use type checking/interface checking macros or the 80 * atk_get_accessible_value() convenience method. 81 * 82 * Return: a gint representing the number of items selected, or 0 83 * if @selection does not implement this interface. 84 */ 85 public int getSelectionCount(); 86 87 /** 88 * Determines if the current child of this object is selected 89 * Note: callers should not rely on %NULL or on a zero value for 90 * indication of whether AtkSelectionIface is implemented, they should 91 * use type checking/interface checking macros or the 92 * atk_get_accessible_value() convenience method. 93 * 94 * Params: 95 * i = a #gint specifying the child index. 96 * 97 * Return: a gboolean representing the specified child is selected, or 0 98 * if @selection does not implement this interface. 99 */ 100 public bool isChildSelected(int i); 101 102 /** 103 * Gets a reference to the accessible object representing the specified 104 * selected child of the object. 105 * Note: callers should not rely on %NULL or on a zero value for 106 * indication of whether AtkSelectionIface is implemented, they should 107 * use type checking/interface checking macros or the 108 * atk_get_accessible_value() convenience method. 109 * 110 * Params: 111 * i = a #gint specifying the index in the selection set. (e.g. the 112 * ith selection as opposed to the ith child). 113 * 114 * Return: an #AtkObject representing the 115 * selected accessible, or %NULL if @selection does not implement this 116 * interface. 117 */ 118 public ObjectAtk refSelection(int i); 119 120 /** 121 * Removes the specified child of the object from the object's selection. 122 * 123 * Params: 124 * i = a #gint specifying the index in the selection set. (e.g. the 125 * ith selection as opposed to the ith child). 126 * 127 * Return: TRUE if success, FALSE otherwise. 128 */ 129 public bool removeSelection(int i); 130 131 /** 132 * Causes every child of the object to be selected if the object 133 * supports multiple selections. 134 * 135 * Return: TRUE if success, FALSE otherwise. 136 */ 137 public bool selectAllSelection(); 138 /** 139 * The "selection-changed" signal is emitted by an object which 140 * implements AtkSelection interface when the selection changes. 141 */ 142 gulong addOnSelectionChanged(void delegate(SelectionIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 143 ; 144 145 }