.TH "QXEmbed" 3 "28 Jan 2004" "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
.RI "\fIThis signal is emitted when the embedded window has been destroyed. \fP"
.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
.RI "\fIConstructs a xembed widget. \fP"
.ti -1c
.RI "\fB~QXEmbed\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "void \fBsetProtocol\fP (Protocol proto)"
.br
.RI "\fISets the protocol used for embedding windows. \fP"
.ti -1c
.RI "Protocol \fBprotocol\fP ()"
.br
.RI "\fIReturns the protocol used for embedding the current window. \fP"
.ti -1c
.RI "void \fBembed\fP (WId w)"
.br
.RI "\fIEmbeds the window with the identifier w into this xembed widget. \fP"
.ti -1c
.RI "WId \fBembeddedWinId\fP () const "
.br
.RI "\fIReturns the window identifier of the embedded window, or 0 if no window is embedded yet. \fP"
.ti -1c
.RI "\fBQSize\fP \fBsizeHint\fP () const "
.br
.RI "\fIReturns a size sufficient for the embedded window. \fP"
.ti -1c
.RI "\fBQSize\fP \fBminimumSizeHint\fP () const "
.br
.RI "\fIReturns the minimum size specified by the embedded window. \fP"
.ti -1c
.RI "\fBQSizePolicy\fP \fBsizePolicy\fP () const "
.br
.RI "\fISpecifies that this widget can use additional space, and that it can survive on less than \fBsizeHint\fP(). \fP"
.ti -1c
.RI "bool \fBeventFilter\fP (\fBQObject\fP *, \fBQEvent\fP *)"
.br
.ti -1c
.RI "void \fBsetAutoDelete\fP (bool)"
.br
.ti -1c
.RI "bool \fBautoDelete\fP () const "
.br
.ti -1c
.RI "bool \fBcustomWhatsThis\fP () const "
.br
.ti -1c
.RI "void \fBenterWhatsThisMode\fP ()"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "void \fBinitialize\fP ()"
.br
.RI "\fIEmbedded applications should call this function to make sure they support the XEMBED protocol. \fP"
.ti -1c
.RI "void \fBembedClientIntoWindow\fP (\fBQWidget\fP *client, WId window)"
.br
.RI "\fIA function for clients that embed themselves. \fBprocessClientCmdline()\fP. \fP"
.ti -1c
.RI "bool \fBprocessClientCmdline\fP (\fBQWidget\fP *client, int &argc, char **argv)"
.br
.RI "\fIA utility function for clients that embed theirselves. \fP"
.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
.RI "\fIA change handler that indicates that the embedded window has been changed. \fP"
.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 QWidgets.
.PP
There are two different ways of using QXEmbed, from the embedder's or from the client's side. When using it from the embedder's side, you already know the window identifier of the window that should be embedded. Simply call \fBembed\fP() with this identifier as parameter.
.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().
.PP
If a window has been embedded succesfully, \fBembeddedWinId\fP() returns its id.
.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 61 of file qxembed.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QXEmbed::QXEmbed (\fBQWidget\fP * parent = 0, const char * name = 0, WFlags f = 0)"
.PP
Constructs a xembed widget. The parent, name and f arguments are passed to the \fBQFrame\fP constructor. 
.SS "QXEmbed::~\fBQXEmbed\fP ()"
.PP
Destructor. Cleans up the focus if necessary. 
.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. It is called automatically when you use \fBembedClientIntoWindow\fP() or \fBprocessClientCmdline\fP(). Clients might have to call it manually when you use \fBembed\fP(). 
.SS "void QXEmbed::setProtocol (Protocol proto)"
.PP
Sets the protocol used for embedding windows. 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
Future work: Create a protocol AUTO that selects the best option. This will be possible with the XEMBED v2 specification. 
.SS "Protocol QXEmbed::protocol ()"
.PP
Returns the protocol used for embedding the current window. \fBReturns:\fP
.RS 4
the protocol used by QXEmbed. 
.RE
.PP

.SS "void QXEmbed::embed (WId w)"
.PP
Embeds the window with the identifier w into this xembed widget. This function is useful if the server 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 
.br
\fIproto\fP is the embedding protocol to use 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBembeddedWinId()\fP 
.RE
.PP

.SS "WId QXEmbed::embeddedWinId () const"
.PP
Returns the window identifier of the embedded window, or 0 if no window is embedded yet. \fBReturns:\fP
.RS 4
the id of the embedded window (0 if no window is embedded) 
.RE
.PP

.SS "void QXEmbed::embedClientIntoWindow (\fBQWidget\fP * client, WId window)\fC [static]\fP"
.PP
A function for clients that embed themselves. \fBprocessClientCmdline()\fP. 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.
.SS "bool QXEmbed::processClientCmdline (\fBQWidget\fP * client, int & argc, char ** argv)\fC [static]\fP"
.PP
A utility function for clients that embed theirselves. The widget client will be embedded in the window that is passed as -embed command line argument.
.PP
The function returns TRUE on sucess or FALSE if no such command line parameter is specified.
.PP
\fBSee also:\fP
.RS 4
\fBembedClientIntoWindow()\fP 
.RE
.PP

.SS "\fBQSize\fP QXEmbed::sizeHint () const"
.PP
Returns a size sufficient for the embedded window. Reimplemented from \fBQWidget\fP.
.SS "\fBQSize\fP QXEmbed::minimumSizeHint () const"
.PP
Returns the minimum size specified by the embedded window. Reimplemented from \fBQWidget\fP.
.SS "\fBQSizePolicy\fP QXEmbed::sizePolicy () const"
.PP
Specifies that this widget can use additional space, and that it can survive on less than \fBsizeHint\fP(). Reimplemented from \fBQWidget\fP.
.SS "void QXEmbed::embeddedWindowDestroyed ()\fC [signal]\fP"
.PP
This signal is emitted when the embedded window has been destroyed. \fBSee also:\fP
.RS 4
\fBembeddedWinId()\fP 
.RE
.PP

.SS "virtual void QXEmbed::windowChanged (WId w)\fC [protected, virtual]\fP"
.PP
A change handler that indicates that the embedded window has been changed. 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


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