summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqnpwidget.3qt
blob: 9f1ac1d0e008b804cf9ab78b4285498a18ef6a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
'\" t
.TH TQNPWidget 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQNPWidget \- TQWidget that is a web browser plugin window
.SH SYNOPSIS
This class is part of the \fBQt Netscape Extension\fR.
.PP
\fC#include <tqnp.h>\fR
.PP
Inherits TQWidget.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQNPWidget\fR ()"
.br
.ti -1c
.BI "\fB~TQNPWidget\fR ()"
.br
.ti -1c
.BI "virtual void \fBenterInstance\fR ()"
.br
.ti -1c
.BI "virtual void \fBleaveInstance\fR ()"
.br
.ti -1c
.BI "TQNPInstance * \fBinstance\fR ()"
.br
.in -1c
.SH DESCRIPTION
This class is defined in the \fBQt Netscape Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API.
.PP
The TQNPWidget class provides a TQWidget that is a web browser plugin window.
.PP
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 TQNPInstance::newWindow() is called by the browser.
.PP
A common way to develop a plugin widget is to develop it as a stand-alone application window, then make it a \fIchild\fR of a plugin widget to use it as a browser plugin. The technique is:
.PP
.nf
.br
class MyPluginWindow : public TQNPWidget
.br
{
.br
    TQWidget* child;
.br
public:
.br
    MyPluginWindow()
.br
    {
.br
        // Some widget that is normally used as a top-level widget
.br
        child = new MyIndependentlyDevelopedWidget();
.br
.br
        // Use the background color of the web page
.br
        child->setBackgroundColor( backgroundColor() );
.br
.br
        // Fill the plugin widget
.br
        child->setGeometry( 0, 0, width(), height() );
.br
    }
.br
.br
    void resizeEvent(TQResizeEvent*)
.br
    {
.br
        // Fill the plugin widget
.br
        child->resize(size());
.br
    }
.br
};
.fi
.PP
The default implementation is an empty window.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQNPWidget::TQNPWidget ()"
Creates a TQNPWidget.
.SH "TQNPWidget::~TQNPWidget ()"
Destroys the window. This will be called by the plugin binding code when the window is no longer required. The web browser will delete windows when they leave the page. The bindings will change the TQWidget::winId() of the window when the window is resized, but this should not affect normal widget behavior.
.SH "void TQNPWidget::enterInstance ()\fC [virtual]\fR"
Called when the mouse enters the plugin window. Does nothing by default.
.PP
Example: grapher/grapher.cpp.
.SH "TQNPInstance * TQNPWidget::instance ()"
Returns the instance for which this widget is the plugin window.
.SH "void TQNPWidget::leaveInstance ()\fC [virtual]\fR"
Called when the mouse leaves the plugin window. Does nothing by default.
.PP
Example: grapher/grapher.cpp.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqnpwidget.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqnpwidget.3qt) and the Qt
version (3.3.8).