diff --git a/src/sp-item-group.h b/src/sp-item-group.h
index 578454c9237e6591ad55fa7389c8168ab6cc8d47..b78291074697f8c30af899a26d164bf3b461703a 100644 (file)
--- a/src/sp-item-group.h
+++ b/src/sp-item-group.h
#define SP_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_GROUP))
#define SP_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_GROUP))
+class CGroup;
+
+namespace NR{ struct translate; }
+
struct SPGroup : public SPItem {
enum LayerMode { GROUP, LAYER };
LayerMode layerDisplayMode(unsigned int display_key) const;
void setLayerDisplayMode(unsigned int display_key, LayerMode mode);
+ void translateChildItems(NR::translate const &tr);
+
+ CGroup *group;
private:
void _updateLayerMode(unsigned int display_key=0);
SPItemClass parent_class;
};
+/*
+ * Virtual methods of SPGroup
+ */
+class CGroup {
+public:
+ CGroup(SPGroup *group);
+ virtual ~CGroup();
+
+ virtual void onChildAdded(Inkscape::XML::Node *child);
+ virtual void onChildRemoved(Inkscape::XML::Node *child);
+ virtual void onUpdate(SPCtx *ctx, unsigned int flags);
+ virtual void onModified(guint flags);
+ virtual void calculateBBox(NRRect *bbox, NR::Matrix const &transform, unsigned const flags);
+ virtual void onPrint(SPPrintContext *ctx);
+ virtual void onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref);
+ virtual gchar *getDescription();
+ virtual NRArenaItem *show (NRArena *arena, unsigned int key, unsigned int flags);
+ virtual void hide (unsigned int key);
+
+ gint getItemCount();
+
+protected:
+ enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow };
+ virtual GSList *_childList(bool add_ref, Action action = ActionGeneral);
+ virtual void _showChildren (NRArena *arena, NRArenaItem *ai, unsigned int key, unsigned int flags);
+
+ SPGroup *_group;
+};
+
GType sp_group_get_type (void);
void sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done = true);