\section{QXEmbed Class Reference}
\label{classQXEmbed}\index{QXEmbed@{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.  


{\tt \#include $<$qxembed.h$>$}

Inheritance diagram for QXEmbed:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{classQXEmbed__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for QXEmbed:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{classQXEmbed__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Protocol} \{ {\bf XEMBED}, 
{\bf XPLAIN}
 \}
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf embedded\-Window\-Destroyed} ()
\begin{CompactList}\small\item\em This signal is emitted when the embedded window has been destroyed. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf QXEmbed} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0, WFlags f=0)
\begin{CompactList}\small\item\em Constructs a xembed widget. \item\end{CompactList}\item 
{\bf $\sim$QXEmbed} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf set\-Protocol} (Protocol proto)
\begin{CompactList}\small\item\em Sets the protocol used for embedding windows. \item\end{CompactList}\item 
Protocol {\bf protocol} ()
\begin{CompactList}\small\item\em Returns the protocol used for embedding the current window. \item\end{CompactList}\item 
void {\bf embed} (WId w)
\begin{CompactList}\small\item\em Embeds the window with the identifier w into this xembed widget. \item\end{CompactList}\item 
WId {\bf embedded\-Win\-Id} () const 
\begin{CompactList}\small\item\em Returns the window identifier of the embedded window, or 0 if no window is embedded yet. \item\end{CompactList}\item 
{\bf QSize} {\bf size\-Hint} () const 
\begin{CompactList}\small\item\em Returns a size sufficient for the embedded window. \item\end{CompactList}\item 
{\bf QSize} {\bf minimum\-Size\-Hint} () const 
\begin{CompactList}\small\item\em Returns the minimum size specified by the embedded window. \item\end{CompactList}\item 
{\bf QSize\-Policy} {\bf size\-Policy} () const 
\begin{CompactList}\small\item\em Specifies that this widget can use additional space, and that it can survive on less than {\bf size\-Hint}{\rm (p.\,\pageref{classQXEmbed_a6})}(). \item\end{CompactList}\item 
bool {\bf event\-Filter} ({\bf QObject} $\ast$, {\bf QEvent} $\ast$)\label{classQXEmbed_a9}

\item 
void {\bf set\-Auto\-Delete} (bool)\label{classQXEmbed_a10}

\item 
bool {\bf auto\-Delete} () const \label{classQXEmbed_a11}

\item 
bool {\bf custom\-Whats\-This} () const \label{classQXEmbed_a12}

\item 
void {\bf enter\-Whats\-This\-Mode} ()\label{classQXEmbed_a13}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf initialize} ()
\begin{CompactList}\small\item\em Embedded applications should call this function to make sure they support the XEMBED protocol. \item\end{CompactList}\item 
void {\bf embed\-Client\-Into\-Window} ({\bf QWidget} $\ast$client, WId window)
\begin{CompactList}\small\item\em A function for clients that embed themselves. {\bf process\-Client\-Cmdline()}{\rm (p.\,\pageref{classQXEmbed_e2})}. \item\end{CompactList}\item 
bool {\bf process\-Client\-Cmdline} ({\bf QWidget} $\ast$client, int \&argc, char $\ast$$\ast$argv)
\begin{CompactList}\small\item\em A utility function for clients that embed theirselves. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
bool {\bf event} ({\bf QEvent} $\ast$)\label{classQXEmbed_b0}

\item 
void {\bf key\-Press\-Event} ({\bf QKey\-Event} $\ast$)\label{classQXEmbed_b1}

\item 
void {\bf key\-Release\-Event} ({\bf QKey\-Event} $\ast$)\label{classQXEmbed_b2}

\item 
void {\bf focus\-In\-Event} ({\bf QFocus\-Event} $\ast$)\label{classQXEmbed_b3}

\item 
void {\bf focus\-Out\-Event} ({\bf QFocus\-Event} $\ast$)\label{classQXEmbed_b4}

\item 
void {\bf resize\-Event} ({\bf QResize\-Event} $\ast$)\label{classQXEmbed_b5}

\item 
void {\bf show\-Event} ({\bf QShow\-Event} $\ast$)\label{classQXEmbed_b6}

\item 
bool {\bf x11Event} (XEvent $\ast$)\label{classQXEmbed_b7}

\item 
virtual void {\bf window\-Changed} (WId w)
\begin{CompactList}\small\item\em A change handler that indicates that the embedded window has been changed. \item\end{CompactList}\item 
bool {\bf focus\-Next\-Prev\-Child} (bool next)\label{classQXEmbed_b9}

\end{CompactItemize}


\subsection{Detailed Description}
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.

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 {\bf embed}{\rm (p.\,\pageref{classQXEmbed_a4})}() with this identifier as parameter.

Embedding from the client's side requires that the client knows the window identifier of the respective embedder widget. Use either {\bf embed\-Client\-Into\-Window}{\rm (p.\,\pageref{classQXEmbed_e1})}() or the high-level wrapper {\bf process\-Client\-Cmdline}{\rm (p.\,\pageref{classQXEmbed_e2})}().

If a window has been embedded succesfully, {\bf embedded\-Win\-Id}{\rm (p.\,\pageref{classQXEmbed_a5})}() returns its id.

Reimplement the change handler {\bf window\-Changed}{\rm (p.\,\pageref{classQXEmbed_b8})}() to catch embedding or the destruction of embedded windows. In the latter case, the embedder also emits a signal {\bf embedded\-Window\-Destroyed}{\rm (p.\,\pageref{classQXEmbed_l0})}() for convenience.



Definition at line 61 of file qxembed.h.

\subsection{Constructor \& Destructor Documentation}
\index{QXEmbed@{QXEmbed}!QXEmbed@{QXEmbed}}
\index{QXEmbed@{QXEmbed}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QXEmbed::QXEmbed ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0, WFlags {\em f} = 0)}\label{classQXEmbed_a0}


Constructs a xembed widget. 

The parent, name and f arguments are passed to the {\bf QFrame} constructor. \index{QXEmbed@{QXEmbed}!~QXEmbed@{$\sim$QXEmbed}}
\index{~QXEmbed@{$\sim$QXEmbed}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QXEmbed::$\sim${\bf QXEmbed} ()}\label{classQXEmbed_a1}


Destructor. 

Cleans up the focus if necessary. 

\subsection{Member Function Documentation}
\index{QXEmbed@{QXEmbed}!initialize@{initialize}}
\index{initialize@{initialize}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void QXEmbed::initialize ()\hspace{0.3cm}{\tt  [static]}}\label{classQXEmbed_e0}


Embedded applications should call this function to make sure they support the XEMBED protocol. 

It is called automatically when you use {\bf embed\-Client\-Into\-Window}{\rm (p.\,\pageref{classQXEmbed_e1})}() or {\bf process\-Client\-Cmdline}{\rm (p.\,\pageref{classQXEmbed_e2})}(). Clients might have to call it manually when you use {\bf embed}{\rm (p.\,\pageref{classQXEmbed_a4})}(). \index{QXEmbed@{QXEmbed}!setProtocol@{setProtocol}}
\index{setProtocol@{setProtocol}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void QXEmbed::set\-Protocol (Protocol {\em proto})}\label{classQXEmbed_a2}


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.

Future work: Create a protocol AUTO that selects the best option. This will be possible with the XEMBED v2 specification. \index{QXEmbed@{QXEmbed}!protocol@{protocol}}
\index{protocol@{protocol}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Protocol QXEmbed::protocol ()}\label{classQXEmbed_a3}


Returns the protocol used for embedding the current window. 

\begin{Desc}
\item[Returns:]the protocol used by QXEmbed. \end{Desc}
\index{QXEmbed@{QXEmbed}!embed@{embed}}
\index{embed@{embed}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void QXEmbed::embed (WId {\em w})}\label{classQXEmbed_a4}


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 {\bf embed()}{\rm (p.\,\pageref{classQXEmbed_a4})}. Instead, the client will call the static function {\bf embed\-Client\-Into\-Window}{\rm (p.\,\pageref{classQXEmbed_e1})}().

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]the identifier of the window to embed \item[{\em proto}]is the embedding protocol to use \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf embedded\-Win\-Id()}{\rm (p.\,\pageref{classQXEmbed_a5})} \end{Desc}
\index{QXEmbed@{QXEmbed}!embeddedWinId@{embeddedWinId}}
\index{embeddedWinId@{embeddedWinId}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}WId QXEmbed::embedded\-Win\-Id () const}\label{classQXEmbed_a5}


Returns the window identifier of the embedded window, or 0 if no window is embedded yet. 

\begin{Desc}
\item[Returns:]the id of the embedded window (0 if no window is embedded) \end{Desc}
\index{QXEmbed@{QXEmbed}!embedClientIntoWindow@{embedClientIntoWindow}}
\index{embedClientIntoWindow@{embedClientIntoWindow}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void QXEmbed::embed\-Client\-Into\-Window ({\bf QWidget} $\ast$ {\em client}, WId {\em window})\hspace{0.3cm}{\tt  [static]}}\label{classQXEmbed_e1}


A function for clients that embed themselves. {\bf process\-Client\-Cmdline()}{\rm (p.\,\pageref{classQXEmbed_e2})}. 

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.\index{QXEmbed@{QXEmbed}!processClientCmdline@{processClientCmdline}}
\index{processClientCmdline@{processClientCmdline}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool QXEmbed::process\-Client\-Cmdline ({\bf QWidget} $\ast$ {\em client}, int \& {\em argc}, char $\ast$$\ast$ {\em argv})\hspace{0.3cm}{\tt  [static]}}\label{classQXEmbed_e2}


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.

The function returns TRUE on sucess or FALSE if no such command line parameter is specified.

\begin{Desc}
\item[See also:]{\bf embed\-Client\-Into\-Window()}{\rm (p.\,\pageref{classQXEmbed_e1})} \end{Desc}
\index{QXEmbed@{QXEmbed}!sizeHint@{sizeHint}}
\index{sizeHint@{sizeHint}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} QXEmbed::size\-Hint () const}\label{classQXEmbed_a6}


Returns a size sufficient for the embedded window. 



Reimplemented from {\bf QWidget}.\index{QXEmbed@{QXEmbed}!minimumSizeHint@{minimumSizeHint}}
\index{minimumSizeHint@{minimumSizeHint}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} QXEmbed::minimum\-Size\-Hint () const}\label{classQXEmbed_a7}


Returns the minimum size specified by the embedded window. 



Reimplemented from {\bf QWidget}.\index{QXEmbed@{QXEmbed}!sizePolicy@{sizePolicy}}
\index{sizePolicy@{sizePolicy}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize\-Policy} QXEmbed::size\-Policy () const}\label{classQXEmbed_a8}


Specifies that this widget can use additional space, and that it can survive on less than {\bf size\-Hint}{\rm (p.\,\pageref{classQXEmbed_a6})}(). 



Reimplemented from {\bf QWidget}.\index{QXEmbed@{QXEmbed}!embeddedWindowDestroyed@{embeddedWindowDestroyed}}
\index{embeddedWindowDestroyed@{embeddedWindowDestroyed}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void QXEmbed::embedded\-Window\-Destroyed ()\hspace{0.3cm}{\tt  [signal]}}\label{classQXEmbed_l0}


This signal is emitted when the embedded window has been destroyed. 

\begin{Desc}
\item[See also:]{\bf embedded\-Win\-Id()}{\rm (p.\,\pageref{classQXEmbed_a5})} \end{Desc}
\index{QXEmbed@{QXEmbed}!windowChanged@{windowChanged}}
\index{windowChanged@{windowChanged}!QXEmbed@{QXEmbed}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void QXEmbed::window\-Changed (WId {\em w})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classQXEmbed_b8}


A change handler that indicates that the embedded window has been changed. 

The window handle can also be retrieved with {\bf embedded\-Win\-Id}{\rm (p.\,\pageref{classQXEmbed_a5})}().

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]the handle of the window that changed \end{description}
\end{Desc}


The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
qxembed.h\end{CompactItemize}
