summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KHTMLPart.java
blob: 3ee52003e5ee37c5b75056fb77355e54d4013cc6 (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQRect;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQDataStream;
import org.kde.qt.TQObject;
import org.kde.qt.TQPoint;
import java.util.ArrayList;
import org.kde.qt.TQPainter;
import org.kde.qt.TQCustomEvent;
import org.kde.qt.TQCursor;
import org.kde.qt.TQVariant;
import org.kde.qt.TQWidget;

/**

 This class is khtml'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";
 KHTMLPart w = new KHTMLPart();
 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 KHTML
 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 = ...;
 KHTMLPart w = new KHTMLPart();
 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>
 KHTMLPart doc = new KHTMLPart();
 doc.openStream( "text/html", KURL() );
 doc.writeStream( String( "<html><body><p>KHTML Rocks!</p></body></html>" ) );
 doc.closeStream();
 </pre>
  See {@link KHTMLPartSignals} for signals emitted by KHTMLPart
		@author Lars Knoll (knoll@kde.org)

		@short HTML Browser Widget.

*/
public class KHTMLPart extends ReadOnlyPart  {
	protected KHTMLPart(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 KHTMLPart.
			 KHTML basically consists of two objects: The KHTMLPart itself,
		 holding the document data (DOM document), and the KHTMLView,
		 derived from TQScrollView, in which the document content is
		 rendered in. You can specify two different parent objects for a
		 KHTMLPart, one parent for the KHTMLPart document and on parent
		 for the KHTMLView. 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 KHTMLPart.
	*/
	public KHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name, int prof) {
		super((Class) null);
		newKHTMLPart(parentWidget,widgetname,parent,name,prof);
	}
	private native void newKHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name, int prof);
	public KHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name) {
		super((Class) null);
		newKHTMLPart(parentWidget,widgetname,parent,name);
	}
	private native void newKHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent, String name);
	public KHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent) {
		super((Class) null);
		newKHTMLPart(parentWidget,widgetname,parent);
	}
	private native void newKHTMLPart(TQWidget parentWidget, String widgetname, TQObject parent);
	public KHTMLPart(TQWidget parentWidget, String widgetname) {
		super((Class) null);
		newKHTMLPart(parentWidget,widgetname);
	}
	private native void newKHTMLPart(TQWidget parentWidget, String widgetname);
	public KHTMLPart(TQWidget parentWidget) {
		super((Class) null);
		newKHTMLPart(parentWidget);
	}
	private native void newKHTMLPart(TQWidget parentWidget);
	public KHTMLPart() {
		super((Class) null);
		newKHTMLPart();
	}
	private native void newKHTMLPart();
	public KHTMLPart(KHTMLView view, TQObject parent, String name, int prof) {
		super((Class) null);
		newKHTMLPart(view,parent,name,prof);
	}
	private native void newKHTMLPart(KHTMLView view, TQObject parent, String name, int prof);
	public KHTMLPart(KHTMLView view, TQObject parent, String name) {
		super((Class) null);
		newKHTMLPart(view,parent,name);
	}
	private native void newKHTMLPart(KHTMLView view, TQObject parent, String name);
	public KHTMLPart(KHTMLView view, TQObject parent) {
		super((Class) null);
		newKHTMLPart(view,parent);
	}
	private native void newKHTMLPart(KHTMLView view, TQObject parent);
	public KHTMLPart(KHTMLView view) {
		super((Class) null);
		newKHTMLPart(view);
	}
	private native void newKHTMLPart(KHTMLView 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 KIO 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 khtml::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 KHTMLView 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 &lt;meta http-equiv="refresh" ....&gt;
		   		@short    Enable/disable automatic forwarding by &lt;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 KHTML.
		 ( 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 KApplication.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 KHTMLView.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>&lt;pre&gt;</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 KHTMLPart's complete state (including child frame
		 objects) to the provided TQDataStream.
			 This is called from the saveState() method of the
		 browserExtension().
		   		@short    Saves the KHTMLPart's complete state (including child frame  objects) to the provided TQDataStream.
	*/
	public native void saveState(TQDataStream stream);
	/**	
		 Restores the KHTMLPart'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 KHTMLPart'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 KHTMLSettings settings();
	/**	
		 Returns a pointer to the parent KHTMLPart if the part is a frame
		 in an HTML frameset.
			  Returns null otherwise.
		   		@short    Returns a pointer to the parent KHTMLPart if the part is a frame  in an HTML frameset.
	*/
	public native KHTMLPart 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 KHTMLPart 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.
	*/
	// KHTMLPart* findFrameParent(KParts::ReadOnlyPart* arg1,const TQString& arg2,khtml::ChildFrame** arg3); >>>> NOT CONVERTED
	public native KHTMLPart 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, KHTMLPart 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> kio error code, eg KIO.ERR_SERVER_TIMEOUT.
		 <code>text</code> kio 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 khtml.MousePressEvent.
		   		@short    Eventhandler of the khtml.MousePressEvent.
	*/
	// void khtmlMousePressEvent(khtml::MousePressEvent* arg1); >>>> NOT CONVERTED
	/**	
		 Eventhandler for the khtml.MouseDoubleClickEvent.
		   		@short    Eventhandler for the khtml.MouseDoubleClickEvent.
	*/
	// void khtmlMouseDoubleClickEvent(khtml::MouseDoubleClickEvent* arg1); >>>> NOT CONVERTED
	/**	
		 Eventhandler for the khtml.MouseMouseMoveEvent.
		   		@short    Eventhandler for the khtml.MouseMouseMoveEvent.
	*/
	// void khtmlMouseMoveEvent(khtml::MouseMoveEvent* arg1); >>>> NOT CONVERTED
	/**	
		 Eventhandler for the khtml.MouseMouseReleaseEvent.
		   		@short    Eventhandler for the khtml.MouseMouseReleaseEvent.
	*/
	// void khtmlMouseReleaseEvent(khtml::MouseReleaseEvent* arg1); >>>> NOT CONVERTED
	/**	
		 Eventhandler for the khtml.DrawContentsEvent.
		   		@short    Eventhandler for the khtml.DrawContentsEvent.
	*/
	// void khtmlDrawContentsEvent(khtml::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(KHTMLPart::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();
}