You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.8 KiB
73 lines
1.8 KiB
15 years ago
|
#ifndef __MODSYSTEMCLIENT_H
|
||
|
#define __MODSYSTEMCLIENT_H
|
||
|
|
||
15 years ago
|
#include <tqbitmap.h>
|
||
15 years ago
|
#include <kpixmap.h>
|
||
|
#include <kcommondecoration.h>
|
||
|
#include <kdecorationfactory.h>
|
||
|
|
||
15 years ago
|
class TQLabel;
|
||
|
class TQSpacerItem;
|
||
15 years ago
|
|
||
|
namespace ModernSystem {
|
||
|
|
||
|
class ModernSys;
|
||
|
|
||
|
class ModernButton : public KCommonDecorationButton
|
||
|
{
|
||
|
public:
|
||
|
ModernButton(ButtonType type, ModernSys *parent, const char *name);
|
||
|
void setBitmap(const unsigned char *bitmap);
|
||
|
virtual void reset(unsigned long changed);
|
||
|
protected:
|
||
|
|
||
15 years ago
|
virtual void drawButton(TQPainter *p);
|
||
|
void drawButtonLabel(TQPainter *){;}
|
||
|
TQBitmap deco;
|
||
15 years ago
|
};
|
||
|
|
||
|
class ModernSys : public KCommonDecoration
|
||
|
{
|
||
|
public:
|
||
|
ModernSys( KDecorationBridge* b, KDecorationFactory* f );
|
||
|
~ModernSys(){;}
|
||
|
|
||
15 years ago
|
virtual TQString visibleName() const;
|
||
|
virtual TQString defaultButtonsLeft() const;
|
||
|
virtual TQString defaultButtonsRight() const;
|
||
15 years ago
|
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
|
||
14 years ago
|
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
|
||
15 years ago
|
virtual KCommonDecorationButton *createButton(ButtonType type);
|
||
|
|
||
|
virtual void updateWindowShape();
|
||
|
virtual void updateCaption();
|
||
|
|
||
|
void init();
|
||
|
protected:
|
||
15 years ago
|
void drawRoundFrame(TQPainter &p, int x, int y, int w, int h);
|
||
|
void paintEvent( TQPaintEvent* );
|
||
15 years ago
|
void recalcTitleBuffer();
|
||
|
void reset( unsigned long );
|
||
|
private:
|
||
15 years ago
|
TQPixmap titleBuffer;
|
||
|
TQString oldTitle;
|
||
15 years ago
|
bool reverse;
|
||
|
};
|
||
|
|
||
15 years ago
|
class ModernSysFactory : public TQObject, public KDecorationFactory
|
||
15 years ago
|
{
|
||
|
public:
|
||
|
ModernSysFactory();
|
||
|
virtual ~ModernSysFactory();
|
||
|
virtual KDecoration* createDecoration( KDecorationBridge* );
|
||
|
virtual bool reset( unsigned long changed );
|
||
|
virtual bool supports( Ability ability );
|
||
15 years ago
|
TQValueList< BorderSize > borderSizes() const;
|
||
15 years ago
|
private:
|
||
|
void read_config();
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|