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.
96 lines
2.2 KiB
96 lines
2.2 KiB
15 years ago
|
/*
|
||
|
* Gallium-Quartz KWin client
|
||
|
*
|
||
|
* Copyright (C) 2005 Sandro Giessl <sandro@giessl.com>
|
||
|
* Copyright 2001
|
||
|
* Karol Szwed <gallium@kde.org>
|
||
|
* http://gallium.n3.net/
|
||
|
*
|
||
|
* Based on the KDE default client.
|
||
|
*
|
||
|
* Includes mini titlebars for ToolWindow Support.
|
||
|
* Button positions are now customizable.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef __KDEGALLIUM_QUARTZ_H
|
||
|
#define __KDEGALLIUM_QUARTZ_H
|
||
|
|
||
14 years ago
|
#include <tqbitmap.h>
|
||
15 years ago
|
#include <kpixmap.h>
|
||
|
#include "../../lib/kcommondecoration.h"
|
||
|
#include "../../lib/kdecorationfactory.h"
|
||
|
|
||
14 years ago
|
class TQSpacerItem;
|
||
|
class TQBoxLayout;
|
||
15 years ago
|
|
||
|
namespace Quartz {
|
||
|
|
||
|
class QuartzClient;
|
||
|
|
||
14 years ago
|
class QuartzHandler: public TQObject, public KDecorationFactory
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
QuartzHandler();
|
||
|
~QuartzHandler();
|
||
|
|
||
|
virtual KDecoration* createDecoration( KDecorationBridge* );
|
||
|
virtual bool reset(unsigned long changed);
|
||
|
virtual bool supports( Ability ability );
|
||
14 years ago
|
virtual TQValueList< BorderSize > borderSizes() const;
|
||
15 years ago
|
|
||
|
private:
|
||
|
void readConfig();
|
||
|
void createPixmaps();
|
||
|
void freePixmaps();
|
||
14 years ago
|
void drawBlocks(KPixmap* pi, KPixmap &p, const TQColor &c1, const TQColor &c2);
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
|
class QuartzButton : public KCommonDecorationButton
|
||
|
{
|
||
|
public:
|
||
|
QuartzButton(ButtonType type, QuartzClient *parent, const char *name);
|
||
|
~QuartzButton();
|
||
|
void setBitmap(const unsigned char *bitmap);
|
||
|
|
||
|
void reset(unsigned long changed);
|
||
|
|
||
|
protected:
|
||
14 years ago
|
void drawButton(TQPainter *p);
|
||
15 years ago
|
|
||
14 years ago
|
TQBitmap* deco;
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
|
class QuartzClient : public KCommonDecoration
|
||
|
{
|
||
|
public:
|
||
|
QuartzClient(KDecorationBridge* bridge, KDecorationFactory* factory);
|
||
|
~QuartzClient() {;}
|
||
|
|
||
14 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 init();
|
||
|
|
||
|
protected:
|
||
|
virtual void reset( unsigned long changed );
|
||
14 years ago
|
void paintEvent( TQPaintEvent* );
|
||
15 years ago
|
|
||
|
private:
|
||
|
int titleHeight, borderSize;
|
||
|
bool largeButtons;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
// vim: ts=4
|
||
|
// kate: space-indent off; tab-width 4;
|