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 <tqwidget.h>
00026 #include <tdelibs_export.h>
00027
00028 #ifdef Q_MOC_RUN
00029 #define Q_WS_X11
00030 #endif // Q_MOC_RUN
00031
00032 #ifdef Q_WS_X11
00033
00034 class QXEmbedData;
00035
00062 class TDEUI_EXPORT QXEmbed : public TQWidget
00063 {
00064 Q_OBJECT
00065
00066
00067 public:
00068
00076 QXEmbed( TQWidget *parent=0, const char *name=0, WFlags f = 0 );
00077
00081 ~QXEmbed();
00082
00090 static void initialize();
00091
00092 enum Protocol { XEMBED, XPLAIN };
00093
00108 void setProtocol( Protocol proto );
00109
00116 Protocol protocol();
00117
00130 void embed( WId w );
00131
00138 WId embeddedWinId() const;
00139
00148 static void embedClientIntoWindow( TQWidget* client, WId window );
00149
00160 static bool processClientCmdline( TQWidget* client, int& argc, char ** argv );
00161
00169 void sendDelete( void );
00170
00180 void setAutoDelete( bool );
00181
00188 bool autoDelete() const;
00189
00190
00191 TQSize sizeHint() const;
00192 TQSize minimumSizeHint() const;
00193 TQSizePolicy sizePolicy() const;
00194 bool eventFilter( TQObject *, TQEvent * );
00195 bool customWhatsThis() const;
00196 void enterWhatsThisMode();
00197 virtual void reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = false );
00198
00202 void updateEmbeddedFocus( bool hasfocus );
00203
00204 signals:
00210
00211 void embeddedWindowDestroyed();
00212
00213 protected:
00214 bool event( TQEvent * );
00215 void keyPressEvent( TQKeyEvent * );
00216 void keyReleaseEvent( TQKeyEvent * );
00217 void focusInEvent( TQFocusEvent * );
00218 void focusOutEvent( TQFocusEvent * );
00219 void resizeEvent(TQResizeEvent *);
00220 void showEvent( TQShowEvent * );
00221 bool x11Event( XEvent* );
00222
00230 virtual void windowChanged( WId w );
00231
00232 bool focusNextPrevChild( bool next );
00233
00234 private:
00235 WId window;
00236 QXEmbedData* d;
00237 void checkGrab();
00238 void sendSyntheticConfigureNotifyEvent();
00239 void handleEmbed();
00240 };
00241
00242
00243 #endif
00244 #endif