// Generated file, do not edit!
/*
 For general Scribus (>=1.3.2) copyright and licensing information please refer
 to the COPYING file provided with the program. Following this notice may exist
 a copyright and/or license notice that predates the release of Scribus 1.3.2
 for which a new license (GPL+exception) is in place.
 */


\#ifndef ${c.name.upper()}_H
\#define ${c.name.upper()}_H

\#include "scribusIO.h"

class ${c.name} : public Style, public ScribusIO
{
	// properties
#for $a in $c.properties
	${a.datatype} _${a.name};
#end for

#for $a in $c.properties
	uint _isset${a.name} : 1;
#end for

public:

	${c.name}() {
		clear();
	}
	
	${c.name}(const ${c.name} & other);
	
	${c.name} & operator=(const ${c.name} & other);


#for $a in $c.properties

	const ${a.datatype}& ${a.getter}() const {
		return _${a.name};
	}

#if $a.type == "coll"
	${a.datatype}& ${a.getter}() {
		return _${a.name};
	}
	
#else
	void set${a.name}(${a.datatype} val) {
		_${a.name} = val;
		_isset${a.name} = 1;
	}
	
	bool isInh${a.name}() const {
		return !_isset${a.name};
	}
	
	void reset${a.name}() {
		${a.name} = ${a.initial};
		_isset${a.name} = 0;
	}
	
	bool isDef${a.name}() const {
		if (_isset${a.name}) return true;
		const ${c.name} * parent = dynamic_cast<const ${c.name}*>(parentStyle());
		return parent && parent->isDef${a.name}();
	}
		
#end if
#end for

	virtual void xmlIn(ScXmlStreamReader& r, ScribusBuilder& builder);
	virtual void xmlOut(ScXmlStreamWriter& w, const QString& xmlName) const;

	void clear();
	void apply(const ${c.name}& other);
	void erase(const ${c.name}& other);
	void setStyle(const ${c.name}& other);
	bool equiv(const Style& other);

	/**
		sets a new StyleContext if b is not NULL and then uses the StyleContext
		to set all inherited attributes to their valid value.
	 */
	void update(const StyleContext* b);
	
};

\#endif
