File: visobj.hpp

package info (click to toggle)
abuse 2.00-12
  • links: PTS
  • area: main
  • in suites: slink
  • size: 12,708 kB
  • ctags: 15,389
  • sloc: ansic: 115,852; cpp: 6,792; lisp: 2,066; sh: 1,734; makefile: 1,601; asm: 264
file content (44 lines) | stat: -rw-r--r-- 960 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef VIS_OBJECT_HPP
#define VIS_OBJECT_HPP

#include "jwindow.hpp"
#include "filter.hpp"

class visual_object
{
  public :
  virtual void draw(image *screen, int x, int y, window_manager *wm, filter *f) = 0;
  virtual int width(window_manager *wm) = 0;
  virtual int height(window_manager *wm) = 0;
} ;



class image_visual : public visual_object
{
  public :
  image *im;

  image_visual(image *img) { im=img; }
  virtual void draw(image *screen, int x, int y, 
		    window_manager *wm, filter *f);
  virtual int width(window_manager *wm) { return im->width(); }
  virtual int height(window_manager *wm) { return im->height(); }
} ;


class string_visual : public visual_object
{
  char *st;
  int color;
  int w,h;
  public :
  string_visual(char *string, int Color);
  virtual void draw(image *screen, int x, int y, 
		    window_manager *wm, filter *f);
  virtual int width(window_manager *wm); 
  virtual int height(window_manager *wm);
} ;


#endif