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


Xfc::G::Boxed Class Reference

A generic base class for GTK+ boxed objects. More...

#include <xfc/glib/boxed.hh>

Inheritance diagram for Xfc::G::Boxed:

Xfc::Object Xfc::Trackable Xfc::G::Value Xfc::Gdk::Color Xfc::Gdk::Cursor Xfc::Gdk::Event Xfc::Gtk::IconInfo Xfc::Gtk::IconSet Xfc::Gtk::IconSource Xfc::Gtk::SelectionData Xfc::Gtk::SourceTagStyle Xfc::Gtk::TextAttributes Xfc::Gtk::TextIter Xfc::Gtk::TreeIter Xfc::Gtk::TreePath Xfc::Gtk::TreeRowReference Xfc::Pango::AttrList Xfc::Pango::Color Xfc::Pango::FontDescription Xfc::Pango::FontMetrics Xfc::Pango::GlyphString Xfc::Pango::LayoutIter Xfc::Pango::Matrix Xfc::Pango::TabArray List of all members.

Public Member Functions

Static Public Member Functions

Templates

Protected Member Functions

Methods

Protected Attributes


Detailed Description

A generic base class for GTK+ boxed objects.

The Boxed class handles the GTK+ memory allocation for boxed objects, saving you the trouble and initializes the underlying GTK+ structure where appropriate. Boxed is derived from Object so its derived classes can be managed by the XFC smart pointer, Pointer<>. Boxed is an implementation class so you wont need to use it unless you are deriving a new boxed object type. Some examples of boxed objects are Gdk::Color, G::Value, Gtk::TreeIter and Gtk::TreePath.

A Boxed object is a small object that is frequently copied and freed by GTK+. What it means to copy a Boxed object depends on each individual object. Sometimes a copied object will be a deep copy (an exact duplicate) and at other times it will be a shallow copy (merely reference counted).


Constructor & Destructor Documentation

Xfc::G::Boxed::Boxed ( GType  boxed_type  )  [explicit, protected]

Construct a new boxed type.

Parameters:
boxed_type The GType value for the boxed object.
Creates an empty wrapper for the boxed object type boxed_type. Objects calling this constructor must call copy() to copy a boxed object to the wrapper.

Xfc::G::Boxed::Boxed ( GType  boxed_type,
void *  boxed 
) [protected]

Construct a new boxed type.

Parameters:
boxed_type The GType value for the boxed object.
boxed A generic pointer to a GTK+ boxed object.
This constructor is used by Boxed::wrap for wrapping boxed objects that must not be freed.

Xfc::G::Boxed::Boxed ( GType  boxed_type,
void *  boxed,
bool  copy 
) [protected]

Construct a new boxed type.

Parameters:
boxed_type The GType value for the boxed object.
boxed A generic pointer to a GTK+ boxed object.
copy Set true if a copy of boxed should be used.
If copy is true boxed is copied. If false boxed is assumed to be a valid copy of a boxed object that must be freed.

Xfc::G::Boxed::Boxed ( GType  boxed_type  )  [explicit, protected]

Construct a new boxed type.

Parameters:
boxed_type The GType value for the boxed object.
Creates an empty wrapper for the boxed object type boxed_type. Objects calling this constructor must call copy() to copy a boxed object to the wrapper.

Xfc::G::Boxed::Boxed ( GType  boxed_type,
void *  boxed 
) [protected]

Construct a new boxed type.

Parameters:
boxed_type The GType value for the boxed object.
boxed A generic pointer to a GTK+ boxed object.
This constructor is used by Boxed::wrap for wrapping boxed objects that must not be freed.

Xfc::G::Boxed::Boxed ( GType  boxed_type,
void *  boxed,
bool  copy 
) [protected]

Construct a new boxed type.

Parameters:
boxed_type The GType value for the boxed object.
boxed A generic pointer to a GTK+ boxed object.
copy Set true if a copy of boxed should be used.
If copy is true boxed is copied. If false boxed is assumed to be a valid copy of a boxed object that must be freed.


Member Function Documentation

void Xfc::G::Boxed::copy ( const Boxed src  )  [protected]

Make a copy of the boxed object src.

Parameters:
src The Boxed object.

void Xfc::G::Boxed::copy ( const void *  boxed  )  [protected]

Copy the GTK+ boxed object to this C++ wrapper.

Parameters:
boxed A generic pointer to the GTK+ boxed object to copy.
boxed must be a valid boxed objrect and have the same GType as the calling object. The previous object, if any, is freed appropriately.

template<typename T>
static T* Xfc::G::Boxed::wrap ( GType  boxed_type,
void *  boxed 
) [static]

Generic C++ wrapper function for GTK+ boxed objects.

Parameters:
boxed_type The GType value of the boxed object.
boxed A generic pointer to a GTK+ boxed object.
This version wraps GTK+ boxed objects that must not be freed. This is a temporary C++ wrapper and doesn't take over ownership of the boxed object.

template<typename T>
static T* Xfc::G::Boxed::wrap ( GType  boxed_type,
void *  boxed,
bool  copy 
) [static]

Generic C++ wrapper function for GTK+ boxed objects.

Parameters:
boxed_type The GType value of the boxed object.
boxed A generic pointer to a GTK+ boxed object.
copy Set true if a copy of boxed should be used.
This version wraps GTK+ boxed objects that must be freed. If copy is true a copy of the boxed object is made. If copy is false the C++ wrapper takes over ownership of the boxed object and frees it appropriately.


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