Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::G::ObjectSignals Class Reference

Abstract base class that implements the virtual signal handlers for G::Object. More...

#include <xfc/glib/objectsignals.hh>

Inheritance diagram for Xfc::G::ObjectSignals:

Xfc::G::TypeInstance Xfc::Trackable Xfc::Atk::HyperlinkSignals Xfc::Atk::ObjectSignals Xfc::Gdk::DisplayManagerSignals Xfc::Gdk::DisplaySignals Xfc::Gdk::KeymapSignals Xfc::Gdk::PixbufLoaderSignals Xfc::Gdk::ScreenSignals Xfc::Gtk::AccelGroupSignals Xfc::Gtk::ActionSignals Xfc::Gtk::EntryCompletionSignals Xfc::Gtk::IconThemeSignals Xfc::Gtk::ObjectSignals Xfc::Gtk::TextBufferSignals Xfc::Gtk::TextTagSignals Xfc::Gtk::TextTagTableSignals Xfc::Gtk::UIManagerSignals List of all members.

Public Member Functions

Signal Handlers

Static Public Member Functions

Accessors

Detailed Description

Abstract base class that implements the virtual signal handlers for G::Object.

In XFC a signal object is an abstract implementation class that implements the vitual signal handling mechanism for the corresponding instance object. Signal objects can only be used as a base class to multiplely inherit from. This way, the overhead associated with multiple virtual function calls and large virtual function tables is minimized by not forcing you to accept this overhead when your not overriding any virtual signal handlers.

The main reason to override an object's virtual signal handlers would be to customize an object's default response to one or more signals. You should note that in XFC each virtual signal handler is called before the corresponding default GTK+ signal handler. This gives you the powerful choice of either calling or not calling the default handler. Another reason to override an object's virtual signal handlers would be for convenience. When your deriving a new class from an exisiting object instead of connecting to object signals in your constructor using the object's proxy signal functions (ligsigc) you can override one or more of the object's virtual signal handlers by multiplely inheriting your new class from the object's signal class. For example, to create a main window and override the on_delete_event() signal handler you would do something like this:

 #include <xfc/gtk/window.hh>
 #include <xfc/gtk/windowsignals.hh>

 using namespace Xfc;

 class MyWindow : public Gtk::Window, protected Gtk::WindowSignals
 {
     virtual bool on_delete_event(const Gdk::EventAny& event);

 public: 
     MyWindow();
 };

 MyWindow::MyWindow()
 : Gtk::WindowSignals(*this)
 {
     // put your code here
 }
 
 bool 
 MyWindow::on_delete_event(const Gdk::EventAny& event)
 {
     // put your code here     
 
     return true;
 }


Constructor & Destructor Documentation

Xfc::G::ObjectSignals::ObjectSignals ( Object object  )  [protected]

Constructs a new ObjectSignals object.

Parameters:
object A G::Object inheriting the G::ObjectSignals implementation.

Xfc::G::ObjectSignals::ObjectSignals ( Object object  )  [protected]

Constructs a new ObjectSignals object.

Parameters:
object A G::Object inheriting the G::ObjectSignals implementation.


Member Function Documentation

virtual void Xfc::G::ObjectSignals::on_notify ( GParamSpec *  pspec  )  [virtual]

Called when a property on an object is changed.

Parameters:
pspec A GParamSpec object that holds the meta data specifying the new property.

static GQuark Xfc::G::ObjectSignals::quark (  )  [static]

Returns a quark that indentifies an object's stored signal class pointer.

Returns:
A GQuark value.
The pointer will be null if an object doesn't multiplely inherit from G::ObjectSignals.

static ObjectSignals* Xfc::G::ObjectSignals::pointer ( GObject *  object  )  [static]

Returns the signal class pointer attached to object.

Returns:
A G::ObjectSignals pointer, or null.
The returned pointer will be null if the the C++ wrapper class for object doesn't multiplely inherit from G::ObjectSignals.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3