1 /********************************************************************
2 This program is free software; you can redistribute it and/or modify
3 it under the terms of the GNU General Public License as published by
4 the Free Software Foundation; either version 2 of the License, or
5 (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *********************************************************************/
16 #ifndef __KWMTHEMECLIENT_H
17 #define __KWMTHEMECLIENT_H
20 #include <QToolButton>
22 #include <kdecoration.h>
23 #include <kdecorationfactory.h>
30 class MyButton
: public QToolButton
33 explicit MyButton(QWidget
*parent
=0, const char *name
=0)
34 : QToolButton(parent
, name
){setAutoRaise(true);setCursor( arrowCursor
); }
36 void drawButtonLabel(QPainter
*p
);
39 class KWMThemeClient
: public KDecoration
43 KWMThemeClient( KDecorationBridge
* b
, KDecorationFactory
* f
);
46 void resize( const QSize
& s
);
47 QSize
minimumSize() const;
48 void borders( int& left
, int& right
, int& top
, int& bottom
) const;
51 void drawTitle(QPainter
&p
);
52 void resizeEvent( QResizeEvent
* );
53 void paintEvent( QPaintEvent
* );
54 void showEvent( QShowEvent
* );
55 void mouseDoubleClickEvent( QMouseEvent
* );
56 bool eventFilter( QObject
* o
, QEvent
* e
);
59 void maximizeChange();
62 void shadeChange() {};
63 Position
mousePosition(const QPoint
&) const;
66 void menuButtonPressed();
70 KPixmap
*aGradient
, *iGradient
;
71 MyButton
*maxBtn
, *stickyBtn
, *mnuBtn
;
72 QSpacerItem
*titlebar
;
76 class KWMThemeFactory
: public KDecorationFactory
81 KDecoration
* createDecoration( KDecorationBridge
* b
);
82 bool reset( unsigned long mask
);