00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef QXEMBED_H
00023 #define QXEMBED_H
00024
00025 #include <qwidget.h>
00026
00027 #ifdef Q_WS_X11
00028
00029 class QXEmbedData;
00030
00057 class QXEmbed : public QWidget
00058 {
00059 Q_OBJECT
00060
00061 public:
00062
00070 QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
00071
00075 ~QXEmbed();
00076
00084 static void initialize();
00085
00086 enum Protocol { XEMBED, XPLAIN };
00087
00102 void setProtocol( Protocol proto );
00103
00110 Protocol protocol();
00111
00124 void embed( WId w );
00125
00132 WId embeddedWinId() const;
00133
00142 static void embedClientIntoWindow( QWidget* client, WId window );
00143
00154 static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
00155
00163 void sendDelete( void );
00164
00174 void setAutoDelete( bool );
00175
00182 bool autoDelete() const;
00183
00184
00185 QSize sizeHint() const;
00186 QSize minimumSizeHint() const;
00187 QSizePolicy sizePolicy() const;
00188 bool eventFilter( QObject *, QEvent * );
00189 bool customWhatsThis() const;
00190 void enterWhatsThisMode();
00191 virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
00192
00196 void updateEmbeddedFocus( bool hasfocus );
00197
00198 signals:
00204
00205 void embeddedWindowDestroyed();
00206
00207 protected:
00208 bool event( QEvent * );
00209 void keyPressEvent( QKeyEvent * );
00210 void keyReleaseEvent( QKeyEvent * );
00211 void focusInEvent( QFocusEvent * );
00212 void focusOutEvent( QFocusEvent * );
00213 void resizeEvent(QResizeEvent *);
00214 void showEvent( QShowEvent * );
00215 bool x11Event( XEvent* );
00216
00224 virtual void windowChanged( WId w );
00225
00226 bool focusNextPrevChild( bool next );
00227
00228 private:
00229 WId window;
00230 QXEmbedData* d;
00231 void checkGrab();
00232 void sendSyntheticConfigureNotifyEvent();
00233 };
00234
00235
00236 #endif
00237 #endif