2000-04-25 01:00:31 +00:00
|
|
|
#ifndef __MWMCLIENT_H
|
|
|
|
#define __MWMCLIENT_H
|
|
|
|
|
|
|
|
#include <qbutton.h>
|
|
|
|
#include <qbitmap.h>
|
|
|
|
#include <kpixmap.h>
|
|
|
|
#include "../../client.h"
|
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
namespace KWinInternal {
|
2000-04-25 01:00:31 +00:00
|
|
|
|
2001-05-04 23:45:52 +00:00
|
|
|
|
|
|
|
enum Buttons { BtnMenu=0, BtnIconify=1, BtnMax=2 };
|
|
|
|
|
|
|
|
class MwmClient;
|
|
|
|
|
2000-04-25 01:00:31 +00:00
|
|
|
class MwmButton : public QButton
|
|
|
|
{
|
|
|
|
public:
|
2001-05-04 23:45:52 +00:00
|
|
|
MwmButton( MwmClient* parent=0, const char* name=0, int btnType=0 );
|
2000-04-25 01:00:31 +00:00
|
|
|
void reset();
|
2001-05-26 20:56:20 +00:00
|
|
|
|
2000-04-25 01:00:31 +00:00
|
|
|
protected:
|
2001-05-26 20:56:20 +00:00
|
|
|
virtual void drawButton( QPainter *p );
|
|
|
|
|
2001-05-04 23:45:52 +00:00
|
|
|
private:
|
|
|
|
MwmClient* m_parent;
|
|
|
|
int m_btnType;
|
2000-04-25 01:00:31 +00:00
|
|
|
};
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
class MwmClient : public KWinInternal::Client
|
2000-04-25 01:00:31 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2001-05-04 23:45:52 +00:00
|
|
|
MwmClient( Workspace* ws, WId w, QWidget* parent=0, const char* name=0 );
|
|
|
|
~MwmClient() {};
|
|
|
|
|
2000-04-25 01:00:31 +00:00
|
|
|
protected:
|
|
|
|
void resizeEvent( QResizeEvent* );
|
|
|
|
void paintEvent( QPaintEvent* );
|
|
|
|
|
2001-05-04 23:45:52 +00:00
|
|
|
void mouseDoubleClickEvent( QMouseEvent* );
|
2000-04-25 01:00:31 +00:00
|
|
|
void init();
|
2001-05-04 23:45:52 +00:00
|
|
|
void captionChange( const QString& );
|
|
|
|
void activeChange( bool );
|
2001-06-10 12:27:26 +00:00
|
|
|
MousePosition mousePosition( const QPoint& p ) const;
|
2001-05-04 23:45:52 +00:00
|
|
|
|
2000-04-25 01:00:31 +00:00
|
|
|
protected slots:
|
|
|
|
void slotReset();
|
2001-05-04 23:45:52 +00:00
|
|
|
void slotMaximize();
|
|
|
|
void menuButtonPressed();
|
|
|
|
|
2000-04-25 01:00:31 +00:00
|
|
|
private:
|
|
|
|
MwmButton* button[3];
|
|
|
|
QSpacerItem* titlebar;
|
|
|
|
};
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
};
|
2000-04-25 01:00:31 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|