From 0b6057404f65218182ab27a9483a21065ef61fca Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 7 Nov 2011 21:50:33 -0600 Subject: Rename kwin to twin (Part 2 of 2) --- twin/clients/default/kdedefault.h | 103 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 twin/clients/default/kdedefault.h (limited to 'twin/clients/default/kdedefault.h') diff --git a/twin/clients/default/kdedefault.h b/twin/clients/default/kdedefault.h new file mode 100644 index 000000000..70b8847fa --- /dev/null +++ b/twin/clients/default/kdedefault.h @@ -0,0 +1,103 @@ +/* + * + * KDE2 Default KWin client + * + * Copyright (C) 1999, 2001 Daniel Duley + * Matthias Ettrich + * Karol Szwed + * + * Draws mini titlebars for tool windows. + * Many features are now customizable. + */ + +#ifndef _KDE_DEFAULT_H +#define _KDE_DEFAULT_H + +#include +#include +#include +#include +#include +#include + +class TQSpacerItem; +class TQBoxLayout; +class TQGridLayout; + +namespace Default { + +class KDEDefaultClient; + +class KDEDefaultHandler: public KDecorationFactory +{ + public: + KDEDefaultHandler(); + ~KDEDefaultHandler(); + KDecoration* createDecoration( KDecorationBridge* b ); + bool reset( unsigned long changed ); + virtual TQValueList< BorderSize > borderSizes() const; + virtual bool supports( Ability ability ); + + private: + unsigned long readConfig( bool update ); + void createPixmaps(); + void freePixmaps(); + void drawButtonBackground(KPixmap *pix, + const TQColorGroup &g, bool sunken); +}; + + +// class KDEDefaultButton : public TQButton, 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(TQEvent *); + void leaveEvent(TQEvent *); + void drawButton(TQPainter *p); + void drawButtonLabel(TQPainter*) {;} + + TQBitmap* deco; + bool large; + bool isMouseOver; +}; + + +class KDEDefaultClient : public KCommonDecoration +{ + public: + KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f ); + ~KDEDefaultClient() {;} + + virtual TQString visibleName() const; + virtual TQString defaultButtonsLeft() const; + virtual TQString 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 TQRegion cornerShape(WindowCorner corner); + + void init(); + void reset( unsigned long changed ); + + protected: + void paintEvent( TQPaintEvent* ); + + private: + bool mustDrawHandle() const; + int titleHeight; +}; + +} + +#endif +// vim: ts=4 +// kate: space-indent off; tab-width 4; -- cgit v1.2.1