ImagemapClickableArea Class Reference

This class represents a clickable area. More...

#include <clicarea.h>

Inheritance diagram for ImagemapClickableArea:

OverrideListItem ListItem CCObject SimpleCCObject ImagemapClickableCircle ImagemapClickablePolygon ImagemapClickableRectangle List of all members.

Public Member Functions

virtual INT32 Write (CCLexFile *pfileToWrite=NULL, TCHAR *pcBuffer=NULL)=0
INT32 WriteURLAndFrame (CCLexFile *pfileToWrite=NULL, TCHAR *pcBuffer=NULL)
 Writes the URL and the frame targetting information.
virtual DocRect GetBoundingRect ()=0
BOOL IsAClickableArea ()
ImagemapFilterGetImagemapFilter ()
 Finds the imagemap filter.

Public Attributes

TCHARm_pcURL
TCHARm_pcFrame

Private Member Functions

 ImagemapClickableArea ()
 Default contructor.
 ImagemapClickableArea (TCHAR *pcURL, TCHAR *pcFrame)
 Specific contructor.
 ~ImagemapClickableArea ()
 Destructor.
 ImagemapClickableArea (const ImagemapClickableArea &icaCopy)
 Copy constructor.
ImagemapClickableAreaoperator= (const ImagemapClickableArea &icpCopy)
 Assignment operator.

Detailed Description

This class represents a clickable area.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
It's a pure virtual class, so use one of the three derived classes (below) instead.

Definition at line 124 of file clicarea.h.


Constructor & Destructor Documentation

ImagemapClickableArea::ImagemapClickableArea  )  [private]
 

Default contructor.

ImagemapClickableArea::ImagemapClickableArea()

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

Definition at line 134 of file clicarea.cpp.

00135 {
00136     //Set our member variable pointers to NULL
00137     m_pcURL=m_pcFrame=NULL;
00138 }

ImagemapClickableArea::ImagemapClickableArea TCHAR pcURL,
TCHAR pcFrame
[private]
 

Specific contructor.

ImagemapClickableArea::ImagemapClickableArea(TCHAR* pcURL, TCHAR* pcFrame)

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
pcURL,pcFrame - the strings to put in our member variables [INPUTS]
- [OUTPUTS]

Definition at line 152 of file clicarea.cpp.

00153 {
00154     //First set our member variables to NULL
00155     m_pcURL=m_pcFrame=NULL;
00156 
00157     //And copy the strings across
00158     WebAddressAttribute::CopyString(&m_pcURL, pcURL);
00159     WebAddressAttribute::CopyString(&m_pcFrame, pcFrame);
00160 }

ImagemapClickableArea::~ImagemapClickableArea  )  [private]
 

Destructor.

ImagemapClickableArea::~ImagemapClickableArea()

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

Definition at line 174 of file clicarea.cpp.

00175 {
00176     //Delete our member variables if they exist
00177     if (m_pcURL)
00178         delete m_pcURL;
00179 
00180     if (m_pcFrame)
00181         delete m_pcFrame;
00182 }

ImagemapClickableArea::ImagemapClickableArea const ImagemapClickableArea icaCopy  )  [private]
 

Copy constructor.

ImagemapClickableArea::ImagemapClickableArea(const ImagemapClickableArea& icaCopy)

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

Definition at line 196 of file clicarea.cpp.

00197 {
00198     //Simply use the assignment operator
00199     *this=icaCopy;
00200 
00201 }


Member Function Documentation

virtual DocRect ImagemapClickableArea::GetBoundingRect  )  [pure virtual]
 

Implemented in ImagemapClickableRectangle, ImagemapClickableCircle, and ImagemapClickablePolygon.

ImagemapFilter * ImagemapClickableArea::GetImagemapFilter  ) 
 

Finds the imagemap filter.

ImagemapFilter* ImagemapClickableArea::GetImagemapFilter()

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/4/97
Parameters:
- [INPUTS]
Returns:
A pointer to the imagemap filter

Definition at line 291 of file clicarea.cpp.

00292 {
00293     //First find the filter manager
00294     FilterManager* pFilterManager=Camelot.GetFilterManager();
00295 
00296     //If we can't find it, return NULL
00297     if (pFilterManager==NULL)
00298         return NULL;
00299 
00300     //Otherwise, find the imagemap filter
00301     return (ImagemapFilter*) pFilterManager->FindFilterFromID(FILTERID_IMAGEMAP);
00302 }

BOOL ImagemapClickableArea::IsAClickableArea  )  [inline, virtual]
 

Reimplemented from OverrideListItem.

Definition at line 147 of file clicarea.h.

00148     {
00149         return TRUE;
00150     }

ImagemapClickableArea & ImagemapClickableArea::operator= const ImagemapClickableArea icaCopy  )  [private]
 

Assignment operator.

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

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

Definition at line 215 of file clicarea.cpp.

00216 {
00217     //First set our member variables to NULL
00218     m_pcURL=m_pcFrame=NULL;
00219 
00220     //And copy the strings across
00221     WebAddressAttribute::CopyString(&m_pcURL, icaCopy.m_pcURL);
00222     WebAddressAttribute::CopyString(&m_pcFrame, icaCopy.m_pcFrame);
00223 
00224     return *this;
00225 
00226 }

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

Implemented in ImagemapClickableRectangle, ImagemapClickableCircle, and ImagemapClickablePolygon.

INT32 ImagemapClickableArea::WriteURLAndFrame CCLexFile pfileToWrite = NULL,
TCHAR pcBuffer = NULL
 

Writes the URL and the frame targetting information.

INT32 ImagemapClickableArea::WriteURLAndFrame(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.
If the frame is "_self", it will not be written out.

Definition at line 247 of file clicarea.cpp.

00248 {
00249     PORTNOTETRACE("other","ImagemapClickableArea::WriteURLAndFrame - do nothing");
00250 #ifndef EXCLUDE_FROM_XARALX
00251     //Keep a count of the characters we write out
00252     INT32 lCharsWritten=0;
00253 
00254     ImagemapFilter * pFilter = GetImagemapFilter();
00255     ERROR2IF(pFilter == NULL,lCharsWritten,"ImagemapClickableArea::WriteURLAndFrame no imagemap filter");
00256 
00257     //Write out HREF="..."
00258     if (m_pcURL)
00259         lCharsWritten += pFilter->WriteParameterInQuotes(_R(IDS_HTMLEXPORT_HREF), m_pcURL, pfileToWrite, pcBuffer);
00260 
00261     //Now, is the frame something other than "_self"?
00262     // Neville 21/8/97 removed the is self test as it is wrong, assumes default setting is self
00263     // Changed so that we output blank when a new default setting is seen
00264     if (m_pcFrame && !WebAddressAttribute::AreStringsEqual(m_pcFrame, String_256(_R(IDS_WEBADDRESS_SHORT_DEFAULT))))
00265     {
00266         //Yes. So write out TARGET="..."
00267         lCharsWritten += pFilter->WriteParameterInQuotes(_R(IDS_HTMLEXPORT_TARGET), m_pcFrame, pfileToWrite, pcBuffer);
00268     }
00269 
00270     //And return the number of characters we've written
00271     return lCharsWritten;
00272 #else
00273     return 0;
00274 #endif
00275 }


Member Data Documentation

TCHAR* ImagemapClickableArea::m_pcFrame
 

Definition at line 158 of file clicarea.h.

TCHAR* ImagemapClickableArea::m_pcURL
 

Definition at line 157 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