add more spacing
[personal-kdebase.git] / workspace / kwin / clients / redmond / redmond.h
blob9bc46ebde328250038eea15d3ee79f08801bd963
1 /********************************************************************
3 Redmond KWin client
5 Copyright 2001-2003
6 Ported to kwin_iii by Chris Lee <clee@kde.org>
7 Karol Szwed <gallium@kde.org>
8 http://gallium.n3.net/
10 Based on the default KWin client.
12 Updated to support the new API 9/2003 (CL)
13 Updated to emulate More Accurately 9/2003 (CL)
14 Updated to support toolwindows 3/2001 (KS)
16 This program is free software; you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation; either version 2 of the License, or
19 (at your option) any later version.
21 This program is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
26 You should have received a copy of the GNU General Public License
27 along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *********************************************************************/
30 #ifndef __KDE_REDMOND_H
31 #define __KDE_REDMOND_H
33 #include <QBitmap>
34 #include <kcommondecoration.h>
35 #include <kdecorationfactory.h>
37 namespace Redmond {
39 class RedmondDeco;
41 class RedmondButton : public KCommonDecorationButton
43 Q_OBJECT
44 public:
45 RedmondButton(ButtonType type, RedmondDeco *parent);
46 void setBitmap(const unsigned char *bitmap);
47 void setPixmap(const QPixmap &p);
48 void reset(unsigned long changed);
50 protected:
51 void paintEvent(QPaintEvent *);
52 virtual void drawButton(QPainter *p);
53 void drawButtonLabel(QPainter *){;}
55 QBitmap deco;
56 QPixmap pix;
57 bool miniBtn;
61 class RedmondDeco : public KCommonDecoration
63 public:
64 RedmondDeco(KDecorationBridge *, KDecorationFactory *);
65 ~RedmondDeco() {;}
67 virtual QString visibleName() const;
68 virtual QString defaultButtonsLeft() const;
69 virtual QString defaultButtonsRight() const;
70 virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
71 virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
72 virtual KCommonDecorationButton *createButton(ButtonType type);
74 void init();
76 protected:
77 virtual void reset( unsigned long changed );
79 void paintEvent(QPaintEvent*);
81 private:
82 int titleHeight;
85 class RedmondDecoFactory : public QObject, public KDecorationFactory
87 Q_OBJECT
88 public:
89 RedmondDecoFactory();
90 virtual ~RedmondDecoFactory();
91 virtual KDecoration *createDecoration(KDecorationBridge *);
92 virtual bool reset(unsigned long);
93 virtual bool supports( Ability ability ) const;
94 virtual QList< BorderSize > borderSizes() const;
95 private:
96 void readConfig();
101 #endif
102 // vim: ts=4
103 // kate: space-indent off; tab-width 4;