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.
77 lines
2.0 KiB
77 lines
2.0 KiB
15 years ago
|
/*
|
||
|
* Laptop KWin Client
|
||
|
*
|
||
|
* Copyright (c) 2005 Sandro Giessl <sandro@giessl.com>
|
||
13 years ago
|
* Ported to the trinity.2 API by Luciano Montanaro <mikelima@cirulla.net>
|
||
15 years ago
|
*/
|
||
|
#ifndef __KDECLIENT_H
|
||
|
#define __KDECLIENT_H
|
||
|
|
||
15 years ago
|
#include <tqbitmap.h>
|
||
15 years ago
|
#include <kpixmap.h>
|
||
|
#include <kcommondecoration.h>
|
||
|
#include <kdecorationfactory.h>
|
||
|
|
||
|
namespace Laptop {
|
||
|
|
||
|
class LaptopClient;
|
||
|
|
||
|
class LaptopButton : public KCommonDecorationButton
|
||
|
{
|
||
|
public:
|
||
|
LaptopButton(ButtonType type, LaptopClient *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);
|
||
|
TQBitmap deco;
|
||
15 years ago
|
};
|
||
|
|
||
|
class LaptopClient : public KCommonDecoration
|
||
|
{
|
||
|
public:
|
||
|
LaptopClient( KDecorationBridge* b, KDecorationFactory* f );
|
||
|
~LaptopClient();
|
||
|
|
||
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);
|
||
|
|
||
15 years ago
|
virtual TQRegion cornerShape(WindowCorner corner);
|
||
15 years ago
|
|
||
|
void init();
|
||
|
protected:
|
||
15 years ago
|
void paintEvent( TQPaintEvent* );
|
||
15 years ago
|
void reset( unsigned long );
|
||
|
void updateActiveBuffer();
|
||
|
void captionChange();
|
||
|
private:
|
||
|
bool mustDrawHandle() const;
|
||
|
bool isTransient() const;
|
||
|
private:
|
||
|
KPixmap activeBuffer;
|
||
|
int lastBufferWidth;
|
||
|
bool bufferDirty;
|
||
|
};
|
||
|
|
||
15 years ago
|
class LaptopClientFactory : public TQObject, public KDecorationFactory
|
||
15 years ago
|
{
|
||
|
public:
|
||
|
LaptopClientFactory();
|
||
|
virtual ~LaptopClientFactory();
|
||
|
virtual KDecoration* createDecoration( KDecorationBridge* );
|
||
|
virtual bool reset( unsigned long changed );
|
||
|
virtual bool supports( Ability ability );
|
||
15 years ago
|
virtual TQValueList< BorderSize > borderSizes() const;
|
||
15 years ago
|
private:
|
||
|
void findPreferredHandleSize();
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|