00001
00002
00003
00004
00005
00006 #ifndef __XYLEGEND_H
00007 #define __XYLEGEND_H
00008
00009 #include "xybool.h"
00010 #include "xymath.h"
00011 #include "xym.h"
00012 #include "xylist.h"
00013
00014
00015
00016
00017
00018
00019
00020
00021 class XYLegend : public XYObject
00022 {
00023 public:
00024
00025
00026
00027 XYLegend (
00028 XYCoordinate x,
00029 XYCoordinate y,
00030 int nlines,
00031 int ncolumns,
00032 xybool box = xytrue,
00033 xybool visible = xytrue);
00034
00035
00036 virtual ~XYLegend (void);
00037
00038
00039
00040 virtual void mask (const XYList<XYMask>* mask);
00041
00042 virtual const XYList<XYMask>* mask (void) const;
00043
00044
00045 virtual void backgroundColor(long color);
00046
00047 virtual long backgroundColor(void) const;
00048
00049
00050 virtual void frameColor(long color);
00051
00052 virtual long frameColor(void) const;
00053
00054
00055 virtual void lines (int nl);
00056
00057 virtual int lines (void) const;
00058
00059
00060 virtual void columns (int nc);
00061
00062 virtual int columns (void) const;
00063
00064
00065 virtual void box (xybool b);
00066
00067 virtual xybool box (void) const;
00068
00069
00070
00071 virtual xybool pick (int px, int py);
00072
00073
00074 virtual XYMask* pickItem (int px, int py);
00075
00076
00077 virtual xybool fence (int x0, int y0, int x1, int y1);
00078
00079
00080
00081 virtual void clear(void) const;
00082 virtual void clear(int xmin, int ymin, int xmax, int ymax) const;
00083
00084
00085 virtual void draw (void);
00086
00087 virtual void draw (int xmin, int ymin, int xmax, int ymax) const;
00088
00089
00090
00091 virtual void boundingBox (int& bxmin, int& bymin, int& bxmax, int& bymax) const;
00092
00093 protected:
00094
00095 const XYList<XYMask>* _masks;
00096 double _x, _y;
00097 int _nLines;
00098 int _nColumns;
00099 xybool _box;
00100 long _color;
00101 long _bColor;
00102 };
00103
00104 #endif
00105