summaryrefslogtreecommitdiffstats
path: root/kwin/clients/default/kdedefault.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kwin/clients/default/kdedefault.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/clients/default/kdedefault.h')
-rw-r--r--kwin/clients/default/kdedefault.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/kwin/clients/default/kdedefault.h b/kwin/clients/default/kdedefault.h
new file mode 100644
index 000000000..53ad23fa2
--- /dev/null
+++ b/kwin/clients/default/kdedefault.h
@@ -0,0 +1,103 @@
+/*
+ *
+ * KDE2 Default KWin client
+ *
+ * Copyright (C) 1999, 2001 Daniel Duley <mosfet@kde.org>
+ * Matthias Ettrich <ettrich@kde.org>
+ * Karol Szwed <gallium@kde.org>
+ *
+ * Draws mini titlebars for tool windows.
+ * Many features are now customizable.
+ */
+
+#ifndef _KDE_DEFAULT_H
+#define _KDE_DEFAULT_H
+
+#include <qbutton.h>
+#include <qbitmap.h>
+#include <qdatetime.h>
+#include <kpixmap.h>
+#include <kcommondecoration.h>
+#include <kdecorationfactory.h>
+
+class QSpacerItem;
+class QBoxLayout;
+class QGridLayout;
+
+namespace Default {
+
+class KDEDefaultClient;
+
+class KDEDefaultHandler: public KDecorationFactory
+{
+ public:
+ KDEDefaultHandler();
+ ~KDEDefaultHandler();
+ KDecoration* createDecoration( KDecorationBridge* b );
+ bool reset( unsigned long changed );
+ virtual QValueList< BorderSize > borderSizes() const;
+ virtual bool supports( Ability ability );
+
+ private:
+ unsigned long readConfig( bool update );
+ void createPixmaps();
+ void freePixmaps();
+ void drawButtonBackground(KPixmap *pix,
+ const QColorGroup &g, bool sunken);
+};
+
+
+// class KDEDefaultButton : public QButton, public KDecorationDefines
+class KDEDefaultButton : public KCommonDecorationButton
+{
+ public:
+ KDEDefaultButton(ButtonType type, KDEDefaultClient *parent, const char *name);
+ ~KDEDefaultButton();
+
+ void reset(unsigned long changed);
+
+ void setBitmap(const unsigned char *bitmap);
+
+ protected:
+ void enterEvent(QEvent *);
+ void leaveEvent(QEvent *);
+ void drawButton(QPainter *p);
+ void drawButtonLabel(QPainter*) {;}
+
+ QBitmap* deco;
+ bool large;
+ bool isMouseOver;
+};
+
+
+class KDEDefaultClient : public KCommonDecoration
+{
+ public:
+ KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f );
+ ~KDEDefaultClient() {;}
+
+ virtual QString visibleName() const;
+ virtual QString defaultButtonsLeft() const;
+ virtual QString defaultButtonsRight() const;
+ virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
+ virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
+ virtual KCommonDecorationButton *createButton(ButtonType type);
+
+ virtual QRegion cornerShape(WindowCorner corner);
+
+ void init();
+ void reset( unsigned long changed );
+
+ protected:
+ void paintEvent( QPaintEvent* );
+
+ private:
+ bool mustDrawHandle() const;
+ int titleHeight;
+};
+
+}
+
+#endif
+// vim: ts=4
+// kate: space-indent off; tab-width 4;