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"
|
2001-07-01 10:10:17 +00:00
|
|
|
#include "../../kwinbutton.h"
|
2000-04-25 01:00:31 +00:00
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
|
2001-02-20 01:20:38 +00:00
|
|
|
namespace KWinInternal {
|
2000-04-25 01:00:31 +00:00
|
|
|
|
2001-07-01 10:10:17 +00:00
|
|
|
class MwmClient;
|
2001-05-04 23:45:52 +00:00
|
|
|
|
|
|
|
enum Buttons { BtnMenu=0, BtnIconify=1, BtnMax=2 };
|
|
|
|
|
2001-07-01 10:10:17 +00:00
|
|
|
class MwmButton : public KWinInternal::KWinButton
|
2000-04-25 01:00:31 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-07-01 10:10:17 +00:00
|
|
|
MwmButton( MwmClient* parent=0, const char* name=0, int btnType=0,
|
|
|
|
const QString& tip=NULL );
|
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:
|
|
|
|
int m_btnType;
|
2001-07-01 10:10:17 +00:00
|
|
|
Client* m_parent;
|
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& );
|
2001-07-01 10:10:17 +00:00
|
|
|
void maximizeChange( bool m );
|
2001-05-04 23:45:52 +00:00
|
|
|
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
|
|
|
|
|