Main Page - Header
Author: The Inti Development Team

Reference Manual

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

# selection.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_SELECTION_H
    00025 #define INTI_ATK_SELECTION_H
    00026
    00027 #ifndef INTI_G_TYPE_H
    00028 #include <inti/glib/type.h>
    00029 #endif
    00030
    00031 #ifndef __ATK_SELECTION_H__
    00032 #include <atk/atkselection.h>
    00033 #endif
    00034
    00035 namespace Inti {
    00036
    00037 namespace Atk {
    00038
    00039 class Object;
    00040 class SelectionIface;
    00041
    00053
    00054 class Selection : public virtual G::TypeInterface
    00055 {
    00056         friend class SelectionIface;
    00057
    00058 protected:
    00061
    00062         virtual ~Selection() = 0;
    00064
    00066 //  Override these do_ methods when you want to change the default behaviour of the AtkSelection.
    00067
    00068         virtual bool do_add_selection(int i);
    00069
    00070         virtual bool do_clear_selection();
    00071
    00072         virtual AtkObject* do_ref_selection(int i);
    00073
    00074         virtual int do_get_selection_count();
    00075
    00076         virtual bool do_is_child_selected(int i);
    00077
    00078         virtual bool do_remove_selection(int i);
    00079
    00080         virtual bool do_select_all_selection();
    00081
    00084
    00085         virtual void on_selection_changed();
    00087
    00089 //  Signals
    00090
    00091         typedef G::Signal0<void> SelectionChangedSignalType;
    00092         typedef G::SignalProxy<TypeInstance, SelectionChangedSignalType> SelectionChangedSignalProxy;
    00093         static const SelectionChangedSignalType selection_changed_signal;
    00094
    00095 public:
    00098
    00099         AtkSelection* atk_selection() const { return (AtkSelection*)instance; }
    00101
    00102         AtkSelectionIface* atk_selection_iface() const;
    00104
    00105         operator AtkSelection* () const;
    00107
    00108         int get_selection_count() const;
    00116
    00117         bool is_child_selected(int i) const;
    00126
    00130
    00131         bool add_selection(int i);
    00135
    00136         bool clear_selection();
    00139
    00140         Object* ref_selection(int i);
    00150
    00151         bool remove_selection(int i);
    00156
    00157         bool select_all_selection();
    00160
    00164
    00165         const SelectionChangedSignalProxy sig_selection_changed()
    00166         {
    00167                 return SelectionChangedSignalProxy(this, &selection_changed_signal);
    00168         }
    00170
    00172 };
    00173
    00174 } // namespace Atk
    00175
    00176 } // namespace Inti
    00177
    00178 #endif // INTI_ATK_SELECTION_H
    00179

Main Page - Footer