#include <qpalette.h>
#include <qfont.h>
#include "qwindowsstyle.h"
#include "qpixmap.h"

#include "bncs_style.h"


class  cc_style : public QWindowsStyle
{
	Q_OBJECT
public:
	enum cornerStyle
	{
		noButtonCorners=0,
		square,
		rounded
	};
	enum buttonStyle
	{
		noButtonStyle=0,
		plain,
		scoopIn,
		scoopOut,
	};
	cc_style();
	virtual ~cc_style();

	void polish( QApplication * app );
	void unPolish( QApplication * app );
	void drawControlMask( ControlElement element,
					  QPainter *p,
					  const QWidget *widget,
					  const QRect &r,
					  const QStyleOption& opt ) const;
	void drawControl ( ControlElement pe, 
									QPainter * p, 
									const QWidget* w,
									const QRect & r, 
									const QColorGroup & cg, 
									SFlags flags, 
									const QStyleOption & opt ) const;
	int pixelMetric ( PixelMetric metric, const QWidget * widget ) const;
	void polish( QWidget * );
	void unPolish( QWidget *w );

	QRect subRect ( SubRect subrect, const QWidget * widget ) const;
private:
	void bncs_control_mask( QPainter * p, QRect & r );

	QPalette m_oldpalette;
	QFont m_oldfont;
	QPixmap m_backgroundBitmap;

//	QColor light, mid, dark;
	QPixmap m_topLeft, m_topRight, m_bottomLeft, m_bottomRight, m_topPix, m_bottomPix, m_leftPix, m_rightPix;

	enum buttonStyle m_buttonStyle;
	enum cornerStyle m_cornerStyle;

	float m_scoopDepth;

	QColor m_activeBase;
	QColor m_activeHighlight;
	QColor m_activeHighlightedText;
	QColor m_activeForeground;
	QColor m_activeText;
	QColor m_activeButtonText;
	QColor m_activeButton;
	QColor m_activeLight;
	QColor m_activeDark;
	QColor m_activeMid;
	QColor m_activeBackground;
	QColor m_activeMidlight;
	QColor m_activeBrightText;
	QColor m_activeShadow;

	QColor m_disabledBase;
	QColor m_disabledHighlight;
	QColor m_disabledHighlightedText;
	QColor m_disabledForeground;
	QColor m_disabledText;
	QColor m_disabledButtonText;
	QColor m_disabledButton;
	QColor m_disabledLight;
	QColor m_disabledDark;
	QColor m_disabledMid;
	QColor m_disabledBackground;
	QColor m_disabledMidlight;
	QColor m_disabledBrightText;
	QColor m_disabledShadow;

};