diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
| commit | aadfea4113abc6863d7ab03d21b973802c41c503 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/sp-object-group.h | |
| parent | Pot and Dutch translation update (diff) | |
| parent | A simple layout document as to what, why and how is cppification. (diff) | |
| download | inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip | |
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/sp-object-group.h')
| -rw-r--r-- | src/sp-object-group.h | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/src/sp-object-group.h b/src/sp-object-group.h index 5d67df6fe..a666a316a 100644 --- a/src/sp-object-group.h +++ b/src/sp-object-group.h @@ -1,11 +1,12 @@ -#ifndef __SP_OBJECTGROUP_H__ -#define __SP_OBJECTGROUP_H__ +#ifndef SEEN_SP_OBJECTGROUP_H +#define SEEN_SP_OBJECTGROUP_H /* * Abstract base class for non-item groups * * Author: * Lauris Kaplinski <lauris@kaplinski.com> + * Abhishek Sharma * * Copyright (C) 1999-2003 Authors * Copyright (C) 2001-2002 Ximian, Inc. @@ -15,19 +16,46 @@ #include "sp-object.h" -#define SP_TYPE_OBJECTGROUP (sp_objectgroup_get_type ()) +#define SP_TYPE_OBJECTGROUP (SPObjectGroup::sp_objectgroup_get_type ()) #define SP_OBJECTGROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_OBJECTGROUP, SPObjectGroup)) #define SP_OBJECTGROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_OBJECTGROUP, SPObjectGroupClass)) #define SP_IS_OBJECTGROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_OBJECTGROUP)) #define SP_IS_OBJECTGROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_OBJECTGROUP)) -struct SPObjectGroup : public SPObject { -}; +class SPObjectGroup : public SPObject { +public: + static GType sp_objectgroup_get_type(void); + +private: + static void init(SPObjectGroup *objectgroup); -struct SPObjectGroupClass { - SPObjectClass parent_class; + static void childAdded(SPObject * object, Inkscape::XML::Node * child, Inkscape::XML::Node * ref); + static void removeChild(SPObject * object, Inkscape::XML::Node * child); + static void orderChanged(SPObject * object, Inkscape::XML::Node * child, Inkscape::XML::Node * old_ref, Inkscape::XML::Node * new_ref); + static Inkscape::XML::Node *write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); + + friend class SPObjectGroupClass; }; -GType sp_objectgroup_get_type (void); +class SPObjectGroupClass { +public: + SPObjectClass parent_class; + +private: + static void sp_objectgroup_class_init(SPObjectGroupClass *klass); + static SPObjectClass *static_parent_class; -#endif + friend class SPObjectGroup; +}; + +#endif // SEEN_SP_OBJECTGROUP_H +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |
