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.
104 lines
2.4 KiB
104 lines
2.4 KiB
15 years ago
|
/*
|
||
|
*
|
||
|
* KDE2 Default KWin client
|
||
|
*
|
||
|
* Copyright (C) 1999, 2001 Daniel Duley <mosfet@kde.org>
|
||
|
* Matthias Ettrich <ettrich@kde.org>
|
||
|
* Karol Szwed <gallium@kde.org>
|
||
|
*
|
||
|
* Draws mini titlebars for tool windows.
|
||
|
* Many features are now customizable.
|
||
|
*/
|
||
|
|
||
|
#ifndef _KDE_DEFAULT_H
|
||
|
#define _KDE_DEFAULT_H
|
||
|
|
||
15 years ago
|
#include <tqbutton.h>
|
||
|
#include <tqbitmap.h>
|
||
|
#include <tqdatetime.h>
|
||
15 years ago
|
#include <kpixmap.h>
|
||
|
#include <kcommondecoration.h>
|
||
|
#include <kdecorationfactory.h>
|
||
|
|
||
14 years ago
|
class TQSpacerItem;
|
||
|
class TQBoxLayout;
|
||
|
class TQGridLayout;
|
||
15 years ago
|
|
||
|
namespace Default {
|
||
|
|
||
|
class KDEDefaultClient;
|
||
|
|
||
|
class KDEDefaultHandler: public KDecorationFactory
|
||
|
{
|
||
|
public:
|
||
|
KDEDefaultHandler();
|
||
|
~KDEDefaultHandler();
|
||
|
KDecoration* createDecoration( KDecorationBridge* b );
|
||
|
bool reset( unsigned long changed );
|
||
15 years ago
|
virtual TQValueList< BorderSize > borderSizes() const;
|
||
15 years ago
|
virtual bool supports( Ability ability );
|
||
|
|
||
|
private:
|
||
|
unsigned long readConfig( bool update );
|
||
|
void createPixmaps();
|
||
|
void freePixmaps();
|
||
|
void drawButtonBackground(KPixmap *pix,
|
||
15 years ago
|
const TQColorGroup &g, bool sunken);
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
15 years ago
|
// class KDEDefaultButton : public TQButton, public KDecorationDefines
|
||
15 years ago
|
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:
|
||
15 years ago
|
void enterEvent(TQEvent *);
|
||
|
void leaveEvent(TQEvent *);
|
||
|
void drawButton(TQPainter *p);
|
||
|
void drawButtonLabel(TQPainter*) {;}
|
||
15 years ago
|
|
||
15 years ago
|
TQBitmap* deco;
|
||
15 years ago
|
bool large;
|
||
|
bool isMouseOver;
|
||
|
};
|
||
|
|
||
|
|
||
|
class KDEDefaultClient : public KCommonDecoration
|
||
|
{
|
||
|
public:
|
||
|
KDEDefaultClient( KDecorationBridge* b, KDecorationFactory* f );
|
||
|
~KDEDefaultClient() {;}
|
||
|
|
||
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();
|
||
|
void reset( unsigned long changed );
|
||
|
|
||
|
protected:
|
||
15 years ago
|
void paintEvent( TQPaintEvent* );
|
||
15 years ago
|
|
||
|
private:
|
||
|
bool mustDrawHandle() const;
|
||
|
int titleHeight;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
// vim: ts=4
|
||
|
// kate: space-indent off; tab-width 4;
|