kwin/clients/mwm/mwmclient.h
Lennart Kudling 33c3749ee6 innovation of the year: make mwm look like mwm.
(some repaint-buglets remain. more work later.)

svn path=/trunk/kdebase/kwin/; revision=95217
2001-05-04 23:45:52 +00:00

60 lines
1.1 KiB
C++

#ifndef __MWMCLIENT_H
#define __MWMCLIENT_H
#include <qbutton.h>
#include <qbitmap.h>
#include <kpixmap.h>
#include "../../client.h"
class QLabel;
class QSpacerItem;
namespace KWinInternal {
enum Buttons { BtnMenu=0, BtnIconify=1, BtnMax=2 };
class MwmClient;
class MwmButton : public QButton
{
public:
MwmButton( MwmClient* parent=0, const char* name=0, int btnType=0 );
void reset();
protected:
virtual void drawButton(QPainter *p);
void drawButtonLabel(QPainter *){;}
private:
MwmClient* m_parent;
int m_btnType;
};
class MwmClient : public KWinInternal::Client
{
Q_OBJECT
public:
MwmClient( Workspace* ws, WId w, QWidget* parent=0, const char* name=0 );
~MwmClient() {};
protected:
void resizeEvent( QResizeEvent* );
void paintEvent( QPaintEvent* );
void mouseDoubleClickEvent( QMouseEvent* );
void init();
void captionChange( const QString& );
void activeChange( bool );
protected slots:
void slotReset();
void slotMaximize();
void menuButtonPressed();
private:
MwmButton* button[3];
QSpacerItem* titlebar;
};
};
#endif