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.TableCellT;
26 
27 public  import atk.ObjectAtk;
28 public  import atk.c.functions;
29 public  import atk.c.types;
30 public  import glib.PtrArray;
31 public  import gobject.ObjectG;
32 public  import gtkc.atktypes;
33 
34 
35 /**
36  * Being #AtkTable a component which present elements ordered via rows
37  * and columns, an #AtkTableCell is the interface which each of those
38  * elements, so "cells" should implement.
39  * 
40  * See also #AtkTable.
41  */
42 public template TableCellT(TStruct)
43 {
44 	/** Get the main Gtk struct */
45 	public AtkTableCell* getTableCellStruct(bool transferOwnership = false)
46 	{
47 		if (transferOwnership)
48 			ownedRef = false;
49 		return cast(AtkTableCell*)getStruct();
50 	}
51 
52 
53 	/**
54 	 * Returns the column headers as an array of cell accessibles.
55 	 *
56 	 * Returns: a GPtrArray of AtkObjects
57 	 *     representing the column header cells.
58 	 *
59 	 * Since: 2.12
60 	 */
61 	public PtrArray getColumnHeaderCells()
62 	{
63 		auto __p = atk_table_cell_get_column_header_cells(getTableCellStruct());
64 
65 		if(__p is null)
66 		{
67 			return null;
68 		}
69 
70 		return new PtrArray(cast(GPtrArray*) __p, true);
71 	}
72 
73 	/**
74 	 * Returns the number of columns occupied by this cell accessible.
75 	 *
76 	 * Returns: a gint representing the number of columns occupied by this cell,
77 	 *     or 0 if the cell does not implement this method.
78 	 *
79 	 * Since: 2.12
80 	 */
81 	public int getColumnSpan()
82 	{
83 		return atk_table_cell_get_column_span(getTableCellStruct());
84 	}
85 
86 	/**
87 	 * Retrieves the tabular position of this cell.
88 	 *
89 	 * Params:
90 	 *     row = the row of the given cell.
91 	 *     column = the column of the given cell.
92 	 *
93 	 * Returns: TRUE if successful; FALSE otherwise.
94 	 *
95 	 * Since: 2.12
96 	 */
97 	public bool getPosition(out int row, out int column)
98 	{
99 		return atk_table_cell_get_position(getTableCellStruct(), &row, &column) != 0;
100 	}
101 
102 	/**
103 	 * Gets the row and column indexes and span of this cell accessible.
104 	 *
105 	 * Note: If the object does not implement this function, then, by default, atk
106 	 * will implement this function by calling get_row_span and get_column_span
107 	 * on the object.
108 	 *
109 	 * Params:
110 	 *     row = the row index of the given cell.
111 	 *     column = the column index of the given cell.
112 	 *     rowSpan = the number of rows occupied by this cell.
113 	 *     columnSpan = the number of columns occupied by this cell.
114 	 *
115 	 * Returns: TRUE if successful; FALSE otherwise.
116 	 *
117 	 * Since: 2.12
118 	 */
119 	public bool getRowColumnSpan(out int row, out int column, out int rowSpan, out int columnSpan)
120 	{
121 		return atk_table_cell_get_row_column_span(getTableCellStruct(), &row, &column, &rowSpan, &columnSpan) != 0;
122 	}
123 
124 	/**
125 	 * Returns the row headers as an array of cell accessibles.
126 	 *
127 	 * Returns: a GPtrArray of AtkObjects
128 	 *     representing the row header cells.
129 	 *
130 	 * Since: 2.12
131 	 */
132 	public PtrArray getRowHeaderCells()
133 	{
134 		auto __p = atk_table_cell_get_row_header_cells(getTableCellStruct());
135 
136 		if(__p is null)
137 		{
138 			return null;
139 		}
140 
141 		return new PtrArray(cast(GPtrArray*) __p, true);
142 	}
143 
144 	/**
145 	 * Returns the number of rows occupied by this cell accessible.
146 	 *
147 	 * Returns: a gint representing the number of rows occupied by this cell,
148 	 *     or 0 if the cell does not implement this method.
149 	 *
150 	 * Since: 2.12
151 	 */
152 	public int getRowSpan()
153 	{
154 		return atk_table_cell_get_row_span(getTableCellStruct());
155 	}
156 
157 	/**
158 	 * Returns a reference to the accessible of the containing table.
159 	 *
160 	 * Returns: the atk object for the containing table.
161 	 *
162 	 * Since: 2.12
163 	 */
164 	public ObjectAtk getTable()
165 	{
166 		auto __p = atk_table_cell_get_table(getTableCellStruct());
167 
168 		if(__p is null)
169 		{
170 			return null;
171 		}
172 
173 		return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) __p, true);
174 	}
175 }