[khtmlw Index] [khtmlw Hierarchy] [Headers]
Widget for displaying HTML. Manages srcollbars and frames. More...
#include <htmlview.h>
Inherits: QWidget (qt)
This widget makes displaying HTML text very easy. It handles scrollbars and stuff. It is able to handle most HTML 3.x including tables and frames. To fill the widget with content you should do the follwing:
view->begin( "file:/tmp/test.html" ); view->parse(); view->write( "<HTML><TITLE>...." ); ..... view->end(); view->show();The widget will care for resize events and paint events and for scrolling. Have a look at the set of signals emitted by this widget. You should connect to most of them.
[public]
Created a new HTML View. The widget is empty by default. You must use begin write end and parse to fill the widget with content.
_name | is the name of the widget. Usually this name is only meaningful for Qt but in this case it is the name of the HTML window. This means you can reference this name in the < href=... target=... > tag. If this argument is 0L then a unique default name is chosen. |
[public virtual]
Destroys the widget and all of its child widgets.
[public virtual]
Clears the widget and prepares it for new content. If you display for example "file:/tmp/test.html", you can use the following code to get a value for '_url':
KURL u( "file:/tmp/test.html" ); view->begin( u.directoryURL() );
_dx | is the initial horizontal scrollbar value. Usually you don't want to use this. |
_dy | is the initial vertical scrollbar value. Usually you don't want to use this. |
[public virtual]
Writes another part of the HTML code to the widget. You may call this function many times in sequence. But remember: The less calls the faster the widget is.
[public virtual]
Call this after your last call to write
[public virtual]
This function will parse the code that has been previously written using the write function. Call this one after calling end
[public virtual]
Shows '_url' in this view. Usually a documentRequest signal is emitted to load the url.
[public virtual]
Prints this view to the printer.
[public virtual]
Creates a new view. This function is not intended to be called by the application that uses this widget. It is intended to be overloaded by some class. If for example you have done this:
class MyView : public KHTMLView { ... virtual KHTMLView* newView( QWidget *_parent, const char *_name, int _flags ); };You may now want to reimplement like this
KHTMLView* myView::newView( QWidget *_parent, const char *_name, int _flags ); { return new MyView( ... ); }This will cause that all frames ( if you have some ) will be an instance of MyView, too.
[public virtual]
Changes the name of the widget. This name is used in the <a href=.. target=... > tag.
[public virtual]
[public]
Tells the widget that it is a frameset This is for internal use only. FOR INTERNAL USE ONLY.
[public]
FOR INTERNAL USE ONLY.
[public]
Tells the widget that it is a frame of some frameset. This is for internal use only. FOR INTERNAL USE ONLY.
[public]
FOR INTERNAL USE ONLY.
[public]
Find the anchor named '_name'. If the anchor is found, the widget scrolls to the closest position. Returns TRUE if the anchor has been found.
[public]
Scrolls to the position (_x, _y). Returns TRUE if succeeded.
[public]
Sets the width of the border. This is used to implement the tag <frame frameborder=... > tag. FOR INTERNAL USE ONLY.
[public]
[public]
Tells the widget to show/hide the scrollbars. This function will have
effect only when called before begin It is used to implement the
<frame scrolling=... > tag.
FOR INTERNAL USE ONLY.
_scroll | is 1 for yes, 0 for no and -1 for auto. |
[public]
[public]
Tells the widget wether it should be resizeable or not.
The widget may still resize. Its only intention is to provide
information for HTMLFrameSet HTMLFrameSet looks at this flag
to determine wether the separator between this frame and another one
may be moved by the user. It is used to impement the
<frame noresize > tag.
FOR INTERNAL USE ONLY.
[public]
This function is used in HTMLFrameSet It is for INTERNAL USE ONLY.
[public]
Sets the width of the margin. This function is used to implement
the <frame marginwidth=... > tag.
FOR INTERNAL USE ONLY.
[public]
Sets the width of the margin. This function is used to implement
the <frame marginheight=... > tag.
FOR INTERNAL USE ONLY.
[public]
Tells the widget that it has been selected. This will result in a black border around the widget. This happens only if this widget represents a frame. FOR INTERNAL USE ONLY.
[public]
FOR INTERNAL USE ONLY.
[public]
FOR INTERNAL USE ONLY.
[public]
Checks out wether there is a URL under the point p and returns a pointer to this URL or 0L if there is none.
[public]
Seaerches for a KHTMLView with a specific name as mentioned in the constructor.
[public virtual]
Select all objects matching the regular expression.
_select | if TRUE then all matching objects are marked, otherwise they become unmarked. |
[public virtual]
Gets a list of all selected URLs. The list may be Null. You can test this using list.isNull().
[public virtual]
Get the text the user has marked.
_str | is the QString which will contain the text the user selected. The selected text is appended to any text currently in _str. |
[public]
Has the user selected any text? Call getSelectedText to retrieve the selected text.
[public]
Initiate a text search.
[public]
Find the next occurrance of the expression.
[public]
end a text search.
[public virtual]
This function allows you to customize the behavior of the KHTMLWidget
[public virtual]
This function allows you to customize the behavior of the KHTMLWidget
[public virtual]
This function is called if the user presses the mouse. If he clicks on a link you get the URL in '_url'.
KHTMLWidget not to this widget!
_ev | the QMouseEvent The coordinates of the mouse contained in this event are relational to the upper left corner of the |
_url | is the clicked URL or 0L is there was none. |
_isselected | is TRUE of the URL '_url' is already selected. |
_target | is the target frame if one is mentioned otherwise 0L. |
[public virtual]
This function is called if the user wants to start a DND action. Overload this function and return TRUE to indicate that you processed the event. By default the function returns FALSE. This causes the KHTMLWidget to process the event. Usually this function calls KHTMLWidget::startDrag like this: view->startDrag(....). Dont call the startDrag function of any other window. KDND would not like it :-)
_url | is the URL the user wants to drag around. |
_p | is the mouse position in global coordinates. |
[public virtual]
Selects all objects in this rectangle and deselects all objects outside the rectangle.
_painter | is a QPainter or 0L. If it is 0L a new painter is created. |
_rect | is a rectangle in display coordinates. This means that the point (0,0) is the upper/left most point of the widget but must not be this one for the HTML page. This happens if the widget is being scrolled. |
[public virtual]
Selects or deselects all objects.
_painter | is a QPainter or 0L. If it is 0L a new painter is created. |
[public]
Selects all objects which refer to '_url'. All selected objects are redrawn if they changed their selection mode.
_painter | may be 0L. In this case a new QPainter is created and destroyed afterwards if no painter already exists. |
[public]
[public]
[public]
Never returns 0L.
[public virtual]
Called when a URL is encountered. Overload this method to indicate which links have been visited previously.
[public]
Sets charset for the View
[public]
set a charset, which will override the setting
[public]
For internal use only.
[public]
For internal use only.
[public]
tell the widget to save himself. Returns a struct, that can be usedto restore it's contents
[public]
restores the contents of the widget to the state gotten by a call to saveYourself )
[public slot]
Call this slot if an requested image is available.The rquested image is named '_url' and is stored on the local disk in the file named '_filename'.
_filename | is a usual UNIX filename like "/tmp/tmpimage". |
_url | is the full qualified URL that was passedd to you by the ref #imageRequest signal. |
[public slot]
This slot is connected to all children. It emits the signal documentRequest if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal cancelDocumentRequest if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal URLSelected if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal setTitle if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal onURL if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal popupMenu if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal imageRequest if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal cancelImageRequest if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal cancelImageRequest if called. This slot is for internal use only.
_method | is the |
_data | is the encoded from data submitted |
_url | is the |
[public slot]
This slot is connected to all children. It emits the signal documentStarted if called. This slot is for internal use only.
[public slot]
This slot is connected to all children. It emits the signal documentDone if called. This slot is for internal use only.
[public slot]
You can move the vertical scrollbar by calling this slot.
[public slot]
You can move the vertical scrollbar by calling this slot.
[public slot]
You can move the vertical scrollbar by calling this slot.
[public slot]
You can move the vertical scrollbar by calling this slot.
[protected]
The currently displayed URL. This is usually the same URL as the one passed to the Constructor of KIDWIindow::KIDWindow
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal URLSelected if called. This slot is for internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal onURL if called. This slot is for internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal popupMenu if called. This slot is for internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal imageRequest if called. This slot is for internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal cancelImageRequest if called. This slot is for internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal if the form is submitted
_method | is the |
_data | is the encoded form data submitted |
_url | is the |
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal
if the document in the HTML Widget changes.
For Internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal documentStarted if called. This slot is for internal use only.
[protected slot virtual]
This slot is connected to KHTMLWidget It emits the signal documentDone if called. This slot is for internal use only.
[protected slot]
Connected to the HTML widget.
[protected slot]
Connected to the HTML widget
[protected slot]
The user pressed ALT + Up
[protected slot]
The user pressed ALT + Right
[protected slot]
The user pressed ALT + Left
[signal]
This signal is emitted if we deal with frames ( or one of the child widgets! ). It tells the owner of the widget to provide a certain URL for a widget. The owner has to call
_widget->begin( .. ); _widget->parse(); _widget->write( .. ); .... _widget->end();This may happen before returning ( directly after receiving this signal ), or some time later on. You may be notified that the URL is no longer wanted. This is done with the signal cancelDocumentRequest
_url | is the URL where the document can be found. |
_widget | is the widget that requests the document. |
[signal]
This signal is emitted if the widget does not need the document any more.
_url | is the URL of the document that we dont need any more. |
[signal]
This signal is emitted whenever the widget wants to change the windows title. Usually this is the text enclosed in the title tag.
_title | is a string of ASCII characters. |
[signal]
Signals that the URL '_url' has been selected. The user used the mouse button '_button' for this.
_url | is a full qualified URL. |
_button | is LeftButton, MiddleButton or RightButton |
_target | is the target window or 0L if none is specified. |
[signal]
Signals that the mouse cursor is over URL '_url'. If '_url' is null then cursor moved off a URL
_url | is a full qualified URL. |
[signal]
Signal that the user has selected text or the existing selection has become unselected. The text may be retrieved using getSelectedText This is a good signal to connect to for enabling/disabling the Copy menu item or calling XSetSelectionOwner().
_selected | is true if the user has selected text or false if the current selection has been removed. |
[signal]
This signal is Emitted if the user pressed the right mouse button over an URL. '_url' may be 0L to indicate the the user pressed the right mouse button over an area that does not have an anchor tag.
_point | is the position where the user pressed the mouse button. This point is already in global cooredinates. |
_url | is a full qualified URL or 0L. |
[signal]
This signal is emitted if the widget requests to load an image. KHTMLWidget can only load image from your local disk. If it finds an image with another protocol in its URL, it will emit this signal. If the image is loaded at some time, call slotImageLoaded If the image is not needed any more, the signal cancelImageRequest is emitted. It may happen that not the widget itself but one of its children requests the image. To distibuish that you get '_view'.
[signal]
This signal is only emitted if this widget and not one of its children requests an image.
[signal]
Cancels an image that has been requested before.
[signal]
This signal is only emitted if this widget and not one of its children cancels a requested image.
[signal]
The user pressed a forms submit button.
_method | is the |
_data | is the encoded data to send |
_url | is the |
[signal]
Emitted if the user presses the mouse button over this widget and if the widget is a frame. In this case this frame became the selected one and this signal is used to tell our parent about this.
[signal]
The widget started working. You may use this signal to implement an animated logo like netscape has one.
[signal]
This signal is emitted if the widget has parsed and if all images arrived. Mention that this is only true or '_view'. The parent widget or any child widget may still parse or wait for an image. This signal is the complement to documentStarted
[signal]
The user pressed ALT + Up
[signal]
The user pressed ALT + Right
[signal]
The user pressed ALT + Left
Documentation generated by root@darkstar.lst.de on Wed Sep 8 17:38:46 CEST 1999 | Kdoc |