summaryrefslogtreecommitdiffstats
path: root/kstyles/asteroid/asteroid.h
blob: 7bd652a12196d265adf020fde90de89da96eab1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
 *	Copyright 2003, Chris Lee <clee@kde.org>
 *
 *	See LICENSE for details about copyright.
 */

#ifndef __ASTEROID_H
#define __ASTEROID_H

#include <kstyle.h>

class AsteroidStyle : public KStyle
{
	Q_OBJECT
	
public:
	AsteroidStyle();
	virtual ~AsteroidStyle();

	void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
	void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
	void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
	void applicationUnPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);

	
	void renderSliderHandle(TQPainter *p,
                                     const TQRect &r,
                                     const TQColorGroup &g,
                                     const bool mouseOver,
                                     const bool horizontal,
                                     const bool enabled) const;

	void renderMenuBlendPixmap(KPixmap &,
	                           const TQColorGroup &,
	                           const TQPopupMenu *) const;
	
	void drawKStylePrimitive(KStylePrimitive,
	                         TQPainter *,
	                         const TQStyleControlElementData &ceData,
	                         ControlElementFlags elementFlags,
	                         const TQRect &,
	                         const TQColorGroup &,
	                         SFlags = Style_Default,
	                         const TQStyleOption & = TQStyleOption::Default,
	                         const TQWidget * = 0) const;

	int styleHint(TQ_StyleHint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
			    const TQStyleOption & = TQStyleOption::Default,
			    TQStyleHintReturn * = 0,
			    const TQWidget * = 0 ) const;

	void drawPrimitive(TQ_PrimitiveElement,
	                   TQPainter *,
	                   const TQStyleControlElementData &ceData,
	                   ControlElementFlags elementFlags,
	                   const TQRect &,
	                   const TQColorGroup &,
	                   SFlags = Style_Default,
	                   const TQStyleOption & = TQStyleOption::Default) const;

	void drawControl(TQ_ControlElement,
	                 TQPainter *,
	                 const TQStyleControlElementData &ceData,
	                 ControlElementFlags elementFlags,
	                 const TQRect &,
	                 const TQColorGroup &,
	                 SFlags = Style_Default,
	                 const TQStyleOption & = TQStyleOption::Default,
	                 const TQWidget * = 0) const;

	void drawControlMask(TQ_ControlElement,
	                     TQPainter *,
	                     const TQStyleControlElementData &ceData,
	                     ControlElementFlags elementFlags,
	                     const TQRect &,
	                     const TQStyleOption &,
	                     const TQWidget * = 0) const;

	void drawComplexControl(TQ_ComplexControl,
	                        TQPainter *,
	                        const TQStyleControlElementData &ceData,
	                        ControlElementFlags elementFlags,
	                        const TQRect &,
	                        const TQColorGroup &,
	                        SFlags = Style_Default,
	                        SCFlags controls = SC_All,
	                        SCFlags active = SC_None,
	                        const TQStyleOption & = TQStyleOption::Default,
	                        const TQWidget * = 0) const;

	void drawComplexControlMask(TQ_ComplexControl,
	                            TQPainter *,
	                            const TQStyleControlElementData &ceData,
	                            const ControlElementFlags elementFlags,
	                            const TQRect &r,
	                            const TQStyleOption & = TQStyleOption::Default,
	                            const TQWidget * = 0) const;

	int pixelMetric(PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * = 0) const;

	int kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const;

	TQRect subRect(SubRect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *) const;

	TQRect querySubControlMetrics(TQ_ComplexControl,
	                             const TQStyleControlElementData &ceData,
	                             ControlElementFlags elementFlags,
	                             SubControl,
	                             const TQStyleOption & = TQStyleOption::Default,
	                             const TQWidget * = 0) const;

	TQSize sizeFromContents(ContentsType,
	                       const TQStyleControlElementData &ceData,
	                       ControlElementFlags elementFlags,
	                       const TQSize &,
	                       const TQStyleOption &,
	                       const TQWidget * = 0) const;

	virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );

protected slots:
	void paletteChanged();

private:
	AsteroidStyle(const AsteroidStyle &);
	AsteroidStyle &operator = (const AsteroidStyle &);

/*	Settings not needed yet. */
//	TQSettings *settings;
	bool backwards;
};

#endif /* __ASTEROID_H */