#include <clicarea.h>
Inheritance diagram for ImagemapClickableRectangle:
Public Member Functions | |
ImagemapClickableRectangle () | |
Default constructor. | |
ImagemapClickableRectangle (DocRect rectToStore, TCHAR *pcURL=NULL, TCHAR *pcFrame=NULL) | |
Specific constructor. | |
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. | |
BOOL | OverrideFromBelow (OverrideListItem *picaOther) |
If this ImagemapClickableRectangle encloses (or is equal to) the bounding box of the other ImagemapClickableArea, and both have the same URL and frame information, then we override the other. | |
BOOL | OverrideFromAbove (OverrideListItem *picaOther) |
DocRect | GetBoundingRect () |
Public Attributes | |
DocRect | m_rect |
Definition at line 171 of file clicarea.h.
|
Default constructor. ImagemapClickableRectangle::ImagemapClickableRectangle() : ImagemapClickableArea()
Definition at line 324 of file clicarea.cpp. 00324 : ImagemapClickableArea() 00325 { 00326 m_rect=DocRect(0,0,0,0); 00327 }
|
|
Specific constructor. ImagemapClickableRectangle::ImagemapClickableRectangle(DocRect rectNew, TCHAR* pcURL, TCHAR* pcFrame) : ImagemapClickableArea(pcURL, pcFrame)
Definition at line 342 of file clicarea.cpp. 00343 : ImagemapClickableArea(pcURL, pcFrame) 00344 { 00345 m_rect=rectNew; 00346 }
|
|
Implements ImagemapClickableArea. Definition at line 196 of file clicarea.h. 00197 { 00198 return m_rect; 00199 }
|
|
Reimplemented from OverrideListItem. Definition at line 189 of file clicarea.h. 00190 { 00191 return OverrideFromBelow(picaOther); 00192 }
|
|
If this ImagemapClickableRectangle encloses (or is equal to) the bounding box of the other ImagemapClickableArea, and both have the same URL and frame information, then we override the other. BOOL ImagemapClickableRectangle::OverrideFromBelow(OverrideListItem* picaOther)
Reimplemented from OverrideListItem. Definition at line 431 of file clicarea.cpp. 00432 { 00433 ERROR2IF(poliOther==NULL, FALSE, "ImagemapClickableRectangle::OverrideFromAbove passed NULL parameter"); 00434 00435 if (!poliOther->IsAClickableArea()) 00436 return FALSE; 00437 00438 ImagemapClickableArea* picaOther=(ImagemapClickableArea*) poliOther; 00439 00440 //Get the bounding box of the other ImagemapClickableArea 00441 DocRect rectOther=picaOther->GetBoundingRect(); 00442 00443 //We override the other ImagemapClickableArea if we contain 00444 //its bounding box and if URL and frame strings are equal 00445 return (m_rect.ContainsRect(rectOther) 00446 && WebAddressAttribute::AreStringsEqual(m_pcURL, picaOther->m_pcURL) 00447 && WebAddressAttribute::AreStringsEqual(m_pcFrame, picaOther->m_pcFrame)); 00448 00449 }
|
|
Writes this clickable area, in client-side imagemap form, into the buffer or the file or both. INT32 Write(CCLexFile* pfileToWrite=NULL, TCHAR* pcBuffer=NULL)
Implements ImagemapClickableArea. Definition at line 370 of file clicarea.cpp. 00371 { 00372 PORTNOTETRACE("other","ImagemapClickableArea::Write - do nothing"); 00373 #ifndef EXCLUDE_FROM_XARALX 00374 //Keep a count of the characters we write out 00375 INT32 lCharsWritten = 0; 00376 00377 ImagemapFilter * pFilter = GetImagemapFilter(); 00378 ERROR2IF(pFilter == NULL,lCharsWritten,"ImagemapClickableRectangle::Write no imagemap filter"); 00379 00380 //First indent the text 00381 pFilter->Indent(); 00382 lCharsWritten += pFilter->WriteIndent(pfileToWrite, pcBuffer); 00383 00384 //And write out <AREA 00385 lCharsWritten += pFilter->WriteStartOfTag(_R(IDS_HTMLEXPORT_AREA), pfileToWrite, pcBuffer); 00386 00387 //Now write out SHAPE=RECTANGLE 00388 lCharsWritten += pFilter->WriteParameter(_R(IDS_HTMLEXPORT_SHAPE), _R(IDS_HTMLEXPORT_RECTANGLE), pfileToWrite, pcBuffer); 00389 00390 //Write out the URL and the FRAME 00391 lCharsWritten += WriteURLAndFrame(pfileToWrite, pcBuffer); 00392 00393 //And write out our coords 00394 lCharsWritten += pFilter->WriteCoords(m_rect, m_pcFrame, pfileToWrite, pcBuffer); 00395 00396 //And the end of the tag 00397 lCharsWritten += pFilter->WriteEndOfTag(pfileToWrite, pcBuffer); 00398 00399 //Then reset the indent 00400 pFilter->Unindent(); 00401 00402 //And write out a new line 00403 lCharsWritten += pFilter->WriteEOL(pfileToWrite, pcBuffer); 00404 00405 //And return the number of characters we've written 00406 return lCharsWritten; 00407 #else 00408 return 0; 00409 #endif 00410 }
|
|
Definition at line 203 of file clicarea.h. |