|
htmlArea
Image map area class | [Previous] [Main] [Next] |
| htmlArea encapsulates the <AREA> tag, and is used to identify an area within an image map associated with a particular URL. Image maps are created using the htmlImageMap class. htmlArea objects are intended to be added to htmlImageMap objects using the << insertion operator or Add() method. They can also be added directly to htmlImage objects.
| |
|
| |
| #include <dcmicro/htmlpp/area.h>
| |
|
| |
| htmlImageMap
| |
|
| |
| ShapeType
| |
|
| |
| htmlArea()
| |
| Constructs an empty area object.
| |
|
| |
| htmlArea( | const String& url,
| |
| ShapeType shape_type,
| ||
| const String& coordinates )
| ||
| Constructs an area object of the specified shape_type and coordinates, referencing the document location url. coordinates must be a string of comma-separated integer coordinates definding the shape. Refer to the Coordinates() method for additional details.
| |
|
| |
| htmlArea( | const String& url,
| |
| const String& target_window,
| ||
| ShapeType shape_type,
| ||
| const String& coordinates )
| ||
| Constructs an area object of the specified shape_type and coordinates, referencing the document location url. If the area is selected by the user, the document will be displayed in the specified target_window. coordinates must be a string of comma-separated integer coordinates definding the shape. Refer to the Coordinates() method for additional details.
| |
|
| |
| htmlArea( const htmlArea& rhs )
| |
| Copy constructor.
| |
|
| |
| virtual ~htmlArea()
| |
| Destroys the object.
| |
|
| |
| URL | htmlArea& URL( const String& url )
| |
| Set the URL to invoke when the user clicks the area to url, then returns a reference to the object.
| |
|
| |
| URL | String URL() const
| |
| Returns the URL that will be invoked when the user clicks the area, or an empty string if not set.
| |
|
| |
| Shape | htmlArea& Shape( ShapeType shape_type )
| |
| Defines the shape described by the coordinates for the area to shape_type, and returns a reference to the object.
| |
|
| |
| Shape | ShapeType Shape() const
| |
| Returns the shape type of the area, or shape_rectangle if not set.
| |
|
| |
| Coordinates | htmlArea& Coordinates( const String& coordinates )
| |
| Sets the coordinates defining the shape to coordinates, and returns a reference to the object. coordinates is a string of comma-separated x,y coordinate pairs. The number of x,y pairs in the string is dependent upon the shape of the area being defined:
| |
|
|
| |
| Coordinates | String Coordinates() const
| |
| Returns the coordinates defining the area as a string, or an empty string if not set.
| |
|
| |
| Target | htmlArea& Target( const String& target_window )
| |
| Sets the frame or window into which the destination url document is loaded to target_window. If the named window is not already open, a new window with that name opens. See Target Windows for additional details.
| |
|
| |
| Target | String Coordinates() const
| |
| Returns the coordinates defining the area as a string, or an empty string if not set.
| |
|
| |
| Name | htmlArea& Name( const String& area_name )
| |
| Sets the JavaScript-accessible name of the area to area_name, and returns a reference to the object.
| |
|
| |
| Name | String Name() const
| |
| Returns the name of the area, or an empty string if not set.
| |
|
| |
| void Print( ostream& os ) const
| ||
| Outputs the object to os.
| |
|
| |
| Clone | htmlObject FAR * Clone() const
| |
| Returns a base-class pointer to a deep copy of the object.
| |
|
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ example application</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| </BODY>
| |
| </HTML>
| |
|
| |
|
| |
