00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PLASTIKCLIENT_H
00024 #define PLASTIKCLIENT_H
00025
00026 #include <kcommondecoration.h>
00027
00028 #include "plastik.h"
00029
00030 namespace KWinPlastik {
00031
00032 class PlastikButton;
00033
00034 class PlastikClient : public KCommonDecoration
00035 {
00036 public:
00037 PlastikClient(KDecorationBridge* bridge, KDecorationFactory* factory);
00038 ~PlastikClient();
00039
00040 virtual TQString visibleName() const;
00041 virtual TQString defaultButtonsLeft() const;
00042 virtual TQString defaultButtonsRight() const;
00043 virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
00044 virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
00045 virtual TQRegion cornerShape(WindowCorner corner);
00046 virtual KCommonDecorationButton *createButton(ButtonType type);
00047
00048 virtual void init();
00049 virtual void reset( unsigned long changed );
00050
00051 virtual void paintEvent(TQPaintEvent *e);
00052 virtual void updateCaption();
00053
00054 const TQPixmap &getTitleBarTile(bool active) const;
00055
00056 private:
00057 TQRect captionRect() const;
00058
00059 const TQPixmap &captionPixmap() const;
00060 void clearCaptionPixmaps();
00061
00062 mutable TQPixmap *m_captionPixmaps[2];
00063
00064 TQRect m_captionRect;
00065 TQString oldCaption;
00066
00067
00068 TQFont s_titleFont;
00069 };
00070
00071 }
00072
00073 #endif // PLASTIKCLIENT_H