// -*- C++ -*-
//
//  This file is part of Siena, a wide-area event notification system.
//  See http://www.cs.colorado.edu/serl/dot/siena.html
//
//  Author: Antonio Carzaniga <carzanig@cs.colorado.edu>
//  See the file AUTHORS for full details. 
//
//  Copyright (C) 1998-1999 University of Colorado
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
//  USA, or send email to serl@cs.colorado.edu.
//
//
// $Id: Image.h,v 1.1 2002/06/12 17:05:28 carzanig Exp $
//
#ifndef _Image_h
#define _Image_h

using namespace std;

#include <string>

#include <gtk/gtk.h>

class Image {
public:
    virtual		~Image() {};
    virtual void	draw(GdkPixmap * pixmap, GdkGC *, 
			     const GdkPoint &)			const = 0;
    virtual void	get_rectangle(const GdkPoint &, 
				      GdkRectangle *)		const = 0;
    virtual void	draw(GdkPixmap * pixmap, GdkGC *, 
			     const GdkPoint &, GdkRectangle *)	const;
};

// extern Image * DefaultImage; 

class Circle : public Image {
    int radius;

 public:
			Circle(int r): radius(r) {};

    virtual void	draw(GdkPixmap * pixmap, GdkGC *, 
			     const GdkPoint &)			const;
    virtual void	get_rectangle(const GdkPoint &, 
				      GdkRectangle *)		const;
};

class PixmapImage : public Image {
    int		width;
    int		height;
    GdkPixmap *	pix;

 public:

    PixmapImage(GtkWidget *widget, char **data, int w, int h);
    virtual ~PixmapImage();

    virtual void	draw(GdkPixmap * pixmap, GdkGC *, 
			     const GdkPoint &)			const;
    virtual void	get_rectangle(const GdkPoint &, 
				      GdkRectangle *)		const;
};

class TextImage : public Image {
    GdkFont *	font;
    string	text;
    int		width;
    int		height;

 public:

			TextImage(GdkFont *f, const string &s);

    virtual void	draw(GdkPixmap * pixmap, GdkGC *, 
			     const GdkPoint &)			const;
    virtual void	get_rectangle(const GdkPoint &, 
				      GdkRectangle *)		const;
};

#endif


