1 /*********************************************************************
3 KDE2 Default KWin client
5 Copyright (C) 1999, 2001 Daniel Duley <mosfet@kde.org>
6 Matthias Ettrich <ettrich@kde.org>
7 Karol Szwed <gallium@kde.org>
9 Draws mini titlebars for tool windows.
10 Many features are now customizable.
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *********************************************************************/
31 #include <kcommondecoration.h>
32 #include <kdecorationfactory.h>
40 class KDE2Handler
: public KDecorationFactory
45 KDecoration
* createDecoration( KDecorationBridge
* b
);
46 bool reset( unsigned long changed
);
47 virtual QList
< BorderSize
> borderSizes() const;
48 virtual bool supports( Ability ability
) const;
51 unsigned long readConfig( bool update
);
54 void drawButtonBackground(QPixmap
*pix
,
55 const QPalette
&g
, bool sunken
);
59 class KDE2Button
: public KCommonDecorationButton
62 KDE2Button(ButtonType type
, KDE2Client
*parent
, const char *name
);
65 void reset(unsigned long changed
);
67 void setBitmap(const unsigned char *bitmap
);
70 void enterEvent(QEvent
*);
71 void leaveEvent(QEvent
*);
72 void paintEvent(QPaintEvent
*);
73 void drawButton(QPainter
*p
);
74 void drawButtonLabel(QPainter
*) {;}
82 class KDE2Client
: public KCommonDecoration
85 KDE2Client( KDecorationBridge
* b
, KDecorationFactory
* f
);
88 virtual QString
visibleName() const;
89 virtual bool decorationBehaviour(DecorationBehaviour behaviour
) const;
90 virtual int layoutMetric(LayoutMetric lm
, bool respectWindowState
= true, const KCommonDecorationButton
* = 0) const;
91 virtual KCommonDecorationButton
*createButton(ButtonType type
);
93 virtual QRegion
cornerShape(WindowCorner corner
);
96 void reset( unsigned long changed
);
99 void paintEvent( QPaintEvent
* );
102 bool mustDrawHandle() const;
110 // kate: space-indent off; tab-width 4;