1 /********************************************************************
6 Ported to kwin_iii by Chris Lee <clee@kde.org>
7 Karol Szwed <gallium@kde.org>
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
34 #include <kcommondecoration.h>
35 #include <kdecorationfactory.h>
41 class RedmondButton
: public KCommonDecorationButton
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
);
51 void paintEvent(QPaintEvent
*);
52 virtual void drawButton(QPainter
*p
);
53 void drawButtonLabel(QPainter
*){;}
61 class RedmondDeco
: public KCommonDecoration
64 RedmondDeco(KDecorationBridge
*, KDecorationFactory
*);
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
);
77 virtual void reset( unsigned long changed
);
79 void paintEvent(QPaintEvent
*);
85 class RedmondDecoFactory
: public QObject
, public KDecorationFactory
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;
103 // kate: space-indent off; tab-width 4;