source: abuse/tags/pd/imlib/include/visobj.hpp @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
File size: 960 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} ;
14
15
16
17class image_visual : public visual_object
18{
19  public :
20  image *im;
21
22  image_visual(image *img) { im=img; }
23  virtual void draw(image *screen, int x, int y,
24                    window_manager *wm, filter *f);
25  virtual int width(window_manager *wm) { return im->width(); }
26  virtual int height(window_manager *wm) { return im->height(); }
27} ;
28
29
30class string_visual : public visual_object
31{
32  char *st;
33  int color;
34  int w,h;
35  public :
36  string_visual(char *string, int Color);
37  virtual void draw(image *screen, int x, int y,
38                    window_manager *wm, filter *f);
39  virtual int width(window_manager *wm);
40  virtual int height(window_manager *wm);
41} ;
42
43
44#endif
Note: See TracBrowser for help on using the repository browser.