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