.TH "QXEmbed" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QXEmbed \- A QXEmbed widget serves as an embedder that can manage one single embedded X-window. The QXEmbed widget is a graphical socket that can embed an external X-Window.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <qxembed.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBProtocol\fP { \fBXEMBED\fP, \fBXPLAIN\fP }"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBembeddedWindowDestroyed\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQXEmbed\fP (\fBQWidget\fP *parent=0, const char *name=0, WFlags f=0)"
.br
.ti -1c
.RI "\fB~QXEmbed\fP ()"
.br
.ti -1c
.RI "void \fBsetProtocol\fP (Protocol proto)"
.br
.ti -1c
.RI "Protocol \fBprotocol\fP ()"
.br
.ti -1c
.RI "void \fBembed\fP (WId w)"
.br
.ti -1c
.RI "WId \fBembeddedWinId\fP () const "
.br
.ti -1c
.RI "void \fBsendDelete\fP (void)"
.br
.ti -1c
.RI "void \fBsetAutoDelete\fP (bool)"
.br
.ti -1c
.RI "bool \fBautoDelete\fP () const "
.br
.ti -1c
.RI "\fBQSize\fP \fBsizeHint\fP () const "
.br
.ti -1c
.RI "\fBQSize\fP \fBminimumSizeHint\fP () const "
.br
.ti -1c
.RI "\fBQSizePolicy\fP \fBsizePolicy\fP () const "
.br
.ti -1c
.RI "bool \fBeventFilter\fP (\fBQObject\fP *, \fBQEvent\fP *)"
.br
.ti -1c
.RI "bool \fBcustomWhatsThis\fP () const "
.br
.ti -1c
.RI "void \fBenterWhatsThisMode\fP ()"
.br
.ti -1c
.RI "virtual void \fBreparent\fP (\fBQWidget\fP *parent, WFlags f, const \fBQPoint\fP &p, bool showIt=false)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBinitialize\fP ()"
.br
.ti -1c
.RI "static void \fBembedClientIntoWindow\fP (\fBQWidget\fP *client, WId window)"
.br
.ti -1c
.RI "static bool \fBprocessClientCmdline\fP (\fBQWidget\fP *client, int &argc, char **argv)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "bool \fBevent\fP (\fBQEvent\fP *)"
.br
.ti -1c
.RI "void \fBkeyPressEvent\fP (\fBQKeyEvent\fP *)"
.br
.ti -1c
.RI "void \fBkeyReleaseEvent\fP (\fBQKeyEvent\fP *)"
.br
.ti -1c
.RI "void \fBfocusInEvent\fP (\fBQFocusEvent\fP *)"
.br
.ti -1c
.RI "void \fBfocusOutEvent\fP (\fBQFocusEvent\fP *)"
.br
.ti -1c
.RI "void \fBresizeEvent\fP (\fBQResizeEvent\fP *)"
.br
.ti -1c
.RI "void \fBshowEvent\fP (\fBQShowEvent\fP *)"
.br
.ti -1c
.RI "bool \fBx11Event\fP (XEvent *)"
.br
.ti -1c
.RI "virtual void \fBwindowChanged\fP (WId w)"
.br
.ti -1c
.RI "bool \fBfocusNextPrevChild\fP (bool next)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A QXEmbed widget serves as an embedder that can manage one single embedded X-window. The QXEmbed widget is a graphical socket that can embed an external X-Window. 

These so-called client windows can be arbitrary \fBQt\fP or non \fBQt\fP applications.
.PP
There are two different ways of using QXEmbed, from the client side or from the embedder's side.
.PP
Embedding from the client's side requires that the client knows the window identifier of the respective embedder widget. Use either \fBembedClientIntoWindow()\fP or the high-level wrapper \fBprocessClientCmdline()\fP. This is only possible when the client is a \fBQt\fP application.
.PP
When using it from the embedder's side, you must know the window identifier of the window that should be embedded. Simply call \fBembed()\fP with this identifier as parameter. If the client is a \fBQt\fP application, make sure it has called \fBQXEmbed::initialize()\fP. Otherwise you should probably call setProtocol(XPLAIN) before \fBembed()\fP.
.PP
Reimplement the change handler \fBwindowChanged()\fP to catch embedding or the destruction of embedded windows. In the latter case, the embedder also emits a signal \fBembeddedWindowDestroyed()\fP for convenience.
.PP
Definition at line 58 of file qxembed.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QXEmbed::QXEmbed (\fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP, WFlags f = \fC0\fP)"
.PP
Constructs a xembed widget. 
.PP
The parent, name and f arguments are passed to the \fBQFrame\fP constructor. 
.PP
Definition at line 608 of file qxembed.cpp.
.PP
References initialize(), QWidget::QWidget(), QApplication::sendPostedEvents(), QWidget::setAcceptDrops(), QWidget::setFocusPolicy(), QWidget::setKeyCompression(), QWidget::topLevelWidget(), and QWidget::winId().
.SS "QXEmbed::~\fBQXEmbed\fP ()"
.PP
Destructor. 
.PP
Cleans up the focus if necessary. 
.PP
Definition at line 668 of file qxembed.cpp.
.PP
References autoDelete(), sendDelete(), QWidget::topLevelWidget(), and QWidget::winId().
.SH "Member Function Documentation"
.PP 
.SS "void QXEmbed::initialize ()\fC [static]\fP"
.PP
Embedded applications should call this function to make sure they support the XEMBED protocol. 
.PP
It is called automatically when you use \fBembedClientIntoWindow()\fP or \fBprocessClientCmdline()\fP. Clients might have to call it manually when you use \fBembed()\fP. 
.PP
Definition at line 568 of file qxembed.cpp.
.PP
References QPtrDict::setAutoDelete().
.PP
Referenced by embedClientIntoWindow(), KSystemTray::KSystemTray(), and QXEmbed().
.SS "void QXEmbed::setProtocol (Protocol proto)"
.PP
Sets the protocol used for embedding windows. 
.PP
This function must be called before embedding a window. Protocol XEMBED provides maximal functionality (focus, tabs, etc) but requires explicit cooperation from the embedded window. Protocol XPLAIN provides maximal compatibility with embedded applications that do not support the XEMBED protocol. The default is XEMBED.
.PP
Non \fBKDE\fP applications should be embedded with protocol XPLAIN. This does not happen automatically yet. You must call \fBsetProtocol()\fP explicitly. 
.PP
Definition at line 739 of file qxembed.cpp.
.SS "QXEmbed::Protocol QXEmbed::protocol ()"
.PP
Returns the protocol used for embedding the current window. 
.PP
\fBReturns:\fP
.RS 4
the protocol used by QXEmbed. 
.RE
.PP

.PP
Definition at line 749 of file qxembed.cpp.
.SS "void QXEmbed::embed (WId w)"
.PP
Embeds the window with the identifier w into this xembed widget. 
.PP
This function is useful if the embedder knows about the client window that should be embedded. Often it is vice versa: the client knows about its target embedder. In that case, it is not necessary to call \fBembed()\fP. Instead, the client will call the static function \fBembedClientIntoWindow()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the identifier of the window to embed 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBembeddedWinId()\fP 
.RE
.PP

.PP
Definition at line 958 of file qxembed.cpp.
.PP
References endl(), QApplication::flushX(), kdDebug(), and QWidget::winId().
.SS "WId QXEmbed::embeddedWinId () const"
.PP
Returns the window identifier of the embedded window, or 0 if no window is embedded yet. 
.PP
\fBReturns:\fP
.RS 4
the id of the embedded window (0 if no window is embedded) 
.RE
.PP

.PP
Definition at line 1012 of file qxembed.cpp.
.SS "void QXEmbed::embedClientIntoWindow (\fBQWidget\fP * client, WId window)\fC [static]\fP"
.PP
A function for clients that embed themselves. \fBprocessClientCmdline()\fP. 
.PP
The widget client will be embedded in the window window. The application has to ensure that window is the handle of the window identifier of an QXEmbed widget.
.PP
Definition at line 1234 of file qxembed.cpp.
.PP
References initialize().
.PP
Referenced by processClientCmdline().
.SS "bool QXEmbed::processClientCmdline (\fBQWidget\fP * client, int & argc, char ** argv)\fC [static]\fP"
.PP
A utility function for clients that embed theirselves. 
.PP
The widget client will be embedded in the window that is passed as -embed command line argument.
.PP
The function returns true on success or false if no such command line parameter is specified.
.PP
\fBSee also:\fP
.RS 4
\fBembedClientIntoWindow()\fP 
.RE
.PP

.PP
Definition at line 1202 of file qxembed.cpp.
.PP
References embedClientIntoWindow(), and QCString::toInt().
.SS "void QXEmbed::sendDelete (void)"
.PP
Sends a WM_DELETE_WINDOW message to the embedded window. 
.PP
This is what typically happens when you click on the close button of a window manager decoration. This should cause the embedded application to cleanly close the window. Signal \fBembeddedWindowDestroyed()\fP can be used to monitor the status of the embedded window. 
.PP
Definition at line 723 of file qxembed.cpp.
.PP
Referenced by ~QXEmbed().
.SS "void QXEmbed::setAutoDelete (bool)"
.PP
Selects what shoud be done with the embedded window when the embedding window is destroyed. 
.PP
When the argument is true, the embedded window is kept alive, is hidden, and receives a WM_DELETE_WINDOW message using \fBsendDelete()\fP. This is the default. Otherwise, the destruction of the QXEmbed object simply destroys the embedded window.
.PP
\fBSee also:\fP
.RS 4
\fBsendDelete()\fP 
.RE
.PP

.PP
Definition at line 1282 of file qxembed.cpp.
.SS "bool QXEmbed::autoDelete () const"
.PP
Returns the value of flag indicating what shoud be done with the embedded window when the embedding window is destroyed. 
.PP
\fBSee also:\fP
.RS 4
\fBsetAutoDelete()\fP 
.RE
.PP

.PP
Definition at line 1288 of file qxembed.cpp.
.PP
Referenced by ~QXEmbed().
.SS "void QXEmbed::embeddedWindowDestroyed ()\fC [signal]\fP"
.PP
This signal is emitted when the embedded window has been lost (destroyed or reparented away). 
.PP
\fBSee also:\fP
.RS 4
\fBembeddedWinId()\fP 
.RE
.PP

.SS "void QXEmbed::windowChanged (WId w)\fC [protected, virtual]\fP"
.PP
A change handler that indicates that the embedded window has been changed. 
.PP
The window handle can also be retrieved with \fBembeddedWinId()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIw\fP the handle of the window that changed 
.RE
.PP

.PP
Definition at line 1195 of file qxembed.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
