Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::G::Boxed Class Reference

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

#include <inti/glib/boxed.h>

Inheritance diagram for Inti::G::Boxed:

Inti::ReferencedObject Inti::ReferencedBase Inti::G::Value Inti::Gdk::Color Inti::Gdk::Cursor Inti::Gdk::Event Inti::Gtk::IconSet Inti::Gtk::IconSource Inti::Gtk::SelectionData Inti::Gtk::TextAttributes Inti::Gtk::TextIter Inti::Gtk::TreeIter Inti::Gtk::TreePath Inti::Gtk::TreeRowReference Inti::Pango::AttrList Inti::Pango::FontDescription Inti::Pango::FontMetrics Inti::Pango::GlyphString Inti::Pango::TabArray List of all members.

Public Member Functions

Static Public Member Functions

Templates

Protected Member Functions

Constructors
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 ReferencedObject so its derived classes can be managed by the Inti 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

Inti::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.

Inti::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.

Inti::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 Inti::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.

void Inti::G::Boxed::copy const Boxed src  )  [protected]
 

Make a copy of the boxed object src.

Parameters:
src The Boxed object.

template<typename T>
T* Inti::G::Boxed::wrap GType  boxed_type,
void *  boxed,
bool  copy
[inline, 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.

template<typename T>
T* Inti::G::Boxed::wrap GType  boxed_type,
void *  boxed
[inline, 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.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:08 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002