Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# table.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti Development Team.
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  */
    00018
    00023
    00024 #ifndef INTI_ATK_TABLE_H
    00025 #define INTI_ATK_TABLE_H
    00026
    00027 #ifndef INTI_G_TYPE_H
    00028 #include <inti/glib/type.h>
    00029 #endif
    00030
    00031 #ifndef __ATK_TABLE_H__
    00032 #include <atk/atktable.h>
    00033 #endif
    00034
    00035 #ifndef _CPP_VECTOR
    00036 #include <vector>
    00037 #endif
    00038
    00039 namespace Inti {
    00040
    00041 namespace Atk {
    00042
    00043 class Object;
    00044
    00045 class TableIface;
    00046
    00063
    00064 class Table : public virtual G::TypeInterface
    00065 {
    00066         friend class TableIface;
    00067
    00068 protected:
    00071
    00072         virtual ~Table() = 0;
    00074
    00076 //  Override these do_ methods when you want to change the default behaviour of the AtkTable.
    00077
    00078         virtual AtkObject* do_ref_at(int row, int column);
    00079
    00080         virtual int do_get_index_at(int row, int column);
    00081
    00082         virtual int do_get_column_at_index(int index);
    00083
    00084         virtual int do_get_row_at_index(int index);
    00085
    00086         virtual int do_get_n_columns();
    00087
    00088         virtual int do_get_n_rows();
    00089
    00090         virtual int do_get_column_extent_at(int row, int column);
    00091
    00092         virtual int do_get_row_extent_at(int row, int column);
    00093
    00094         virtual AtkObject* do_get_caption();
    00095
    00096         virtual const char* do_get_column_description(int column);
    00097
    00098         virtual AtkObject* do_get_column_header(int column);
    00099
    00100         virtual const char* do_get_row_description(int row);
    00101
    00102         virtual AtkObject* do_get_row_header(int row);
    00103
    00104         virtual AtkObject* do_get_summary();
    00105
    00106         virtual void do_set_caption(AtkObject *caption);
    00107
    00108         virtual void do_set_column_description(int column, const char *description);
    00109
    00110         virtual void do_set_column_header(int column, AtkObject *header);
    00111
    00112         virtual void do_set_row_description(int row, const char *description);
    00113
    00114         virtual void do_set_row_header(int row, AtkObject *header);
    00115
    00116         virtual void do_set_summary(AtkObject *accessible);
    00117
    00118         virtual int do_get_selected_columns(int **selected);
    00119
    00120         virtual int do_get_selected_rows(int **selected);
    00121
    00122         virtual bool do_is_column_selected(int column);
    00123
    00124         virtual bool do_is_row_selected(int row);
    00125
    00126         virtual bool do_is_selected(int row, int column);
    00127
    00128         virtual bool do_add_row_selection(int row);
    00129
    00130         virtual bool do_remove_row_selection(int row);
    00131
    00132         virtual bool do_add_column_selection(int column);
    00133
    00134         virtual bool do_remove_column_selection(int column);
    00135
    00138
    00139         virtual void on_row_inserted(int row, int num_inserted);
    00143
    00144         virtual void on_column_inserted(int column, int num_inserted);
    00148
    00149         virtual void on_row_deleted(int row, int num_deleted);
    00153
    00154         virtual void on_column_deleted(int column, int num_deleted);
    00158
    00159         virtual void on_row_reordered();
    00161
    00162         virtual void on_column_reordered();
    00164
    00165         virtual void on_model_changed();
    00167
    00169 //  Signals
    00170
    00171         typedef G::Signal2<void, int, int> RowInsertedSignalType;
    00172         typedef G::SignalProxy<TypeInstance, RowInsertedSignalType> RowInsertedSignalProxy;
    00173         static const RowInsertedSignalType row_inserted_signal;
    00174
    00175         typedef G::Signal2<void, int, int> ColumnInsertedSignalType;
    00176         typedef G::SignalProxy<TypeInstance, ColumnInsertedSignalType> ColumnInsertedSignalProxy;
    00177         static const ColumnInsertedSignalType column_inserted_signal;
    00178
    00179         typedef G::Signal2<void, int, int> RowDeletedSignalType;
    00180         typedef G::SignalProxy<TypeInstance, RowDeletedSignalType> RowDeletedSignalProxy;
    00181         static const RowDeletedSignalType row_deleted_signal;
    00182
    00183         typedef G::Signal2<void, int, int> ColumnDeletedSignalType;
    00184         typedef G::SignalProxy<TypeInstance, ColumnDeletedSignalType> ColumnDeletedSignalProxy;
    00185         static const ColumnDeletedSignalType column_deleted_signal;
    00186
    00187         typedef G::Signal0<void> RowReorderedSignalType;
    00188         typedef G::SignalProxy<TypeInstance, RowReorderedSignalType> RowReorderedSignalProxy;
    00189         static const RowReorderedSignalType row_reordered_signal;
    00190
    00191         typedef G::Signal0<void> ColumnReorderedSignalType;
    00192         typedef G::SignalProxy<TypeInstance, ColumnReorderedSignalType> ColumnReorderedSignalProxy;
    00193         static const ColumnReorderedSignalType column_reordered_signal;
    00194
    00195         typedef G::Signal0<void> ModelChangedSignalType;
    00196         typedef G::SignalProxy<TypeInstance, ModelChangedSignalType> ModelChangedSignalProxy;
    00197         static const ModelChangedSignalType model_changed_signal;
    00198
    00199 public:
    00202
    00203         AtkTable* atk_table() const { return (AtkTable*)instance; }
    00205
    00206         AtkTableIface* atk_table_iface() const;
    00208
    00209         operator AtkTable* () const;
    00211
    00212         Object* ref_at(int row, int column) const;
    00217
    00218         int get_index_at(int row, int column) const;
    00226
    00227         int get_column_at_index(int index) const;
    00232
    00233         int get_row_at_index(int index) const;
    00238
    00239         int get_n_columns() const;
    00243
    00244         int get_n_rows() const;
    00248
    00249         int get_column_extent_at(int row, int column) const;
    00256
    00257         int get_row_extent_at(int row, int column) const;
    00264
    00265         Object* get_caption() const;
    00269
    00270         String get_column_description(int column) const;
    00275
    00276         Object* get_column_header(int column) const;
    00281
    00282         String get_row_description(int row) const;
    00287
    00288         Object* get_row_header(int row) const;
    00293
    00294         Object* get_summary() const;
    00298
    00299         bool get_selected_columns(std::vector<int>& selected) const;
    00303
    00304         bool get_selected_rows(std::vector<int>& selected) const;
    00308
    00309         bool is_column_selected(int column) const;
    00314
    00315         bool is_row_selected(int row) const;
    00320
    00321         bool is_selected(int row, int column) const;
    00328
    00332
    00333         void set_caption(const Object *caption);
    00336
    00337         void set_column_description(int column, const String& description);
    00342
    00343         void set_column_header(int column, const Object *header);
    00347
    00348         void set_row_description(int row, const String& description);
    00353
    00354         void set_row_header(int row, const Object *header);
    00358
    00359         void set_summary(const Object *accessible);
    00362
    00363         bool add_row_selection(int row);
    00368
    00369         bool remove_row_selection(int row);
    00374
    00375         bool add_column_selection(int column);
    00380
    00381         bool remove_column_selection(int column);
    00386
    00390
    00391         const RowInsertedSignalProxy sig_row_inserted()
    00392         {
    00393                 return RowInsertedSignalProxy(this, &row_inserted_signal);
    00394         }
    00396
    00397         const ColumnInsertedSignalProxy sig_column_inserted()
    00398         {
    00399                 return ColumnInsertedSignalProxy(this, &column_inserted_signal);
    00400         }
    00402
    00403         const RowDeletedSignalProxy sig_row_deleted()
    00404         {
    00405                 return RowDeletedSignalProxy(this, &row_deleted_signal);
    00406         }
    00408
    00409         const ColumnDeletedSignalProxy sig_column_deleted()
    00410         {
    00411                 return ColumnDeletedSignalProxy(this, &column_deleted_signal);
    00412         }
    00414
    00415         const RowReorderedSignalProxy sig_row_reordered()
    00416         {
    00417                 return RowReorderedSignalProxy(this, &row_reordered_signal);
    00418         }
    00420
    00421         const ColumnReorderedSignalProxy sig_column_reordered()
    00422         {
    00423                 return ColumnReorderedSignalProxy(this, &column_reordered_signal);
    00424         }
    00426
    00427         const ModelChangedSignalProxy sig_model_changed()
    00428         {
    00429                 return ModelChangedSignalProxy(this, &model_changed_signal);
    00430         }
    00432
    00434 };
    00435
    00436 } // namespace Atk
    00437
    00438 } // namespace Inti
    00439
    00440 #endif // INTI_ATK_TABLE_H
    00441

Main Page - Footer