2 // Generated by gtkmmproc -- DO NOT MODIFY!
10 /* Copyright (C) 2002 The gtkmm Development Team
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct _AtkTableIface AtkTableIface;
32 typedef struct _AtkTable AtkTable;
34 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _AtkTable AtkTable;
39 typedef struct _AtkTableClass AtkTableClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 { class Table_Class; } // namespace Atk
50 /** The ATK interface implemented for UI components which contain tabular or row/column information.
51 * This should be implemented by components which present elements ordered via rows and columns. It may also be used to
52 * present tree-structured information if the nodes of the trees can be said to contain multiple "columns". Individual
53 * elements of an Atk::Table are typically referred to as "cells", and these cells are exposed by Atk::Table as child
54 * Atk::Objects of the Atk::Table. Both row/column and child-index-based access to these children is provided.
56 * Children of Atk::Table are frequently "lightweight" objects, that is, they may not have backing widgets in the host UI
57 * toolkit. They are therefore often transient.
59 * Since tables are often very complex, Atk::Table includes provision for offering simplified summary information, as
60 * well as row and column headers and captions. Headers and captions are AtkObjects which may implement other interfaces
61 * (Atk::Text, Atk::Image, etc.) as appropriate. Atk::Table summaries may themselves be (simplified) Atk::Tables, etc.
64 class Table : public Glib::Interface
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70 typedef Table CppObjectType;
71 typedef Table_Class CppClassType;
72 typedef AtkTable BaseObjectType;
73 typedef AtkTableIface BaseClassType;
76 friend class Table_Class;
77 static CppClassType table_class_;
81 Table& operator=(const Table&);
84 Table(); // you must derive from this class
85 explicit Table(AtkTable* castitem);
87 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
92 static void add_interface(GType gtype_implementer);
94 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95 static GType get_type() G_GNUC_CONST;
96 static GType get_base_type() G_GNUC_CONST;
99 ///Provides access to the underlying C GObject.
100 AtkTable* gobj() { return reinterpret_cast<AtkTable*>(gobject_); }
102 ///Provides access to the underlying C GObject.
103 const AtkTable* gobj() const { return reinterpret_cast<AtkTable*>(gobject_); }
110 /** Get a reference to the table cell at @a row , @a column .
111 * @param row A <tt>int</tt> representing a row in @a table .
112 * @param column A <tt>int</tt> representing a column in @a table .
113 * @return A AtkObject* representing the referred to accessible.
115 Glib::RefPtr<Atk::Object> get_at(int row, int column);
117 /** Gets a <tt>int</tt> representing the index at the specified @a row and @a column .
118 * The value -1 is returned if the object at row,column is not a child
119 * of table or table does not implement this interface.
120 * @param row A <tt>int</tt> representing a row in @a table .
121 * @param column A <tt>int</tt> representing a column in @a table .
122 * @return A <tt>int</tt> representing the index at specified position.
124 int get_index_at(int row, int column) const;
126 /** Gets a <tt>int</tt> representing the column at the specified @a index , or -1
127 * if the table does not implement this interface
128 * @param index A <tt>int</tt> representing an index in @a table .
129 * @return A <tt>int</tt> representing the column at the specified index.
131 int get_column_at_index(int index) const;
133 /** Gets a <tt>int</tt> representing the row at the specified @a index , or -1
134 * if the table does not implement this interface
135 * @param index A <tt>int</tt> representing an index in @a table .
136 * @return A <tt>int</tt> representing the row at the specified index.
138 int get_row_at_index(int index) const;
140 /** Gets the number of columns in the table.
141 * @return A <tt>int</tt> representing the number of columns, or 0
142 * if value does not implement this interface.
144 int get_n_columns() const;
146 /** Gets the number of rows in the table.
147 * @return A <tt>int</tt> representing the number of rows, or 0
148 * if value does not implement this interface.
150 int get_n_rows() const;
152 /** Gets the number of columns occupied by the accessible object
153 * at the specified @a row and @a column in the @a table .
154 * @param row A <tt>int</tt> representing a row in @a table .
155 * @param column A <tt>int</tt> representing a column in @a table .
156 * @return A <tt>int</tt> representing the column extent at specified position, or 0
157 * if value does not implement this interface.
159 int get_column_extent_at(int row, int column) const;
161 /** Gets the number of rows occupied by the accessible object
162 * at a specified @a row and @a column in the @a table .
163 * @param row A <tt>int</tt> representing a row in @a table .
164 * @param column A <tt>int</tt> representing a column in @a table .
165 * @return A <tt>int</tt> representing the row extent at specified position, or 0
166 * if value does not implement this interface.
168 int get_row_extent_at(int row, int column) const;
171 /** Gets the caption for the @a table .
172 * @return A AtkObject* representing the table caption, or <tt>0</tt>
173 * if value does not implement this interface.
175 Glib::RefPtr<Atk::Object> get_caption();
177 /** Gets the caption for the @a table .
178 * @return A AtkObject* representing the table caption, or <tt>0</tt>
179 * if value does not implement this interface.
181 Glib::RefPtr<const Atk::Object> get_caption() const;
184 /** Gets the description text of the specified @a column in the table
185 * @param column A <tt>int</tt> representing a column in @a table .
186 * @return A gchar* representing the column description, or <tt>0</tt>
187 * if value does not implement this interface.
189 Glib::ustring get_column_description(int column) const;
192 /** Gets the column header of a specified column in an accessible table.
193 * @param column A <tt>int</tt> representing a column in the table.
194 * @return A AtkObject* representing the specified column header, or
195 * <tt>0</tt> if value does not implement this interface.
197 Glib::RefPtr<Atk::Object> get_column_header(int column);
199 /** Gets the column header of a specified column in an accessible table.
200 * @param column A <tt>int</tt> representing a column in the table.
201 * @return A AtkObject* representing the specified column header, or
202 * <tt>0</tt> if value does not implement this interface.
204 Glib::RefPtr<const Atk::Object> get_column_header(int column) const;
207 /** Gets the description text of the specified row in the table
208 * @param row A <tt>int</tt> representing a row in @a table .
209 * @return A gchar* representing the row description, or <tt>0</tt>
210 * if value does not implement this interface.
212 Glib::ustring get_row_description(int row) const;
215 /** Gets the row header of a specified row in an accessible table.
216 * @param row A <tt>int</tt> representing a row in the table.
217 * @return A AtkObject* representing the specified row header, or
218 * <tt>0</tt> if value does not implement this interface.
220 Glib::RefPtr<Atk::Object> get_row_header(int row);
222 /** Gets the row header of a specified row in an accessible table.
223 * @param row A <tt>int</tt> representing a row in the table.
224 * @return A AtkObject* representing the specified row header, or
225 * <tt>0</tt> if value does not implement this interface.
227 Glib::RefPtr<const Atk::Object> get_row_header(int row) const;
230 /** Gets the summary description of the table.
231 * @return A AtkObject* representing a summary description of the table,
232 * or zero if value does not implement this interface.
234 Glib::RefPtr<Atk::Object> get_summary();
236 /** Gets the summary description of the table.
237 * @return A AtkObject* representing a summary description of the table,
238 * or zero if value does not implement this interface.
240 Glib::RefPtr<const Atk::Object> get_summary() const;
243 /** Sets the caption for the table.
244 * @param caption A Atk::Object representing the caption to set for @a table .
246 void set_caption(const Glib::RefPtr<Atk::Object>& caption);
248 /** Sets the description text for the specified @a column of the @a table .
249 * @param column A <tt>int</tt> representing a column in @a table .
250 * @param description A #gchar representing the description text
251 * to set for the specified @a column of the @a table .
253 void set_column_description(int column, const Glib::ustring& description);
255 /** Sets the specified column header to @a header .
256 * @param column A <tt>int</tt> representing a column in @a table .
257 * @param header An Atk::Table.
259 void set_column_header(int column, const Glib::RefPtr<Atk::Object>& header);
261 /** Sets the description text for the specified @a row of @a table .
262 * @param row A <tt>int</tt> representing a row in @a table .
263 * @param description A #gchar representing the description text
264 * to set for the specified @a row of @a table .
266 void set_row_description(int row, const Glib::ustring& description);
268 /** Sets the specified row header to @a header .
269 * @param row A <tt>int</tt> representing a row in @a table .
270 * @param header An Atk::Table.
272 void set_row_header(int row, const Glib::RefPtr<Atk::Object>& header);
274 /** Sets the summary description of the table.
275 * @param accessible An Atk::Object representing the summary description
276 * to set for @a table .
278 void set_summary(const Glib::RefPtr<Atk::Object>& accessible);
281 Glib::ArrayHandle<int> get_selected_columns() const;
282 Glib::ArrayHandle<int> get_selected_rows() const;
285 /** Gets a boolean value indicating whether the specified @a column
287 * @param column A <tt>int</tt> representing a column in @a table .
288 * @return A <tt>bool</tt> representing if the column is selected, or 0
289 * if value does not implement this interface.
291 bool is_column_selected(int column) const;
293 /** Gets a boolean value indicating whether the specified @a row
295 * @param row A <tt>int</tt> representing a row in @a table .
296 * @return A <tt>bool</tt> representing if the row is selected, or 0
297 * if value does not implement this interface.
299 bool is_row_selected(int row) const;
301 /** Gets a boolean value indicating whether the accessible object
302 * at the specified @a row and @a column is selected
303 * @param row A <tt>int</tt> representing a row in @a table .
304 * @param column A <tt>int</tt> representing a column in @a table .
305 * @return A <tt>bool</tt> representing if the cell is selected, or 0
306 * if value does not implement this interface.
308 bool is_selected(int row, int column) const;
310 /** Adds the specified @a row to the selection.
311 * @param row A <tt>int</tt> representing a row in @a table .
312 * @return A <tt>bool</tt> representing if row was successfully added to selection,
313 * or 0 if value does not implement this interface.
315 bool add_row_selection(int row);
317 /** Removes the specified @a row from the selection.
318 * @param row A <tt>int</tt> representing a row in @a table .
319 * @return A <tt>bool</tt> representing if the row was successfully removed from
320 * the selection, or 0 if value does not implement this interface.
322 bool remove_row_selection(int row);
324 /** Adds the specified @a column to the selection.
325 * @param column A <tt>int</tt> representing a column in @a table .
326 * @return A <tt>bool</tt> representing if the column was successfully added to
327 * the selection, or 0 if value does not implement this interface.
329 bool add_column_selection(int column);
331 /** Adds the specified @a column to the selection.
332 * @param column A <tt>int</tt> representing a column in @a table .
333 * @return A <tt>bool</tt> representing if the column was successfully removed from
334 * the selection, or 0 if value does not implement this interface.
336 bool remove_column_selection(int column);
339 Glib::SignalProxy2< void,int,int > signal_row_inserted();
342 Glib::SignalProxy2< void,int,int > signal_column_inserted();
345 Glib::SignalProxy2< void,int,int > signal_row_deleted();
348 Glib::SignalProxy2< void,int,int > signal_column_deleted();
351 Glib::SignalProxy0< void > signal_row_reordered();
354 Glib::SignalProxy0< void > signal_column_reordered();
357 Glib::SignalProxy0< void > signal_model_changed();
361 virtual Glib::RefPtr<Atk::Object> get_at_vfunc(int row, int column);
362 virtual int get_index_at_vfunc(int row, int column) const;
363 virtual int get_column_at_index_vfunc(int index) const;
364 virtual int get_row_at_index_vfunc(int index) const;
365 virtual int get_n_columns_vfunc() const;
366 virtual int get_n_rows_vfunc() const;
367 virtual int get_column_extent_at_vfunc(int row, int column) const;
368 virtual int get_row_extent_at_vfunc(int row, int column) const;
369 virtual Glib::RefPtr<Atk::Object> get_caption_vfunc();
370 virtual const char* get_column_description_vfunc(int column) const;
371 virtual Glib::RefPtr<Atk::Object> get_column_header_vfunc(int column);
372 virtual const char* get_row_description_vfunc(int row) const;
373 virtual Glib::RefPtr<Atk::Object> get_row_header_vfunc(int row);
374 virtual Glib::RefPtr<Atk::Object> get_summary_vfunc();
375 virtual void set_caption_vfunc(const Glib::RefPtr<Atk::Object>& caption);
376 virtual void set_column_description_vfunc(int column, const char* description);
377 virtual void set_column_header_vfunc(int column, const Glib::RefPtr<Atk::Object>& header);
378 virtual void set_row_description_vfunc(int row, const char* description);
379 virtual void set_row_header_vfunc(int row, const Glib::RefPtr<Atk::Object>& header);
380 virtual void set_summary_vfunc(const Glib::RefPtr<Atk::Object>& accessible);
381 virtual bool is_column_selected_vfunc(int column) const;
382 virtual bool is_row_selected_vfunc(int row) const;
383 virtual bool is_selected_vfunc(int row, int column) const;
384 virtual bool add_row_selection_vfunc(int row);
385 virtual bool remove_row_selection_vfunc(int row);
386 virtual bool add_column_selection_vfunc(int column);
387 virtual bool remove_column_selection_vfunc(int column);
388 virtual int get_selected_columns_vfunc(int** selected) const;
389 virtual int get_selected_rows_vfunc(int** selected) const;
395 //C++ methods used to invoke GTK+ virtual functions:
398 //GTK+ Virtual Functions (override these to change behaviour):
400 //Default Signal Handlers::
401 virtual void on_row_inserted(int row, int num_inserted);
402 virtual void on_column_inserted(int column, int num_inserted);
403 virtual void on_row_deleted(int row, int num_deleted);
404 virtual void on_column_deleted(int column, int num_deleted);
405 virtual void on_row_reordered();
406 virtual void on_column_reordered();
407 virtual void on_model_changed();
417 /** @relates Atk::Table
418 * @param object The C instance
419 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
420 * @result A C++ instance that wraps this C instance.
422 Glib::RefPtr<Atk::Table> wrap(AtkTable* object, bool take_copy = false);
426 #endif /* _ATKMM_TABLE_H */