qxembed.h
00001 /**************************************************************************** 00002 Definition of QXEmbed class 00003 00004 Copyright (C) 1999-2000 Troll Tech AS 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library 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 library 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 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. 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 QXEMBED_H 00023 #define QXEMBED_H 00024 00025 #include <qwidget.h> 00026 00027 #ifndef Q_WS_QWS 00028 00029 /* 00030 Documentation for this class is in the cpp-file! 00031 */ 00032 00033 00034 class QXEmbedData; 00035 00061 class QXEmbed : public QWidget 00062 { 00063 Q_OBJECT 00064 00065 public: 00066 00074 QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 ); 00075 00079 ~QXEmbed(); 00080 00081 static void initialize(); 00082 00095 void embed( WId w ); 00096 00103 WId embeddedWinId() const; 00104 00113 static void embedClientIntoWindow( QWidget* client, WId window ); 00114 00125 static bool processClientCmdline( QWidget* client, int& argc, char ** argv ); 00126 00127 00131 QSize sizeHint() const; 00132 00136 QSize minimumSizeHint() const; 00137 00142 QSizePolicy sizePolicy() const; 00143 00144 bool eventFilter( QObject *, QEvent * ); 00145 00146 void setAutoDelete( bool ); 00147 bool autoDelete() const; 00148 00149 bool customWhatsThis() const; 00150 void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 ) 00151 00152 signals: 00158 void embeddedWindowDestroyed(); 00159 00160 protected: 00161 bool event( QEvent * ); 00162 void keyPressEvent( QKeyEvent * ); 00163 void keyReleaseEvent( QKeyEvent * ); 00164 void focusInEvent( QFocusEvent * ); 00165 void focusOutEvent( QFocusEvent * ); 00166 void resizeEvent(QResizeEvent *); 00167 void showEvent( QShowEvent * ); 00168 bool x11Event( XEvent* ); 00169 00177 virtual void windowChanged( WId w ); 00178 00179 bool focusNextPrevChild( bool next ); 00180 00181 private: 00182 WId window; 00183 QXEmbedData* d; 00184 void sendSyntheticConfigureNotifyEvent(); 00185 }; 00186 00187 00188 #endif 00189 #endif