remove empty sigc++2 directory

git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Doug McLain 2008-06-02 05:02:28 +00:00
parent 2f3f697bb8
commit 9c0d7d72d7
2797 changed files with 0 additions and 992363 deletions

Binary file not shown.

View file

@ -1 +0,0 @@
*.os

View file

@ -1,234 +0,0 @@
// -*- C++ -*-
/* $Id$ */
/* affinetrans.h
*
* Copyright (C) 1999 The gnomemm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/affinetrans.h>
#include <libgnomecanvas/gnome-canvas.h>
namespace Gnome
{
namespace Art
{
AffineTrans::AffineTrans(double scale)
{
trans_[0] = scale;
trans_[1] = 0.0;
trans_[2] = 0.0;
trans_[3] = scale;
trans_[4] = 0.0;
trans_[5] = 0.0;
}
AffineTrans::AffineTrans(const double aff[6])
{
trans_[0] = aff[0];
trans_[1] = aff[1];
trans_[2] = aff[2];
trans_[3] = aff[3];
trans_[4] = aff[4];
trans_[5] = aff[5];
}
AffineTrans::AffineTrans(const AffineTrans& src)
{
operator=(src);
}
AffineTrans::~AffineTrans()
{
}
AffineTrans& AffineTrans::operator=(const AffineTrans& src)
{
for(unsigned int i = 0; i < 6; i++)
{
trans_[i] = src.trans_[i];
}
return *this;
}
double&
AffineTrans::operator[](unsigned int idx)
{
if(idx > 5)
{
g_warning("AffineTrans::operator[] called with idx > 5");
return trans_[5]; //0; //Can't convert 0 to double& - throw exception?
}
return trans_[idx];
}
const double&
AffineTrans::operator[](unsigned int idx) const
{
if(idx > 5)
{
g_warning("AffineTrans::operator[] const called with idx > 5");
return trans_[5]; //0; //Can't convert 0 to double& - throw exception?
}
return trans_[idx];
}
Point AffineTrans::apply_to(const Point& p) const
{
Point result;
art_affine_point(result.gobj(), p.gobj(), trans_);
return result;
}
Point AffineTrans::operator*(const Point& p) const
{
return apply_to(p);
}
AffineTrans
AffineTrans::operator*(const AffineTrans& aff2)
{
AffineTrans result;
art_affine_multiply(result.gobj(), gobj(), aff2.gobj());
return result;
}
bool AffineTrans::operator==(const AffineTrans& other) const
{
return (bool)art_affine_equal(const_cast<double*>(trans_),
const_cast<double*>(other.gobj()));
}
bool AffineTrans::operator!=(const AffineTrans& other) const
{
return !(bool)art_affine_equal(const_cast<double*>(trans_),
const_cast<double*>(other.gobj()));
}
void AffineTrans::invert()
{
art_affine_invert(trans_, trans_);
}
void AffineTrans::flip(bool horiz, bool vert)
{
art_affine_flip(trans_, trans_, horiz, vert);
}
bool AffineTrans::rectilinear() const
{
return art_affine_rectilinear(trans_);
}
double AffineTrans::expansion() const
{
return art_affine_expansion(trans_);
}
AffineTrans const &
AffineTrans::operator*=(AffineTrans& other)
{
art_affine_multiply(gobj(), gobj(), other.gobj());
return *this;
}
AffineTrans AffineTrans::identity()
{
AffineTrans tmp;
art_affine_identity(tmp.gobj());
return tmp;
}
AffineTrans
AffineTrans::scaling(double s)
{
return scaling(s, s);
}
AffineTrans
AffineTrans::scaling(double sx, double sy)
{
AffineTrans tmp;
art_affine_scale(tmp.gobj(), sx, sy);
return tmp;
}
AffineTrans
AffineTrans::rotation(double theta)
{
AffineTrans tmp;
art_affine_rotate(tmp.gobj(), theta);
return tmp;
}
AffineTrans
AffineTrans::translation(double dx, double dy)
{
AffineTrans tmp;
art_affine_translate(tmp.gobj(), dx, dy);
return tmp;
}
AffineTrans
AffineTrans::translation(const Point& p)
{
AffineTrans tmp;
art_affine_translate(tmp.gobj(), p.get_x(), p.get_y());
return tmp;
}
AffineTrans
AffineTrans::shearing(double theta)
{
AffineTrans tmp;
art_affine_shear(tmp.gobj(), theta);
return tmp;
}
double* AffineTrans::gobj()
{
return trans_;
}
const double* AffineTrans::gobj() const
{
return trans_;
}
Glib::ustring AffineTrans::to_string() const
{
char pchStr[128];
pchStr[127] = 0; //Just in case art_affine_to_string doesn't work properly.
art_affine_to_string(pchStr, gobj());
return Glib::ustring(pchStr);
}
} //namespace Art
} //namespace Gnome
std::ostream& operator<<(std::ostream& out, const Gnome::Art::AffineTrans& aff)
{
return out << aff.to_string();
}

View file

@ -1,119 +0,0 @@
#ifndef _LIBGNOMECANVASMM_AFFINETRANS_H
#define _LIBGNOMECANVASMM_AFFINETRANS_H
// -*- C++ -*-
/* $Id$ */
/* affinetrans.h
*
* Copyright (C) 1999 The gnomemm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm/containers.h>
#include <libgnomecanvasmm/point.h>
namespace Gnome
{
namespace Art
{
//: Used by CanvasItem.
class AffineTrans
{
public:
//: Initialize the affine as unit matrix, with a scaling factor
AffineTrans(double scale = 1.0);
//: aff[6]
explicit AffineTrans(const double aff[6]);
AffineTrans(const AffineTrans& src);
AffineTrans& operator=(const AffineTrans& src);
~AffineTrans();
double& operator[](unsigned int idx);
const double& operator[](unsigned int idx) const;
double* gobj();
const double* gobj() const;
//: Apply the affine to a given point
//: e.g. Point dst = affine.apply(Point(x,y));
//: is the same as:
//: dst.x = x * affine[0] + y * affine[2] + affine[4];
//: dst.y = x * affine[1] + y * affine[3] + affine[5];
Point apply_to(const Point& p) const;
//: Apply the affine to a given point
Point operator*(const Point& p) const;
//: Compose two affines
AffineTrans operator*(const AffineTrans& aff2);
//: Apply other affine to the affine
AffineTrans const & operator*=(AffineTrans& other);
bool operator==(const AffineTrans& other) const;
bool operator!=(const AffineTrans& other) const;
//: Give the inverse of the affine
void invert();
//: Flip horizontally and/or vertically the affine
void flip(bool horiz, bool vert);
//: Determine whether the affine is rectilinear (rotates 0, 90, 180 or 270 degrees)
bool rectilinear() const;
//: Find the affine's "expansion factor", i.e. the scale amount
double expansion() const;
//: Set up the identity matrix
static AffineTrans identity();
//: Set up a scaling matrix
static AffineTrans scaling(double s);
//: Set up a scaling matrix
static AffineTrans scaling(double sx, double sy);
//: Set up a rotation matrix; theta is given in degrees
static AffineTrans rotation(double theta);
//: Set up a shearing matrix; theta given in degrees
static AffineTrans shearing(double theta);
//: Set up a translation matrix
static AffineTrans translation(double dx, double dy);
//: Set up a translation matrix
static AffineTrans translation(const Point& p);
Glib::ustring to_string() const;
protected:
double trans_[6];
};
} //namespace Art
} /* namespace Gnome */
std::ostream& operator<<(std::ostream& out, const Gnome::Art::AffineTrans& aff);
#endif // _GNOMEMM_AFFINETRANS_H

View file

@ -1,156 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/bpath.h>
#include <libgnomecanvasmm/private/bpath_p.h>
/* bpath.cc
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Bpath::Bpath(Group& parent)
: Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
{
item_construct(parent);
}
void Bpath::set_bpath(const Glib::RefPtr<PathDef>& path)
{
property_bpath ().set_value ((gpointer)path->gobj());
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Bpath* wrap(GnomeCanvasBpath* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Bpath *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Bpath_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Bpath_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_bpath_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Bpath_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Bpath_Class::wrap_new(GObject* o)
{
return manage(new Bpath((GnomeCanvasBpath*)(o)));
}
/* The implementation: */
Bpath::Bpath(const Glib::ConstructParams& construct_params)
:
Shape(construct_params)
{
}
Bpath::Bpath(GnomeCanvasBpath* castitem)
:
Shape((GnomeCanvasShape*)(castitem))
{
}
Bpath::~Bpath()
{
destroy_();
}
Bpath::CppClassType Bpath::bpath_class_; // initialize static member
GType Bpath::get_type()
{
return bpath_class_.init().get_type();
}
GType Bpath::get_base_type()
{
return gnome_canvas_bpath_get_type();
}
Glib::PropertyProxy<gpointer> Bpath::property_bpath()
{
return Glib::PropertyProxy<gpointer>(this, "bpath");
}
Glib::PropertyProxy_ReadOnly<gpointer> Bpath::property_bpath() const
{
return Glib::PropertyProxy_ReadOnly<gpointer>(this, "bpath");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,148 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_BPATH_H
#define _LIBGNOMECANVASMM_BPATH_H
#include <glibmm.h>
/* $Id$ */
/* bpath.h
*
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/shape.h>
#include <libgnomecanvasmm/path-def.h>
#include <libgnomecanvas/gnome-canvas-bpath.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasBpath GnomeCanvasBpath;
typedef struct _GnomeCanvasBpathClass GnomeCanvasBpathClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Bpath_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Bpath : public Shape
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Bpath CppObjectType;
typedef Bpath_Class CppClassType;
typedef GnomeCanvasBpath BaseObjectType;
typedef GnomeCanvasBpathClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Bpath();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Bpath_Class;
static CppClassType bpath_class_;
// noncopyable
Bpath(const Bpath&);
Bpath& operator=(const Bpath&);
protected:
explicit Bpath(const Glib::ConstructParams& construct_params);
explicit Bpath(GnomeCanvasBpath* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasBpath* gobj() { return reinterpret_cast<GnomeCanvasBpath*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasBpath* gobj() const { return reinterpret_cast<GnomeCanvasBpath*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
explicit Bpath(Group& parent);
// This property stores a pointer to GnomeCanvasPathDef
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<gpointer> property_bpath() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<gpointer> property_bpath() const;
void set_bpath(const Glib::RefPtr<PathDef>& path);
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Bpath
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Bpath* wrap(GnomeCanvasBpath* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_BPATH_H */

View file

@ -1,533 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/canvas.h>
#include <libgnomecanvasmm/private/canvas_p.h>
// -*- C++ -*-
/* $Id$ */
/* canvas.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtk.h>
#include <libgnomecanvasmm/group.h>
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvasmm/wrap_init.h>
#include <libgnomecanvas/gnome-canvas-util.h>
namespace Gnome
{
namespace Canvas
{
bool
Canvas::get_color(const Glib::ustring& spec, Gdk::Color& color) const
{
GdkColor* pColor = 0;
gboolean result = gnome_canvas_get_color(const_cast<GnomeCanvas*>(gobj()),
const_cast<gchar*>(spec.c_str()),
pColor);
color = Glib::wrap(pColor);
return (result == TRUE);
}
CanvasAA::CanvasAA()
:
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
Canvas(Glib::ConstructParams(canvas_class_.init(), "aa", TRUE, (char*) 0))
{
//Note that the use of Glib::ConstructParams() here required use of _GMMPROC_PROTECTED_GCLASS in cavas.hg.
//gtk_widget_push_colormap (gdk_rgb_get_cmap ());
//ObjectBase::initialize ((GObject*)g_object_new (get_type (),
// "aa", true,
// NULL));
//gtk_widget_pop_colormap();
}
CanvasAA::~CanvasAA()
{
}
Art::AffineTrans Canvas::w2c_affine() const
{
double pAffine[6];
gnome_canvas_w2c_affine(const_cast<GnomeCanvas*>(gobj()), pAffine);
return Art::AffineTrans(pAffine);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
void Canvas_signal_draw_background_callback(GnomeCanvas* self, GdkDrawable* p0,gint p1,gint p2,gint p3,gint p4,void* data)
{
using namespace Gnome::Canvas;
typedef sigc::slot< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
try
{
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
(*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
, p1
, p2
, p3
, p4
);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
}
const Glib::SignalProxyInfo Canvas_signal_draw_background_info =
{
"draw_background",
(GCallback) &Canvas_signal_draw_background_callback,
(GCallback) &Canvas_signal_draw_background_callback
};
void Canvas_signal_render_background_callback(GnomeCanvas* self, GnomeCanvasBuf* p0,void* data)
{
using namespace Gnome::Canvas;
typedef sigc::slot< void,GnomeCanvasBuf* > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
try
{
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
(*static_cast<SlotType*>(slot))(p0);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
}
const Glib::SignalProxyInfo Canvas_signal_render_background_info =
{
"render_background",
(GCallback) &Canvas_signal_render_background_callback,
(GCallback) &Canvas_signal_render_background_callback
};
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Canvas* wrap(GnomeCanvas* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Canvas *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Canvas_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Canvas_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Canvas_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
klass->request_update = &request_update_vfunc_callback;
klass->draw_background = &draw_background_callback;
klass->render_background = &render_background_callback;
}
void Canvas_Class::request_update_vfunc_callback(GnomeCanvas* self)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->request_update_vfunc();
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->request_update)
(*base->request_update)(self);
}
}
void Canvas_Class::draw_background_callback(GnomeCanvas* self, GdkDrawable* p0, gint p1, gint p2, gint p3, gint p4)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->on_draw_background(Glib::wrap(p0, true)
, p1
, p2
, p3
, p4
);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->draw_background)
(*base->draw_background)(self, p0, p1, p2, p3, p4);
}
}
void Canvas_Class::render_background_callback(GnomeCanvas* self, GnomeCanvasBuf* p0)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->on_render_background(p0);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->render_background)
(*base->render_background)(self, p0);
}
}
Glib::ObjectBase* Canvas_Class::wrap_new(GObject* o)
{
return manage(new Canvas((GnomeCanvas*)(o)));
}
/* The implementation: */
Canvas::Canvas(const Glib::ConstructParams& construct_params)
:
Gtk::Layout(construct_params)
{
}
Canvas::Canvas(GnomeCanvas* castitem)
:
Gtk::Layout((GtkLayout*)(castitem))
{
}
Canvas::~Canvas()
{
destroy_();
}
Canvas::CppClassType Canvas::canvas_class_; // initialize static member
GType Canvas::get_type()
{
return canvas_class_.init().get_type();
}
GType Canvas::get_base_type()
{
return gnome_canvas_get_type();
}
Canvas::Canvas()
:
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
Gtk::Layout(Glib::ConstructParams(canvas_class_.init()))
{
}
Group* Canvas::root() const
{
return Glib::wrap(gnome_canvas_root(const_cast<GnomeCanvas*>(gobj())));
}
void Canvas::set_scroll_region(double x1, double y1, double x2, double y2)
{
gnome_canvas_set_scroll_region(gobj(), x1, y1, x2, y2);
}
void Canvas::get_scroll_region(double& x1, double& y1, double& x2, double& y2) const
{
gnome_canvas_get_scroll_region(const_cast<GnomeCanvas*>(gobj()), &(x1), &(y1), &(x2), &(y2));
}
void Canvas::set_center_scroll_region(bool center)
{
gnome_canvas_set_center_scroll_region(gobj(), static_cast<int>(center));
}
bool Canvas::get_center_scroll_region() const
{
return gnome_canvas_get_center_scroll_region(const_cast<GnomeCanvas*>(gobj()));
}
void Canvas::set_pixels_per_unit(double n)
{
gnome_canvas_set_pixels_per_unit(gobj(), n);
}
void Canvas::scroll_to(int x, int y)
{
gnome_canvas_scroll_to(gobj(), x, y);
}
void Canvas::get_scroll_offsets(int& cx, int& cy) const
{
gnome_canvas_get_scroll_offsets(const_cast<GnomeCanvas*>(gobj()), &cx, &cy);
}
void Canvas::update_now()
{
gnome_canvas_update_now(gobj());
}
Item* Canvas::get_item_at(double x, double y) const
{
return Glib::wrap(gnome_canvas_get_item_at(const_cast<GnomeCanvas*>(gobj()), x, y));
}
void Canvas::request_redraw(int x1, int y1, int x2, int y2)
{
gnome_canvas_request_redraw(gobj(), x1, y1, x2, y2);
}
void Canvas::request_redraw(ArtUta* uta)
{
gnome_canvas_request_redraw_uta(gobj(), uta);
}
void Canvas::w2c(double wx, double wy, int& cx, int& cy) const
{
gnome_canvas_w2c(const_cast<GnomeCanvas*>(gobj()), wx, wy, &cx, &cy);
}
void Canvas::w2c(double wx, double wy, double& cx, double& cy) const
{
gnome_canvas_w2c_d(const_cast<GnomeCanvas*>(gobj()), wx, wy, &(cx), &(cy));
}
void Canvas::c2w(int cx, int cy, double& wx, double& wy) const
{
gnome_canvas_c2w(const_cast<GnomeCanvas*>(gobj()), cx, cy, &(wx), &(wy));
}
void Canvas::window_to_world(double winx, double winy, double& worldx, double& worldy) const
{
gnome_canvas_window_to_world(const_cast<GnomeCanvas*>(gobj()), winx, winy, &(worldx), &(worldy));
}
void Canvas::world_to_window(double worldx, double worldy, double& winx, double& winy) const
{
gnome_canvas_world_to_window(const_cast<GnomeCanvas*>(gobj()), worldx, worldy, &(winx), &(winy));
}
gulong Canvas::get_color_pixel(guint rgba) const
{
return gnome_canvas_get_color_pixel(const_cast<GnomeCanvas*>(gobj()), rgba);
}
void Canvas::set_stipple_origin(const Glib::RefPtr<Gdk::GC>& gc)
{
gnome_canvas_set_stipple_origin(gobj(), Glib::unwrap(gc));
}
void Canvas::set_dither(Gdk::RgbDither dither)
{
gnome_canvas_set_dither(gobj(), ((GdkRgbDither)(dither)));
}
Gdk::RgbDither Canvas::get_dither() const
{
return ((Gdk::RgbDither)(gnome_canvas_get_dither(const_cast<GnomeCanvas*>(gobj()))));
}
void Canvas::update_svp(ArtSVP** p_svp, ArtSVP* new_svp)
{
gnome_canvas_update_svp(gobj(), p_svp, new_svp);
}
void Canvas::update_svp_clip(ArtSVP** p_svp, ArtSVP* new_svp, ArtSVP* clip_svp)
{
gnome_canvas_update_svp_clip(gobj(), p_svp, new_svp, clip_svp);
}
double Canvas::get_pixels_per_unit() const
{
return gobj()->pixels_per_unit;
}
Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int > Canvas::signal_draw_background()
{
return Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int >(this, &Canvas_signal_draw_background_info);
}
Glib::SignalProxy1< void,GnomeCanvasBuf* > Canvas::signal_render_background()
{
return Glib::SignalProxy1< void,GnomeCanvasBuf* >(this, &Canvas_signal_render_background_info);
}
Glib::PropertyProxy<bool> Canvas::property_aa()
{
return Glib::PropertyProxy<bool>(this, "aa");
}
Glib::PropertyProxy_ReadOnly<bool> Canvas::property_aa() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "aa");
}
void Gnome::Canvas::Canvas::on_draw_background(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->draw_background)
(*base->draw_background)(gobj(),Glib::unwrap(drawable),x,y,width,height);
}
void Gnome::Canvas::Canvas::on_render_background(GnomeCanvasBuf* buf)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->render_background)
(*base->render_background)(gobj(),buf);
}
void Gnome::Canvas::Canvas::request_update_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->request_update)
(*base->request_update)(gobj());
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,443 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_CANVAS_H
#define _LIBGNOMECANVASMM_CANVAS_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* canvas.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvas/gnome-canvas.h>
#include <libgnomecanvasmm/affinetrans.h>
#include <gtkmm/layout.h>
#include <gdkmm/color.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvas GnomeCanvas;
typedef struct _GnomeCanvasClass GnomeCanvasClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Canvas_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Item;
class Group;
/** Canvas functions usually operate in either World coordinates
* (units for the entire canvas), or Canvas coordinates (pixels starting
* at 0,0 in the top left). There are functions to transform from
* one to the other.
*/
class Canvas : public Gtk::Layout
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Canvas CppObjectType;
typedef Canvas_Class CppClassType;
typedef GnomeCanvas BaseObjectType;
typedef GnomeCanvasClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Canvas();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
friend class Canvas_Class;
static CppClassType canvas_class_;
// noncopyable
Canvas(const Canvas&);
Canvas& operator=(const Canvas&);
protected:
explicit Canvas(const Glib::ConstructParams& construct_params);
explicit Canvas(GnomeCanvas* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvas* gobj() { return reinterpret_cast<GnomeCanvas*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvas* gobj() const { return reinterpret_cast<GnomeCanvas*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
virtual void on_draw_background(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height);
virtual void on_render_background(GnomeCanvasBuf* buf);
private:
;
public:
Canvas();
//Allow CanvasAA to access the canvas_class_ member.
//: Get the root canvas item
/** Queries the root group of a canvas.
* @return The root group of the specified canvas.
*/
Group* root() const;
//: Limits of scroll region
/** Sets the scrolling region of a canvas to the specified rectangle. The canvas
* will then be able to scroll only within this region. The view of the canvas
* is adjusted as appropriate to display as much of the new region as possible.
* @param x1 Leftmost limit of the scrolling region.
* @param y1 Upper limit of the scrolling region.
* @param x2 Rightmost limit of the scrolling region.
* @param y2 Lower limit of the scrolling region.
*/
void set_scroll_region(double x1, double y1, double x2, double y2);
//: Get limits of scroll region
/** Queries the scrolling region of a canvas.
* @param x1 Leftmost limit of the scrolling region (return value).
* @param y1 Upper limit of the scrolling region (return value).
* @param x2 Rightmost limit of the scrolling region (return value).
* @param y2 Lower limit of the scrolling region (return value).
*/
void get_scroll_region(double& x1, double& y1, double& x2, double& y2) const;
/** When the scrolling region of the canvas is smaller than the canvas window,
* e.g.\ the allocation of the canvas, it can be either centered on the window
* or simply made to be on the upper-left corner on the window. This function
* lets you configure this property.
* @param center_scroll_region Whether to center the scrolling region in the canvas
* window when it is smaller than the canvas' allocation.
*/
void set_center_scroll_region(bool center);
/** Returns whether the canvas is set to center the scrolling region in the window
* if the former is smaller than the canvas' allocation.
* @return Whether the scroll region is being centered in the canvas window.
*/
bool get_center_scroll_region() const;
//: Set the pixels/world coordinates ratio
//- With no arguments sets to default of 1.0.
/** Sets the zooming factor of a canvas by specifying the number of pixels that
* correspond to one canvas unit.
*
* The anchor point for zooming, i.e. the point that stays fixed and all others
* zoom inwards or outwards from it, depends on whether the canvas is set to
* center the scrolling region or not. You can control this using the
* set_center_scroll_region() function. If the canvas is set to
* center the scroll region, then the center of the canvas window is used as the
* anchor point for zooming. Otherwise, the upper-left corner of the canvas
* window is used as the anchor point.
* @param n The number of pixels that correspond to one canvas unit.
*/
void set_pixels_per_unit(double n = 1.0);
//: Shift window.
//- Makes a canvas scroll to the specified offsets, given in canvas pixel
//- units.
//- The canvas will adjust the view so that it is not outside the scrolling
//- region. This function is typically not used, as it is better to hook
//- scrollbars to the canvas layout's scrolling adjusments.
/** Makes a canvas scroll to the specified offsets, given in canvas pixel units.
* The canvas will adjust the view so that it is not outside the scrolling
* region. This function is typically not used, as it is better to hook
* scrollbars to the canvas layout's scrolling adjusments.
* @param cx Horizontal scrolling offset in canvas pixel units.
* @param cy Vertical scrolling offset in canvas pixel units.
*/
void scroll_to(int x, int y);
//: Scroll offsets in canvas pixel coordinates.
/** Queries the scrolling offsets of a canvas. The values are returned in canvas
* pixel units.
* @param cx Horizontal scrolling offset (return value).
* @param cy Vertical scrolling offset (return value).
*/
void get_scroll_offsets(int& cx, int& cy) const;
//: Repaint immediately, don't wait for idle loop
//- normally the canvas queues repainting and does it in an
//- idle loop
/** Forces an immediate update and redraw of a canvas. If the canvas does not
* have any pending update or redraw requests, then no action is taken. This is
* typically only used by applications that need explicit control of when the
* display is updated, like games. It is not needed by normal applications.
*/
void update_now();
//: Find an item at a location.
//- Looks for the item that is under the specified position, which must be
//- specified in world coordinates. Arguments are in world coordinates.
//- Returns 0 if no item is at that
//- location.
/** Looks for the item that is under the specified position, which must be
* specified in world coordinates.
* @param x X position in world coordinates.
* @param y Y position in world coordinates.
* @return The sought item, or <tt>0</tt> if no item is at the specified
* coordinates.
*/
Item* get_item_at(double x, double y) const;
//: Repaint small area (internal)
//- Used only by item implementations. Request an eventual redraw
//- of the region, which includes x1,y1 but not x2,y2
/** Convenience function that informs a canvas that the specified rectangle needs
* to be repainted. This function converts the rectangle to a microtile array
* and feeds it to request_redraw_uta(). The rectangle includes
* @a x1 and @a y1 , but not @a x2 and @a y2 . To be used only by item implementations.
* @param x1 Leftmost coordinate of the rectangle to be redrawn.
* @param y1 Upper coordinate of the rectangle to be redrawn.
* @param x2 Rightmost coordinate of the rectangle to be redrawn, plus 1.
* @param y2 Lower coordinate of the rectangle to be redrawn, plus 1.
*/
void request_redraw(int x1, int y1, int x2, int y2);
//TODO: Investigate ArtUta.
/** Informs a canvas that the specified area, given as a microtile array, needs
* to be repainted. To be used only by item implementations.
* @param uta Microtile array that specifies the area to be redrawn. It will
* be freed by this function, so the argument you pass will be invalid
* after you call this function.
*/
void request_redraw(ArtUta* uta);
Art::AffineTrans w2c_affine() const;
//: Convert from World to canvas coordinates (units for the entire canvas)
//: to Canvas coordinates (pixels starting at 0,0 in the top left
//: of the visible area). The relationship depends on the current
//: scroll position and the pixels_per_unit ratio (zoom factor)
/** Converts world coordinates into canvas pixel coordinates.
* @param wx World X coordinate.
* @param wy World Y coordinate.
* @param cx X pixel coordinate (return value).
* @param cy Y pixel coordinate (return value).
*/
void w2c(double wx, double wy, int& cx, int& cy) const;
/** Converts world coordinates into canvas pixel coordinates. This version
* @param wx World X coordinate.
* @param wy World Y coordinate.
* @param cx X pixel coordinate (return value).
* @param cy Y pixel coordinate (return value).
* @return Coordinates in floating point coordinates, for greater precision.
*/
void w2c(double wx, double wy, double& cx, double& cy) const;
//: From Canvas to World
/** Converts canvas pixel coordinates to world coordinates.
* @param cx Canvas pixel X coordinate.
* @param cy Canvas pixel Y coordinate.
* @param wx X world coordinate (return value).
* @param wy Y world coordinate (return value).
*/
void c2w(int cx, int cy, double& wx, double& wy) const;
//: Convert from Window coordinates to world coordinates.
//- Window coordinates are based of the widget's GdkWindow.
//- This is fairly low-level and not generally useful.
/** Converts window-relative coordinates into world coordinates. You can use
* this when you need to convert mouse coordinates into world coordinates, for
* example.
* @param winx Window-relative X coordinate.
* @param winy Window-relative Y coordinate.
* @param worldx X world coordinate (return value).
* @param worldy Y world coordinate (return value).
*/
void window_to_world (double winx,double winy, double& worldx,double& worldy) const;
//: Convert from world coordinates to Window coordinates.
//- Window coordinates are based of the widget's GdkWindow.
//- This is fairly low-level and not generally useful.
/** Converts world coordinates into window-relative coordinates.
* @param worldx World X coordinate.
* @param worldy World Y coordinate.
* @param winx X window-relative coordinate.
* @param winy Y window-relative coordinate.
*/
void world_to_window (double worldx, double worldy, double& winx, double& winy) const;
//: Parse color spec string and allocate it into the GdkColor.
bool get_color(const Glib::ustring& spec, Gdk::Color& color) const;
/* Allocates a color from the RGB value passed into this function. */
/** Allocates a color from the RGBA value passed into this function. The alpha
* opacity value is discarded, since normal X colors do not support it.
* @param rgba RGBA color specification.
* @return Allocated pixel value corresponding to the specified color.
*/
gulong get_color_pixel(guint rgba) const;
/** Sets the stipple origin of the specified GC as is appropriate for the canvas,
* so that it will be aligned with other stipple patterns used by canvas items.
* This is typically only needed by item implementations.
* @param gc GC on which to set the stipple origin.
*/
void set_stipple_origin(const Glib::RefPtr<Gdk::GC>& gc);
/** Controls dithered rendering for antialiased canvases. The value of
* dither should be Gdk::RGB_DITHER_NONE, Gdk::RGB_DITHER_NORMAL, or
* Gdk::RGB_DITHER_MAX. The default canvas setting is
* Gdk::RGB_DITHER_NORMAL.
* @param dither Type of dithering used to render an antialiased canvas.
*/
void set_dither(Gdk::RgbDither dither);
/** Returns the type of dithering used to render an antialiased canvas.
* @return The dither setting.
*/
Gdk::RgbDither get_dither() const;
//TODO: Look at ArtSVP.
/** Sets the svp to the new value, requesting repaint on what's changed. This
* function takes responsibility for freeing new_svp.
* @param p_svp A pointer to the existing svp.
* @param new_svp The new svp.
*/
void update_svp(ArtSVP** p_svp, ArtSVP* new_svp);
/** Sets the svp to the new value, clipping if necessary, and requesting repaint
* on what's changed. This function takes responsibility for freeing new_svp.
* @param p_svp A pointer to the existing svp.
* @param new_svp The new svp.
* @param clip_svp A clip path, if non-null.
*/
void update_svp_clip(ArtSVP** p_svp, ArtSVP* new_svp, ArtSVP* clip_svp);
// The following are simply accessed via the struct in C,
// but Federico reports that they are meant to be used.
//: Get the pixels per unit.
double get_pixels_per_unit() const;
//: Draw the background for the area given.
//- This method is only used for non-antialiased canvases.
Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int > signal_draw_background();
// Render the background for the buffer given.
//- The buf data structure contains both a pointer to a packed 24-bit
//- RGB array, and the coordinates.
//- This method is only used for antialiased canvases.
Glib::SignalProxy1< void,GnomeCanvasBuf* > signal_render_background();
//: Private Virtual methods for groping the canvas inside bonobo.
virtual void request_update_vfunc();
// Whether the canvas is in antialiased mode or not.
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_aa() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_aa() const;
};
//: Antialiased Canvas.
//- Constructor takes care of push/pop actions of the colormap.
class CanvasAA : public Canvas
{
public:
CanvasAA();
virtual ~CanvasAA();
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Canvas
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Canvas* wrap(GnomeCanvas* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_CANVAS_H */

View file

@ -1,147 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/ellipse.h>
#include <libgnomecanvasmm/private/ellipse_p.h>
// -*- C++ -*-
/* $Id$ */
/* ellipse.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Ellipse::Ellipse(Group& parentx, double x1, double y1, double x2, double y2)
: RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(), 0)))
{
item_construct(parentx);
set("x1",x1,"y1",y1,"x2",x2,"y2",y2,0);
}
Ellipse::Ellipse(Group& parentx)
: RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(), 0)))
{
item_construct(parentx);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Ellipse* wrap(GnomeCanvasEllipse* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Ellipse *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Ellipse_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Ellipse_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_ellipse_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Ellipse_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Ellipse_Class::wrap_new(GObject* o)
{
return manage(new Ellipse((GnomeCanvasEllipse*)(o)));
}
/* The implementation: */
Ellipse::Ellipse(const Glib::ConstructParams& construct_params)
:
RectEllipse(construct_params)
{
}
Ellipse::Ellipse(GnomeCanvasEllipse* castitem)
:
RectEllipse((GnomeCanvasRE*)(castitem))
{
}
Ellipse::~Ellipse()
{
destroy_();
}
Ellipse::CppClassType Ellipse::ellipse_class_; // initialize static member
GType Ellipse::get_type()
{
return ellipse_class_.init().get_type();
}
GType Ellipse::get_base_type()
{
return gnome_canvas_ellipse_get_type();
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,130 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_ELLIPSE_H
#define _LIBGNOMECANVASMM_ELLIPSE_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* ellipse.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvasmm/group.h>
#include <libgnomecanvasmm/rect-ellipse.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasEllipse GnomeCanvasEllipse;
typedef struct _GnomeCanvasEllipseClass GnomeCanvasEllipseClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Ellipse_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Ellipse : public RectEllipse
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Ellipse CppObjectType;
typedef Ellipse_Class CppClassType;
typedef GnomeCanvasEllipse BaseObjectType;
typedef GnomeCanvasEllipseClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Ellipse();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Ellipse_Class;
static CppClassType ellipse_class_;
// noncopyable
Ellipse(const Ellipse&);
Ellipse& operator=(const Ellipse&);
protected:
explicit Ellipse(const Glib::ConstructParams& construct_params);
explicit Ellipse(GnomeCanvasEllipse* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasEllipse* gobj() { return reinterpret_cast<GnomeCanvasEllipse*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasEllipse* gobj() const { return reinterpret_cast<GnomeCanvasEllipse*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
;
public:
explicit Ellipse(Group& parent);
Ellipse(Group& parent, double x1, double y1, double x2, double y2);
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Ellipse
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Ellipse* wrap(GnomeCanvasEllipse* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_ELLIPSE_H */

View file

@ -1,170 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/group.h>
#include <libgnomecanvasmm/private/group_p.h>
// -*- C++ -*-
/* $Id$ */
/* group.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Group::Group(Group& parentx, double x, double y)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
{
item_construct(parentx);
set("x", x, "y", y, 0);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Group* wrap(GnomeCanvasGroup* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Group *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Group_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Group_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_group_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Group_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Group_Class::wrap_new(GObject* o)
{
return manage(new Group((GnomeCanvasGroup*)(o)));
}
/* The implementation: */
Group::Group(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
Group::Group(GnomeCanvasGroup* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
Group::~Group()
{
destroy_();
}
Group::CppClassType Group::group_class_; // initialize static member
GType Group::get_type()
{
return group_class_.init().get_type();
}
GType Group::get_base_type()
{
return gnome_canvas_group_get_type();
}
Group::Group()
:
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
Item(Glib::ConstructParams(group_class_.init()))
{
}
Glib::PropertyProxy<double> Group::property_x()
{
return Glib::PropertyProxy<double>(this, "x");
}
Glib::PropertyProxy_ReadOnly<double> Group::property_x() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x");
}
Glib::PropertyProxy<double> Group::property_y()
{
return Glib::PropertyProxy<double>(this, "y");
}
Glib::PropertyProxy_ReadOnly<double> Group::property_y() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,164 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_GROUP_H
#define _LIBGNOMECANVASMM_GROUP_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* group.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasGroup GnomeCanvasGroup;
typedef struct _GnomeCanvasGroupClass GnomeCanvasGroupClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Group_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Canvas;
class Group : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Group CppObjectType;
typedef Group_Class CppClassType;
typedef GnomeCanvasGroup BaseObjectType;
typedef GnomeCanvasGroupClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Group();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Group_Class;
static CppClassType group_class_;
// noncopyable
Group(const Group&);
Group& operator=(const Group&);
protected:
explicit Group(const Glib::ConstructParams& construct_params);
explicit Group(GnomeCanvasGroup* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasGroup* gobj() { return reinterpret_cast<GnomeCanvasGroup*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasGroup* gobj() const { return reinterpret_cast<GnomeCanvasGroup*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
;
public:
friend class Canvas;
explicit Group(Group& parent, double x = 0, double y = 0);
Group();
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Group
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Group* wrap(GnomeCanvasGroup* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_GROUP_H */

View file

@ -1,37 +0,0 @@
/* init.cc
*
* Copyright (C) 2001 The libgnomeuimm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/init.h>
#include <gtkmm/main.h>
#include <libgnomecanvasmm/wrap_init.h>
namespace Gnome
{
namespace Canvas
{
void init()
{
Gtk::Main::init_gtkmm_internals(); //Sets up the g type system and the Glib::wrap() table.
wrap_init(); //Tells the Glib::wrap() table about the libgnomecanvasmm classes.
}
} /* namespace Canvas */
} /* namespace Gnome */

View file

@ -1,37 +0,0 @@
#ifndef _LIBGNOMEUIMM_INIT_H
#define _LIBGNOMEUIMM_INIT_H
/* init.h
*
* Copyright (C) 2001 The libgnomeuimm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
/* Initialize libgnomecanvas wrap table:
* You still need a Gtk::Main instance, or a subclass such as Gnome::Main.
*/
void init();
} /* namespace Canvas */
} /* namespace Gnome */
#endif // _LIBGNOMEUIMM_INIT_H

View file

@ -1,908 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvasmm/private/item_p.h>
// -*- C++ -*-
/* $Id$ */
/* item.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
extern "C"
{
#include <stdarg.h>
}
#include <libgnomecanvasmm/canvas.h>
#include <libgnomecanvasmm/group.h>
#include <libgnomecanvas/gnome-canvas-util.h>
namespace Gnome
{
namespace Canvas
{
//This function creates an empty va_list instead of just passing 0 to gnome_canvas_item_construct().
//This is necessary on the alpha platform.
//It needs to be a separate helper function because we need a ... argument.
static void
item_construct_helper(GnomeCanvasItem *item, GnomeCanvasGroup *group, ...)
{
va_list va;
va_start(va, group);
gnome_canvas_item_construct(item, group, 0, va);
va_end(va);
}
void
Item::item_construct(Group& group)
{
item_construct_helper(GNOME_CANVAS_ITEM(gobj()), group.gobj()); //With no ... arguments.
}
void
Item::item_construct(Group& group, const gchar* first_arg_name,
va_list ap)
{
gnome_canvas_item_construct(GNOME_CANVAS_ITEM(gobj()), group.gobj(),
first_arg_name,
ap);
}
void
Item::set(const gchar* first_arg_name, ...)
{
va_list args;
va_start(args,first_arg_name);
gnome_canvas_item_set_valist(gobj(), first_arg_name, args);
va_end(args);
}
int Item::grab(unsigned int event_mask, const Gdk::Cursor& cursor, guint32 etime)
{
return gnome_canvas_item_grab(gobj(), event_mask, const_cast<GdkCursor*>(cursor.gobj()), etime);
}
int Item::grab(unsigned int event_mask, guint32 etime)
{
return gnome_canvas_item_grab(gobj(), event_mask, 0, etime);
}
void
Item::affine_relative(const Art::AffineTrans &affine)
{
gnome_canvas_item_affine_relative (gobj(), affine.gobj());
}
void
Item::affine_absolute (const Art::AffineTrans &affine)
{
gnome_canvas_item_affine_absolute (gobj(), affine.gobj());
}
Art::AffineTrans
Item::get_i2w_affine() const
{
double tmp[6] = {0};
gnome_canvas_item_i2w_affine(const_cast<GnomeCanvasItem*>(gobj()), tmp);
return Art::AffineTrans(tmp);
}
Art::AffineTrans
Item::get_i2c_affine() const
{
double tmp[6] = {0};
gnome_canvas_item_i2c_affine(const_cast<GnomeCanvasItem*>(gobj()), tmp);
return Art::AffineTrans(tmp);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
gboolean Item_signal_event_callback(GnomeCanvasItem* self, GdkEvent* p0,void* data)
{
using namespace Gnome::Canvas;
typedef sigc::slot< bool,GdkEvent* > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
try
{
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
typedef gboolean RType;
return RType();
}
gboolean Item_signal_event_notify_callback(GnomeCanvasItem* self, GdkEvent* p0, void* data)
{
using namespace Gnome::Canvas;
typedef sigc::slot< void,GdkEvent* > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
try
{
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
(*static_cast<SlotType*>(slot))(p0);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
typedef gboolean RType;
return RType();
}
const Glib::SignalProxyInfo Item_signal_event_info =
{
"event",
(GCallback) &Item_signal_event_callback,
(GCallback) &Item_signal_event_notify_callback
};
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Item* wrap(GnomeCanvasItem* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Item *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Item_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Item_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_item_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Item_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
klass->update = &update_vfunc_callback;
klass->realize = &realize_vfunc_callback;
klass->unrealize = &unrealize_vfunc_callback;
klass->map = &map_vfunc_callback;
klass->unmap = &unmap_vfunc_callback;
klass->coverage = &coverage_vfunc_callback;
klass->draw = &draw_vfunc_callback;
klass->render = &render_vfunc_callback;
klass->point = &point_vfunc_callback;
klass->bounds = &bounds_vfunc_callback;
klass->event = &event_callback;
}
void Item_Class::update_vfunc_callback(GnomeCanvasItem* self, double* affine, ArtSVP* clip_path, int flags)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->update_vfunc(affine, clip_path, flags);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->update)
(*base->update)(self, affine, clip_path, flags);
}
}
void Item_Class::realize_vfunc_callback(GnomeCanvasItem* self)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->realize_vfunc();
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->realize)
(*base->realize)(self);
}
}
void Item_Class::unrealize_vfunc_callback(GnomeCanvasItem* self)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->unrealize_vfunc();
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->unrealize)
(*base->unrealize)(self);
}
}
void Item_Class::map_vfunc_callback(GnomeCanvasItem* self)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->map_vfunc();
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->map)
(*base->map)(self);
}
}
void Item_Class::unmap_vfunc_callback(GnomeCanvasItem* self)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->unmap_vfunc();
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->unmap)
(*base->unmap)(self);
}
}
ArtUta* Item_Class::coverage_vfunc_callback(GnomeCanvasItem* self)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
return obj->coverage_vfunc();
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->coverage)
return (*base->coverage)(self);
}
typedef ArtUta* RType;
return RType();
}
void Item_Class::draw_vfunc_callback(GnomeCanvasItem* self, GdkDrawable* drawable, int x, int y, int width, int height)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->draw_vfunc(Glib::wrap(drawable, true)
, x, y, width, height);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->draw)
(*base->draw)(self, drawable, x, y, width, height);
}
}
void Item_Class::render_vfunc_callback(GnomeCanvasItem* self, GnomeCanvasBuf* buf)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->render_vfunc(buf);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->render)
(*base->render)(self, buf);
}
}
double Item_Class::point_vfunc_callback(GnomeCanvasItem* self, double x, double y, int cx, int cy, GnomeCanvasItem** actual_item)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
return obj->point_vfunc(x, y, cx, cy, actual_item);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->point)
return (*base->point)(self, x, y, cx, cy, actual_item);
}
typedef double RType;
return RType();
}
void Item_Class::bounds_vfunc_callback(GnomeCanvasItem* self, double* x1, double* y1, double* x2, double* y2)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->bounds_vfunc(x1, y1, x2, y2);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->bounds)
(*base->bounds)(self, x1, y1, x2, y2);
}
}
gboolean Item_Class::event_callback(GnomeCanvasItem* self, GdkEvent* p0)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->on_event(p0));
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->event)
return (*base->event)(self, p0);
}
typedef gboolean RType;
return RType();
}
Glib::ObjectBase* Item_Class::wrap_new(GObject* o)
{
return manage(new Item((GnomeCanvasItem*)(o)));
}
/* The implementation: */
Item::Item(const Glib::ConstructParams& construct_params)
:
Gtk::Object(construct_params)
{
}
Item::Item(GnomeCanvasItem* castitem)
:
Gtk::Object((GtkObject*)(castitem))
{
}
Item::~Item()
{
destroy_();
}
Item::CppClassType Item::item_class_; // initialize static member
GType Item::get_type()
{
return item_class_.init().get_type();
}
GType Item::get_base_type()
{
return gnome_canvas_item_get_type();
}
void Item::move(double dx, double dy)
{
gnome_canvas_item_move(gobj(), dx, dy);
}
void Item::raise(int positions)
{
gnome_canvas_item_raise(gobj(), positions);
}
void Item::lower(int positions)
{
gnome_canvas_item_lower(gobj(), positions);
}
void Item::raise_to_top()
{
gnome_canvas_item_raise_to_top(gobj());
}
void Item::lower_to_bottom()
{
gnome_canvas_item_lower_to_bottom(gobj());
}
void Item::ungrab(guint32 etime)
{
gnome_canvas_item_ungrab(gobj(), etime);
}
void Item::w2i(double& x, double& y)
{
gnome_canvas_item_w2i(gobj(), &(x), &(y));
}
void Item::i2w(double& x, double& y)
{
gnome_canvas_item_i2w(gobj(), &(x), &(y));
}
void Item::grab_focus()
{
gnome_canvas_item_grab_focus(gobj());
}
void Item::get_bounds(double& x1, double& y1, double& x2, double& y2) const
{
gnome_canvas_item_get_bounds(const_cast<GnomeCanvasItem*>(gobj()), &(x1), &(y1), &(x2), &(y2));
}
void Item::show()
{
gnome_canvas_item_show(gobj());
}
void Item::hide()
{
gnome_canvas_item_hide(gobj());
}
void Item::reparent(Group& new_group)
{
gnome_canvas_item_reparent(gobj(), (new_group).gobj());
}
Canvas* Item::get_canvas() const
{
return Glib::wrap(gobj()->canvas);
}
void Item::request_update()
{
gnome_canvas_item_request_update(gobj());
}
void Item::reset_bounds()
{
gnome_canvas_item_reset_bounds(gobj());
}
void Item::update_svp(ArtSVP ** p_svp, ArtSVP * new_svp)
{
gnome_canvas_item_update_svp(gobj(), p_svp, new_svp);
}
void Item::update_svp_clip(ArtSVP ** p_svp, ArtSVP * new_svp, ArtSVP * clip_svp)
{
gnome_canvas_item_update_svp_clip(gobj(), p_svp, new_svp, clip_svp);
}
void Item::request_redraw_svp(const ArtSVP* svp)
{
gnome_canvas_item_request_redraw_svp(gobj(), svp);
}
void Item::update_bbox(int x1, int y1, int x2, int y2)
{
gnome_canvas_update_bbox(gobj(), x1, y1, x2, y2);
}
Glib::SignalProxy1< bool,GdkEvent* > Item::signal_event()
{
return Glib::SignalProxy1< bool,GdkEvent* >(this, &Item_signal_event_info);
}
Glib::PropertyProxy<Group*> Item::property_parent()
{
return Glib::PropertyProxy<Group*>(this, "parent");
}
Glib::PropertyProxy_ReadOnly<Group*> Item::property_parent() const
{
return Glib::PropertyProxy_ReadOnly<Group*>(this, "parent");
}
bool Gnome::Canvas::Item::on_event(GdkEvent* p1)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->event)
return (*base->event)(gobj(),p1);
typedef bool RType;
return RType();
}
void Gnome::Canvas::Item::update_vfunc(double* affine, ArtSVP* clip_path, int flags)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->update)
(*base->update)(gobj(),affine,clip_path,flags);
}
void Gnome::Canvas::Item::realize_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->realize)
(*base->realize)(gobj());
}
void Gnome::Canvas::Item::unrealize_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->unrealize)
(*base->unrealize)(gobj());
}
void Gnome::Canvas::Item::map_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->map)
(*base->map)(gobj());
}
void Gnome::Canvas::Item::unmap_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->unmap)
(*base->unmap)(gobj());
}
ArtUta* Gnome::Canvas::Item::coverage_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->coverage)
return (*base->coverage)(gobj());
typedef ArtUta* RType;
return RType();
}
void Gnome::Canvas::Item::draw_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->draw)
(*base->draw)(gobj(),Glib::unwrap(drawable),x,y,width,height);
}
void Gnome::Canvas::Item::render_vfunc(GnomeCanvasBuf* buf)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->render)
(*base->render)(gobj(),buf);
}
double Gnome::Canvas::Item::point_vfunc(double x, double y, int cx, int cy, GnomeCanvasItem** actual_item)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->point)
return (*base->point)(gobj(),x,y,cx,cy,actual_item);
typedef double RType;
return RType();
}
void Gnome::Canvas::Item::bounds_vfunc(double* x1, double* y1, double* x2, double* y2)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->bounds)
(*base->bounds)(gobj(),x1,y1,x2,y2);
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,370 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_ITEM_H
#define _LIBGNOMECANVASMM_ITEM_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* item.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/object.h>
#include <gdkmm/cursor.h>
#include <libgnomecanvas/gnome-canvas.h>
#include <libgnomecanvasmm/point.h>
#include <libgnomecanvasmm/affinetrans.h>
#include <libgnomecanvasmm/properties.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasItem GnomeCanvasItem;
typedef struct _GnomeCanvasItemClass GnomeCanvasItemClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Item_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Canvas;
class Group;
class Item : public Gtk::Object
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Item CppObjectType;
typedef Item_Class CppClassType;
typedef GnomeCanvasItem BaseObjectType;
typedef GnomeCanvasItemClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Item();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Item_Class;
static CppClassType item_class_;
// noncopyable
Item(const Item&);
Item& operator=(const Item&);
protected:
explicit Item(const Glib::ConstructParams& construct_params);
explicit Item(GnomeCanvasItem* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasItem* gobj() { return reinterpret_cast<GnomeCanvasItem*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasItem* gobj() const { return reinterpret_cast<GnomeCanvasItem*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
virtual bool on_event(GdkEvent* p1);
private:
public:
//: Move an item by the specified amount
/** Moves a canvas item by creating an affine transformation matrix for
* translation by using the specified values. This happens in item
* local coordinate system, so if you have nontrivial transform, it
* most probably does not do, what you want.
* @param dx Horizontal offset.
* @param dy Vertical offset.
*/
void move(double dx, double dy);
//: Raise an item in the z-order of its parent group by the specified
//: number of positions. If the number is zero, then the item will
//: be made the topmost of its parent group.
/** Raises the item in its parent's stack by the specified number of positions.
* If the number of positions is greater than the distance to the top of the
* stack, then the item is put at the top.
* @param positions Number of steps to raise the item.
*/
void raise(int positions);
//: Lower an item in the z-order of its parent group by the specified
//: number of positions. If the number is zero, then the item will be
//: made the bottommost of its parent group. */
/** Lowers the item in its parent's stack by the specified number of positions.
* If the number of positions is greater than the distance to the bottom of the
* stack, then the item is put at the bottom.
* @param positions Number of steps to lower the item.
*/
void lower(int positions);
//: Raise an item to the top of its parent group's z-order.
/** Raises an item to the top of its parent's stack.
*/
void raise_to_top();
//: Lower an item to the bottom of its parent group's z-order
/** Lowers an item to the bottom of its parent's stack.
*/
void lower_to_bottom();
//: Grab the mouse for the specified item. Only the events in
//: event_mask will be reported. If cursor is non-NULL, it will be
//: used during the duration of the grab. Time is a proper X event
//: time parameter. Returns the same values as XGrabPointer().
int grab(unsigned int event_mask, const Gdk::Cursor& cursor, guint32 etime);
int grab(unsigned int event_mask, guint32 etime);
//: Ungrabs the mouse -- the specified item must be the same that was
//: passed to gnome_canvas_item_grab(). Time is a proper X event
//: time parameter.
/** Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the
* mouse.
* @param etime The timestamp for ungrabbing the mouse.
*/
void ungrab(guint32 etime);
//: These functions convert from a coordinate system to another. "w"
//: is world coordinates and "i" is item coordinates.
/** Converts a coordinate pair from world coordinates to item-relative
* coordinates.
* @param x X coordinate to convert (input/output value).
* @param y Y coordinate to convert (input/output value).
*/
void w2i(double& x, double& y);
/** Converts a coordinate pair from item-relative coordinates to world
* coordinates.
* @param x X coordinate to convert (input/output value).
* @param y Y coordinate to convert (input/output value).
*/
void i2w(double& x, double& y);
//: Used to send all of the keystroke events to a specific item as well
//: as GDK_FOCUS_CHANGE events.
/** Makes the specified item take the keyboard focus, so all keyboard events will
* be sent to it. If the canvas widget itself did not have the focus, it grabs
* it as well.
*/
void grab_focus();
//: Fetch the bounding box of the item. The bounding box may not be
//: exactly tight, but the canvas items will do the best they can.
/** Queries the bounding box of a canvas item. The bounds are returned in the
* coordinate system of the item's parent.
* @param x1 Leftmost edge of the bounding box (return value).
* @param y1 Upper edge of the bounding box (return value).
* @param x2 Rightmost edge of the bounding box (return value).
* @param y2 Lower edge of the bounding box (return value).
*/
void get_bounds(double& x1, double& y1, double& x2, double& y2) const;
//: Make the item visible
/** Shows a canvas item. If the item was already shown, then no action is taken.
*/
void show();
//: Hide the item
/** Hides a canvas item. If the item was already hidden, then no action is
* taken.
*/
void hide();
//: Apply a relative affine transformation to the item
void affine_relative(const Art::AffineTrans &affine);
//: Apply an absolute affine transformation to the item
void affine_absolute(const Art::AffineTrans &affine);
//: Gets the affine transform that converts from item-relative
//: coordinates to world coordinates
Art::AffineTrans get_i2w_affine() const;
//: Gets the affine transform that converts from item-relative
//: coordinates to canvas pixel coordinates
Art::AffineTrans get_i2c_affine() const;
/** Changes the parent of the specified item to be the new group. The item keeps
* its group-relative coordinates as for its old parent, so the item may change
* its absolute position within the canvas.
* @param new_group A canvas group.
*/
void reparent(Group& new_group);
/// Returns the canvas we're on.
Canvas* get_canvas() const;
virtual void update_vfunc(double* affine, ArtSVP* clip_path, int flags);
virtual void realize_vfunc();
virtual void unrealize_vfunc();
virtual void map_vfunc();
virtual void unmap_vfunc();
virtual ArtUta* coverage_vfunc();
virtual void draw_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height);
virtual void render_vfunc(GnomeCanvasBuf* buf);
virtual double point_vfunc(double x, double y, int cx, int cy, GnomeCanvasItem** actual_item);
virtual void bounds_vfunc(double* x1, double* y1, double* x2, double* y2);
//: Signal: an event ocurred for an item of this type. The(x, y)
//: coordinates are in the canvas world coordinate system.
Glib::SignalProxy1< bool,GdkEvent* > signal_event();
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Group*> property_parent() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Group*> property_parent() const;
protected:
//- For class children use only
void item_construct(Group& group);
//- Unsafe version - can't use a _gtk_string here, C++ doesn't like
//- classes being passed before ellipses('...') args
void item_construct(Group& group, const gchar* first_arg_name,
va_list ap);
//- Set arguments - For class children use only
void set(const gchar* first_arg_name, ...);
//: Request that the update method eventually get called. This should be used
//: only by item implementations.
/** To be used only by item implementations. Requests that the canvas queue an
* update for the specified item.
*/
void request_update();
/** Resets the bounding box of a canvas item to an empty rectangle.
*/
void reset_bounds();
/** Sets the svp to the new value, requesting repaint on what's changed. This
* function takes responsibility for freeing new_svp. This routine also adds the
* svp's bbox to the item's.
* @param p_svp A pointer to the existing svp.
* @param new_svp The new svp.
*/
void update_svp(ArtSVP **p_svp, ArtSVP *new_svp);
/** Sets the svp to the new value, clipping if necessary, and requesting repaint
* on what's changed. This function takes responsibility for freeing new_svp.
* @param p_svp A pointer to the existing svp.
* @param new_svp The new svp.
* @param clip_svp A clip path, if non-null.
*/
void update_svp_clip(ArtSVP **p_svp, ArtSVP *new_svp, ArtSVP *clip_svp);
/** Request redraw of the svp if in aa mode, or the entire item in in xlib mode.
* @param svp The svp that needs to be redrawn.
*/
void request_redraw_svp(const ArtSVP* svp);
/** Sets the bbox to the new value, requesting full repaint.
* @param item The canvas item needing update.
* @param x1 Left coordinate of the new bounding box.
* @param y1 Top coordinate of the new bounding box.
* @param x2 Right coordinate of the new bounding box.
* @param y2 Bottom coordinate of the new bounding box.
*/
void update_bbox(int x1, int y1, int x2, int y2);
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Item
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Item* wrap(GnomeCanvasItem* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_ITEM_H */

View file

@ -1,390 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/line.h>
#include <libgnomecanvasmm/private/line_p.h>
/* $Id$ */
/* line.ccg
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
//#include <libgnomecanvasmm/group.h>
namespace Gnome
{
namespace Canvas
{
Points::Points(size_type nbpoints)
: std::vector<Art::Point>(nbpoints), points_(0), owned_(false)
{}
Points::Points(GnomeCanvasPoints *castitem)
: points_(castitem),owned_(false)
{
while (size() < points_->num_points) {
push_back (Art::Point());
}
//GnomeCanvasPoints has an array of doubles, used 2 at a time:
int i = 0;
for(iterator it = begin(); i < points_->num_points; i += 2, ++it)
{
(*it).set_x(points_->coords[i]);
(*it).set_y(points_->coords[i+1]);
}
}
Points::~Points()
{
if (owned_ && points_)
gnome_canvas_points_free(points_);
}
Points::operator bool() const
{
return (!is_null());
}
bool Points::is_null() const
{
return size() == 0;
}
GnomeCanvasPoints* Points::_gobj() const
{
int i = 0;
if(!points_)
{
points_ = gnome_canvas_points_new(size());
owned_ = true;
}
else if(size() != static_cast<unsigned int>(points_->num_points))
{
if (owned_)
gnome_canvas_points_free(points_);
points_ = gnome_canvas_points_new(size());
owned_ = true;
}
for(const_iterator it = begin(); it != end(); ++it, i+=2)
{
points_->coords[i] = (*it).get_x();
points_->coords[i+1] = (*it).get_y();
}
return points_;
}
Line::Line(Group& parentx)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
{
item_construct(parentx);
}
Line::Line(Group& parentx, const Points& points)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
{
item_construct(parentx);
property_points().set_value(points);
}
} /* namespace Canvas */
} /* namespace Gnome */
// static
GType Glib::Value<Gnome::Canvas::Points>::value_type()
{
return Gnome::Canvas::Points::get_type();
}
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Line *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Line_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Line_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_line_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Line_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Line_Class::wrap_new(GObject* o)
{
return manage(new Line((GnomeCanvasLine*)(o)));
}
/* The implementation: */
Line::Line(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
Line::Line(GnomeCanvasLine* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
Line::~Line()
{
destroy_();
}
Line::CppClassType Line::line_class_; // initialize static member
GType Line::get_type()
{
return line_class_.init().get_type();
}
GType Line::get_base_type()
{
return gnome_canvas_line_get_type();
}
Glib::PropertyProxy<Points> Line::property_points()
{
return Glib::PropertyProxy<Points>(this, "points");
}
Glib::PropertyProxy_ReadOnly<Points> Line::property_points() const
{
return Glib::PropertyProxy_ReadOnly<Points>(this, "points");
}
Glib::PropertyProxy<Glib::ustring> Line::property_fill_color()
{
return Glib::PropertyProxy<Glib::ustring>(this, "fill-color");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Line::property_fill_color() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
}
Glib::PropertyProxy<Gdk::Color> Line::property_fill_color_gdk()
{
return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
}
Glib::PropertyProxy_ReadOnly<Gdk::Color> Line::property_fill_color_gdk() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
}
Glib::PropertyProxy<guint> Line::property_fill_color_rgba()
{
return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
}
Glib::PropertyProxy_ReadOnly<guint> Line::property_fill_color_rgba() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
}
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Line::property_fill_stipple()
{
return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
}
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Line::property_fill_stipple() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
}
Glib::PropertyProxy<guint> Line::property_width_pixels()
{
return Glib::PropertyProxy<guint>(this, "width-pixels");
}
Glib::PropertyProxy_ReadOnly<guint> Line::property_width_pixels() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "width-pixels");
}
Glib::PropertyProxy<double> Line::property_width_units()
{
return Glib::PropertyProxy<double>(this, "width-units");
}
Glib::PropertyProxy_ReadOnly<double> Line::property_width_units() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "width-units");
}
Glib::PropertyProxy<Gdk::CapStyle> Line::property_cap_style()
{
return Glib::PropertyProxy<Gdk::CapStyle>(this, "cap-style");
}
Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> Line::property_cap_style() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::CapStyle>(this, "cap-style");
}
Glib::PropertyProxy<Gdk::JoinStyle> Line::property_join_style()
{
return Glib::PropertyProxy<Gdk::JoinStyle>(this, "join-style");
}
Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> Line::property_join_style() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle>(this, "join-style");
}
Glib::PropertyProxy<Gdk::LineStyle> Line::property_line_style()
{
return Glib::PropertyProxy<Gdk::LineStyle>(this, "line-style");
}
Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> Line::property_line_style() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::LineStyle>(this, "line-style");
}
Glib::PropertyProxy<bool> Line::property_first_arrowhead()
{
return Glib::PropertyProxy<bool>(this, "first-arrowhead");
}
Glib::PropertyProxy_ReadOnly<bool> Line::property_first_arrowhead() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "first-arrowhead");
}
Glib::PropertyProxy<bool> Line::property_last_arrowhead()
{
return Glib::PropertyProxy<bool>(this, "last-arrowhead");
}
Glib::PropertyProxy_ReadOnly<bool> Line::property_last_arrowhead() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "last-arrowhead");
}
Glib::PropertyProxy<bool> Line::property_smooth()
{
return Glib::PropertyProxy<bool>(this, "smooth");
}
Glib::PropertyProxy_ReadOnly<bool> Line::property_smooth() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "smooth");
}
Glib::PropertyProxy<guint> Line::property_spline_steps()
{
return Glib::PropertyProxy<guint>(this, "spline-steps");
}
Glib::PropertyProxy_ReadOnly<guint> Line::property_spline_steps() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "spline-steps");
}
Glib::PropertyProxy<double> Line::property_arrow_shape_a()
{
return Glib::PropertyProxy<double>(this, "arrow-shape-a");
}
Glib::PropertyProxy_ReadOnly<double> Line::property_arrow_shape_a() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "arrow-shape-a");
}
Glib::PropertyProxy<double> Line::property_arrow_shape_b()
{
return Glib::PropertyProxy<double>(this, "arrow-shape-b");
}
Glib::PropertyProxy_ReadOnly<double> Line::property_arrow_shape_b() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "arrow-shape-b");
}
Glib::PropertyProxy<double> Line::property_arrow_shape_c()
{
return Glib::PropertyProxy<double>(this, "arrow-shape-c");
}
Glib::PropertyProxy_ReadOnly<double> Line::property_arrow_shape_c() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "arrow-shape-c");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,461 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_LINE_H
#define _LIBGNOMECANVASMM_LINE_H
#include <glibmm.h>
/* $Id$ */
/* line.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvas/gnome-canvas-line.h>
#include <libgnomecanvas/gnome-canvas-util.h>
#include <libgnomecanvas/libgnomecanvas.h>
#include <vector>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasLine GnomeCanvasLine;
typedef struct _GnomeCanvasLineClass GnomeCanvasLineClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Line_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class GnomeGroup;
// Sample use of Gnome_CanvasPoints :
// Gnome_CanvasPoints points;
//
// points.push_back(Art::Point(0, 0));
// points.push_back(Art::Point(100,0));
// points.push_back(Art::Point(0,100));
// points.push_back(Art::Point(100,100));
//
// line = new Gnome_CanvasLine(&m_canvasgroup,points);
//using std::vector;
/** Wrapper for GnomeCanvasPoints.
* GnomeCanvasPoints is actually a BoxedType,
* but this acts in a similar way, with the advantage of acting like a std::vector.
*/
class Points : public std::vector<Art::Point>
{
public:
Points(size_type nbpoints = 0);
explicit Points(GnomeCanvasPoints* castitem);
~Points();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef GnomeCanvasPoints BaseObjectType; //So that this works with tempaltes that are intended for normal BoxedTypes.
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
operator bool() const;
bool is_null() const;
const GnomeCanvasPoints* gobj() const { return _gobj(); }
GnomeCanvasPoints* gobj() { return _gobj(); }
static GType get_type () { return GNOME_TYPE_CANVAS_POINTS; }
protected:
GnomeCanvasPoints* _gobj() const;
mutable GnomeCanvasPoints* points_;
mutable bool owned_;
};
class Line : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Line CppObjectType;
typedef Line_Class CppClassType;
typedef GnomeCanvasLine BaseObjectType;
typedef GnomeCanvasLineClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Line();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Line_Class;
static CppClassType line_class_;
// noncopyable
Line(const Line&);
Line& operator=(const Line&);
protected:
explicit Line(const Glib::ConstructParams& construct_params);
explicit Line(GnomeCanvasLine* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasLine* gobj() { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasLine* gobj() const { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
explicit Line(Group& parent);
Line(Group& parent, const Points& points);
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Points> property_points() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Points> property_points() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_fill_color_rgba() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_width_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_width_units() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::LineStyle> property_line_style() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> property_line_style() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_first_arrowhead() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_first_arrowhead() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_last_arrowhead() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_last_arrowhead() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_smooth() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_smooth() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_spline_steps() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_spline_steps() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_arrow_shape_a() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_a() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_arrow_shape_b() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_b() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_arrow_shape_c() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_c() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<Gnome::Canvas::Points> : public Value_Boxed<Gnome::Canvas::Points>
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Glib
{
/** @relates Gnome::Canvas::Line
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_LINE_H */

View file

@ -1,249 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/path-def.h>
#include <libgnomecanvasmm/private/path-def_p.h>
/* path-def.cc
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Gnome::Art::Point PathDef::currentpoint() const
{
Gnome::Art::Point point;
gnome_canvas_path_def_currentpoint(gobj(), point.gobj());
return point;
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
/* Why reinterpret_cast<PathDef*>(gobject) is needed:
*
* A PathDef instance is in fact always a GnomeCanvasPathDef instance.
* Unfortunately, GnomeCanvasPathDef cannot be a member of PathDef,
* because it is an opaque struct. Also, the C interface does not provide
* any hooks to install a destroy notification handler, thus we cannot
* wrap it dynamically either.
*
* The cast works because PathDef does not have any member data, and
* it is impossible to derive from it. This is ensured by not implementing
* the (protected) default constructor. The ctor is protected rather than
* private just to avoid a compile warning.
*/
namespace Glib
{
Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy)
{
if(take_copy && object)
gnome_canvas_path_def_duplicate(object);
// See the comment at the top of this file, if you want to know why the cast works.
return Glib::RefPtr<Gnome::Canvas::PathDef>(reinterpret_cast<Gnome::Canvas::PathDef*>(object));
}
} // namespace Glib
namespace Gnome
{
namespace Canvas
{
// static
Glib::RefPtr<PathDef> PathDef::create()
{
// See the comment at the top of this file, if you want to know why the cast works.
return Glib::RefPtr<PathDef>(reinterpret_cast<PathDef*>(gnome_canvas_path_def_new()));
}
void PathDef::reference() const
{
// See the comment at the top of this file, if you want to know why the cast works.
gnome_canvas_path_def_duplicate(reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this)));
}
void PathDef::unreference() const
{
// See the comment at the top of this file, if you want to know why the cast works.
gnome_canvas_path_def_unref(reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this)));
}
GnomeCanvasPathDef* PathDef::gobj()
{
// See the comment at the top of this file, if you want to know why the cast works.
return reinterpret_cast<GnomeCanvasPathDef*>(this);
}
const GnomeCanvasPathDef* PathDef::gobj() const
{
// See the comment at the top of this file, if you want to know why the cast works.
return reinterpret_cast<const GnomeCanvasPathDef*>(this);
}
GnomeCanvasPathDef* PathDef::gobj_copy() const
{
// See the comment at the top of this file, if you want to know why the cast works.
GnomeCanvasPathDef *const gobject = reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this));
gnome_canvas_path_def_duplicate(gobject);
return gobject;
}
Glib::RefPtr<PathDef> PathDef::create(int length)
{
return Glib::wrap(gnome_canvas_path_def_new_sized(length));
}
Glib::RefPtr<PathDef> PathDef::create(ArtBpath& bpath)
{
return Glib::wrap(gnome_canvas_path_def_new_from_bpath(&(bpath)));
}
Glib::RefPtr<PathDef> PathDef::open_parts()
{
return Glib::wrap(gnome_canvas_path_def_open_parts(gobj()));
}
Glib::RefPtr<PathDef> PathDef::closed_parts()
{
return Glib::wrap(gnome_canvas_path_def_closed_parts(gobj()));
}
Glib::RefPtr<PathDef> PathDef::close_all()
{
return Glib::wrap(gnome_canvas_path_def_close_all(gobj()));
}
void PathDef::finish()
{
gnome_canvas_path_def_finish(gobj());
}
void PathDef::ensure_space(int space)
{
gnome_canvas_path_def_ensure_space(gobj(), space);
}
void PathDef::reset()
{
gnome_canvas_path_def_reset(gobj());
}
void PathDef::moveto(double x, double y)
{
gnome_canvas_path_def_moveto(gobj(), x, y);
}
void PathDef::lineto(double x, double y)
{
gnome_canvas_path_def_lineto(gobj(), x, y);
}
void PathDef::lineto_moving(double x, double y)
{
gnome_canvas_path_def_lineto_moving(gobj(), x, y);
}
void PathDef::curveto(double x1, double y1, double x2, double y2, double x3, double y3)
{
gnome_canvas_path_def_curveto(gobj(), x1, y1, x2, y2, x3, y3);
}
void PathDef::closepath()
{
gnome_canvas_path_def_closepath(gobj());
}
void PathDef::closepath_current()
{
gnome_canvas_path_def_closepath_current(gobj());
}
ArtBpath* PathDef::get_bpath() const
{
return gnome_canvas_path_def_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
}
ArtBpath* PathDef::first_bpath() const
{
return gnome_canvas_path_def_first_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
}
ArtBpath* PathDef::last_bpath() const
{
return gnome_canvas_path_def_last_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
}
bool PathDef::is_empty() const
{
return gnome_canvas_path_def_is_empty(const_cast<GnomeCanvasPathDef*>(gobj()));
}
int PathDef::length() const
{
return gnome_canvas_path_def_length(const_cast<GnomeCanvasPathDef*>(gobj()));
}
bool PathDef::has_currentpoint() const
{
return gnome_canvas_path_def_has_currentpoint(const_cast<GnomeCanvasPathDef*>(gobj()));
}
bool PathDef::any_open() const
{
return gnome_canvas_path_def_any_open(const_cast<GnomeCanvasPathDef*>(gobj()));
}
bool PathDef::all_open() const
{
return gnome_canvas_path_def_all_open(const_cast<GnomeCanvasPathDef*>(gobj()));
}
bool PathDef::any_closed() const
{
return gnome_canvas_path_def_any_closed(const_cast<GnomeCanvasPathDef*>(gobj()));
}
bool PathDef::all_closed() const
{
return gnome_canvas_path_def_all_closed(const_cast<GnomeCanvasPathDef*>(gobj()));
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,284 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_PATH_DEF_H
#define _LIBGNOMECANVASMM_PATH_DEF_H
#include <glibmm.h>
/* $Id$ */
/* path-def.h
*
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/point.h>
#include <glibmm/containers.h>
#include <libgnomecanvas/gnome-canvas-path-def.h>
#include <libart_lgpl/art_bpath.h>
#include <libart_lgpl/art_point.h>
#include <libart_lgpl/art_bpath.h>
namespace Gnome
{
namespace Canvas
{
class PathDef
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef PathDef CppObjectType;
typedef GnomeCanvasPathDef BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
static Glib::RefPtr<PathDef> create();
// For use with Glib::RefPtr<> only.
void reference() const;
void unreference() const;
///Provides access to the underlying C instance.
GnomeCanvasPathDef* gobj();
///Provides access to the underlying C instance.
const GnomeCanvasPathDef* gobj() const;
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GnomeCanvasPathDef* gobj_copy() const;
protected:
// Do not derive this. Gnome::Canvas::PathDef can neither be constructed nor deleted.
PathDef();
void operator delete(void*, size_t);
private:
// noncopyable
PathDef(const PathDef&);
PathDef& operator=(const PathDef&);
public:
//gtkmmproc error: gnome_canvas_path_def_new : method defs lookup failed (1)
/** This funtion creates a new #gnome_canvas_path_def with @a length
* number of points allocated. It is useful, if you know the exact
* number of points in path, so you can avoid automatic point
* array reallocation.
* @param length Number of points to allocate for the path.
* @return The new canvas path definition.
*/
static Glib::RefPtr<PathDef> create(int length);
/** This function constructs a new #gnome_canvas_path_def and uses the
* passed @a bpath as the contents. The passed bpath should not be
* static as the path definition is editable when constructed with
* this function. Also, passed bpath will be freed with art_free, if
* path is destroyed, so use it with caution.
* For constructing a #gnome_canvas_path_def
* from (non-modifiable) bpath use
* #gnome_canvas_path_def_new_from_static_bpath.
* @param bpath Libart bezier path.
* @return The new canvas path definition that is populated with the
* passed bezier path, if the @a bpath is bad <tt>0</tt> is returned.
*/
static Glib::RefPtr<PathDef> create(ArtBpath& bpath);
//GnomeCanvasPathDef * gnome_canvas_path_def_new_from_static_bpath (ArtBpath * bpath);
//GnomeCanvasPathDef * gnome_canvas_path_def_new_from_foreign_bpath (ArtBpath * bpath);
//GnomeCanvasPathDef * gnome_canvas_path_def_concat (const GSList * list);
//GSList * gnome_canvas_path_def_split (const GnomeCanvasPathDef * path);
/** This function creates a new GnomeCanvasPathDef that contains all of
* the open segments on the passed @a path .
* @return A new GnomeCanvasPathDef that contains all of the open segemtns in @a path .
*/
Glib::RefPtr<PathDef> open_parts();
/** This function returns a new GnomeCanvasPathDef that contains the
* all of close parts of passed @a path .
* @return A new GnomeCanvasPathDef that contains all of the closed
* parts of passed @a path .
*/
Glib::RefPtr<PathDef> closed_parts();
/** This function closes all of the open segments in the passed path
* and returns a new GnomeCanvasPathDef.
* @return A GnomeCanvasPathDef that contains the contents of @a path
* but has modified the path is fully closed.
*/
Glib::RefPtr<PathDef> close_all();
/** Trims dynamic point array to exact length of path.
*/
void finish();
/** This function ensures that enough space for @a space points is
* allocated at the end of the path.
* @param space Number of points to guarantee are allocated at the end of
* the path.
*/
void ensure_space(int space);
/** This function clears the contents of the passed @a path .
*/
void reset();
/** This function adds starts new subpath on @a path , and sets its
* starting point to @a x and @a y . If current subpath is empty, it
* simply changes its starting coordinates to new values.
* @param x X coordinate.
* @param y Y coordinate.
*/
void moveto(double x, double y);
/** This function add a line segment to the passed @a path with the
* specified @a x and @a y coordinates.
* @param x X coordinate.
* @param y Y coordinate.
*/
void lineto(double x, double y);
/** This functions adds a new line segment with loose endpoint to the path, or
* if endpoint is already loose, changes its coordinates to @a x , @a y . You
* can change the coordinates of loose endpoint as many times as you want,
* the last ones set will be fixed, if you continue line. This is useful
* for handling drawing with mouse.
* @param x X coordinate.
* @param y Y coordinate.
*/
void lineto_moving(double x, double y);
/** This function adds a bezier curve segment to the path definition.
* @param x0 First control point x coordinate.
* @param y0 First control point y coordinate.
* @param x1 Second control point x coordinate.
* @param y1 Second control point y coordinate.
* @param x2 End of curve x coordinate.
* @param y2 End of curve y coordinate.
*/
void curveto(double x1, double y1, double x2, double y2, double x3, double y3);
/** This function closes the last subpath of @a path , adding a ART_LINETO to
* subpath starting point, if needed and changing starting pathcode to
* ART_MOVETO
*/
void closepath();
/** This function closes the last subpath by setting the coordinates of
* the endpoint of the last segment (line or curve) to starting point.
*/
void closepath_current();
Gnome::Art::Point currentpoint() const;
/** This function returns a ArtBpath that consists of the path
* definition.
* @return ArtBpath.
*/
ArtBpath* get_bpath() const;
/** This function returns the first ArtBpath point in the definition.
* @return ArtBpath being the first point in the path definition or
* null if no points are defined.
*/
ArtBpath* first_bpath() const;
/** This function returns pointer to the last ArtBpath segment in the path
* definition.
* @return ArtBpath, being the last segment in the path definition or
* null if no line segments have been defined.
*/
ArtBpath* last_bpath() const;
/** This function is a boolean test to see if the path is empty,
* meaning containing no line segments.
* @return Boolean, indicating if the path is empty.
*/
bool is_empty() const;
/** This function returns the length of the path definition. Not
* Euclidian length of the path but rather the number of points on the
* path.
* @return Integer, number of points on the path.
*/
int length() const;
/** This function is a boolean test checking to see if the path has a
* current point defined. Current point will be set by line operators,
* and cleared by closing subpath.
* @return Boolean, indicating if the path has a current point defined.
*/
bool has_currentpoint() const;
/** This function returns a boolean value indicating if the path has
* any open segments.
* @return Boolean, indicating if the path has any open segments.
*/
bool any_open() const;
/** This function returns a boolean value indicating if the path only
* contains open segments.
* @return Boolean, indicating if the path has all open segments.
*/
bool all_open() const;
/** This function returns a boolean valid indicating if the path has
* any closed segements.
* @return Boolean, indicating if the path has any closed segments.
*/
bool any_closed() const;
/** This function returns a boolean value indicating if the path only
* contains closed segments.
* @return Boolean, indicating if the path has all closed segments.
*/
bool all_closed() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::PathDef
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy = false);
} // namespace Glib
#endif /* _LIBGNOMECANVASMM_PATH_DEF_H */

View file

@ -1,277 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/pixbuf.h>
#include <libgnomecanvasmm/private/pixbuf_p.h>
/* $Id$ */
/* pixbuf.cc
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Pixbuf::Pixbuf (Group& parent,
double x, double y,
const Glib::RefPtr<Gdk::Pixbuf>& image)
: Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
{
item_construct (parent);
set ("x", x,
"y", y,
"pixbuf", image->gobj (),
"width", (double) gdk_pixbuf_get_width (image->gobj ()),
"height", (double) gdk_pixbuf_get_height (image->gobj ()),
NULL);
}
Pixbuf::Pixbuf (Group& parent)
: Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
{
item_construct (parent);
}
}
}
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Pixbuf* wrap(GnomeCanvasPixbuf* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Pixbuf *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Pixbuf_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Pixbuf_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_pixbuf_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Pixbuf_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Pixbuf_Class::wrap_new(GObject* o)
{
return manage(new Pixbuf((GnomeCanvasPixbuf*)(o)));
}
/* The implementation: */
Pixbuf::Pixbuf(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
Pixbuf::Pixbuf(GnomeCanvasPixbuf* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
Pixbuf::~Pixbuf()
{
destroy_();
}
Pixbuf::CppClassType Pixbuf::pixbuf_class_; // initialize static member
GType Pixbuf::get_type()
{
return pixbuf_class_.init().get_type();
}
GType Pixbuf::get_base_type()
{
return gnome_canvas_pixbuf_get_type();
}
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf()
{
return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
}
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
}
Glib::PropertyProxy<double> Pixbuf::property_width()
{
return Glib::PropertyProxy<double>(this, "width");
}
Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_width() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "width");
}
Glib::PropertyProxy<bool> Pixbuf::property_width_set()
{
return Glib::PropertyProxy<bool>(this, "width-set");
}
Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "width-set");
}
Glib::PropertyProxy<bool> Pixbuf::property_width_in_pixels()
{
return Glib::PropertyProxy<bool>(this, "width-in-pixels");
}
Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_in_pixels() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "width-in-pixels");
}
Glib::PropertyProxy<double> Pixbuf::property_height()
{
return Glib::PropertyProxy<double>(this, "height");
}
Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_height() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "height");
}
Glib::PropertyProxy<bool> Pixbuf::property_height_set()
{
return Glib::PropertyProxy<bool>(this, "height-set");
}
Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "height-set");
}
Glib::PropertyProxy<bool> Pixbuf::property_height_in_pixels()
{
return Glib::PropertyProxy<bool>(this, "height-in-pixels");
}
Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_in_pixels() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "height-in-pixels");
}
Glib::PropertyProxy<double> Pixbuf::property_x()
{
return Glib::PropertyProxy<double>(this, "x");
}
Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_x() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x");
}
Glib::PropertyProxy<bool> Pixbuf::property_x_in_pixels()
{
return Glib::PropertyProxy<bool>(this, "x-in-pixels");
}
Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_x_in_pixels() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "x-in-pixels");
}
Glib::PropertyProxy<double> Pixbuf::property_y()
{
return Glib::PropertyProxy<double>(this, "y");
}
Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_y() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y");
}
Glib::PropertyProxy<bool> Pixbuf::property_y_in_pixels()
{
return Glib::PropertyProxy<bool>(this, "y-in-pixels");
}
Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_y_in_pixels() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "y-in-pixels");
}
Glib::PropertyProxy<Gtk::AnchorType> Pixbuf::property_anchor()
{
return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Pixbuf::property_anchor() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,321 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_PIXBUF_H
#define _LIBGNOMECANVASMM_PIXBUF_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* pixbuf.h
*
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gdkmm/pixbuf.h>
#include <gtkmm/enums.h>
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvas/gnome-canvas-pixbuf.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasPixbuf GnomeCanvasPixbuf;
typedef struct _GnomeCanvasPixbufClass GnomeCanvasPixbufClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Pixbuf_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Pixbuf : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Pixbuf CppObjectType;
typedef Pixbuf_Class CppClassType;
typedef GnomeCanvasPixbuf BaseObjectType;
typedef GnomeCanvasPixbufClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Pixbuf();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Pixbuf_Class;
static CppClassType pixbuf_class_;
// noncopyable
Pixbuf(const Pixbuf&);
Pixbuf& operator=(const Pixbuf&);
protected:
explicit Pixbuf(const Glib::ConstructParams& construct_params);
explicit Pixbuf(GnomeCanvasPixbuf* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasPixbuf* gobj() { return reinterpret_cast<GnomeCanvasPixbuf*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasPixbuf* gobj() const { return reinterpret_cast<GnomeCanvasPixbuf*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
Pixbuf(Group& parent, double x, double y, const Glib::RefPtr<Gdk::Pixbuf>& image);
explicit Pixbuf(Group& parent);
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_width() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_width() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_width_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_width_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_width_in_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_width_in_pixels() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_height() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_height() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_height_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_height_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_height_in_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_height_in_pixels() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_x_in_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_x_in_pixels() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_y_in_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_y_in_pixels() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Pixbuf
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Pixbuf* wrap(GnomeCanvasPixbuf* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_PIXBUF_H */

View file

@ -1,117 +0,0 @@
/* point.cc
*
* Copyright (C) 1999 The gnomemm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/point.h>
namespace Gnome
{
namespace Art
{
Point::Point(const ArtPoint& artpoint)
{
m_ArtPoint = artpoint;
}
Point::Point(gdouble x /* = 0.0 */, gdouble y /* = 0.0 */)
{
m_ArtPoint.x = x;
m_ArtPoint.y = y;
}
Point::Point(const Point& src)
{
operator=(src);
}
Point& Point::operator=(const Point& src)
{
m_ArtPoint = src.m_ArtPoint;
return *this;
}
Point::~Point()
{
}
gdouble Point::get_x() const
{
return m_ArtPoint.x;
}
void Point::set_x(gdouble x)
{
m_ArtPoint.x = x;
}
gdouble Point::get_y() const
{
return m_ArtPoint.y;
}
void Point::set_y(gdouble y)
{
m_ArtPoint.y = y;
}
Point Point::operator+(const Point& p2)
{
return Point(get_x() + p2.get_x(), get_y() + p2.get_y());
}
Point Point::operator-(const Point& p2)
{
return Point(get_x() - p2.get_x(), get_y() - p2.get_y());
}
Point const & Point::operator+=(const Point& other)
{
set_x(get_x() + other.get_x());
set_y(get_y() + other.get_y());
return *this;
}
Point const & Point::operator-=(const Point& other)
{
set_x(get_x() - other.get_x());
set_y(get_y() - other.get_y());
return *this;
}
ArtPoint* Point::gobj()
{
return &m_ArtPoint;
}
const ArtPoint* Point::gobj() const
{
return &m_ArtPoint;
}
} //namespace Art
} //namespace Gnome
std::ostream& operator<<(std::ostream& out, const Gnome::Art::Point& p)
{
return out << '(' << p.get_x() << ", " << p.get_y() << ')';
}

View file

@ -1,74 +0,0 @@
#ifndef _LIBGNOMECANVASMM_POINT_H
#define _LIBGNOMECANVASMM_POINT_H
// -*- C++ -*-
/* $Id$ */
/* point.h
*
* Copyright (C) 1999 The gnomemm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvas/gnome-canvas.h>
//#include <libgnomecanvasmm/types.h>
#include <iostream>
namespace Gnome
{
namespace Art
{
/** Wrapper for ArtPoint struct.
* Used by AffineTrans and CanvasPoints.
*/
class Point
{
public:
Point(gdouble x = 0.0, gdouble y = 0.0);
Point(const ArtPoint& artpoint);
Point(const Point& src);
Point& operator=(const Point& src);
~Point();
gdouble get_x() const;
void set_x(gdouble x);
gdouble get_y() const;
void set_y(gdouble y);
Point operator+(const Point& p2);
Point operator-(const Point& p2);
Point const & operator+=(const Point& other);
Point const & operator-=(const Point& other);
ArtPoint* gobj();
const ArtPoint* gobj() const;
protected:
//GnomeCanvasPoints uses arrays of double, 2 at a time, which is the same as a set of ArtPoints
//because an ArtPoint struct only has 2 double members.
ArtPoint m_ArtPoint;
};
} //namespace Art
} //namespace Gnome
std::ostream& operator<<(std::ostream& out, const Gnome::Art::Point& p);
#endif /* _LIBGNOMECANVASMM_POINT_H */

View file

@ -1,156 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/polygon.h>
#include <libgnomecanvasmm/private/polygon_p.h>
/* $Id$ */
/* polygon.ccg
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Polygon::Polygon(Group& parent,const Points& points)
: Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
{
item_construct(parent);
property_points().set_value(points);
}
Polygon::Polygon(Group& parent)
: Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
{
item_construct(parent);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Polygon* wrap(GnomeCanvasPolygon* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Polygon *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Polygon_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Polygon_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_polygon_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Polygon_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Polygon_Class::wrap_new(GObject* o)
{
return manage(new Polygon((GnomeCanvasPolygon*)(o)));
}
/* The implementation: */
Polygon::Polygon(const Glib::ConstructParams& construct_params)
:
Shape(construct_params)
{
}
Polygon::Polygon(GnomeCanvasPolygon* castitem)
:
Shape((GnomeCanvasShape*)(castitem))
{
}
Polygon::~Polygon()
{
destroy_();
}
Polygon::CppClassType Polygon::polygon_class_; // initialize static member
GType Polygon::get_type()
{
return polygon_class_.init().get_type();
}
GType Polygon::get_base_type()
{
return gnome_canvas_polygon_get_type();
}
Glib::PropertyProxy<Points> Polygon::property_points()
{
return Glib::PropertyProxy<Points>(this, "points");
}
Glib::PropertyProxy_ReadOnly<Points> Polygon::property_points() const
{
return Glib::PropertyProxy_ReadOnly<Points>(this, "points");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,144 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_POLYGON_H
#define _LIBGNOMECANVASMM_POLYGON_H
#include <glibmm.h>
/* $Id$ */
/* polygon.hg
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/shape.h>
#include <libgnomecanvasmm/line.h>
#include <libgnomecanvas/gnome-canvas-polygon.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasPolygon GnomeCanvasPolygon;
typedef struct _GnomeCanvasPolygonClass GnomeCanvasPolygonClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Polygon_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Polygon : public Shape
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Polygon CppObjectType;
typedef Polygon_Class CppClassType;
typedef GnomeCanvasPolygon BaseObjectType;
typedef GnomeCanvasPolygonClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Polygon();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Polygon_Class;
static CppClassType polygon_class_;
// noncopyable
Polygon(const Polygon&);
Polygon& operator=(const Polygon&);
protected:
explicit Polygon(const Glib::ConstructParams& construct_params);
explicit Polygon(GnomeCanvasPolygon* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasPolygon* gobj() { return reinterpret_cast<GnomeCanvasPolygon*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasPolygon* gobj() const { return reinterpret_cast<GnomeCanvasPolygon*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
Polygon(Group& parent, const Points& points);
explicit Polygon(Group& parent);
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Points> property_points() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Points> property_points() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Polygon
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Polygon* wrap(GnomeCanvasPolygon* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_POLYGON_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_BPATH_P_H
#define _LIBGNOMECANVASMM_BPATH_P_H
#include <libgnomecanvasmm/private/shape_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Bpath_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Bpath CppObjectType;
typedef GnomeCanvasBpath BaseObjectType;
typedef GnomeCanvasBpathClass BaseClassType;
typedef Shape_Class CppClassParent;
typedef GnomeCanvasShapeClass BaseClassParent;
friend class Bpath;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_BPATH_P_H */

View file

@ -1,52 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_CANVAS_P_H
#define _LIBGNOMECANVASMM_CANVAS_P_H
#include <gtkmm/private/layout_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Canvas_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Canvas CppObjectType;
typedef GnomeCanvas BaseObjectType;
typedef GnomeCanvasClass BaseClassType;
typedef Gtk::Layout_Class CppClassParent;
typedef GtkLayoutClass BaseClassParent;
friend class Canvas;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
static void draw_background_callback(GnomeCanvas* self, GdkDrawable* p0, gint p1, gint p2, gint p3, gint p4);
static void render_background_callback(GnomeCanvas* self, GnomeCanvasBuf* p0);
//Callbacks (virtual functions):
static void request_update_vfunc_callback(GnomeCanvas* self);
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_CANVAS_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_ELLIPSE_P_H
#define _LIBGNOMECANVASMM_ELLIPSE_P_H
#include <libgnomecanvasmm/private/rect-ellipse_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Ellipse_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Ellipse CppObjectType;
typedef GnomeCanvasEllipse BaseObjectType;
typedef GnomeCanvasEllipseClass BaseClassType;
typedef RectEllipse_Class CppClassParent;
typedef GnomeCanvasREClass BaseClassParent;
friend class Ellipse;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_ELLIPSE_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_GROUP_P_H
#define _LIBGNOMECANVASMM_GROUP_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Group_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Group CppObjectType;
typedef GnomeCanvasGroup BaseObjectType;
typedef GnomeCanvasGroupClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class Group;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_GROUP_P_H */

View file

@ -1,60 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_ITEM_P_H
#define _LIBGNOMECANVASMM_ITEM_P_H
#include <gtkmm/private/object_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Item_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Item CppObjectType;
typedef GnomeCanvasItem BaseObjectType;
typedef GnomeCanvasItemClass BaseClassType;
typedef Gtk::Object_Class CppClassParent;
typedef GtkObjectClass BaseClassParent;
friend class Item;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
static gboolean event_callback(GnomeCanvasItem* self, GdkEvent* p0);
//Callbacks (virtual functions):
static void update_vfunc_callback(GnomeCanvasItem* self, double* affine, ArtSVP* clip_path, int flags);
static void realize_vfunc_callback(GnomeCanvasItem* self);
static void unrealize_vfunc_callback(GnomeCanvasItem* self);
static void map_vfunc_callback(GnomeCanvasItem* self);
static void unmap_vfunc_callback(GnomeCanvasItem* self);
static ArtUta* coverage_vfunc_callback(GnomeCanvasItem* self);
static void draw_vfunc_callback(GnomeCanvasItem* self, GdkDrawable* drawable, int x, int y, int width, int height);
static void render_vfunc_callback(GnomeCanvasItem* self, GnomeCanvasBuf* buf);
static double point_vfunc_callback(GnomeCanvasItem* self, double x, double y, int cx, int cy, GnomeCanvasItem** actual_item);
static void bounds_vfunc_callback(GnomeCanvasItem* self, double* x1, double* y1, double* x2, double* y2);
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_ITEM_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_LINE_P_H
#define _LIBGNOMECANVASMM_LINE_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Line_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Line CppObjectType;
typedef GnomeCanvasLine BaseObjectType;
typedef GnomeCanvasLineClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class Line;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_LINE_P_H */

View file

@ -1,6 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_PATH_DEF_P_H
#define _LIBGNOMECANVASMM_PATH_DEF_P_H
#endif /* _LIBGNOMECANVASMM_PATH_DEF_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_PIXBUF_P_H
#define _LIBGNOMECANVASMM_PIXBUF_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Pixbuf_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Pixbuf CppObjectType;
typedef GnomeCanvasPixbuf BaseObjectType;
typedef GnomeCanvasPixbufClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class Pixbuf;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_PIXBUF_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_POLYGON_P_H
#define _LIBGNOMECANVASMM_POLYGON_P_H
#include <libgnomecanvasmm/private/shape_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Polygon_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Polygon CppObjectType;
typedef GnomeCanvasPolygon BaseObjectType;
typedef GnomeCanvasPolygonClass BaseClassType;
typedef Shape_Class CppClassParent;
typedef GnomeCanvasShapeClass BaseClassParent;
friend class Polygon;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_POLYGON_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_RECT_ELLIPSE_P_H
#define _LIBGNOMECANVASMM_RECT_ELLIPSE_P_H
#include <libgnomecanvasmm/private/shape_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class RectEllipse_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef RectEllipse CppObjectType;
typedef GnomeCanvasRE BaseObjectType;
typedef GnomeCanvasREClass BaseClassType;
typedef Shape_Class CppClassParent;
typedef GnomeCanvasShapeClass BaseClassParent;
friend class RectEllipse;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_RECT_ELLIPSE_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_RECT_P_H
#define _LIBGNOMECANVASMM_RECT_P_H
#include <libgnomecanvasmm/private/rect-ellipse_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Rect_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Rect CppObjectType;
typedef GnomeCanvasRect BaseObjectType;
typedef GnomeCanvasRectClass BaseClassType;
typedef RectEllipse_Class CppClassParent;
typedef GnomeCanvasREClass BaseClassParent;
friend class Rect;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_RECT_P_H */

View file

@ -1,50 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_RICH_TEXT_P_H
#define _LIBGNOMECANVASMM_RICH_TEXT_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class RichText_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef RichText CppObjectType;
typedef GnomeCanvasRichText BaseObjectType;
typedef GnomeCanvasRichTextClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class RichText;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
static void tag_changed_callback(GnomeCanvasRichText* self, GtkTextTag* tag);
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_RICH_TEXT_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_SHAPE_P_H
#define _LIBGNOMECANVASMM_SHAPE_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Shape_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Shape CppObjectType;
typedef GnomeCanvasShape BaseObjectType;
typedef GnomeCanvasShapeClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class Shape;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_SHAPE_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_TEXT_P_H
#define _LIBGNOMECANVASMM_TEXT_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Text_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Text CppObjectType;
typedef GnomeCanvasText BaseObjectType;
typedef GnomeCanvasTextClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class Text;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_TEXT_P_H */

View file

@ -1,49 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_WIDGET_P_H
#define _LIBGNOMECANVASMM_WIDGET_P_H
#include <libgnomecanvasmm/private/item_p.h>
#include <glibmm/class.h>
namespace Gnome
{
namespace Canvas
{
class Widget_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Widget CppObjectType;
typedef GnomeCanvasWidget BaseObjectType;
typedef GnomeCanvasWidgetClass BaseClassType;
typedef Item_Class CppClassParent;
typedef GnomeCanvasItemClass BaseClassParent;
friend class Widget;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
static void class_init_function(void* g_class, void* class_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
//Callbacks (virtual functions):
};
} // namespace Canvas
} // namespace Gnome
#endif /* _LIBGNOMECANVASMM_WIDGET_P_H */

View file

@ -1,238 +0,0 @@
// -*- c++ -*-
/* $Id$ */
/* properties.cc
*
* Copyright (C) 2002 The Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/properties.h>
namespace Gnome
{
namespace Canvas
{
namespace Properties
{
PropertyBase::PropertyBase(const char* name)
: name_(name)
{}
PropertyBase::~PropertyBase()
{}
const char* PropertyBase::get_name() const
{
return name_;
}
/////////////////////////////
// Property<Gdk::Color>
Property<Gdk::Color>::Property(const char* name, const Gdk::Color& value) :
PropertyBase(name),
value_(value),
value_gobj_used_(true),
value_string_used_(false),
value_rgba_(0)
{}
Property<Gdk::Color>::Property(const char* name, const Glib::ustring& color) :
PropertyBase(name),
value_gobj_used_(false),
value_string_(color),
value_string_used_ (true),
value_rgba_(0)
{}
Property<Gdk::Color>::Property(const char* name, const guint& rgba_color) :
PropertyBase(name),
value_gobj_used_(false),
value_string_used_(false),
value_rgba_(rgba_color)
{}
void Property<Gdk::Color>::set_value_in_object(Glib::Object& object) const
{
//Set the appropriate property name with the appropriately-typed value:
if(value_string_used_) {
Glib::PropertyProxy<Glib::ustring> proxy(&object, get_name());
if (value_string_ == "")
proxy.reset_value ();
else
proxy.set_value(value_string_);
} else if(value_gobj_used_) {
Glib::PropertyProxy<Gdk::Color> proxy(&object, get_name());
proxy.set_value(value_);
} else {
Glib::PropertyProxy<guint> proxy(&object, get_name());
proxy.set_value(value_rgba_);
}
}
/////////////////////////////
// Property<Pango::FontDescription>
Property<Pango::FontDescription>::Property(const char* name, const Pango::FontDescription& value) :
PropertyBase(name),
value_(value)
{}
Property<Pango::FontDescription>::Property(const char* name, const Glib::ustring& font) :
PropertyBase(name),
value_(0),
value_string_(font)
{}
void Property<Pango::FontDescription>::set_value_in_object(Glib::Object& object) const
{
if(value_string_.size())
{
Glib::PropertyProxy<Glib::ustring> proxy(&object, get_name());
proxy.set_value(value_string_);
}
else
{
Glib::PropertyProxy<Pango::FontDescription> proxy(&object, get_name());
proxy.set_value(value_);
}
}
/////////////////////////////
// Property< Glib::RefPtr<Gdk::Bitmap> >
Property< Glib::RefPtr<Gdk::Bitmap> >::Property(const char* name, const Glib::RefPtr<Gdk::Bitmap>& value)
: PropertyBase(name),
value_(value)
{}
void Property< Glib::RefPtr<Gdk::Bitmap> >::set_value_in_object(Glib::Object& object) const
{
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > proxy(&object, get_name());
proxy.set_value(value_);
}
font::font(const Pango::FontDescription& v)
: Property<Pango::FontDescription>("font-desc", v)
{}
font::font(const Glib::ustring& v)
: Property<Pango::FontDescription>("font", v)
{}
fill_color::fill_color(const Gdk::Color& v)
: Property<Gdk::Color>("fill_color_gdk",v)
{}
fill_color::fill_color(const Glib::ustring& v)
: Property<Gdk::Color>("fill_color",v)
{}
outline_color::outline_color(const Gdk::Color& v)
: Property<Gdk::Color>("outline_color_gdk", v)
{}
outline_color::outline_color(const Glib::ustring& v)
: Property<Gdk::Color>("outline_color", v)
{}
// GNOMEMM_PROPERTY_IMPL(C++ name, C property name, C++ type)
#define GNOMEMM_PROPERTY_IMPL(N,N2,T) \
N::N(const T& v) \
: Property<T >(#N2, v) \
{}
// CanvasLine
GNOMEMM_PROPERTY_IMPL(arrow_shape_a,arrow_shape_a,double)
GNOMEMM_PROPERTY_IMPL(arrow_shape_b,arrow_shape_b,double)
GNOMEMM_PROPERTY_IMPL(arrow_shape_c,arrow_shape_c,double)
GNOMEMM_PROPERTY_IMPL(cap_style,cap_style,Gdk::CapStyle)
GNOMEMM_PROPERTY_IMPL(first_arrowhead,first_arrowhead,bool)
GNOMEMM_PROPERTY_IMPL(join_style,join_style,Gdk::JoinStyle)
GNOMEMM_PROPERTY_IMPL(last_arrowhead,last_arrowhead,bool)
GNOMEMM_PROPERTY_IMPL(line_style,line_style,Gdk::LineStyle)
GNOMEMM_PROPERTY_IMPL(smooth,smooth,bool)
GNOMEMM_PROPERTY_IMPL(spline_steps,spline_steps,guint)
// CanvasText
GNOMEMM_PROPERTY_IMPL(clip,clip,bool)
GNOMEMM_PROPERTY_IMPL(clip_height,clip_height,double)
GNOMEMM_PROPERTY_IMPL(clip_width,clip_width,double)
GNOMEMM_PROPERTY_IMPL(wrap_mode,wrap_mode,Gtk::WrapMode)
GNOMEMM_PROPERTY_IMPL(justification,justification,Gtk::Justification)
GNOMEMM_PROPERTY_IMPL(direction,direction,Gtk::DirectionType)
GNOMEMM_PROPERTY_IMPL(text_height,text_height,double)
GNOMEMM_PROPERTY_IMPL(text_width,text_width,double)
GNOMEMM_PROPERTY_IMPL(x_offset,x_offset,double)
GNOMEMM_PROPERTY_IMPL(y_offset,y_offset,double)
GNOMEMM_PROPERTY_IMPL(text,text,Glib::ustring)
GNOMEMM_PROPERTY_IMPL(markup,markup,Glib::ustring)
GNOMEMM_PROPERTY_IMPL(editable,editable,bool)
GNOMEMM_PROPERTY_IMPL(visible,visible,bool)
GNOMEMM_PROPERTY_IMPL(cursor_visible,cursor_visible,bool)
GNOMEMM_PROPERTY_IMPL(cursor_blink,cursor_blink,bool)
GNOMEMM_PROPERTY_IMPL(grow_height,grow_height,bool)
GNOMEMM_PROPERTY_IMPL(pixels_above_lines,pixels_above_lines,int)
GNOMEMM_PROPERTY_IMPL(pixels_below_lines,pixels_below_lines,int)
GNOMEMM_PROPERTY_IMPL(pixels_inside_wrap,pixels_inside_wrap,int)
GNOMEMM_PROPERTY_IMPL(left_margin,left_margin,int)
GNOMEMM_PROPERTY_IMPL(right_margin,right_margin,int)
GNOMEMM_PROPERTY_IMPL(indent,indent,int)
// CanvasWidget
GNOMEMM_PROPERTY_IMPL(size_pixels,size_pixels,bool)
// CanvasImage, CanvasWidget
GNOMEMM_PROPERTY_IMPL(height,height,double)
GNOMEMM_PROPERTY_IMPL(width,width,double)
// CanvasRect, CanvasEllipse
GNOMEMM_PROPERTY_IMPL(x1,x1,double)
GNOMEMM_PROPERTY_IMPL(x2,x2,double)
GNOMEMM_PROPERTY_IMPL(y1,y1,double)
GNOMEMM_PROPERTY_IMPL(y2,y2,double)
// CanvasImage, CanvasText, CanvasWidget
GNOMEMM_PROPERTY_IMPL(anchor,anchor,Gtk::AnchorType)
// CanvasPolygon, CanvasRect, CanvasEllipse
GNOMEMM_PROPERTY_IMPL(outline_stipple,outline_stipple,Glib::RefPtr<Gdk::Bitmap>)
GNOMEMM_PROPERTY_IMPL(wind,wind,guint)
GNOMEMM_PROPERTY_IMPL(miterlimit,miterlimit,double)
// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse
GNOMEMM_PROPERTY_IMPL(width_pixels,width_pixels,guint)
GNOMEMM_PROPERTY_IMPL(width_units,width_units,double)
// CanvasGroup, CanvasImage, CanvasText, CanvasWidget
GNOMEMM_PROPERTY_IMPL(x,x,double)
GNOMEMM_PROPERTY_IMPL(y,y,double)
// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse, CanvasText
GNOMEMM_PROPERTY_IMPL(fill_stipple,fill_stipple,Glib::RefPtr<Gdk::Bitmap>)
} /* namespace Properties */
} /* namespace Canvas */
} /* namespace Gnome */

View file

@ -1,248 +0,0 @@
#ifndef _LIBGNOMECANVASMM_PROPERTIES_H_
#define _LIBGNOMECANVASMM_PROPERTIES_H_
// -*- c++ -*-
/* $Id$ */
/* properties.h
*
* Copyright (C) 1999-2002 The Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
//#include <gtk/gtkpacker.h> //For GtkAnchorType.
#include <glibmm/propertyproxy.h>
#include <gdkmm/color.h>
#include <gdkmm/bitmap.h>
#include <pangomm/fontdescription.h>
#include <gtkmm/enums.h>
namespace Gnome
{
namespace Canvas
{
namespace Properties
{
class PropertyBase
{
public:
PropertyBase(const char* name);
~PropertyBase();
const char* get_name() const;
protected:
const char* name_;
};
template <class T_Value>
class Property : public PropertyBase
{
public:
Property(const char* name, const T_Value& value)
: PropertyBase(name), value_(value)
{}
void set_value_in_object(Glib::Object& object) const
{
Glib::PropertyProxy<T_Value> proxy(&object, get_name());
proxy.set_value(value_);
}
protected:
T_Value value_;
};
/** Allow use of << operator on objects:
* For instance:
* canvasgroup << Gnome::Canvas::CanvasHelpers::x(2);
*/
template <class O, class T>
O& operator << (O& object, const Property<T>& property)
{
property.set_value_in_object(object);
return object;
}
/********* specializations *********/
//Colors can be specified with a string or a Gdk::Color, or an rgba guint.
template<>
class Property<Gdk::Color> : public PropertyBase
{
public:
Property(const char* name, const Gdk::Color& value);
Property(const char* name, const Glib::ustring& color);
Property(const char* name, const guint& rgba_color);
void set_value_in_object(Glib::Object& object) const;
protected:
Gdk::Color value_;
bool value_gobj_used_; //Whether the Gdk::Value was intialised in the constructor.
Glib::ustring value_string_;
bool value_string_used_;
guint value_rgba_;
};
//Font can be specified with a string or a Pango::FontDescription.
template<>
class Property<Pango::FontDescription> : public PropertyBase
{
public:
Property(const char* name, const Pango::FontDescription& value);
Property(const char* name, const Glib::ustring& font);
void set_value_in_object(Glib::Object& object) const;
protected:
Pango::FontDescription value_;
Glib::ustring value_string_;
};
//We now define some specific properties.
//Some of these are unusual, so we define them manually.
//Others are regular so we define them with a macro:
class font : public Property<Pango::FontDescription> //Used by CanvasText.
{
public:
font(const Pango::FontDescription& v);
font(const Glib::ustring& v);
};
template<>
class Property< Glib::RefPtr<Gdk::Bitmap> > : public PropertyBase
{
public:
Property(const char* name, const Glib::RefPtr<Gdk::Bitmap>& value);
void set_value_in_object(Glib::Object& object) const;
protected:
Glib::RefPtr<Gdk::Bitmap> value_;
};
class fill_color : public Property<Gdk::Color>
{
public:
fill_color(const Gdk::Color& v);
fill_color(const Glib::ustring& v);
};
class outline_color : public Property<Gdk::Color>
{
public:
outline_color(const Gdk::Color& v);
outline_color(const Glib::ustring& v);
};
// GNOMEMM_PROPERTY(C++ name, C property name, C++ type)
#define GNOMEMM_PROPERTY(N,N2,T) \
class N : public Property<T > \
{ \
public: \
N(const T& v); \
};
// CanvasLine
GNOMEMM_PROPERTY(arrow_shape_a,arrow_shape_a,double)
GNOMEMM_PROPERTY(arrow_shape_b,arrow_shape_b,double)
GNOMEMM_PROPERTY(arrow_shape_c,arrow_shape_c,double)
GNOMEMM_PROPERTY(cap_style,cap_style,Gdk::CapStyle)
GNOMEMM_PROPERTY(first_arrowhead,first_arrowhead,bool)
GNOMEMM_PROPERTY(join_style,join_style,Gdk::JoinStyle)
GNOMEMM_PROPERTY(last_arrowhead,last_arrowhead,bool)
GNOMEMM_PROPERTY(line_style,line_style,Gdk::LineStyle)
GNOMEMM_PROPERTY(smooth,smooth,bool)
GNOMEMM_PROPERTY(spline_steps,spline_steps,guint)
// CanvasText
GNOMEMM_PROPERTY(clip,clip,bool)
GNOMEMM_PROPERTY(clip_height,clip_height,double)
GNOMEMM_PROPERTY(clip_width,clip_width,double)
GNOMEMM_PROPERTY(justification,justification,Gtk::Justification)
GNOMEMM_PROPERTY(direction,direction,Gtk::DirectionType)
GNOMEMM_PROPERTY(wrap_mode,wrap_mode,Gtk::WrapMode)
GNOMEMM_PROPERTY(text_height,text_height,double)
GNOMEMM_PROPERTY(text_width,text_width,double)
GNOMEMM_PROPERTY(x_offset,x_offset,double)
GNOMEMM_PROPERTY(y_offset,y_offset,double)
GNOMEMM_PROPERTY(text,text,Glib::ustring)
GNOMEMM_PROPERTY(markup,markup,Glib::ustring)
GNOMEMM_PROPERTY(editable,editable,bool)
GNOMEMM_PROPERTY(visible,visible,bool)
GNOMEMM_PROPERTY(cursor_visible,cursor_visible,bool)
GNOMEMM_PROPERTY(cursor_blink,cursor_blink,bool)
GNOMEMM_PROPERTY(grow_height,grow_height,bool)
GNOMEMM_PROPERTY(pixels_above_lines,pixels_above_lines,int)
GNOMEMM_PROPERTY(pixels_below_lines,pixels_below_lines,int)
GNOMEMM_PROPERTY(pixels_inside_wrap,pixels_inside_wrap,int)
GNOMEMM_PROPERTY(left_margin,left_margin,int)
GNOMEMM_PROPERTY(right_margin,right_margin,int)
GNOMEMM_PROPERTY(indent,indent,int)
// CanvasWidget
GNOMEMM_PROPERTY(size_pixels,size_pixels,bool)
// CanvasImage, CanvasWidget
GNOMEMM_PROPERTY(height,height,double)
GNOMEMM_PROPERTY(width,width,double)
// CanvasRect, CanvasEllipse
GNOMEMM_PROPERTY(x1,x1,double)
GNOMEMM_PROPERTY(x2,x2,double)
GNOMEMM_PROPERTY(y1,y1,double)
GNOMEMM_PROPERTY(y2,y2,double)
// CanvasImage, CanvasText, CanvasWidget
GNOMEMM_PROPERTY(anchor,anchor,Gtk::AnchorType)
// CanvasPolygon, CanvasRect, CanvasEllipse
GNOMEMM_PROPERTY(outline_stipple,outline_stipple,Glib::RefPtr<Gdk::Bitmap>)
GNOMEMM_PROPERTY(wind,wind,guint)
GNOMEMM_PROPERTY(miterlimit,miterlimit,double)
// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse
GNOMEMM_PROPERTY(width_pixels,width_pixels,guint)
GNOMEMM_PROPERTY(width_units,width_units,double)
// CanvasGroup, CanvasImage, CanvasText, CanvasWidget
GNOMEMM_PROPERTY(x,x,double)
GNOMEMM_PROPERTY(y,y,double)
// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse, CanvasText
GNOMEMM_PROPERTY(fill_stipple,fill_stipple,Glib::RefPtr<Gdk::Bitmap>)
} /* namespace Properties */
} /* namespace Canvas */
} /* namespace Gnome */
#endif /* _LIBGNOMECANVASMM_PROPERTIES_H_ */

View file

@ -1,180 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/rect-ellipse.h>
#include <libgnomecanvasmm/private/rect-ellipse_p.h>
/* $Id$ */
/* ellipse.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
RectEllipse::RectEllipse(Group& parent)
: Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
{
item_construct(parent);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::RectEllipse* wrap(GnomeCanvasRE* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::RectEllipse *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& RectEllipse_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &RectEllipse_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_re_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void RectEllipse_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* RectEllipse_Class::wrap_new(GObject* o)
{
return manage(new RectEllipse((GnomeCanvasRE*)(o)));
}
/* The implementation: */
RectEllipse::RectEllipse(const Glib::ConstructParams& construct_params)
:
Shape(construct_params)
{
}
RectEllipse::RectEllipse(GnomeCanvasRE* castitem)
:
Shape((GnomeCanvasShape*)(castitem))
{
}
RectEllipse::~RectEllipse()
{
destroy_();
}
RectEllipse::CppClassType RectEllipse::rectellipse_class_; // initialize static member
GType RectEllipse::get_type()
{
return rectellipse_class_.init().get_type();
}
GType RectEllipse::get_base_type()
{
return gnome_canvas_re_get_type();
}
Glib::PropertyProxy<double> RectEllipse::property_x1()
{
return Glib::PropertyProxy<double>(this, "x1");
}
Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_x1() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x1");
}
Glib::PropertyProxy<double> RectEllipse::property_y1()
{
return Glib::PropertyProxy<double>(this, "y1");
}
Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_y1() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y1");
}
Glib::PropertyProxy<double> RectEllipse::property_x2()
{
return Glib::PropertyProxy<double>(this, "x2");
}
Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_x2() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x2");
}
Glib::PropertyProxy<double> RectEllipse::property_y2()
{
return Glib::PropertyProxy<double>(this, "y2");
}
Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_y2() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y2");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,196 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_RECT_ELLIPSE_H
#define _LIBGNOMECANVASMM_RECT_ELLIPSE_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* canvas-ellipse.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/shape.h>
//#include <libgnomecanvasmm/group.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasRE GnomeCanvasRE;
typedef struct _GnomeCanvasREClass GnomeCanvasREClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class RectEllipse_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
/** Abstract class for all rectangular shapes
* Corresponds to GnomeCanvasRE in libgnomecanvas
*/
class RectEllipse : public Shape
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef RectEllipse CppObjectType;
typedef RectEllipse_Class CppClassType;
typedef GnomeCanvasRE BaseObjectType;
typedef GnomeCanvasREClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~RectEllipse();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class RectEllipse_Class;
static CppClassType rectellipse_class_;
// noncopyable
RectEllipse(const RectEllipse&);
RectEllipse& operator=(const RectEllipse&);
protected:
explicit RectEllipse(const Glib::ConstructParams& construct_params);
explicit RectEllipse(GnomeCanvasRE* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasRE* gobj() { return reinterpret_cast<GnomeCanvasRE*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasRE* gobj() const { return reinterpret_cast<GnomeCanvasRE*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
explicit RectEllipse(Group& parent);
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x1() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x1() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y1() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y1() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x2() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x2() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y2() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y2() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::RectEllipse
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::RectEllipse* wrap(GnomeCanvasRE* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_RECT_ELLIPSE_H */

View file

@ -1,146 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/rect.h>
#include <libgnomecanvasmm/private/rect_p.h>
/* $Id$ */
/* rect.c
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
Rect::Rect(Group& parentx, double x1, double y1, double x2, double y2)
: RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(),0)))
{
item_construct(parentx);
set("x1",x1,"y1",y1,"x2",x2,"y2",y2,0);
}
Rect::Rect(Group& parentx)
: RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(),0)))
{
item_construct(parentx);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Rect* wrap(GnomeCanvasRect* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Rect *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Rect_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Rect_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_rect_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Rect_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Rect_Class::wrap_new(GObject* o)
{
return manage(new Rect((GnomeCanvasRect*)(o)));
}
/* The implementation: */
Rect::Rect(const Glib::ConstructParams& construct_params)
:
RectEllipse(construct_params)
{
}
Rect::Rect(GnomeCanvasRect* castitem)
:
RectEllipse((GnomeCanvasRE*)(castitem))
{
}
Rect::~Rect()
{
destroy_();
}
Rect::CppClassType Rect::rect_class_; // initialize static member
GType Rect::get_type()
{
return rect_class_.init().get_type();
}
GType Rect::get_base_type()
{
return gnome_canvas_rect_get_type();
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,132 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_RECT_H
#define _LIBGNOMECANVASMM_RECT_H
#include <glibmm.h>
/* $Id$ */
/* rect.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvasmm/group.h>
#include <libgnomecanvasmm/rect-ellipse.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasRect GnomeCanvasRect;
typedef struct _GnomeCanvasRectClass GnomeCanvasRectClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Rect_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
//class Group;
class Rect : public RectEllipse
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Rect CppObjectType;
typedef Rect_Class CppClassType;
typedef GnomeCanvasRect BaseObjectType;
typedef GnomeCanvasRectClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Rect();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Rect_Class;
static CppClassType rect_class_;
// noncopyable
Rect(const Rect&);
Rect& operator=(const Rect&);
protected:
explicit Rect(const Glib::ConstructParams& construct_params);
explicit Rect(GnomeCanvasRect* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasRect* gobj() { return reinterpret_cast<GnomeCanvasRect*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasRect* gobj() const { return reinterpret_cast<GnomeCanvasRect*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
Rect(Group& parent, double x1, double y1, double x2, double y2);
explicit Rect(Group& parent);
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Rect
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Rect* wrap(GnomeCanvasRect* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_RECT_H */

View file

@ -1,475 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/rich-text.h>
#include <libgnomecanvasmm/private/rich-text_p.h>
/* $Id$ */
/* rich-text.cc
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace Gnome
{
namespace Canvas
{
RichText::RichText (Group& parent,
double x, double y,
const Glib::ustring& text)
: Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
{
item_construct (parent);
set ("x", x,
"y", y,
"text", text.c_str (),
NULL);
}
RichText::RichText (Group& parent)
: Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
{
item_construct (parent);
}
RichText::iterator RichText::get_iter_at_location(int x, int y) const
{
iterator iter;
gnome_canvas_rich_text_get_iter_at_location(const_cast<GnomeCanvasRichText*>(gobj()), iter.gobj(), x, y);
return iter;
}
}
}
namespace
{
void RichText_signal_tag_changed_callback(GnomeCanvasRichText* self, GtkTextTag* tag,void* data)
{
using namespace Gnome::Canvas;
typedef sigc::slot< void,const Glib::RefPtr<Gtk::TextTag>& > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
try
{
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
(*static_cast<SlotType*>(slot))(Glib::wrap(tag, true)
);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
}
const Glib::SignalProxyInfo RichText_signal_tag_changed_info =
{
"tag_changed",
(GCallback) &RichText_signal_tag_changed_callback,
(GCallback) &RichText_signal_tag_changed_callback
};
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::RichText* wrap(GnomeCanvasRichText* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::RichText *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& RichText_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &RichText_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_rich_text_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void RichText_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
klass->tag_changed = &tag_changed_callback;
}
void RichText_Class::tag_changed_callback(GnomeCanvasRichText* self, GtkTextTag* tag)
{
CppObjectType *const obj = dynamic_cast<CppObjectType*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj && obj->is_derived_())
{
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
// Call the virtual member method, which derived classes might override.
obj->on_tag_changed(Glib::wrap(tag, true)
);
}
catch(...)
{
Glib::exception_handlers_invoke();
}
}
else
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
);
// Call the original underlying C function:
if(base && base->tag_changed)
(*base->tag_changed)(self, tag);
}
}
Glib::ObjectBase* RichText_Class::wrap_new(GObject* o)
{
return manage(new RichText((GnomeCanvasRichText*)(o)));
}
/* The implementation: */
RichText::RichText(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
RichText::RichText(GnomeCanvasRichText* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
RichText::~RichText()
{
destroy_();
}
RichText::CppClassType RichText::richtext_class_; // initialize static member
GType RichText::get_type()
{
return richtext_class_.init().get_type();
}
GType RichText::get_base_type()
{
return gnome_canvas_rich_text_get_type();
}
void RichText::cut_clipboard()
{
gnome_canvas_rich_text_cut_clipboard(gobj());
}
void RichText::copy_clipboard()
{
gnome_canvas_rich_text_copy_clipboard(gobj());
}
void RichText::paste_clipboard()
{
gnome_canvas_rich_text_paste_clipboard(gobj());
}
void RichText::set_buffer(const Glib::RefPtr<Gtk::TextBuffer>& buffer)
{
gnome_canvas_rich_text_set_buffer(gobj(), Glib::unwrap(buffer));
}
Glib::RefPtr<Gtk::TextBuffer> RichText::get_buffer() const
{
return Glib::wrap(gnome_canvas_rich_text_get_buffer(const_cast<GnomeCanvasRichText*>(gobj())));
}
void RichText::get_iter_location(const iterator& iter, Gdk::Rectangle& location) const
{
gnome_canvas_rich_text_get_iter_location(const_cast<GnomeCanvasRichText*>(gobj()), (iter).gobj(), (location).gobj());
}
Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& > RichText::signal_tag_changed()
{
return Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& >(this, &RichText_signal_tag_changed_info);
}
Glib::PropertyProxy<Glib::ustring> RichText::property_text()
{
return Glib::PropertyProxy<Glib::ustring>(this, "text");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> RichText::property_text() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
}
Glib::PropertyProxy<double> RichText::property_x()
{
return Glib::PropertyProxy<double>(this, "x");
}
Glib::PropertyProxy_ReadOnly<double> RichText::property_x() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x");
}
Glib::PropertyProxy<double> RichText::property_y()
{
return Glib::PropertyProxy<double>(this, "y");
}
Glib::PropertyProxy_ReadOnly<double> RichText::property_y() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y");
}
Glib::PropertyProxy<double> RichText::property_width()
{
return Glib::PropertyProxy<double>(this, "width");
}
Glib::PropertyProxy_ReadOnly<double> RichText::property_width() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "width");
}
Glib::PropertyProxy<double> RichText::property_height()
{
return Glib::PropertyProxy<double>(this, "height");
}
Glib::PropertyProxy_ReadOnly<double> RichText::property_height() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "height");
}
Glib::PropertyProxy<bool> RichText::property_editable()
{
return Glib::PropertyProxy<bool>(this, "editable");
}
Glib::PropertyProxy_ReadOnly<bool> RichText::property_editable() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
}
Glib::PropertyProxy<bool> RichText::property_visible()
{
return Glib::PropertyProxy<bool>(this, "visible");
}
Glib::PropertyProxy_ReadOnly<bool> RichText::property_visible() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
}
Glib::PropertyProxy<bool> RichText::property_cursor_visible()
{
return Glib::PropertyProxy<bool>(this, "cursor-visible");
}
Glib::PropertyProxy_ReadOnly<bool> RichText::property_cursor_visible() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "cursor-visible");
}
Glib::PropertyProxy<bool> RichText::property_cursor_blink()
{
return Glib::PropertyProxy<bool>(this, "cursor-blink");
}
Glib::PropertyProxy_ReadOnly<bool> RichText::property_cursor_blink() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "cursor-blink");
}
Glib::PropertyProxy<bool> RichText::property_grow_height()
{
return Glib::PropertyProxy<bool>(this, "grow-height");
}
Glib::PropertyProxy_ReadOnly<bool> RichText::property_grow_height() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "grow-height");
}
Glib::PropertyProxy<Gtk::WrapMode> RichText::property_wrap_mode()
{
return Glib::PropertyProxy<Gtk::WrapMode>(this, "wrap-mode");
}
Glib::PropertyProxy_ReadOnly<Gtk::WrapMode> RichText::property_wrap_mode() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::WrapMode>(this, "wrap-mode");
}
Glib::PropertyProxy<Gtk::Justification> RichText::property_justification()
{
return Glib::PropertyProxy<Gtk::Justification>(this, "justification");
}
Glib::PropertyProxy_ReadOnly<Gtk::Justification> RichText::property_justification() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::Justification>(this, "justification");
}
Glib::PropertyProxy<Gtk::DirectionType> RichText::property_direction()
{
return Glib::PropertyProxy<Gtk::DirectionType>(this, "direction");
}
Glib::PropertyProxy_ReadOnly<Gtk::DirectionType> RichText::property_direction() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::DirectionType>(this, "direction");
}
Glib::PropertyProxy<Gtk::AnchorType> RichText::property_anchor()
{
return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> RichText::property_anchor() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy<int> RichText::property_pixels_above_lines()
{
return Glib::PropertyProxy<int>(this, "pixels-above-lines");
}
Glib::PropertyProxy_ReadOnly<int> RichText::property_pixels_above_lines() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-above-lines");
}
Glib::PropertyProxy<int> RichText::property_pixels_below_lines()
{
return Glib::PropertyProxy<int>(this, "pixels-below-lines");
}
Glib::PropertyProxy_ReadOnly<int> RichText::property_pixels_below_lines() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-below-lines");
}
Glib::PropertyProxy<int> RichText::property_pixels_inside_wrap()
{
return Glib::PropertyProxy<int>(this, "pixels-inside-wrap");
}
Glib::PropertyProxy_ReadOnly<int> RichText::property_pixels_inside_wrap() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-inside-wrap");
}
Glib::PropertyProxy<int> RichText::property_left_margin()
{
return Glib::PropertyProxy<int>(this, "left-margin");
}
Glib::PropertyProxy_ReadOnly<int> RichText::property_left_margin() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "left-margin");
}
Glib::PropertyProxy<int> RichText::property_right_margin()
{
return Glib::PropertyProxy<int>(this, "right-margin");
}
Glib::PropertyProxy_ReadOnly<int> RichText::property_right_margin() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "right-margin");
}
Glib::PropertyProxy<int> RichText::property_indent()
{
return Glib::PropertyProxy<int>(this, "indent");
}
Glib::PropertyProxy_ReadOnly<int> RichText::property_indent() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "indent");
}
void Gnome::Canvas::RichText::on_tag_changed(const Glib::RefPtr<Gtk::TextTag>& tag)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
);
if(base && base->tag_changed)
(*base->tag_changed)(gobj(),Glib::unwrap(tag));
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,472 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_RICH_TEXT_H
#define _LIBGNOMECANVASMM_RICH_TEXT_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* rich-text.h
*
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/textbuffer.h>
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvas/gnome-canvas-rich-text.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasRichText GnomeCanvasRichText;
typedef struct _GnomeCanvasRichTextClass GnomeCanvasRichTextClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class RichText_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class RichText : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef RichText CppObjectType;
typedef RichText_Class CppClassType;
typedef GnomeCanvasRichText BaseObjectType;
typedef GnomeCanvasRichTextClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~RichText();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class RichText_Class;
static CppClassType richtext_class_;
// noncopyable
RichText(const RichText&);
RichText& operator=(const RichText&);
protected:
explicit RichText(const Glib::ConstructParams& construct_params);
explicit RichText(GnomeCanvasRichText* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasRichText* gobj() { return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasRichText* gobj() const { return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
virtual void on_tag_changed(const Glib::RefPtr<Gtk::TextTag>& tag);
private:
public:
typedef Gtk::TextIter iterator;
RichText(Group& parent, double x, double y, const Glib::ustring& text);
explicit RichText(Group& parent);
void cut_clipboard();
void copy_clipboard();
void paste_clipboard();
void set_buffer(const Glib::RefPtr<Gtk::TextBuffer>& buffer);
Glib::RefPtr<Gtk::TextBuffer> get_buffer() const;
void get_iter_location(const iterator& iter, Gdk::Rectangle& location) const;
iterator get_iter_at_location(int x, int y) const;
Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& > signal_tag_changed();
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_text() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_width() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_width() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_height() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_height() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_editable() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_visible() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_cursor_visible() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_cursor_blink() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_cursor_blink() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_grow_height() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_grow_height() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::WrapMode> property_wrap_mode() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::WrapMode> property_wrap_mode() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::Justification> property_justification() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::Justification> property_justification() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::DirectionType> property_direction() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::DirectionType> property_direction() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_pixels_above_lines() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_pixels_above_lines() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_pixels_below_lines() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_pixels_below_lines() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_pixels_inside_wrap() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_pixels_inside_wrap() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_left_margin() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_left_margin() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_right_margin() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_right_margin() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_indent() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_indent() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::RichText
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::RichText* wrap(GnomeCanvasRichText* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_RICH_TEXT_H */

View file

@ -1,272 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/shape.h>
#include <libgnomecanvasmm/private/shape_p.h>
/* shape.cc
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Shape* wrap(GnomeCanvasShape* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Shape *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Shape_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Shape_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_shape_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Shape_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Shape_Class::wrap_new(GObject* o)
{
return manage(new Shape((GnomeCanvasShape*)(o)));
}
/* The implementation: */
Shape::Shape(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
Shape::Shape(GnomeCanvasShape* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
Shape::~Shape()
{
destroy_();
}
Shape::CppClassType Shape::shape_class_; // initialize static member
GType Shape::get_type()
{
return shape_class_.init().get_type();
}
GType Shape::get_base_type()
{
return gnome_canvas_shape_get_type();
}
Glib::PropertyProxy_WriteOnly<Glib::ustring> Shape::property_fill_color()
{
return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "fill-color");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Shape::property_fill_color() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
}
Glib::PropertyProxy<Gdk::Color> Shape::property_fill_color_gdk()
{
return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
}
Glib::PropertyProxy_ReadOnly<Gdk::Color> Shape::property_fill_color_gdk() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
}
Glib::PropertyProxy<guint> Shape::property_fill_color_rgba()
{
return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
}
Glib::PropertyProxy_ReadOnly<guint> Shape::property_fill_color_rgba() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
}
Glib::PropertyProxy_WriteOnly<Glib::ustring> Shape::property_outline_color()
{
return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "outline-color");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Shape::property_outline_color() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "outline-color");
}
Glib::PropertyProxy<Gdk::Color> Shape::property_outline_color_gdk()
{
return Glib::PropertyProxy<Gdk::Color>(this, "outline-color-gdk");
}
Glib::PropertyProxy_ReadOnly<Gdk::Color> Shape::property_outline_color_gdk() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "outline-color-gdk");
}
Glib::PropertyProxy<guint> Shape::property_outline_color_rgba()
{
return Glib::PropertyProxy<guint>(this, "outline-color-rgba");
}
Glib::PropertyProxy_ReadOnly<guint> Shape::property_outline_color_rgba() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "outline-color-rgba");
}
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Shape::property_fill_stipple()
{
return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
}
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Shape::property_fill_stipple() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
}
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Shape::property_outline_stipple()
{
return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "outline-stipple");
}
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Shape::property_outline_stipple() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "outline-stipple");
}
Glib::PropertyProxy<guint> Shape::property_width_pixels()
{
return Glib::PropertyProxy<guint>(this, "width-pixels");
}
Glib::PropertyProxy_ReadOnly<guint> Shape::property_width_pixels() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "width-pixels");
}
Glib::PropertyProxy_WriteOnly<double> Shape::property_width_units()
{
return Glib::PropertyProxy_WriteOnly<double>(this, "width-units");
}
Glib::PropertyProxy_ReadOnly<double> Shape::property_width_units() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "width-units");
}
Glib::PropertyProxy<Gdk::CapStyle> Shape::property_cap_style()
{
return Glib::PropertyProxy<Gdk::CapStyle>(this, "cap-style");
}
Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> Shape::property_cap_style() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::CapStyle>(this, "cap-style");
}
Glib::PropertyProxy<Gdk::JoinStyle> Shape::property_join_style()
{
return Glib::PropertyProxy<Gdk::JoinStyle>(this, "join-style");
}
Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> Shape::property_join_style() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle>(this, "join-style");
}
Glib::PropertyProxy<guint> Shape::property_wind()
{
return Glib::PropertyProxy<guint>(this, "wind");
}
Glib::PropertyProxy_ReadOnly<guint> Shape::property_wind() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "wind");
}
Glib::PropertyProxy<double> Shape::property_miterlimit()
{
return Glib::PropertyProxy<double>(this, "miterlimit");
}
Glib::PropertyProxy_ReadOnly<double> Shape::property_miterlimit() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "miterlimit");
}
Glib::PropertyProxy<ArtVpathDash*> Shape::property_dash()
{
return Glib::PropertyProxy<ArtVpathDash*>(this, "dash");
}
Glib::PropertyProxy_ReadOnly<ArtVpathDash*> Shape::property_dash() const
{
return Glib::PropertyProxy_ReadOnly<ArtVpathDash*>(this, "dash");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,368 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_SHAPE_H
#define _LIBGNOMECANVASMM_SHAPE_H
#include <glibmm.h>
// -*- C++ -*-
/* $Id$ */
/* shape.h
*
*
* Copyright (C) 2002 The libgnomecanvasmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvas/gnome-canvas-shape.h>
#include <libart_lgpl/art_vpath_dash.h> //For ArtVpathDash
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasShape GnomeCanvasShape;
typedef struct _GnomeCanvasShapeClass GnomeCanvasShapeClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Shape_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Shape : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Shape CppObjectType;
typedef Shape_Class CppClassType;
typedef GnomeCanvasShape BaseObjectType;
typedef GnomeCanvasShapeClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Shape();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Shape_Class;
static CppClassType shape_class_;
// noncopyable
Shape(const Shape&);
Shape& operator=(const Shape&);
protected:
explicit Shape(const Glib::ConstructParams& construct_params);
explicit Shape(GnomeCanvasShape* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasShape* gobj() { return reinterpret_cast<GnomeCanvasShape*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasShape* gobj() const { return reinterpret_cast<GnomeCanvasShape*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_WriteOnly<Glib::ustring> property_fill_color() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_fill_color_rgba() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_WriteOnly<Glib::ustring> property_outline_color() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_outline_color() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::Color> property_outline_color_gdk() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::Color> property_outline_color_gdk() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_outline_color_rgba() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_outline_color_rgba() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_outline_stipple() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_outline_stipple() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_width_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_WriteOnly<double> property_width_units() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_wind() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_wind() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_miterlimit() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_miterlimit() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<ArtVpathDash*> property_dash() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<ArtVpathDash*> property_dash() const;
//TODO: Look at ArtVpathDash to see if it should be wrapped.
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Shape
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Shape* wrap(GnomeCanvasShape* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_SHAPE_H */

View file

@ -1,575 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/text.h>
#include <libgnomecanvasmm/private/text_p.h>
/* $Id$ */
/* text.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtksettings.h>
#include <glib-object.h>
static void
_catch_xft_dpi (GObject* thing, gpointer val, gpointer arg)
{
GnomeCanvasText* text = (GnomeCanvasText*) arg;
gchar *txt;
g_object_get (G_OBJECT(text), "text", &txt, NULL);
if (txt && txt[0] != '\0') {
g_object_set (G_OBJECT(text), "text", txt, NULL);
}
}
namespace Gnome
{
namespace Canvas
{
Text::Text(Group& parentx, double x, double y, const Glib::ustring& text)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
{
item_construct(parentx);
set("x", x, "y", y, "text", text.c_str(), 0);
g_signal_connect (gtk_settings_get_default(), "notify::gtk-xft-dpi", (GCallback) _catch_xft_dpi, gobj());
}
Text::Text(Group& parentx)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
{
item_construct(parentx);
g_signal_connect (gtk_settings_get_default(), "notify::gtk-xft-dpi", (GCallback) _catch_xft_dpi, gobj());
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Text* wrap(GnomeCanvasText* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Text *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Text_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Text_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_text_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Text_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Text_Class::wrap_new(GObject* o)
{
return manage(new Text((GnomeCanvasText*)(o)));
}
/* The implementation: */
Text::Text(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
Text::Text(GnomeCanvasText* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
Text::~Text()
{
destroy_();
}
Text::CppClassType Text::text_class_; // initialize static member
GType Text::get_type()
{
return text_class_.init().get_type();
}
GType Text::get_base_type()
{
return gnome_canvas_text_get_type();
}
Glib::PropertyProxy<Glib::ustring> Text::property_text()
{
return Glib::PropertyProxy<Glib::ustring>(this, "text");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_text() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
}
Glib::PropertyProxy_WriteOnly<Glib::ustring> Text::property_markup()
{
return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "markup");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_markup() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "markup");
}
Glib::PropertyProxy<double> Text::property_x()
{
return Glib::PropertyProxy<double>(this, "x");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_x() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x");
}
Glib::PropertyProxy<double> Text::property_y()
{
return Glib::PropertyProxy<double>(this, "y");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_y() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y");
}
Glib::PropertyProxy<Glib::ustring> Text::property_font()
{
return Glib::PropertyProxy<Glib::ustring>(this, "font");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_font() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font");
}
Glib::PropertyProxy<Pango::FontDescription> Text::property_font_desc()
{
return Glib::PropertyProxy<Pango::FontDescription>(this, "font-desc");
}
Glib::PropertyProxy_ReadOnly<Pango::FontDescription> Text::property_font_desc() const
{
return Glib::PropertyProxy_ReadOnly<Pango::FontDescription>(this, "font-desc");
}
Glib::PropertyProxy<Glib::ustring> Text::property_family()
{
return Glib::PropertyProxy<Glib::ustring>(this, "family");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_family() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "family");
}
Glib::PropertyProxy<bool> Text::property_family_set()
{
return Glib::PropertyProxy<bool>(this, "family-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_family_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "family-set");
}
Glib::PropertyProxy<Pango::AttrList> Text::property_attributes()
{
return Glib::PropertyProxy<Pango::AttrList>(this, "attributes");
}
Glib::PropertyProxy_ReadOnly<Pango::AttrList> Text::property_attributes() const
{
return Glib::PropertyProxy_ReadOnly<Pango::AttrList>(this, "attributes");
}
Glib::PropertyProxy<Pango::Style> Text::property_style()
{
return Glib::PropertyProxy<Pango::Style>(this, "style");
}
Glib::PropertyProxy_ReadOnly<Pango::Style> Text::property_style() const
{
return Glib::PropertyProxy_ReadOnly<Pango::Style>(this, "style");
}
Glib::PropertyProxy<bool> Text::property_style_set()
{
return Glib::PropertyProxy<bool>(this, "style-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_style_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "style-set");
}
Glib::PropertyProxy<Pango::Variant> Text::property_variant()
{
return Glib::PropertyProxy<Pango::Variant>(this, "variant");
}
Glib::PropertyProxy_ReadOnly<Pango::Variant> Text::property_variant() const
{
return Glib::PropertyProxy_ReadOnly<Pango::Variant>(this, "variant");
}
Glib::PropertyProxy<bool> Text::property_variant_set()
{
return Glib::PropertyProxy<bool>(this, "variant-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_variant_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "variant-set");
}
Glib::PropertyProxy<int> Text::property_weight()
{
return Glib::PropertyProxy<int>(this, "weight");
}
Glib::PropertyProxy_ReadOnly<int> Text::property_weight() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "weight");
}
Glib::PropertyProxy<bool> Text::property_weight_set()
{
return Glib::PropertyProxy<bool>(this, "weight-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_weight_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "weight-set");
}
Glib::PropertyProxy<Pango::Weight> Text::property_stretch()
{
return Glib::PropertyProxy<Pango::Weight>(this, "stretch");
}
Glib::PropertyProxy_ReadOnly<Pango::Weight> Text::property_stretch() const
{
return Glib::PropertyProxy_ReadOnly<Pango::Weight>(this, "stretch");
}
Glib::PropertyProxy<bool> Text::property_stretch_set()
{
return Glib::PropertyProxy<bool>(this, "stretch-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_stretch_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "stretch-set");
}
Glib::PropertyProxy<int> Text::property_size()
{
return Glib::PropertyProxy<int>(this, "size");
}
Glib::PropertyProxy_ReadOnly<int> Text::property_size() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "size");
}
Glib::PropertyProxy<bool> Text::property_size_set()
{
return Glib::PropertyProxy<bool>(this, "size-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_size_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "size-set");
}
Glib::PropertyProxy<double> Text::property_size_points()
{
return Glib::PropertyProxy<double>(this, "size-points");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_size_points() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "size-points");
}
Glib::PropertyProxy<bool> Text::property_strikethrough()
{
return Glib::PropertyProxy<bool>(this, "strikethrough");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough");
}
Glib::PropertyProxy<bool> Text::property_strikethrough_set()
{
return Glib::PropertyProxy<bool>(this, "strikethrough-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough-set");
}
Glib::PropertyProxy<Pango::Underline> Text::property_underline()
{
return Glib::PropertyProxy<Pango::Underline>(this, "underline");
}
Glib::PropertyProxy_ReadOnly<Pango::Underline> Text::property_underline() const
{
return Glib::PropertyProxy_ReadOnly<Pango::Underline>(this, "underline");
}
Glib::PropertyProxy<bool> Text::property_underline_set()
{
return Glib::PropertyProxy<bool>(this, "underline-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_underline_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "underline-set");
}
Glib::PropertyProxy<int> Text::property_rise()
{
return Glib::PropertyProxy<int>(this, "rise");
}
Glib::PropertyProxy_ReadOnly<int> Text::property_rise() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "rise");
}
Glib::PropertyProxy<bool> Text::property_rise_set()
{
return Glib::PropertyProxy<bool>(this, "rise-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_rise_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "rise-set");
}
Glib::PropertyProxy<double> Text::property_scale()
{
return Glib::PropertyProxy<double>(this, "scale");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_scale() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "scale");
}
Glib::PropertyProxy<bool> Text::property_scale_set()
{
return Glib::PropertyProxy<bool>(this, "scale-set");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_scale_set() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "scale-set");
}
Glib::PropertyProxy<Gtk::AnchorType> Text::property_anchor()
{
return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Text::property_anchor() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy<Gtk::Justification> Text::property_justification()
{
return Glib::PropertyProxy<Gtk::Justification>(this, "justification");
}
Glib::PropertyProxy_ReadOnly<Gtk::Justification> Text::property_justification() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::Justification>(this, "justification");
}
Glib::PropertyProxy<double> Text::property_clip_width()
{
return Glib::PropertyProxy<double>(this, "clip-width");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_clip_width() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "clip-width");
}
Glib::PropertyProxy<double> Text::property_clip_height()
{
return Glib::PropertyProxy<double>(this, "clip-height");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_clip_height() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "clip-height");
}
Glib::PropertyProxy<bool> Text::property_clip()
{
return Glib::PropertyProxy<bool>(this, "clip");
}
Glib::PropertyProxy_ReadOnly<bool> Text::property_clip() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "clip");
}
Glib::PropertyProxy<double> Text::property_x_offset()
{
return Glib::PropertyProxy<double>(this, "x-offset");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_x_offset() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x-offset");
}
Glib::PropertyProxy<double> Text::property_y_offset()
{
return Glib::PropertyProxy<double>(this, "y-offset");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_y_offset() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y-offset");
}
Glib::PropertyProxy<Glib::ustring> Text::property_fill_color()
{
return Glib::PropertyProxy<Glib::ustring>(this, "fill-color");
}
Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_fill_color() const
{
return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
}
Glib::PropertyProxy<Gdk::Color> Text::property_fill_color_gdk()
{
return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
}
Glib::PropertyProxy_ReadOnly<Gdk::Color> Text::property_fill_color_gdk() const
{
return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
}
Glib::PropertyProxy<guint> Text::property_fill_color_rgba()
{
return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
}
Glib::PropertyProxy_ReadOnly<guint> Text::property_fill_color_rgba() const
{
return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
}
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple()
{
return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
}
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple() const
{
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
}
Glib::PropertyProxy<double> Text::property_text_width()
{
return Glib::PropertyProxy<double>(this, "text-width");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_text_width() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "text-width");
}
Glib::PropertyProxy<double> Text::property_text_height()
{
return Glib::PropertyProxy<double>(this, "text-height");
}
Glib::PropertyProxy_ReadOnly<double> Text::property_text_height() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "text-height");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,788 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_TEXT_H
#define _LIBGNOMECANVASMM_TEXT_H
#include <glibmm.h>
/* $Id$ */
/* text.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#include <pangomm/attrlist.h>
#include <gtkmm/enums.h>
#include <libgnomecanvas/gnome-canvas-text.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasText GnomeCanvasText;
typedef struct _GnomeCanvasTextClass GnomeCanvasTextClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Text_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Group;
class Text : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Text CppObjectType;
typedef Text_Class CppClassType;
typedef GnomeCanvasText BaseObjectType;
typedef GnomeCanvasTextClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Text();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Text_Class;
static CppClassType text_class_;
// noncopyable
Text(const Text&);
Text& operator=(const Text&);
protected:
explicit Text(const Glib::ConstructParams& construct_params);
explicit Text(GnomeCanvasText* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasText* gobj() { return reinterpret_cast<GnomeCanvasText*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasText* gobj() const { return reinterpret_cast<GnomeCanvasText*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
Text(Group& parent, double x, double y, const Glib::ustring& text);
explicit Text(Group& parent);
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_text() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_WriteOnly<Glib::ustring> property_markup() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_markup() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_font() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Pango::FontDescription> property_font_desc() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Pango::FontDescription> property_font_desc() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_family() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_family() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_family_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_family_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Pango::AttrList> property_attributes() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Pango::AttrList> property_attributes() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Pango::Style> property_style() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Pango::Style> property_style() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_style_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_style_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Pango::Variant> property_variant() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Pango::Variant> property_variant() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_variant_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_variant_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_weight() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_weight() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_weight_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_weight_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Pango::Weight> property_stretch() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Pango::Weight> property_stretch() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_stretch_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_stretch_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_size() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_size() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_size_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_size_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_size_points() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_size_points() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_strikethrough() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_strikethrough() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_strikethrough_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_strikethrough_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Pango::Underline> property_underline() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Pango::Underline> property_underline() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_underline_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_underline_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_rise() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_rise() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_rise_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_rise_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_scale() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_scale() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_scale_set() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_scale_set() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::Justification> property_justification() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::Justification> property_justification() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_clip_width() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_clip_width() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_clip_height() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_clip_height() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_clip() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_clip() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x_offset() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x_offset() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y_offset() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y_offset() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<guint> property_fill_color_rgba() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_text_width() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_text_width() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_text_height() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_text_height() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Text
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Text* wrap(GnomeCanvasText* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_TEXT_H */

View file

@ -1,220 +0,0 @@
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <libgnomecanvasmm/widget.h>
#include <libgnomecanvasmm/private/widget_p.h>
/* $Id$ */
/* widget.cc
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdarg.h>
#include <gtkmm/widget.h>
namespace Gnome
{
namespace Canvas
{
Widget::Widget(Group& parentx, double x, double y,
Gtk::Widget& w)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
{
item_construct(parentx);
set("x", x, "y", y, "widget",w.gobj(), 0);
}
Widget::Widget(Group& parentx)
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
{
item_construct(parentx);
}
} /* namespace Canvas */
} /* namespace Gnome */
namespace
{
} // anonymous namespace
namespace Glib
{
Gnome::Canvas::Widget* wrap(GnomeCanvasWidget* object, bool take_copy)
{
return dynamic_cast<Gnome::Canvas::Widget *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Gnome
{
namespace Canvas
{
/* The *_Class implementation: */
const Glib::Class& Widget_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &Widget_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(gnome_canvas_widget_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
}
return *this;
}
void Widget_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
}
Glib::ObjectBase* Widget_Class::wrap_new(GObject* o)
{
return manage(new Widget((GnomeCanvasWidget*)(o)));
}
/* The implementation: */
Widget::Widget(const Glib::ConstructParams& construct_params)
:
Item(construct_params)
{
}
Widget::Widget(GnomeCanvasWidget* castitem)
:
Item((GnomeCanvasItem*)(castitem))
{
}
Widget::~Widget()
{
destroy_();
}
Widget::CppClassType Widget::widget_class_; // initialize static member
GType Widget::get_type()
{
return widget_class_.init().get_type();
}
GType Widget::get_base_type()
{
return gnome_canvas_widget_get_type();
}
Glib::PropertyProxy<Gtk::Widget*> Widget::property_widget()
{
return Glib::PropertyProxy<Gtk::Widget*>(this, "widget");
}
Glib::PropertyProxy_ReadOnly<Gtk::Widget*> Widget::property_widget() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::Widget*>(this, "widget");
}
Glib::PropertyProxy<double> Widget::property_x()
{
return Glib::PropertyProxy<double>(this, "x");
}
Glib::PropertyProxy_ReadOnly<double> Widget::property_x() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "x");
}
Glib::PropertyProxy<double> Widget::property_y()
{
return Glib::PropertyProxy<double>(this, "y");
}
Glib::PropertyProxy_ReadOnly<double> Widget::property_y() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "y");
}
Glib::PropertyProxy<double> Widget::property_width()
{
return Glib::PropertyProxy<double>(this, "width");
}
Glib::PropertyProxy_ReadOnly<double> Widget::property_width() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "width");
}
Glib::PropertyProxy<double> Widget::property_height()
{
return Glib::PropertyProxy<double>(this, "height");
}
Glib::PropertyProxy_ReadOnly<double> Widget::property_height() const
{
return Glib::PropertyProxy_ReadOnly<double>(this, "height");
}
Glib::PropertyProxy<Gtk::AnchorType> Widget::property_anchor()
{
return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Widget::property_anchor() const
{
return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
}
Glib::PropertyProxy<bool> Widget::property_size_pixels()
{
return Glib::PropertyProxy<bool>(this, "size-pixels");
}
Glib::PropertyProxy_ReadOnly<bool> Widget::property_size_pixels() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "size-pixels");
}
} // namespace Canvas
} // namespace Gnome

View file

@ -1,244 +0,0 @@
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMECANVASMM_WIDGET_H
#define _LIBGNOMECANVASMM_WIDGET_H
#include <glibmm.h>
/* $Id$ */
/* widget.h
*
* Copyright (C) 1998 EMC Capital Management Inc.
* Developed by Havoc Pennington <hp@pobox.com>
*
* Copyright (C) 1999 The Gtk-- Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomecanvasmm/item.h>
#include <libgnomecanvas/gnome-canvas-widget.h>
#include <gtkmm/widget.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomeCanvasWidget GnomeCanvasWidget;
typedef struct _GnomeCanvasWidgetClass GnomeCanvasWidgetClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gnome
{
namespace Canvas
{ class Widget_Class; } // namespace Canvas
} // namespace Gnome
namespace Gnome
{
namespace Canvas
{
class Group;
class Widget : public Item
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Widget CppObjectType;
typedef Widget_Class CppClassType;
typedef GnomeCanvasWidget BaseObjectType;
typedef GnomeCanvasWidgetClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Widget();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Widget_Class;
static CppClassType widget_class_;
// noncopyable
Widget(const Widget&);
Widget& operator=(const Widget&);
protected:
explicit Widget(const Glib::ConstructParams& construct_params);
explicit Widget(GnomeCanvasWidget* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GnomeCanvasWidget* gobj() { return reinterpret_cast<GnomeCanvasWidget*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GnomeCanvasWidget* gobj() const { return reinterpret_cast<GnomeCanvasWidget*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
private:
public:
Widget(Group& parent, double x, double y, Gtk::Widget& w);
explicit Widget(Group& parent);
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::Widget*> property_widget() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::Widget*> property_widget() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_x() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_x() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_y() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_y() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_width() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_width() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_height() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_height() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_size_pixels() ;
/**
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_size_pixels() const;
};
} /* namespace Canvas */
} /* namespace Gnome */
namespace Glib
{
/** @relates Gnome::Canvas::Widget
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Gnome::Canvas::Widget* wrap(GnomeCanvasWidget* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_WIDGET_H */

View file

@ -1,116 +0,0 @@
#include <glib.h>
// Disable the 'const' function attribute of the get_type() functions.
// GCC would optimize them out because we don't use the return value.
#undef G_GNUC_CONST
#define G_GNUC_CONST /* empty */
#include <libgnomecanvasmm/wrap_init.h>
#include <glibmm/error.h>
#include <glibmm/object.h>
// #include the widget headers so that we can call the get_type() static methods:
#include "canvas.h"
#include "ellipse.h"
#include "rect.h"
#include "group.h"
#include "item.h"
#include "line.h"
#include "polygon.h"
#include "rect-ellipse.h"
#include "shape.h"
#include "pixbuf.h"
#include "rich-text.h"
#include "text.h"
#include "widget.h"
#include "path-def.h"
#include "bpath.h"
extern "C"
{
//Declarations of the *_get_type() functions:
GType gnome_canvas_bpath_get_type(void);
GType gnome_canvas_get_type(void);
GType gnome_canvas_ellipse_get_type(void);
GType gnome_canvas_group_get_type(void);
GType gnome_canvas_item_get_type(void);
GType gnome_canvas_line_get_type(void);
GType gnome_canvas_pixbuf_get_type(void);
GType gnome_canvas_polygon_get_type(void);
GType gnome_canvas_rect_get_type(void);
GType gnome_canvas_re_get_type(void);
GType gnome_canvas_rich_text_get_type(void);
GType gnome_canvas_shape_get_type(void);
GType gnome_canvas_text_get_type(void);
GType gnome_canvas_widget_get_type(void);
//Declarations of the *_error_quark() functions:
} // extern "C"
//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
namespace Gnome { namespace Canvas { class Bpath_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Canvas_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Ellipse_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Group_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Item_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Line_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Pixbuf_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Polygon_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Rect_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class RectEllipse_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class RichText_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Shape_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Text_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas { class Widget_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
namespace Gnome { namespace Canvas {
void wrap_init()
{
// Register Error domains:
// Map gtypes to gtkmm wrapper-creation functions:
Glib::wrap_register(gnome_canvas_bpath_get_type(), &Gnome::Canvas::Bpath_Class::wrap_new);
Glib::wrap_register(gnome_canvas_get_type(), &Gnome::Canvas::Canvas_Class::wrap_new);
Glib::wrap_register(gnome_canvas_ellipse_get_type(), &Gnome::Canvas::Ellipse_Class::wrap_new);
Glib::wrap_register(gnome_canvas_group_get_type(), &Gnome::Canvas::Group_Class::wrap_new);
Glib::wrap_register(gnome_canvas_item_get_type(), &Gnome::Canvas::Item_Class::wrap_new);
Glib::wrap_register(gnome_canvas_line_get_type(), &Gnome::Canvas::Line_Class::wrap_new);
Glib::wrap_register(gnome_canvas_pixbuf_get_type(), &Gnome::Canvas::Pixbuf_Class::wrap_new);
Glib::wrap_register(gnome_canvas_polygon_get_type(), &Gnome::Canvas::Polygon_Class::wrap_new);
Glib::wrap_register(gnome_canvas_rect_get_type(), &Gnome::Canvas::Rect_Class::wrap_new);
Glib::wrap_register(gnome_canvas_re_get_type(), &Gnome::Canvas::RectEllipse_Class::wrap_new);
Glib::wrap_register(gnome_canvas_rich_text_get_type(), &Gnome::Canvas::RichText_Class::wrap_new);
Glib::wrap_register(gnome_canvas_shape_get_type(), &Gnome::Canvas::Shape_Class::wrap_new);
Glib::wrap_register(gnome_canvas_text_get_type(), &Gnome::Canvas::Text_Class::wrap_new);
Glib::wrap_register(gnome_canvas_widget_get_type(), &Gnome::Canvas::Widget_Class::wrap_new);
// Register the gtkmm gtypes:
Gnome::Canvas::Bpath::get_type();
Gnome::Canvas::Canvas::get_type();
Gnome::Canvas::Ellipse::get_type();
Gnome::Canvas::Group::get_type();
Gnome::Canvas::Item::get_type();
Gnome::Canvas::Line::get_type();
Gnome::Canvas::Pixbuf::get_type();
Gnome::Canvas::Polygon::get_type();
Gnome::Canvas::Rect::get_type();
Gnome::Canvas::RectEllipse::get_type();
Gnome::Canvas::RichText::get_type();
Gnome::Canvas::Shape::get_type();
Gnome::Canvas::Text::get_type();
Gnome::Canvas::Widget::get_type();
} // wrap_init()
} //Canvas
} //Gnome

View file

@ -1,36 +0,0 @@
#ifndef _LIBGNOMECANVASMM_WRAP_INIT_H
#define _LIBGNOMECANVASMM_WRAP_INIT_H
/* wrap_init.h
*
* Copyright (C) 1998-2001 The libgnomeuimm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// wrap_init.cc is generated by tools/generate_wrap_init.pl
namespace Gnome
{
namespace Canvas
{
void wrap_init();
} /* namespace Canvas */
} /* namespace Gnome */
#endif // _LIBGNOMECANVASMM_WRAP_INIT_H