You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
5.2 KiB
127 lines
5.2 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQNPWidget Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQNPWidget Class Reference</h1>
|
||
|
|
||
|
<p>The TQNPWidget class provides a TQWidget that is a web browser plugin window.
|
||
|
<a href="#details">More...</a>
|
||
|
<p>This class is part of the <b>TQt Netscape Extension</b>.
|
||
3 months ago
|
<p><tt>#include <<a href="tqnp-h.html">tqnp.h</a>></tt>
|
||
7 months ago
|
<p>Inherits <a href="tqwidget.html">TQWidget</a>.
|
||
3 months ago
|
<p><a href="tqnpwidget-members.html">List of all member functions.</a>
|
||
13 years ago
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQNPWidget"><b>TQNPWidget</b></a> ()</li>
|
||
|
<li class=fn><a href="#~TQNPWidget"><b>~TQNPWidget</b></a> ()</li>
|
||
|
<li class=fn>virtual void <a href="#enterInstance"><b>enterInstance</b></a> ()</li>
|
||
|
<li class=fn>virtual void <a href="#leaveInstance"><b>leaveInstance</b></a> ()</li>
|
||
|
<li class=fn>TQNPInstance * <a href="#instance"><b>instance</b></a> ()</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
<p> This class is defined in the <b>TQt <a href="netscape-plugin.html#Netscape">Netscape</a> Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main TQt API.
|
||
|
<p>
|
||
|
|
||
7 months ago
|
The TQNPWidget class provides a <a href="tqwidget.html">TQWidget</a> that is a web browser plugin window.
|
||
13 years ago
|
<p>
|
||
|
<p> Derive from TQNPWidget to create a widget that can be used as a
|
||
|
web browser plugin window, or create one and add child widgets.
|
||
|
Instances of TQNPWidget may only be created when
|
||
3 months ago
|
<a href="tqnpinstance.html#newWindow">TQNPInstance::newWindow</a>() is called by the browser.
|
||
13 years ago
|
<p> A common way to develop a plugin widget is to develop it as a
|
||
|
stand-alone application window, then make it a <em>child</em> of a
|
||
|
plugin widget to use it as a browser plugin. The technique is:
|
||
|
<p> <pre>
|
||
|
class MyPluginWindow : public TQNPWidget
|
||
|
{
|
||
7 months ago
|
<a href="tqwidget.html">TQWidget</a>* child;
|
||
13 years ago
|
public:
|
||
|
MyPluginWindow()
|
||
|
{
|
||
|
// Some widget that is normally used as a top-level widget
|
||
|
child = new MyIndependentlyDevelopedWidget();
|
||
|
|
||
|
// Use the background color of the web page
|
||
7 months ago
|
child-><a href="tqwidget.html#setBackgroundColor">setBackgroundColor</a>( <a href="tqwidget.html#backgroundColor">backgroundColor</a>() );
|
||
13 years ago
|
|
||
|
// Fill the plugin widget
|
||
7 months ago
|
child-><a href="tqwidget.html#setGeometry">setGeometry</a>( 0, 0, width(), height() );
|
||
13 years ago
|
}
|
||
|
|
||
|
void resizeEvent(TQResizeEvent*)
|
||
|
{
|
||
|
// Fill the plugin widget
|
||
7 months ago
|
child-><a href="tqwidget.html#resize">resize</a>(<a href="tqwidget.html#size">size</a>());
|
||
13 years ago
|
}
|
||
|
};
|
||
|
</pre>
|
||
|
|
||
|
<p> The default implementation is an empty window.
|
||
|
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
|
<h3 class=fn><a name="TQNPWidget"></a>TQNPWidget::TQNPWidget ()
|
||
|
</h3>
|
||
|
Creates a TQNPWidget.
|
||
|
|
||
|
<h3 class=fn><a name="~TQNPWidget"></a>TQNPWidget::~TQNPWidget ()
|
||
|
</h3>
|
||
|
Destroys the window. This will be called by the plugin binding
|
||
13 years ago
|
code when the window is no longer required. The web browser will
|
||
13 years ago
|
delete windows when they leave the page. The bindings will change
|
||
7 months ago
|
the <a href="tqwidget.html#winId">TQWidget::winId</a>() of the window when the window is resized, but
|
||
13 years ago
|
this should not affect normal widget behavior.
|
||
|
|
||
|
<h3 class=fn>void <a name="enterInstance"></a>TQNPWidget::enterInstance ()<tt> [virtual]</tt>
|
||
|
</h3>
|
||
|
Called when the mouse enters the plugin window. Does nothing by
|
||
|
default.
|
||
|
|
||
|
<p>Example: <a href="grapher-nsplugin-example.html#x2753">grapher/grapher.cpp</a>.
|
||
3 months ago
|
<h3 class=fn><a href="tqnpinstance.html">TQNPInstance</a> * <a name="instance"></a>TQNPWidget::instance ()
|
||
13 years ago
|
</h3>
|
||
|
Returns the instance for which this widget is the plugin window.
|
||
|
|
||
|
<h3 class=fn>void <a name="leaveInstance"></a>TQNPWidget::leaveInstance ()<tt> [virtual]</tt>
|
||
|
</h3>
|
||
|
Called when the mouse leaves the plugin window. Does nothing by
|
||
|
default.
|
||
|
|
||
|
<p>Example: <a href="grapher-nsplugin-example.html#x2754">grapher/grapher.cpp</a>.
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">TQt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|