Implement ListenToMessage and trap the message from the IconCache to call a pure virtual. Means subclasses don't have to override ListenToMessage.

This commit is contained in:
pinkerton%netscape.com 1998-08-05 02:59:23 +00:00
Родитель ff2cf9fa06
Коммит 9b6cf092b1
2 изменённых файлов: 22 добавлений и 1 удалений

Просмотреть файл

@ -52,6 +52,20 @@ CImageIconMixin :: ~CImageIconMixin ( )
}
//
// ListenToMessage
//
// Listen for the update of image and then
//
void
CImageIconMixin :: ListenToMessage ( const MessageT inMessage, void* ioData )
{
if ( inMessage == CIconContext::msg_ImageReadyToDraw )
ImageIsReady();
} // ListenToMessage
//
// DrawIcon
//

Просмотреть файл

@ -37,7 +37,7 @@
//
// class CImageIconMixin
//
// Draw an image, most likely as an icon
// Draw an image, most likely as an icon.
//
class CImageIconMixin : public LListener
{
@ -59,6 +59,13 @@ public:
protected:
// catch the message that the image is ready to draw
virtual void ListenToMessage ( MessageT inMessage, void* ioPtr ) ;
// called when the image is ready to draw. This should do something like
// refresh the view.
virtual void ImageIsReady ( ) = 0;
// Draw a scaled image as an icon. Override to draw differently
virtual void DoDrawing ( DrawingState & inState, const Point & inTopLeft,
const IconTransformType inTransform, Uint32 inWidth,