summaryrefslogtreecommitdiffstats
path: root/twin/clients/kwmtheme/kwmthemeclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'twin/clients/kwmtheme/kwmthemeclient.h')
-rw-r--r--twin/clients/kwmtheme/kwmthemeclient.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/twin/clients/kwmtheme/kwmthemeclient.h b/twin/clients/kwmtheme/kwmthemeclient.h
new file mode 100644
index 000000000..58db3d14f
--- /dev/null
+++ b/twin/clients/kwmtheme/kwmthemeclient.h
@@ -0,0 +1,74 @@
+#ifndef __KWMTHEMECLIENT_H
+#define __KWMTHEMECLIENT_H
+
+#include <tqbutton.h>
+#include <tqtoolbutton.h>
+#include <kpixmap.h>
+#include <kdecoration.h>
+#include <kdecorationfactory.h>
+
+class TQLabel;
+class TQSpacerItem;
+class TQGridLayout;
+
+namespace KWMTheme {
+
+class MyButton : public TQToolButton
+{
+public:
+ MyButton(TQWidget *parent=0, const char *name=0)
+ : TQToolButton(parent, name){setAutoRaise(true);setCursor( arrowCursor ); }
+protected:
+ void drawButtonLabel(TQPainter *p);
+};
+
+class KWMThemeClient : public KDecoration
+{
+ Q_OBJECT
+public:
+ KWMThemeClient( KDecorationBridge* b, KDecorationFactory* f );
+ ~KWMThemeClient(){;}
+ void init();
+ void resize( const TQSize& s );
+ TQSize minimumSize() const;
+ void borders( int& left, int& right, int& top, int& bottom ) const;
+protected:
+ void doShape();
+ void drawTitle(TQPainter &p);
+ void resizeEvent( TQResizeEvent* );
+ void paintEvent( TQPaintEvent* );
+ void showEvent( TQShowEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ bool eventFilter( TQObject* o, TQEvent* e );
+ void captionChange();
+ void desktopChange();
+ void maximizeChange();
+ void iconChange();
+ void activeChange();
+ void shadeChange() {};
+ Position mousePosition(const TQPoint &) const;
+protected slots:
+ //void slotReset();
+ void menuButtonPressed();
+ void slotMaximize();
+private:
+ TQPixmap buffer;
+ KPixmap *aGradient, *iGradient;
+ MyButton *maxBtn, *stickyBtn, *mnuBtn;
+ TQSpacerItem *titlebar;
+ TQGridLayout* layout;
+};
+
+class KWMThemeFactory : public KDecorationFactory
+{
+public:
+ KWMThemeFactory();
+ ~KWMThemeFactory();
+ KDecoration* createDecoration( KDecorationBridge* b );
+ bool reset( unsigned long mask );
+};
+
+}
+
+#endif
+