00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef Fl_Bitmap_H
00032 #define Fl_Bitmap_H
00033 # include "Fl_Image.H"
00034
00035 class Fl_Widget;
00036 struct Fl_Menu_Item;
00037
00042 class FL_EXPORT Fl_Bitmap : public Fl_Image {
00043 friend class Fl_Quartz_Graphics_Driver;
00044 friend class Fl_GDI_Graphics_Driver;
00045 friend class Fl_Xlib_Graphics_Driver;
00046 public:
00047
00049 const uchar *array;
00051 int alloc_array;
00052
00053 private:
00054
00055 #if defined(__APPLE__) || defined(WIN32)
00056
00057 void *id_;
00058 #else
00059
00060 unsigned id_;
00061 #endif // __APPLE__ || WIN32
00062
00063 public:
00064
00066 Fl_Bitmap(const uchar *bits, int W, int H) :
00067 Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0) {data((const char **)&array, 1);}
00069 Fl_Bitmap(const char *bits, int W, int H) :
00070 Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0) {data((const char **)&array, 1);}
00071 virtual ~Fl_Bitmap();
00072 virtual Fl_Image *copy(int W, int H);
00073 Fl_Image *copy() { return copy(w(), h()); }
00074 virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
00075 void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
00076 virtual void label(Fl_Widget*w);
00077 virtual void label(Fl_Menu_Item*m);
00078 virtual void uncache();
00079 };
00080
00081 #endif
00082
00083
00084
00085