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