kwin Library API Documentation

Web.h

00001 /* 00002 'Web' kwin client 00003 00004 Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org> 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; see the file COPYING. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef KWIN_WEB_H 00023 #define KWIN_WEB_H 00024 00025 #include <qptrlist.h> 00026 00027 #include "../../lib/kdecoration.h" 00028 #include "../../lib/kdecorationfactory.h" 00029 00030 class QLabel; 00031 class QSpacerItem; 00032 class QBoxLayout; 00033 00034 namespace Web 00035 { 00036 00037 class WebButton; 00038 00039 class WebClient : public KDecoration 00040 { 00041 Q_OBJECT 00042 00043 public: 00044 00045 WebClient(KDecorationBridge* bridge, KDecorationFactory* factory); 00046 ~WebClient(); 00047 00048 virtual void init(); 00049 virtual void resize(const QSize&); 00050 virtual bool eventFilter( QObject* o, QEvent* e ); 00051 00052 protected: 00053 virtual void reset( unsigned long changed ); 00054 00055 virtual void resizeEvent(QResizeEvent *); 00056 virtual void paintEvent(QPaintEvent *); 00057 virtual void showEvent(QShowEvent *); 00058 virtual void mouseDoubleClickEvent(QMouseEvent *); 00059 00060 virtual void windowWrapperShowEvent(QShowEvent *); 00061 virtual void captionChange(); 00062 virtual void desktopChange(); 00063 virtual void maximizeChange(); 00064 virtual void shadeChange() {}; 00065 virtual void activeChange(); 00066 virtual void iconChange(); 00067 virtual void doShape(); 00068 virtual Position mousePosition(const QPoint &) const; 00069 virtual void borders(int&, int&, int&, int&) const; 00070 virtual QSize minimumSize() const; 00071 00072 protected slots: 00073 00074 void slotMaximize(int button); 00075 00076 signals: 00077 00078 void oadChange(bool); 00079 void maxChange(bool); 00080 00081 private: 00082 bool isTool(); 00083 00084 enum ButtonType 00085 { 00086 ButtonHelp, 00087 ButtonOnAllDesktops, 00088 ButtonMenu, 00089 ButtonSeparator, 00090 ButtonIconify, 00091 ButtonMaximize, 00092 ButtonClose, 00093 ButtonLower 00094 }; 00095 00096 int titleHeight_, borderSize_; 00097 00098 bool shape_; 00099 00100 WebButton * _createButton(const QString &, QWidget * parent); 00101 void _createButtons(); 00102 void _resetLayout(); 00103 00104 QBitmap _buttonBitmap(ButtonType t) const; 00105 00106 QBoxLayout * mainLayout_; 00107 QSpacerItem * titleSpacer_; 00108 00109 QPtrList<WebButton> leftButtonList_; 00110 QPtrList<WebButton> rightButtonList_; 00111 }; 00112 00113 class WebFactory : public QObject, public KDecorationFactory 00114 { 00115 Q_OBJECT 00116 00117 public: 00118 00119 WebFactory() {}; 00120 virtual ~WebFactory() {}; 00121 virtual KDecoration* createDecoration( KDecorationBridge* ); 00122 virtual bool reset( unsigned long changed ); 00123 virtual QValueList< BorderSize > borderSizes() const; 00124 }; 00125 } 00126 00127 #endif 00128 // vim:ts=2:sw=2:tw=78:set et:
KDE Logo
This file is part of the documentation for kwin Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Aug 31 00:02:14 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003