ImagemapClickablePolygon Class Reference

This class represents a clickable n-sided polygon. More...

#include <clicarea.h>

Inheritance diagram for ImagemapClickablePolygon:

ImagemapClickableArea OverrideListItem ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ImagemapClickablePolygon ()
 Default contructor.
 ImagemapClickablePolygon (Path *pthToCopy, TCHAR *pcURL=NULL, TCHAR *pcFrame=NULL)
 Specific contructor.
 ~ImagemapClickablePolygon ()
 Destructor.
 ImagemapClickablePolygon (const ImagemapClickablePolygon &icpCopy)
 Copy constructor.
ImagemapClickablePolygonoperator= (const ImagemapClickablePolygon &icpCopy)
 Assignment operator.
INT32 Write (CCLexFile *pfileToWrite=NULL, TCHAR *pcBuffer=NULL)
 Writes this clickable area, in client-side imagemap form, into the buffer or the file or both.
DocRect GetBoundingRect ()

Public Attributes

Pathm_ppth

Detailed Description

This class represents a clickable n-sided polygon.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97

Definition at line 252 of file clicarea.h.


Constructor & Destructor Documentation

ImagemapClickablePolygon::ImagemapClickablePolygon  ) 
 

Default contructor.

ImagemapClickablePolygon::ImagemapClickablePolygon() : ImagemapClickableArea()

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
- [INPUTS]
- [OUTPUTS]

Definition at line 611 of file clicarea.cpp.

00611                                                    : ImagemapClickableArea()
00612 {
00613     m_ppth=NULL;
00614 }

ImagemapClickablePolygon::ImagemapClickablePolygon Path ppthPath,
TCHAR pcURL = NULL,
TCHAR pcFrame = NULL
 

Specific contructor.

ImagemapClickablePolygon::ImagemapClickablePolygon(Path* ppthPath)

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
ppthPath - pointer to the path to copy [INPUTS]
- [OUTPUTS]

Definition at line 628 of file clicarea.cpp.

00629     : ImagemapClickableArea(pcURL, pcFrame)
00630 {
00631     //Create a new path member variable
00632     m_ppth=new Path();
00633 
00634     //Initialise it
00635     m_ppth->Initialise(ppthPath->GetNumCoords());
00636 
00637     //And copy the path we have been given
00638     m_ppth->CopyPathDataFrom(ppthPath);
00639 }

ImagemapClickablePolygon::~ImagemapClickablePolygon  ) 
 

Destructor.

ImagemapClickablePolygon::~ImagemapClickablePolygon()

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/4/97
Parameters:
- [INPUTS]
- [OUTPUTS]

Definition at line 653 of file clicarea.cpp.

00654 {
00655     //If we have a path member variable, delete it
00656     if (m_ppth)
00657         delete m_ppth;
00658 }

ImagemapClickablePolygon::ImagemapClickablePolygon const ImagemapClickablePolygon icpCopy  ) 
 

Copy constructor.

ImagemapClickablePolygon::ImagemapClickablePolygon(const ImagemapClickablePolygon& waaCopy);

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/4/97
Parameters:
- [INPUTS]
- [OUTPUTS]

Definition at line 672 of file clicarea.cpp.

00673 :ImagemapClickableArea(icpCopy)
00674 {
00675     //Simply use the assignment operator
00676     *this=icpCopy;
00677 
00678 }


Member Function Documentation

DocRect ImagemapClickablePolygon::GetBoundingRect  )  [inline, virtual]
 

Implements ImagemapClickableArea.

Definition at line 274 of file clicarea.h.

00275     {
00276         if (m_ppth)
00277             return m_ppth->GetBoundingRect();
00278         else
00279             return DocRect(0,0,0,0);
00280     }

ImagemapClickablePolygon & ImagemapClickablePolygon::operator= const ImagemapClickablePolygon icpCopy  ) 
 

Assignment operator.

ImagemapClickablePolygon& ImagemapClickablePolygon::operator=(const ImagemapClickablePolygon& icpCopy)

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/4/97
Parameters:
icpCopy [INPUTS]
- [OUTPUTS]

Definition at line 692 of file clicarea.cpp.

00693 {
00694     //Delete our member variable path
00695     if (m_ppth)
00696         delete m_ppth;
00697         
00698     //Now, does the other ICP have a member path variable?
00699     if (icpCopy.m_ppth!=NULL)
00700     {
00701         //Yes. So create a new path member variable
00702         m_ppth=new Path();
00703         
00704         //Initialise it
00705         m_ppth->Initialise(icpCopy.m_ppth->GetNumCoords());
00706 
00707         //And copy the path we have been given
00708         m_ppth->CopyPathDataFrom(icpCopy.m_ppth);
00709     }
00710     else
00711     {
00712         //No. So set our member path pointer to NULL
00713         m_ppth=NULL;
00714     }
00715 
00716     return *this;
00717 
00718 }

INT32 ImagemapClickablePolygon::Write CCLexFile pfileToWrite = NULL,
TCHAR pcBuffer = NULL
[virtual]
 

Writes this clickable area, in client-side imagemap form, into the buffer or the file or both.

INT32 ImagemapClickablePolygon::Write(CCLexFile* pfileToWrite, TCHAR* pcBuffer)

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
pfileToWrite The file to write to [INPUTS] pcBuffer The text buffer to write to
Either of the above may be NULL.

Returns:
The number of TCHARs written.
This function may be called with all parameters NULL, to find out how many TCHARs will be written into the imagemap, and hence to find out how long the text buffer must be

Implements ImagemapClickableArea.

Definition at line 743 of file clicarea.cpp.

00744 {
00745     PORTNOTETRACE("other","ImagemapClickableArea::Write - do nothing");
00746 #ifndef EXCLUDE_FROM_XARALX
00747     //Keep a count of the characters we write out
00748     INT32 lCharsWritten=0;
00749 
00750     ImagemapFilter * pFilter = GetImagemapFilter();
00751     ERROR2IF(pFilter == NULL,lCharsWritten,"ImagemapClickablePolygon::Write no imagemap filter");
00752 
00753     //First indent the text
00754     pFilter->Indent();
00755     lCharsWritten += pFilter->WriteIndent(pfileToWrite, pcBuffer);
00756 
00757     //And write out <AREA
00758     lCharsWritten += pFilter->WriteStartOfTag(_R(IDS_HTMLEXPORT_AREA), pfileToWrite, pcBuffer);
00759 
00760     //Now write out SHAPE=PATH
00761     lCharsWritten += pFilter->WriteParameter(_R(IDS_HTMLEXPORT_SHAPE), _R(IDS_HTMLEXPORT_POLYGON), pfileToWrite, pcBuffer);
00762 
00763     //Write out the URL and the FRAME
00764     lCharsWritten += WriteURLAndFrame(pfileToWrite, pcBuffer);
00765 
00766     //And write out our coords
00767     lCharsWritten += pFilter->WriteCoords(m_ppth, m_pcFrame, pfileToWrite, pcBuffer);
00768 
00769     //And the end of the tag
00770     lCharsWritten += pFilter->WriteEndOfTag(pfileToWrite, pcBuffer);
00771 
00772     //Then reset the indent
00773     pFilter->Unindent();
00774 
00775     //And write out a new line
00776     lCharsWritten += pFilter->WriteEOL(pfileToWrite, pcBuffer);
00777 
00778     //And return the number of characters we've written
00779     return lCharsWritten; */
00780 #else
00781     return 0;
00782 #endif
00783 }


Member Data Documentation

Path* ImagemapClickablePolygon::m_ppth
 

Definition at line 284 of file clicarea.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:21 2007 for Camelot by  doxygen 1.4.4