diff options
| author | Markus Engel <markus.engel@tum.de> | 2012-08-21 00:54:06 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2012-08-21 00:54:06 +0000 |
| commit | 62fbbefccbe10ec11e727735e6bfe890003b0af2 (patch) | |
| tree | 1741dcb7c61f75230ba00489ee2d9f3c0d11692f /src/sp-gradient.h | |
| parent | Added "virtual pad" to SPScript. (diff) | |
| download | inkscape-62fbbefccbe10ec11e727735e6bfe890003b0af2.tar.gz inkscape-62fbbefccbe10ec11e727735e6bfe890003b0af2.zip | |
Added "virtual pad" to
- SPPaintServer
- SPPattern
- SPGradient
- SPStop
- SPLinearGradient
- SPMeshGradient
- SPMeshPatch
- SPMeshRow
- SPRadialGradient
As all subclasses of SPPaintServer now have "virtual pads" with correct inheritance, the virtual function call to "onCreatePattern" was converted to C++ style.
(bzr r11608.1.35)
Diffstat (limited to 'src/sp-gradient.h')
| -rw-r--r-- | src/sp-gradient.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/sp-gradient.h b/src/sp-gradient.h index 61b459eee..5c156f41c 100644 --- a/src/sp-gradient.h +++ b/src/sp-gradient.h @@ -87,6 +87,7 @@ std::vector<PaintTarget> const &allPaintTargets(); } // namespace Inkscape +class CGradient; /** * Gradient @@ -95,6 +96,9 @@ std::vector<PaintTarget> const &allPaintTargets(); * \todo fixme: Implement more here (Lauris) */ class SPGradient : public SPPaintServer { +public: + CGradient* cgradient; + private: /** gradientUnits attribute */ SPGradientUnits units; @@ -197,7 +201,7 @@ private: void rebuildVector(); void rebuildArray(); - friend class SPGradientImpl; + friend class CGradient; // friend class SPLGPainter; // friend class SPRGPainter; }; @@ -210,6 +214,33 @@ struct SPGradientClass { }; +class CGradient : public CPaintServer { +public: + CGradient(SPGradient* gradient); + virtual ~CGradient(); + + static void classInit(SPGradientClass *klass); + static void init(SPGradient *gr); + + virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); + virtual void onRelease(); + virtual void onModified(guint flags); + virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + + + static void gradientRefModified(SPObject *href, guint flags, SPGradient *gradient); + static void gradientRefChanged(SPObject *old_ref, SPObject *ref, SPGradient *gr); + + virtual void onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref); + virtual void onRemoveChild(Inkscape::XML::Node *child); + + virtual void onSet(unsigned key, gchar const *value); + +protected: + SPGradient* spgradient; +}; + + #include "sp-gradient-fns.h" #endif // SEEN_SP_GRADIENT_H |
