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 #ifndef Q_WS_QWS
00028
00029
00030
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
00088 static void initialize();
00089
00090 enum Protocol { XEMBED, XPLAIN };
00091
00106 void setProtocol( Protocol proto );
00107
00114 Protocol protocol();
00115
00128 void embed( WId w );
00129
00136 WId embeddedWinId() const;
00137
00146 static void embedClientIntoWindow( QWidget* client, WId window );
00147
00158 static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
00159
00160
00164 QSize sizeHint() const;
00165
00169 QSize minimumSizeHint() const;
00170
00175 QSizePolicy sizePolicy() const;
00176
00177 bool eventFilter( QObject *, QEvent * );
00178
00179 void setAutoDelete( bool );
00180 bool autoDelete() const;
00181
00182 bool customWhatsThis() const;
00183 void enterWhatsThisMode();
00184
00185 virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
00186
00187 signals:
00193 void embeddedWindowDestroyed();
00194
00195 protected:
00196 bool event( QEvent * );
00197 void keyPressEvent( QKeyEvent * );
00198 void keyReleaseEvent( QKeyEvent * );
00199 void focusInEvent( QFocusEvent * );
00200 void focusOutEvent( QFocusEvent * );
00201 void resizeEvent(QResizeEvent *);
00202 void showEvent( QShowEvent * );
00203 bool x11Event( XEvent* );
00204
00212 virtual void windowChanged( WId w );
00213
00214 bool focusNextPrevChild( bool next );
00215
00216 private:
00217 WId window;
00218 QXEmbedData* d;
00219 void checkGrab();
00220 void sendSyntheticConfigureNotifyEvent();
00221 };
00222
00223
00224 #endif
00225 #endif