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.
28
#include <kdecoration.h>
29
#include <kdecorationfactory.h>
31
namespace KWinPlastik {
35
TitleGradient1, // top
37
TitleGradient3, // bottom
74
class PlastikHandler: public QObject, public KDecorationFactory
80
virtual bool reset( unsigned long changed );
82
virtual KDecoration* createDecoration( KDecorationBridge* );
83
virtual bool supports( Ability ability ) const;
85
const QPixmap &pixmap(Pixmaps type, bool active, bool toolWindow);
86
const QBitmap &buttonBitmap(ButtonIcon type, const QSize &size, bool toolWindow);
88
int titleHeight() const { return m_titleHeight; }
89
int titleHeightTool() const { return m_titleHeightTool; }
90
const QFont &titleFont() { return m_titleFont; }
91
const QFont &titleFontTool() { return m_titleFontTool; }
92
bool titleShadow() const { return m_titleShadow; }
93
int borderSize() const { return m_borderSize; }
94
bool animateButtons() const { return m_animateButtons; }
95
bool menuClose() const { return m_menuClose; }
96
Qt::AlignmentFlag titleAlign() const { return m_titleAlign; }
97
bool reverseLayout() const { return m_reverse; }
98
QColor getColor(KWinPlastik::ColorType type, const bool active = true);
100
QList< PlastikHandler::BorderSize > borderSizes() const;
104
bool m_coloredBorder;
106
bool m_animateButtons;
111
int m_titleHeightTool;
113
QFont m_titleFontTool;
114
Qt::AlignmentFlag m_titleAlign;
117
QPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
118
QBitmap *m_bitmaps[2][NumButtonIcons];
121
PlastikHandler* Handler();