source: abuse/trunk/src/imlib/include/visobj.hpp @ 28

Last change on this file since 28 was 14, checked in by Sam Hocevar, 18 years ago
  • fix C++ warning with classes that have virtual functions but not virtual dtor.
File size: 990 bytes
Line 
1#ifndef VIS_OBJECT_HPP
2#define VIS_OBJECT_HPP
3
4#include "jwindow.hpp"
5#include "filter.hpp"
6
7class visual_object
8{
9  public :
10  virtual void draw(image *screen, int x, int y, window_manager *wm, filter *f) = 0;
11  virtual int width(window_manager *wm) = 0;
12  virtual int height(window_manager *wm) = 0;
13  virtual ~visual_object() {}
14} ;
15
16
17
18class image_visual : public visual_object
19{
20  public :
21  image *im;
22
23  image_visual(image *img) { im=img; }
24  virtual void draw(image *screen, int x, int y,
25                    window_manager *wm, filter *f);
26  virtual int width(window_manager *wm) { return im->width(); }
27  virtual int height(window_manager *wm) { return im->height(); }
28} ;
29
30
31class string_visual : public visual_object
32{
33  char *st;
34  int color;
35  int w,h;
36  public :
37  string_visual(char *string, int Color);
38  virtual void draw(image *screen, int x, int y,
39                    window_manager *wm, filter *f);
40  virtual int width(window_manager *wm);
41  virtual int height(window_manager *wm);
42} ;
43
44
45#endif
Note: See TracBrowser for help on using the repository browser.