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.
1005 lines
40 KiB
1005 lines
40 KiB
//Auto-generated by kalyptus. DO NOT EDIT.
|
|
package org.trinitydesktop.koala;
|
|
|
|
import org.trinitydesktop.qt.Qt;
|
|
import org.trinitydesktop.qt.TQRect;
|
|
import org.trinitydesktop.qt.TQMetaObject;
|
|
import org.trinitydesktop.qt.QtSupport;
|
|
import org.trinitydesktop.qt.TQDataStream;
|
|
import org.trinitydesktop.qt.TQObject;
|
|
import org.trinitydesktop.qt.TQPoint;
|
|
import java.util.ArrayList;
|
|
import org.trinitydesktop.qt.TQPainter;
|
|
import org.trinitydesktop.qt.TQCustomEvent;
|
|
import org.trinitydesktop.qt.TQCursor;
|
|
import org.trinitydesktop.qt.TQVariant;
|
|
import org.trinitydesktop.qt.TQWidget;
|
|
|
|
/**
|
|
|
|
This class is tdehtml's main class. It features an almost complete
|
|
web browser, and html renderer.
|
|
The easiest way to use this class (if you just want to display an HTML
|
|
page at some URL) is the following:
|
|
<pre>
|
|
KURL url = "http://www.kde.org";
|
|
TDEHTMLPart w = new TDEHTMLPart();
|
|
w.openURL(url);
|
|
w.view().resize(500, 400);
|
|
w.show();
|
|
</pre>
|
|
Java and JavaScript are enabled by default depending on the user's
|
|
settings. If you do not need them, and especially if you display
|
|
unfiltered data from untrusted sources, it is strongly recommended to
|
|
turn them off. In that case, you should also turn off the automatic
|
|
redirect and plugins:
|
|
<pre>
|
|
w.setJScriptEnabled(false);
|
|
w.setJavaEnabled(false);
|
|
w.setMetaRefreshEnabled(false);
|
|
w.setPluginsEnabled(false);
|
|
</pre>
|
|
You may also wish to disable external references. This will prevent TDEHTML
|
|
from loading images, frames, etc, or redirecting to external sites.
|
|
<pre>
|
|
w.setOnlyLocalReferences(true);
|
|
</pre>
|
|
Some apps want to write their HTML code directly into the widget instead of
|
|
opening an url. You can do this in the following way:
|
|
<pre>
|
|
String myHTMLCode = ...;
|
|
TDEHTMLPart w = new TDEHTMLPart();
|
|
w.begin();
|
|
w.write(myHTMLCode);
|
|
...
|
|
w.end();
|
|
</pre>
|
|
You can do as many calls to write() as you wish. There are two
|
|
write() methods, one accepting a String and one accepting a
|
|
<code>char</code> <code>argument.</code> You should use one or the other
|
|
(but not both) since the method using
|
|
the <code>char</code> <code>argument</code> does an additional decoding step to convert the
|
|
written data to Unicode.
|
|
It is also possible to write content to the HTML part using the
|
|
standard streaming API from KParts.ReadOnlyPart. The usage of
|
|
the API is similar to that of the begin(), write(), end() process
|
|
described above as the following example shows:
|
|
<pre>
|
|
TDEHTMLPart doc = new TDEHTMLPart();
|
|
doc.openStream( "text/html", KURL() );
|
|
doc.writeStream( String( "<html><body><p>TDEHTML Rocks!</p></body></html>" ) );
|
|
doc.closeStream();
|
|
</pre>
|
|
See {@link TDEHTMLPartSignals} for signals emitted by TDEHTMLPart
|
|
@author Lars Knoll (knoll@kde.org)
|
|
|
|
@short HTML Browser Widget.
|
|
|
|
*/
|
|
public class TDEHTMLPart extends ReadOnlyPart {
|
|
protected TDEHTMLPart(Class dummy){super((Class) null);}
|
|
public static final int DefaultGUI = 0;
|
|
public static final int BrowserViewGUI = 1;
|
|
|
|
/**
|
|
Enumeration for displaying the caret.
|
|
@param Visible caret is displayed
|
|
@param Invisible caret is not displayed
|
|
@param Blink caret toggles between visible and invisible
|
|
@short Enumeration for displaying the caret.
|
|
*/
|
|
public static final int CaretVisible = 0;
|
|
public static final int CaretInvisible = 1;
|
|
public static final int CaretBlink = 2;
|
|
|
|
/**
|
|
Extra Find options that can be used when calling the extended findText().
|
|
@short Extra Find options that can be used when calling the extended findText().
|
|
*/
|
|
public static final int FindLinksOnly = 1*KFindDialog.MinimumUserOption;
|
|
public static final int FindNoPopups = 2*KFindDialog.MinimumUserOption;
|
|
|
|
public static final int NoNotification = 0;
|
|
public static final int Before = 1;
|
|
public static final int Only = 2;
|
|
public static final int Unused = 255;
|
|
|
|
public static final int NotCrypted = 0;
|
|
public static final int Encrypted = 1;
|
|
public static final int Mixed = 2;
|
|
|
|
public native TQMetaObject metaObject();
|
|
public native String className();
|
|
/**
|
|
Constructs a new TDEHTMLPart.
|
|
TDEHTML basically consists of two objects: The TDEHTMLPart itself,
|
|
holding the document data (DOM document), and the TDEHTMLView,
|
|
derived from TQScrollView, in which the document content is
|
|
rendered in. You can specify two different parent objects for a
|
|
TDEHTMLPart, one parent for the TDEHTMLPart document and on parent
|
|
for the TDEHTMLView. If the second <code>parent</code> argument is null, then
|
|
<code>parentWidget</code> is used as parent for both objects, the part and
|
|
the view.
|
|
@short Constructs a new TDEHTMLPart.
|
|
*/
|
|
public TDEHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name, int prof) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(parentWidget,widgetname,parent,name,prof);
|
|
}
|
|
private native void newTDEHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name, int prof);
|
|
public TDEHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(parentWidget,widgetname,parent,name);
|
|
}
|
|
private native void newTDEHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name);
|
|
public TDEHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(parentWidget,widgetname,parent);
|
|
}
|
|
private native void newTDEHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent);
|
|
public TDEHTMLPart(TQWidget parentWidget, String widgetname) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(parentWidget,widgetname);
|
|
}
|
|
private native void newTDEHTMLPart(TQWidget parentWidget, String widgetname);
|
|
public TDEHTMLPart(TQWidget parentWidget) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(parentWidget);
|
|
}
|
|
private native void newTDEHTMLPart(TQWidget parentWidget);
|
|
public TDEHTMLPart() {
|
|
super((Class) null);
|
|
newTDEHTMLPart();
|
|
}
|
|
private native void newTDEHTMLPart();
|
|
public TDEHTMLPart(TDEHTMLView view, TQObject parent, String name, int prof) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(view,parent,name,prof);
|
|
}
|
|
private native void newTDEHTMLPart(TDEHTMLView view, TQObject parent, String name, int prof);
|
|
public TDEHTMLPart(TDEHTMLView view, TQObject parent, String name) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(view,parent,name);
|
|
}
|
|
private native void newTDEHTMLPart(TDEHTMLView view, TQObject parent, String name);
|
|
public TDEHTMLPart(TDEHTMLView view, TQObject parent) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(view,parent);
|
|
}
|
|
private native void newTDEHTMLPart(TDEHTMLView view, TQObject parent);
|
|
public TDEHTMLPart(TDEHTMLView view) {
|
|
super((Class) null);
|
|
newTDEHTMLPart(view);
|
|
}
|
|
private native void newTDEHTMLPart(TDEHTMLView view);
|
|
/**
|
|
Opens the specified URL <code>url.</code>
|
|
Reimplemented from KParts.ReadOnlyPart.openURL .
|
|
@short Opens the specified URL <code>url.</code>
|
|
*/
|
|
public native boolean openURL(KURL url);
|
|
/**
|
|
Stops loading the document and kills all data requests (for images, etc.)
|
|
@short Stops loading the document and kills all data requests (for images, etc.
|
|
*/
|
|
public native boolean closeURL();
|
|
/**
|
|
Called when a certain error situation (i.e. connection timed out) occurred.
|
|
The default implementation either shows a TDEIO error dialog or loads a more
|
|
verbose error description a as page, depending on the users configuration.
|
|
<code>job</code> is the job that signaled the error situation
|
|
@short Called when a certain error situation (i.
|
|
*/
|
|
public native void showError(Job job);
|
|
/**
|
|
Returns a reference to the DOM HTML document (for non-HTML documents, returns null)
|
|
@short Returns a reference to the DOM HTML document (for non-HTML documents, returns null)
|
|
*/
|
|
public native HTMLDocument htmlDocument();
|
|
/**
|
|
Returns a reference to the DOM document.
|
|
@short Returns a reference to the DOM document.
|
|
*/
|
|
public native Document document();
|
|
/**
|
|
Returns the content of the source document.
|
|
@short Returns the content of the source document.
|
|
*/
|
|
public native String documentSource();
|
|
/**
|
|
Returns the node that has the keyboard focus.
|
|
@short Returns the node that has the keyboard focus.
|
|
*/
|
|
public native Node activeNode();
|
|
/**
|
|
Returns a pointer to the KParts.BrowserExtension.
|
|
@short Returns a pointer to the KParts.BrowserExtension.
|
|
*/
|
|
public native BrowserExtension browserExtension();
|
|
// KParts::LiveConnectExtension* liveConnectExtension(const tdehtml::RenderPart* arg1); >>>> NOT CONVERTED
|
|
public native BrowserHostExtension browserHostExtension();
|
|
/**
|
|
Returns a pointer to the HTML document's view.
|
|
@short Returns a pointer to the HTML document's view.
|
|
*/
|
|
public native TDEHTMLView view();
|
|
/**
|
|
Enable/disable Javascript support. Note that this will
|
|
in either case permanently override the default usersetting.
|
|
If you want to have the default UserSettings, don't call this
|
|
method.
|
|
@short Enable/disable Javascript support.
|
|
*/
|
|
public native void setJScriptEnabled(boolean enable);
|
|
/**
|
|
Returns <code>true</code> if Javascript support is enabled or <code>false</code>
|
|
otherwise.
|
|
@short Returns <code>true</code> if Javascript support is enabled or <code>false</code> otherwise.
|
|
*/
|
|
public native boolean jScriptEnabled();
|
|
/**
|
|
Returns the JavaScript interpreter the part is using. This method is
|
|
mainly intended for applications which embed and extend the part and
|
|
provides a mechanism for adding additional native objects to the
|
|
interpreter (or removing the built-ins).
|
|
One thing people using this method to add things to the interpreter must
|
|
consider, is that when you start writing new content to the part, the
|
|
interpreter is cleared. This includes both use of the
|
|
begin( KURL, int, int ) method, and the openURL( KURL )
|
|
method. If you want your objects to have a longer lifespan, then you must
|
|
retain a KJS.Object yourself to ensure that the reference count of your
|
|
custom objects never reaches 0. You will also need to re-add your
|
|
bindings everytime this happens - one way to detect the need for this is
|
|
to connect to the docCreated() signal, another is to reimplement the
|
|
begin() method.
|
|
@short Returns the JavaScript interpreter the part is using.
|
|
*/
|
|
// KJS::Interpreter* jScriptInterpreter(); >>>> NOT CONVERTED
|
|
/**
|
|
Enable/disable statusbar messages.
|
|
When this class wants to set the statusbar text, it emits
|
|
setStatusBarText(String text)
|
|
If you want to catch this for your own statusbar, note that it returns
|
|
back a rich text string, starting with "<qt>". This you need to
|
|
either pass this into your own TQLabel or to strip out the tags
|
|
before passing it to TQStatusBar.message(String message)
|
|
@short Enable/disable statusbar messages.
|
|
@see Part#setStatusBarText(
|
|
@see #const
|
|
@see #text
|
|
*/
|
|
public native void setStatusMessagesEnabled(boolean enable);
|
|
/**
|
|
Returns <code>true</code> if status messages are enabled.
|
|
@short Returns <code>true</code> if status messages are enabled.
|
|
*/
|
|
public native boolean statusMessagesEnabled();
|
|
/**
|
|
Enable/disable automatic forwarding by <meta http-equiv="refresh" ....>
|
|
@short Enable/disable automatic forwarding by <meta http-equiv="refresh" .
|
|
*/
|
|
public native void setMetaRefreshEnabled(boolean enable);
|
|
/**
|
|
Returns <code>true</code> if automatic forwarding is enabled.
|
|
@short Returns <code>true</code> if automatic forwarding is enabled.
|
|
*/
|
|
public native boolean metaRefreshEnabled();
|
|
/**
|
|
Same as executeScript( String ) except with the Node parameter
|
|
specifying the 'this' value.
|
|
@short Same as executeScript( String ) except with the Node parameter specifying the 'this' value.
|
|
*/
|
|
public native TQVariant executeScript(Node n, String script);
|
|
/**
|
|
Enables or disables Drag'n'Drop support. A drag operation is started if
|
|
the users drags a link.
|
|
@short Enables or disables Drag'n'Drop support.
|
|
*/
|
|
public native void setDNDEnabled(boolean b);
|
|
/**
|
|
Returns whether Dragn'n'Drop support is enabled or not.
|
|
@short Returns whether Dragn'n'Drop support is enabled or not.
|
|
*/
|
|
public native boolean dndEnabled();
|
|
/**
|
|
Enables/disables Java applet support. Note that calling this function
|
|
will permanently override the User settings about Java applet support.
|
|
Not calling this function is the only way to let the default settings
|
|
apply.
|
|
@short Enables/disables Java applet support.
|
|
*/
|
|
public native void setJavaEnabled(boolean enable);
|
|
/**
|
|
Return true if Java applet support is enabled, false if disabled
|
|
@short Return true if Java applet support is enabled, false if disabled
|
|
*/
|
|
public native boolean javaEnabled();
|
|
/**
|
|
Returns the java context of the applets. If no applet exists, 0 is returned.
|
|
@short Returns the java context of the applets.
|
|
*/
|
|
// KJavaAppletContext* javaContext(); >>>> NOT CONVERTED
|
|
/**
|
|
Returns the java context of the applets. If no context exists yet, a
|
|
new one is created.
|
|
@short Returns the java context of the applets.
|
|
*/
|
|
// KJavaAppletContext* createJavaContext(); >>>> NOT CONVERTED
|
|
/**
|
|
Enables or disables plugins, default is enabled
|
|
@short Enables or disables plugins, default is enabled
|
|
*/
|
|
public native void setPluginsEnabled(boolean enable);
|
|
/**
|
|
Returns true if plugins are enabled/disabled.
|
|
@short Returns true if plugins are enabled/disabled.
|
|
*/
|
|
public native boolean pluginsEnabled();
|
|
/**
|
|
Specifies whether images contained in the document should be loaded
|
|
automatically or not.
|
|
@note Request will be ignored if called before begin().
|
|
@short Specifies whether images contained in the document should be loaded automatically or not.
|
|
*/
|
|
public native void setAutoloadImages(boolean enable);
|
|
/**
|
|
Returns whether images contained in the document are loaded automatically
|
|
or not.
|
|
@note that the returned information is unrelieable as long as no begin()
|
|
was called.
|
|
@short Returns whether images contained in the document are loaded automatically or not.
|
|
*/
|
|
public native boolean autoloadImages();
|
|
/**
|
|
Security option.
|
|
Specify whether only file:/ or data:/ urls are allowed to be loaded without
|
|
user confirmation by TDEHTML.
|
|
( for example referenced by stylesheets, images, scripts, subdocuments, embedded elements ).
|
|
This option is mainly intended for enabling the "mail reader mode", where you load untrusted
|
|
content with a file:/ url.
|
|
Please note that enabling this option currently automatically disables Javascript,
|
|
Java and Plugins support. This might change in the future if the security model
|
|
is becoming more sophisticated, so don't rely on this behaviour.
|
|
( default false - everything is loaded unless forbidden by TDEApplication.authorizeURLAction).
|
|
@short Security option.
|
|
*/
|
|
public native void setOnlyLocalReferences(boolean enable);
|
|
/**
|
|
Returns whether only file:/ or data:/ references are allowed
|
|
to be loaded ( default false ). See setOnlyLocalReferences.
|
|
@short Returns whether only file:/ or data:/ references are allowed to be loaded ( default false ).
|
|
*/
|
|
public native boolean onlyLocalReferences();
|
|
/** Returns whether caret mode is on/off.
|
|
@short Returns whether caret mode is on/off.
|
|
*/
|
|
public native boolean isCaretMode();
|
|
/**
|
|
Returns <code>true</code> if the document is editable, <code>false</code> otherwise.
|
|
@short Returns <code>true</code> if the document is editable, <code>false</code> otherwise.
|
|
*/
|
|
public native boolean isEditable();
|
|
/**
|
|
Sets the caret to the given position.
|
|
If the given location is invalid, it will snap to the nearest valid
|
|
location. Immediately afterwards a <code>caretPositionChanged</code> signal
|
|
containing the effective position is emitted
|
|
@param node node to set to
|
|
@param offset zero-based offset within the node
|
|
@param extendSelection If <code>true</code>, a selection will be spanned from the
|
|
last caret position to the given one. Otherwise, any existing selection
|
|
will be deselected.
|
|
@short Sets the caret to the given position.
|
|
*/
|
|
public native void setCaretPosition(Node node, long offset, boolean extendSelection);
|
|
public native void setCaretPosition(Node node, long offset);
|
|
/**
|
|
Returns the current caret policy when the view is not focused.
|
|
@short Returns the current caret policy when the view is not focused.
|
|
*/
|
|
public native int caretDisplayPolicyNonFocused();
|
|
/**
|
|
Sets the caret display policy when the view is not focused.
|
|
Whenever the caret is in use, this property determines how the
|
|
caret should be displayed when the document view is not focused.
|
|
The default policy is CaretInvisible.
|
|
@param policy new display policy
|
|
@short Sets the caret display policy when the view is not focused.
|
|
*/
|
|
public native void setCaretDisplayPolicyNonFocused(int policy);
|
|
public native void enableJScript(boolean e);
|
|
public native void enableJava(boolean e);
|
|
public native void enablePlugins(boolean e);
|
|
public native void autoloadImages(boolean e);
|
|
public native void enableMetaRefresh(boolean e);
|
|
public native boolean setCharset(String arg1, boolean arg2);
|
|
public native KURL baseURL();
|
|
public native String baseTarget();
|
|
/**
|
|
Returns the URL for the background Image (used by save background)
|
|
@short Returns the URL for the background Image (used by save background)
|
|
*/
|
|
public native KURL backgroundURL();
|
|
/**
|
|
Schedules a redirection after <code>delay</code> seconds.
|
|
@short Schedules a redirection after <code>delay</code> seconds.
|
|
*/
|
|
public native void scheduleRedirection(int delay, String url, boolean lockHistory);
|
|
public native void scheduleRedirection(int delay, String url);
|
|
/**
|
|
Clears the widget and prepares it for new content.
|
|
If you want url() to return
|
|
for example "file:/tmp/test.html", you can use the following code:
|
|
<pre>
|
|
view.begin( KURL("file:/tmp/test.html" ) );
|
|
</pre>
|
|
@param url is the url of the document to be displayed. Even if you
|
|
are generating the HTML on the fly, it may be useful to specify
|
|
a directory so that any pixmaps are found.
|
|
@param xOffset is the initial horizontal scrollbar value. Usually
|
|
you don't want to use this.
|
|
@param yOffset is the initial vertical scrollbar value. Usually
|
|
you don't want to use this.
|
|
All child frames and the old document are removed if you call
|
|
this method.
|
|
@short Clears the widget and prepares it for new content.
|
|
*/
|
|
public native void begin(KURL url, int xOffset, int yOffset);
|
|
public native void begin(KURL url, int xOffset);
|
|
public native void begin(KURL url);
|
|
public native void begin();
|
|
/**
|
|
Writes another part of the HTML code to the widget.
|
|
You may call
|
|
this function many times in sequence. But remember: The fewer calls
|
|
you make, the faster the widget will be.
|
|
The HTML code is send through a decoder which decodes the stream to
|
|
Unicode.
|
|
The <code>len</code> parameter is needed for streams encoded in utf-16,
|
|
since these can have \\0 chars in them. In case the encoding
|
|
you're using isn't utf-16, you can safely leave out the length
|
|
parameter.
|
|
Attention: Don't mix calls to write( String ) with calls
|
|
to write( String ).
|
|
The result might not be what you want.
|
|
@short Writes another part of the HTML code to the widget.
|
|
*/
|
|
public native void write(String str, int len);
|
|
public native void write(String str);
|
|
/**
|
|
Call this after your last call to write().
|
|
@short Call this after your last call to write().
|
|
*/
|
|
public native void end();
|
|
/**
|
|
Paints the HTML page to a TQPainter. See TDEHTMLView.paint for details
|
|
@short Paints the HTML page to a TQPainter.
|
|
*/
|
|
public native void paint(TQPainter arg1, TQRect arg2, int arg3, boolean[] arg4);
|
|
public native void paint(TQPainter arg1, TQRect arg2, int arg3);
|
|
public native void paint(TQPainter arg1, TQRect arg2);
|
|
/**
|
|
Sets the encoding the page uses.
|
|
This can be different from the charset. The widget will try to reload the current page in the new
|
|
encoding, if url() is not empty.
|
|
@short Sets the encoding the page uses.
|
|
*/
|
|
public native boolean setEncoding(String name, boolean override);
|
|
public native boolean setEncoding(String name);
|
|
/**
|
|
Returns the encoding the page currently uses.
|
|
Note that the encoding might be different from the charset.
|
|
@short Returns the encoding the page currently uses.
|
|
*/
|
|
public native String encoding();
|
|
/**
|
|
Sets a user defined style sheet to be used on top of the HTML 4
|
|
default style sheet.
|
|
This gives a wide range of possibilities to
|
|
change the layout of the page.
|
|
To have an effect this function has to be called after calling begin().
|
|
@short Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
|
|
*/
|
|
public native void setUserStyleSheet(KURL url);
|
|
/**
|
|
Sets a user defined style sheet to be used on top of the HTML 4
|
|
default style sheet.
|
|
This gives a wide range of possibilities to
|
|
change the layout of the page.
|
|
To have an effect this function has to be called after calling begin().
|
|
@short Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
|
|
*/
|
|
public native void setUserStyleSheet(String styleSheet);
|
|
/**
|
|
Sets the standard font style.
|
|
@param name The font name to use for standard text.
|
|
@short Sets the standard font style.
|
|
*/
|
|
public native void setStandardFont(String name);
|
|
/**
|
|
Sets the fixed font style.
|
|
@param name The font name to use for fixed text, e.g.
|
|
the <tt><pre></tt> tag.
|
|
@short Sets the fixed font style.
|
|
*/
|
|
public native void setFixedFont(String name);
|
|
/**
|
|
Finds the anchor named <code>name.</code>
|
|
If the anchor is found, the widget
|
|
scrolls to the closest position. Returns <code>if</code> the anchor has
|
|
been found.
|
|
@short Finds the anchor named <code>name.</code>
|
|
*/
|
|
public native boolean gotoAnchor(String name);
|
|
/**
|
|
Go to the next anchor
|
|
This is useful to navigate from outside the navigator
|
|
@short Go to the next anchor
|
|
*/
|
|
public native boolean nextAnchor();
|
|
/**
|
|
Go to previous anchor
|
|
@short Go to previous anchor
|
|
*/
|
|
public native boolean prevAnchor();
|
|
/**
|
|
Sets the cursor to use when the cursor is on a link.
|
|
@short Sets the cursor to use when the cursor is on a link.
|
|
*/
|
|
public native void setURLCursor(TQCursor c);
|
|
/**
|
|
Returns the cursor which is used when the cursor is on a link.
|
|
@short Returns the cursor which is used when the cursor is on a link.
|
|
*/
|
|
public native TQCursor urlCursor();
|
|
/**
|
|
Starts a new search by popping up a dialog asking the user what he wants to
|
|
search for.
|
|
@short Starts a new search by popping up a dialog asking the user what he wants to search for.
|
|
*/
|
|
public native void findText();
|
|
/**
|
|
Starts a new search, but bypasses the user dialog.
|
|
@param str The string to search for.
|
|
@param options Find options.
|
|
@param parent Parent used for centering popups like "string not found".
|
|
@param findDialog Optionally, you can supply your own dialog.
|
|
@short Starts a new search, but bypasses the user dialog.
|
|
*/
|
|
public native void findText(String str, long options, TQWidget parent, KFindDialog findDialog);
|
|
public native void findText(String str, long options, TQWidget parent);
|
|
public native void findText(String str, long options);
|
|
/**
|
|
Initiates a text search.
|
|
@short Initiates a text search.
|
|
*/
|
|
public native void findTextBegin();
|
|
/**
|
|
Finds the next occurence of a string set by {@link #findText}
|
|
@return true if a new match was found.
|
|
|
|
@short Finds the next occurence of a string set by @ref findText()
|
|
*/
|
|
public native boolean findTextNext();
|
|
/**
|
|
Finds the next occurence of a string set by {@link #findText}
|
|
@param reverse if true, revert seach direction (only if no find dialog is used)
|
|
@return true if a new match was found.
|
|
|
|
@short Finds the next occurence of a string set by @ref findText()
|
|
*/
|
|
public native boolean findTextNext(boolean reverse);
|
|
/**
|
|
Sets the Zoom factor. The value is given in percent, larger values mean a
|
|
generally larger font and larger page contents. It is not guaranteed that
|
|
all parts of the page are scaled with the same factor though.
|
|
The given value should be in the range of 20..300, values outside that
|
|
range are not guaranteed to work. A value of 100 will disable all zooming
|
|
and show the page with the sizes determined via the given lengths in the
|
|
stylesheets.
|
|
@short Sets the Zoom factor.
|
|
*/
|
|
public native void setZoomFactor(int percent);
|
|
/**
|
|
Returns the current zoom factor.
|
|
@short Returns the current zoom factor.
|
|
*/
|
|
public native int zoomFactor();
|
|
/**
|
|
Returns the text the user has marked.
|
|
@short Returns the text the user has marked.
|
|
*/
|
|
public native String selectedText();
|
|
/**
|
|
Return the text the user has marked. This is guaranteed to be valid xml,
|
|
and to contain the \<html> and \<body> tags.
|
|
FIXME probably should make for 4.0 ?
|
|
@short Return the text the user has marked.
|
|
*/
|
|
public native String selectedTextAsHTML();
|
|
/**
|
|
Returns the selected part of the HTML.
|
|
@short Returns the selected part of the HTML.
|
|
*/
|
|
public native Range selection();
|
|
/**
|
|
Returns the selected part of the HTML by returning the starting and end
|
|
position.
|
|
If there is no selection, both nodes and offsets are equal.
|
|
@param startNode returns node selection starts in
|
|
@param startOffset returns offset within starting node
|
|
@param endNode returns node selection ends in
|
|
@param endOffset returns offset within end node.
|
|
@short Returns the selected part of the HTML by returning the starting and end position.
|
|
*/
|
|
public native void selection(Node startNode, long startOffset, Node endNode, long endOffset);
|
|
/**
|
|
Sets the current selection.
|
|
@short Sets the current selection.
|
|
*/
|
|
public native void setSelection(Range arg1);
|
|
/**
|
|
Has the user selected anything?
|
|
Call selectedText() to
|
|
retrieve the selected text.
|
|
@return <code>true</code> if there is text selected.
|
|
|
|
@short Has the user selected anything?
|
|
*/
|
|
public native boolean hasSelection();
|
|
/**
|
|
Marks all text in the document as selected.
|
|
@short Marks all text in the document as selected.
|
|
*/
|
|
public native void selectAll();
|
|
/**
|
|
Convenience method to show the document's view.
|
|
Equivalent to widget().show() or view().show() .
|
|
@short Convenience method to show the document's view.
|
|
*/
|
|
public native void show();
|
|
/**
|
|
Convenience method to hide the document's view.
|
|
Equivalent to widget().hide() or view().hide().
|
|
@short Convenience method to hide the document's view.
|
|
*/
|
|
public native void hide();
|
|
/**
|
|
Returns a reference to the partmanager instance which
|
|
manages html frame objects.
|
|
@short Returns a reference to the partmanager instance which manages html frame objects.
|
|
*/
|
|
public native PartManager partManager();
|
|
/**
|
|
Saves the TDEHTMLPart's complete state (including child frame
|
|
objects) to the provided TQDataStream.
|
|
This is called from the saveState() method of the
|
|
browserExtension().
|
|
@short Saves the TDEHTMLPart's complete state (including child frame objects) to the provided TQDataStream.
|
|
*/
|
|
public native void saveState(TQDataStream stream);
|
|
/**
|
|
Restores the TDEHTMLPart's previously saved state (including
|
|
child frame objects) from the provided TQDataStream.
|
|
This is called from the restoreState() method of the
|
|
browserExtension() .
|
|
@short Restores the TDEHTMLPart's previously saved state (including child frame objects) from the provided TQDataStream.
|
|
@see #saveState
|
|
*/
|
|
public native void restoreState(TQDataStream stream);
|
|
/**
|
|
Returns the <code>Node</code> currently under the mouse.
|
|
The returned node may be a shared node (e. g. an \<area> node if the
|
|
mouse is hovering over an image map).
|
|
@short Returns the <code>Node</code> currently under the mouse.
|
|
*/
|
|
public native Node nodeUnderMouse();
|
|
/**
|
|
Returns the <code>Node</code> currently under the mouse that is not shared.
|
|
The returned node is always the node that is physically under the mouse
|
|
pointer (irrespective of logically overlying elements like, e. g.,
|
|
\<area> on image maps).
|
|
@short Returns the <code>Node</code> currently under the mouse that is not shared.
|
|
*/
|
|
public native Node nonSharedNodeUnderMouse();
|
|
/**
|
|
@short
|
|
*/
|
|
public native TDEHTMLSettings settings();
|
|
/**
|
|
Returns a pointer to the parent TDEHTMLPart if the part is a frame
|
|
in an HTML frameset.
|
|
Returns null otherwise.
|
|
@short Returns a pointer to the parent TDEHTMLPart if the part is a frame in an HTML frameset.
|
|
*/
|
|
public native TDEHTMLPart parentPart();
|
|
/**
|
|
Returns a list of names of all frame (including iframe) objects of
|
|
the current document. Note that this method is not working recursively
|
|
for sub-frames.
|
|
@short Returns a list of names of all frame (including iframe) objects of the current document.
|
|
*/
|
|
public native ArrayList frameNames();
|
|
// TQPtrList<KParts::ReadOnlyPart> frames(); >>>> NOT CONVERTED
|
|
/**
|
|
Finds a frame by name. Returns null if frame can't be found.
|
|
@short Finds a frame by name.
|
|
*/
|
|
public native TDEHTMLPart findFrame(String f);
|
|
/**
|
|
Recursively finds the part containing the frame with name <code>f</code>
|
|
and checks if it is accessible by <code>callingPart</code>
|
|
Returns null if no suitable frame can't be found.
|
|
Returns parent part if a suitable frame was found and
|
|
frame info in <code>childFrame</code>
|
|
@short Recursively finds the part containing the frame with name <code>f</code> and checks if it is accessible by <code>callingPart</code> Returns 0L if no suitable frame can't be found.
|
|
*/
|
|
// TDEHTMLPart* findFrameParent(KParts::ReadOnlyPart* arg1,const TQString& arg2,tdehtml::ChildFrame** arg3); >>>> NOT CONVERTED
|
|
public native TDEHTMLPart findFrameParent(ReadOnlyPart callingPart, String f);
|
|
/**
|
|
Return the current frame (the one that has focus)
|
|
Not necessarily a direct child of ours, framesets can be nested.
|
|
Returns "this" if this part isn't a frameset.
|
|
@short Return the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested.
|
|
*/
|
|
public native ReadOnlyPart currentFrame();
|
|
/**
|
|
Returns whether a frame with the specified name is exists or not.
|
|
In contrary to the findFrame method this one also returns true
|
|
if the frame is defined but no displaying component has been
|
|
found/loaded, yet.
|
|
@short Returns whether a frame with the specified name is exists or not.
|
|
*/
|
|
public native boolean frameExists(String frameName);
|
|
/**
|
|
Returns child frame framePart its script interpreter
|
|
@short Returns child frame framePart its script interpreter
|
|
*/
|
|
// KJSProxy* framejScript(KParts::ReadOnlyPart* arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Finds a frame by name. Returns null if frame can't be found.
|
|
@short Finds a frame by name.
|
|
*/
|
|
public native ReadOnlyPart findFramePart(String f);
|
|
/**
|
|
Called by KJS.
|
|
Sets the StatusBarText assigned
|
|
via window.status
|
|
@short Called by KJS.
|
|
*/
|
|
public native void setJSStatusBarText(String text);
|
|
/**
|
|
Called by KJS.
|
|
Sets the DefaultStatusBarText assigned
|
|
via window.defaultStatus
|
|
@short Called by KJS.
|
|
*/
|
|
public native void setJSDefaultStatusBarText(String text);
|
|
/**
|
|
Called by KJS.
|
|
Returns the StatusBarText assigned
|
|
via window.status
|
|
@short Called by KJS.
|
|
*/
|
|
public native String jsStatusBarText();
|
|
/**
|
|
Called by KJS.
|
|
Returns the DefaultStatusBarText assigned
|
|
via window.defaultStatus
|
|
@short Called by KJS.
|
|
*/
|
|
public native String jsDefaultStatusBarText();
|
|
/**
|
|
Referrer used for links in this page.
|
|
@short Referrer used for links in this page.
|
|
*/
|
|
public native String referrer();
|
|
/**
|
|
Referrer used to obtain this page.
|
|
@short Referrer used to obtain this page.
|
|
*/
|
|
public native String pageReferrer();
|
|
/**
|
|
Last-modified date (in raw string format), if received in the [HTTP] headers.
|
|
@short Last-modified date (in raw string format), if received in the [HTTP] headers.
|
|
*/
|
|
public native String lastModified();
|
|
/**
|
|
Loads a style sheet into the stylesheet cache.
|
|
@short Loads a style sheet into the stylesheet cache.
|
|
*/
|
|
public native void preloadStyleSheet(String url, String stylesheet);
|
|
/**
|
|
Loads a script into the script cache.
|
|
@short Loads a script into the script cache.
|
|
*/
|
|
public native void preloadScript(String url, String script);
|
|
/**
|
|
@short
|
|
*/
|
|
public native boolean restored();
|
|
/**
|
|
Determine if signal should be emitted before, instead or never when a
|
|
submitForm() happens.
|
|
@short Determine if signal should be emitted before, instead or never when a submitForm() happens.
|
|
*/
|
|
public native void setFormNotification(int fn);
|
|
/**
|
|
Determine if signal should be emitted before, instead or never when a
|
|
submitForm() happens.
|
|
### KDE4 remove me
|
|
@short Determine if signal should be emitted before, instead or never when a submitForm() happens.
|
|
*/
|
|
public native int formNotification();
|
|
/**
|
|
Returns the toplevel (origin) URL of this document, even if this
|
|
part is a frame or an iframe.
|
|
@return the actual original url.
|
|
|
|
@short Returns the toplevel (origin) URL of this document, even if this part is a frame or an iframe.
|
|
*/
|
|
public native KURL toplevelURL();
|
|
/**
|
|
Checks whether the page contains unsubmitted form changes.
|
|
@return true if form changes exist
|
|
|
|
@short Checks whether the page contains unsubmitted form changes.
|
|
*/
|
|
public native boolean isModified();
|
|
/**
|
|
Shows or hides the suppressed popup indicator
|
|
@short Shows or hides the suppressed popup indicator
|
|
*/
|
|
public native void setSuppressedPopupIndicator(boolean enable, TDEHTMLPart originPart);
|
|
/**
|
|
@short
|
|
*/
|
|
public native boolean inProgress();
|
|
/**
|
|
Sets the focused node of the document to the specified node. If the node is a form control, the control will
|
|
receive focus in the same way that it would if the user had clicked on it or tabbed to it with the keyboard. For
|
|
most other types of elements, there is no visual indication of whether or not they are focused.
|
|
See activeNode
|
|
@param node The node to focus
|
|
@short Sets the focused node of the document to the specified node.
|
|
*/
|
|
public native void setActiveNode(Node node);
|
|
/**
|
|
Stops all animated images on the current and child pages
|
|
@short Stops all animated images on the current and child pages
|
|
*/
|
|
public native void stopAnimations();
|
|
public native String dcopObjectId();
|
|
/**
|
|
Enables/disables caret mode.
|
|
Enabling caret mode displays a caret which can be used to navigate
|
|
the document using the keyboard only. Caret mode is switched off by
|
|
default.
|
|
@param enable <code>true</code> to enable, <code>false</code> to disable caret mode.
|
|
@short Enables/disables caret mode.
|
|
*/
|
|
public native void setCaretMode(boolean enable);
|
|
/**
|
|
Makes the document editable.
|
|
Setting this property to <code>true</code> makes the document, and its
|
|
subdocuments (such as frames, iframes, objects) editable as a whole.
|
|
FIXME: insert more information about navigation, features etc. as seen fit
|
|
@param enable <code>true</code> to set document editable, <code>false</code> to set it
|
|
read-only.
|
|
@short Makes the document editable.
|
|
*/
|
|
public native void setEditable(boolean enable);
|
|
/**
|
|
Sets the visibility of the caret.
|
|
This methods displays or hides the caret regardless of the current
|
|
caret display policy (see setCaretDisplayNonFocused), and regardless
|
|
of focus.
|
|
The caret will be shown/hidden only under at least one of
|
|
the following conditions:
|
|
|
|
<li>
|
|
the document is editable
|
|
</li>
|
|
|
|
<li>
|
|
the document is in caret mode
|
|
</li>
|
|
|
|
<li>
|
|
the document's currently focused element is editable
|
|
</li>
|
|
@param show <code>true</code> to make visible, <code>false</code> to hide.
|
|
@short Sets the visibility of the caret.
|
|
*/
|
|
public native void setCaretVisible(boolean show);
|
|
public native void submitFormProxy(String action, String url, byte[] formData, String target, String contentType, String boundary);
|
|
public native void submitFormProxy(String action, String url, byte[] formData, String target, String contentType);
|
|
public native void submitFormProxy(String action, String url, byte[] formData, String target);
|
|
/**
|
|
returns a KURL object for the given url. Use when
|
|
you know what you're doing.
|
|
@short returns a KURL object for the given url.
|
|
*/
|
|
protected native KURL completeURL(String url);
|
|
/**
|
|
presents a detailed error message to the user.
|
|
<code>errorCode</code> tdeio error code, eg TDEIO.ERR_SERVER_TIMEOUT.
|
|
<code>text</code> tdeio additional information text.
|
|
<code>url</code> the url that triggered the error.
|
|
@short presents a detailed error message to the user.
|
|
*/
|
|
protected native void htmlError(int errorCode, String text, KURL reqUrl);
|
|
protected native void customEvent(TQCustomEvent event);
|
|
/**
|
|
Eventhandler of the tdehtml.MousePressEvent.
|
|
@short Eventhandler of the tdehtml.MousePressEvent.
|
|
*/
|
|
// void tdehtmlMousePressEvent(tdehtml::MousePressEvent* arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Eventhandler for the tdehtml.MouseDoubleClickEvent.
|
|
@short Eventhandler for the tdehtml.MouseDoubleClickEvent.
|
|
*/
|
|
// void tdehtmlMouseDoubleClickEvent(tdehtml::MouseDoubleClickEvent* arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Eventhandler for the tdehtml.MouseMouseMoveEvent.
|
|
@short Eventhandler for the tdehtml.MouseMouseMoveEvent.
|
|
*/
|
|
// void tdehtmlMouseMoveEvent(tdehtml::MouseMoveEvent* arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Eventhandler for the tdehtml.MouseMouseReleaseEvent.
|
|
@short Eventhandler for the tdehtml.MouseMouseReleaseEvent.
|
|
*/
|
|
// void tdehtmlMouseReleaseEvent(tdehtml::MouseReleaseEvent* arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Eventhandler for the tdehtml.DrawContentsEvent.
|
|
@short Eventhandler for the tdehtml.DrawContentsEvent.
|
|
*/
|
|
// void tdehtmlDrawContentsEvent(tdehtml::DrawContentsEvent* arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Internal reimplementation of KParts.Part.guiActivateEvent .
|
|
@short Internal reimplementation of KParts.Part.guiActivateEvent .
|
|
*/
|
|
protected native void guiActivateEvent(GUIActivateEvent event);
|
|
/**
|
|
Internal empty reimplementation of KParts.ReadOnlyPart.openFile .
|
|
@short Internal empty reimplementation of KParts.ReadOnlyPart.openFile .
|
|
*/
|
|
protected native boolean openFile();
|
|
protected native void urlSelected(String url, int button, int state, String _target, URLArgs args);
|
|
protected native void urlSelected(String url, int button, int state, String _target);
|
|
/**
|
|
This method is called when a new embedded object (include html frames) is to be created.
|
|
Reimplement it if you want to add support for certain embeddable objects without registering
|
|
them in the KDE wide registry system (KSyCoCa) . Another reason for re-implementing this
|
|
method could be if you want to derive from KTHMLPart and also want all html frame objects
|
|
to be a object of your derived type, in which case you should return a new instance for
|
|
the mimetype 'text/html' .
|
|
@short This method is called when a new embedded object (include html frames) is to be created.
|
|
*/
|
|
protected native ReadOnlyPart createPart(TQWidget parentWidget, String widgetName, TQObject parent, String name, String mimetype, StringBuffer serviceName, String[] serviceTypes, String[] params);
|
|
protected native boolean pluginPageQuestionAsked(String mimetype);
|
|
protected native void setPluginPageQuestionAsked(String mimetype);
|
|
// void setPageSecurity(TDEHTMLPart::PageSecurity arg1); >>>> NOT CONVERTED
|
|
/**
|
|
Implements the streaming API of KParts.ReadOnlyPart.
|
|
@short Implements the streaming API of KParts.ReadOnlyPart.
|
|
*/
|
|
protected native boolean doOpenStream(String mimeType);
|
|
/**
|
|
Implements the streaming API of KParts.ReadOnlyPart.
|
|
@short Implements the streaming API of KParts.ReadOnlyPart.
|
|
*/
|
|
protected native boolean doWriteStream(byte[] data);
|
|
/**
|
|
Implements the streaming API of KParts.ReadOnlyPart.
|
|
@short Implements the streaming API of KParts.ReadOnlyPart.
|
|
*/
|
|
protected native boolean doCloseStream();
|
|
/** Deletes the wrapped C++ instance */
|
|
protected native void finalize() throws InternalError;
|
|
/** Delete the wrapped C++ instance ahead of finalize() */
|
|
public native void dispose();
|
|
/** Has the wrapped C++ instance been deleted? */
|
|
public native boolean isDisposed();
|
|
}
|