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