/***************************************************************************
 *   Copyright (C) 2004 by Hans Oischinger                                 *
 *   hans.oischinger@kdemail.net                                           *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program 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 General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
 ***************************************************************************/
#ifndef STYLABLE_H
#define STYLABLE_H

#include "elementnode.h"

class Attribute;
class FillAttribute;
class StrokeAttribute;
/**
Inherited by all Elements that can be styled with fill and stroke
 
@author Hans Oischinger
*/
class Stylable : public ElementNode
{
  Q_OBJECT
public:
  Stylable( const QString & name = "", State state = undefined );
  Stylable( const Stylable &other );
  ~Stylable();

  Stylable &operator=(const Stylable&);
  virtual Attribute* getAttrByName( const QString& name );
  
  FillAttribute& fill() const { return *m_fill; }
  StrokeAttribute& stroke() const { return *m_stroke; }

protected:
  void init();
  
  // Attributes
  //   AnimatedLength *strokeWidth() const { return m_strokeWidth; }

  /*  unsigned int strokeMiterLimit() const;
    void setStrokeMiterLimit(unsigned int strokeMiterLimit);
   
    KCWindRule fillRule() const;
    void setFillRule(KCWindRule fillRule);
   
    KCWindRule clipRule() const;
    void setClipRule(KCWindRule clipRule);
   
    KCCapStyle strokeCapStyle() const;
    void setStrokeCapStyle(KCCapStyle strokeCapStyle);
   
    KCJoinStyle strokeJoinStyle() const;
    void setStrokeJoinStyle(KCJoinStyle strokeJoinStyle);
   
    KCColorInterpolation colorInterpolation() const;
    void setColorInterpolation(KCColorInterpolation colorInterpolation);
   
    float opacity() const;
    void setOpacity(float opacity);
   
    float fillOpacity() const;
    void setFillOpacity(float fillOpacity);
   
    float strokeOpacity() const;
    void setStrokeOpacity(float strokeOpacity);*/

private:
  FillAttribute* m_fill;
  StrokeAttribute* m_stroke;
  
  
  //   AnimatedLength *m_strokeWidth;

  /*  unsigned int m_strokeMiterLimit;
   
    KCWindRule m_fillRule;
    KCWindRule m_clipRule;
    KCCapStyle m_strokeCapStyle;
    KCJoinStyle m_strokeJoinStyle;
    KCColorInterpolation m_colorInterpolation;
   
    float m_opacity;
    float m_fillOpacity;
    float m_strokeOpacity;*/

};

#endif
