Xfce Foundation Classes
Main Page | Index | Namespace 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:

List of all members.

## Public Member Functions

Signal Handlers

- virtual void on_notify (GParamSpec *pspec)
    Called when a property on an object is changed.

## Static Public Member Functions

Accessors

- GQuark quark ()
    Returns a quark that indentifies an object's stored signal class pointer.
- ObjectSignals * pointer (GObject *object)
    Returns the signal class pointer attached to object.

## Protected Member Functions

Constructors

- ObjectSignals (Object *object)
    Constructs a new ObjectSignals object.
- virtual ~ObjectSignals ()=0
    Destructor.

## 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();
        }; */

## 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.
Reimplemented in Xfc::Atk::ObjectSignals, and Xfc::Gtk::ObjectSignals.

## 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.

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.

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.

The documentation for this class was generated from the following file:

- libXFCcore/xfc/glib/objectsignals.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3