khtml Library API Documentation

kjavaappletwidget.h

00001 // -*- c++ -*-
00002 
00003 /* This file is part of the KDE project
00004  *
00005  * Copyright (C) 2000 Richard Moore <rich@kde.org>
00006  *               2000 Wynn Wilkes <wynnw@caldera.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Library General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2 of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Library General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Library General Public License
00019  * along with this library; see the file COPYING.LIB.  If not, write to
00020  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00021  * Boston, MA 02111-1307, USA.
00022  */
00023 
00024 #ifndef KJAVAAPPLETWIDGET_H
00025 #define KJAVAAPPLETWIDGET_H
00026 
00027 #include <qwidget.h>
00028 #ifndef Q_WS_QWS //FIXME(?) I don't think this is possible with Qt Embedded
00029 #include "java/kjavaappletcontext.h"
00030 #include "java/kjavaapplet.h"
00031 #include <qxembed.h>
00032 #include <kwinmodule.h>
00033 
00076 class KJavaAppletWidgetPrivate;
00077 
00078 class KJavaAppletWidget : public QXEmbed
00079 {
00080     Q_OBJECT
00081 public:
00082     KJavaAppletWidget( KJavaAppletContext* context,
00083                        QWidget* parent=0, const char* name=0 );
00084 
00085    ~KJavaAppletWidget();
00086 
00092     KJavaApplet* applet() { return m_applet; }
00093 
00098     void showApplet();
00099 
00100     QSize sizeHint() const;
00101     void resize( int, int );
00102 
00103 protected slots:
00108     void setWindow( WId w );
00109 
00110 protected:
00111     //The counter to generate ID's for the applets
00112     static int appletCount;
00113 
00117     void focusOutEvent( QFocusEvent * );
00118     void focusInEvent( QFocusEvent * );
00119     bool x11Event( XEvent* e);
00120 
00121 private:
00122     KJavaAppletWidgetPrivate* d;
00123 
00124     KJavaApplet* m_applet;
00125     KWinModule*  m_kwm;
00126     QString      m_swallowTitle;
00127 
00128 };
00129 
00130 #endif
00131 #endif // KJAVAAPPLETWIDGET_H
00132 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:40 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001