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 atk.c.functions; 29 public import atk.c.types; 30 private import gobject.ObjectG; 31 private import gobject.Signals; 32 public import gtkc.atktypes; 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(bool transferOwnership = false); 51 52 /** the main Gtk struct as a void* */ 53 protected void* getStruct(); 54 55 56 /** */ 57 public static GType getType() 58 { 59 return atk_selection_get_type(); 60 } 61 62 /** 63 * Adds the specified accessible child of the object to the 64 * object's selection. 65 * 66 * Params: 67 * i = a #gint specifying the child index. 68 * 69 * Returns: TRUE if success, FALSE otherwise. 70 */ 71 public bool addSelection(int i); 72 73 /** 74 * Clears the selection in the object so that no children in the object 75 * are selected. 76 * 77 * Returns: TRUE if success, FALSE otherwise. 78 */ 79 public bool clearSelection(); 80 81 /** 82 * Gets the number of accessible children currently selected. 83 * Note: callers should not rely on %NULL or on a zero value for 84 * indication of whether AtkSelectionIface is implemented, they should 85 * use type checking/interface checking macros or the 86 * atk_get_accessible_value() convenience method. 87 * 88 * Returns: a gint representing the number of items selected, or 0 89 * if @selection does not implement this interface. 90 */ 91 public int getSelectionCount(); 92 93 /** 94 * Determines if the current child of this object is selected 95 * Note: callers should not rely on %NULL or on a zero value for 96 * indication of whether AtkSelectionIface is implemented, they should 97 * use type checking/interface checking macros or the 98 * atk_get_accessible_value() convenience method. 99 * 100 * Params: 101 * i = a #gint specifying the child index. 102 * 103 * Returns: a gboolean representing the specified child is selected, or 0 104 * if @selection does not implement this interface. 105 */ 106 public bool isChildSelected(int i); 107 108 /** 109 * Gets a reference to the accessible object representing the specified 110 * selected child of the object. 111 * Note: callers should not rely on %NULL or on a zero value for 112 * indication of whether AtkSelectionIface is implemented, they should 113 * use type checking/interface checking macros or the 114 * atk_get_accessible_value() convenience method. 115 * 116 * Params: 117 * i = a #gint specifying the index in the selection set. (e.g. the 118 * ith selection as opposed to the ith child). 119 * 120 * Returns: an #AtkObject representing the 121 * selected accessible, or %NULL if @selection does not implement this 122 * interface. 123 */ 124 public ObjectAtk refSelection(int i); 125 126 /** 127 * Removes the specified child of the object from the object's selection. 128 * 129 * Params: 130 * i = a #gint specifying the index in the selection set. (e.g. the 131 * ith selection as opposed to the ith child). 132 * 133 * Returns: TRUE if success, FALSE otherwise. 134 */ 135 public bool removeSelection(int i); 136 137 /** 138 * Causes every child of the object to be selected if the object 139 * supports multiple selections. 140 * 141 * Returns: TRUE if success, FALSE otherwise. 142 */ 143 public bool selectAllSelection(); 144 145 /** 146 * The "selection-changed" signal is emitted by an object which 147 * implements AtkSelection interface when the selection changes. 148 */ 149 gulong addOnSelectionChanged(void delegate(SelectionIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 150 }