2001-05-06 19:03:20 +00:00
|
|
|
/*
|
|
|
|
'Web' kwin client
|
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
Copyright (C) 2005 Sandro Giessl <sandro@giessl.com>
|
2001-05-06 19:03:20 +00:00
|
|
|
Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; see the file COPYING. If not, write to
|
2005-10-05 08:44:32 +00:00
|
|
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
2005-07-04 19:02:09 +00:00
|
|
|
Boston, MA 02110-1301, USA.
|
2001-05-06 19:03:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KWIN_WEB_H
|
|
|
|
#define KWIN_WEB_H
|
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
#include "../../lib/kcommondecoration.h"
|
2003-09-18 14:59:47 +00:00
|
|
|
#include "../../lib/kdecorationfactory.h"
|
2001-05-06 19:03:20 +00:00
|
|
|
|
|
|
|
class QLabel;
|
|
|
|
class QSpacerItem;
|
|
|
|
class QBoxLayout;
|
|
|
|
|
2002-08-27 18:08:20 +00:00
|
|
|
namespace Web
|
2001-05-06 19:03:20 +00:00
|
|
|
{
|
2002-08-27 18:08:20 +00:00
|
|
|
|
2001-05-06 19:03:20 +00:00
|
|
|
class WebButton;
|
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
class WebClient : public KCommonDecoration
|
2001-05-06 19:03:20 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2003-09-18 14:59:47 +00:00
|
|
|
WebClient(KDecorationBridge* bridge, KDecorationFactory* factory);
|
2002-08-27 18:08:20 +00:00
|
|
|
~WebClient();
|
2001-05-06 19:03:20 +00:00
|
|
|
|
2005-03-21 19:57:25 +00:00
|
|
|
virtual QString visibleName() const;
|
|
|
|
virtual QString defaultButtonsLeft() const;
|
|
|
|
virtual QString defaultButtonsRight() const;
|
|
|
|
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
|
|
|
|
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
|
|
|
|
virtual KCommonDecorationButton *createButton(ButtonType type);
|
|
|
|
|
|
|
|
virtual void updateWindowShape();
|
|
|
|
|
2003-09-18 14:59:47 +00:00
|
|
|
virtual void init();
|
|
|
|
|
2001-05-06 19:03:20 +00:00
|
|
|
protected:
|
2003-09-18 14:59:47 +00:00
|
|
|
virtual void reset( unsigned long changed );
|
2001-05-06 19:03:20 +00:00
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2003-09-18 14:59:47 +00:00
|
|
|
int titleHeight_, borderSize_;
|
|
|
|
|
2001-05-06 19:03:20 +00:00
|
|
|
bool shape_;
|
|
|
|
|
|
|
|
QBitmap _buttonBitmap(ButtonType t) const;
|
|
|
|
};
|
2003-09-18 14:59:47 +00:00
|
|
|
|
|
|
|
class WebFactory : public QObject, public KDecorationFactory
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2007-03-20 14:21:56 +00:00
|
|
|
WebFactory() {}
|
|
|
|
virtual ~WebFactory() {}
|
2003-09-18 14:59:47 +00:00
|
|
|
virtual KDecoration* createDecoration( KDecorationBridge* );
|
|
|
|
virtual bool reset( unsigned long changed );
|
2004-11-05 15:33:09 +00:00
|
|
|
virtual bool supports( Ability ability );
|
2005-07-28 14:59:42 +00:00
|
|
|
virtual QList< BorderSize > borderSizes() const;
|
2003-09-18 14:59:47 +00:00
|
|
|
};
|
2001-05-06 19:03:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// vim:ts=2:sw=2:tw=78:set et:
|
2005-03-21 19:57:25 +00:00
|
|
|
// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on;
|