Reference Manual

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

# object.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti Development Team.
    00003  *  Copyright (C) 2000 Red Hat, Inc.
    00004  *
    00005  *  This program is free software; you can redistribute it and/or modify
    00006  *  it under the terms of the GNU General Public License as published by
    00007  *  the Free Software Foundation; either version 2 of the License, or
    00008  *  (at your option) any later version.
    00009  *
    00010  *  This program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013  *  GNU Library General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU Library General Public License
    00016  *  along with this program; if not, write to the Free Software
    00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018  */
    00019
    00024
    00025 #ifndef INTI_GTK_OBJECT_H
    00026 #define INTI_GTK_OBJECT_H
    00027
    00028 #ifndef INTI_G_OBJECT_H
    00029 #include <inti/glib/object.h>
    00030 #endif
    00031
    00032 #ifndef __GTK_OBJECT_H__
    00033 #include <gtk/gtkobject.h>
    00034 #endif
    00035
    00036 namespace Inti {
    00037
    00038 namespace Gtk {
    00039
    00040 class ObjectClass;
    00041
    00098
    00099 class Object : public G::Object
    00100 {
    00101         friend class G::Object;
    00102         friend class ObjectClass;
    00103
    00104         Object(const Object&);
    00105         Object& operator=(const Object&);
    00106
    00107 protected:
    00110
    00111         Object();
    00113
    00114         explicit Object(GtkObject *object, bool reference = false);
    00121
    00125
    00126         virtual void on_destroy();
    00129
    00131 //  Properties
    00132
    00133         typedef G::Property<void*> UserDataPropertyType;
    00134         typedef G::PropertyProxy<G::Object, UserDataPropertyType> UserDataPropertyProxy;
    00135         static const UserDataPropertyType user_data_property;
    00136
    00137 //  Signals
    00138
    00139         typedef G::Signal0<void> DestroySignalType;
    00140         typedef G::SignalProxy<TypeInstance, DestroySignalType> DestroySignalProxy;
    00141         static const DestroySignalType destroy_signal;
    00142
    00143 public:
    00146
    00147         virtual ~Object();
    00149
    00152
    00153         GtkObject* gtk_object() const { return (GtkObject*)instance; }
    00155
    00156         GtkObjectClass* gtk_object_class() const;
    00158
    00159         operator GtkObject* () const;
    00161
    00165
    00166         void sink();
    00170
    00171         virtual void ref();
    00175
    00176         virtual void dispose();
    00182
    00186
    00187         const UserDataPropertyProxy prop_user_data()
    00188         {
    00189                 return UserDataPropertyProxy(this, &user_data_property);
    00190         }
    00192
    00196
    00197         const DestroySignalProxy sig_destroy()
    00198         {
    00199                 return DestroySignalProxy(this, &destroy_signal);
    00200         }
    00203
    00205 };
    00206
    00207 } // namespace Gtk
    00208
    00209 } // namespace Inti
    00210
    00211 #endif // INTI_GTK_OBJECT_H
    00212

Main Page - Footer