add more spacing
[personal-kdebase.git] / workspace / kwin / clients / plastik / plastikclient.h
blob4c5b0d958684ed32ec816b8ed7a2ba77523517a5
1 /* Plastik KWin window decoration
2 Copyright (C) 2003-2005 Sandro Giessl <sandro@giessl.com>
4 based on the window decoration "Web":
5 Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
23 #ifndef PLASTIKCLIENT_H
24 #define PLASTIKCLIENT_H
26 #include <kcommondecoration.h>
28 #include "plastik.h"
30 namespace KWinPlastik {
33 class PlastikClient : public KCommonDecoration
35 public:
36 PlastikClient(KDecorationBridge* bridge, KDecorationFactory* factory);
37 ~PlastikClient();
39 virtual QString visibleName() const;
40 virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
41 virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
42 virtual QRegion cornerShape(WindowCorner corner);
43 virtual KCommonDecorationButton *createButton(ButtonType type);
45 virtual void init();
46 virtual void reset( unsigned long changed );
48 virtual void paintEvent(QPaintEvent *e);
49 virtual void updateCaption();
51 const QPixmap &getTitleBarTile(bool active) const;
53 private:
54 QRect captionRect() const;
56 const QPixmap &captionPixmap() const;
57 void clearCaptionPixmaps();
59 mutable QPixmap *m_captionPixmaps[2];
61 QRect m_captionRect;
62 QString oldCaption;
64 // settings...
65 QFont s_titleFont;
68 } // KWinPlastik
70 #endif // PLASTIKCLIENT_H