summaryrefslogtreecommitdiff
path: root/FL/Fl_Image.H
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-05 23:58:54 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-05 23:58:54 +0000
commit7ebaf77cdcbcadb4706c87f1662730a4687caf20 (patch)
tree07340f24b863b23f716b9cf9f657026c76c62fbf /FL/Fl_Image.H
parent208cf399a6ab801951bf28a82a0e07adefc60028 (diff)
Image labels!
image() method to set active image, deimage() method to set inactive image. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Image.H')
-rw-r--r--FL/Fl_Image.H43
1 files changed, 32 insertions, 11 deletions
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index 8e7bb219c..e0a9f29f8 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Image.H,v 1.5.2.3 2001/01/22 15:13:37 easysw Exp $"
+// "$Id: Fl_Image.H,v 1.5.2.3.2.1 2001/08/05 23:58:54 easysw Exp $"
//
// Image header file for the Fast Light Tool Kit (FLTK).
//
@@ -29,21 +29,42 @@
class Fl_Widget;
struct Fl_Menu_Item;
-struct Fl_Image {
+class FL_EXPORT Fl_Image {
+ int w_, h_;
+
+ public:
+
+ int w() const {return w_;}
+ void w(int W) {w_ = W;}
+ int h() const {return h_;}
+ void h(int H) {h_ = H;}
+
+ Fl_Image(int W, int H) {w_ = W; h_ = H;}
+ virtual ~Fl_Image();
+ virtual void label(Fl_Widget*w);
+ virtual void label(Fl_Menu_Item*m);
+ virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
+ void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
+};
+
+class FL_EXPORT Fl_RGB_Image : public Fl_Image {
+ public:
+
const uchar *array;
- int w, h, d, ld;
+ int d, ld;
ulong id; // for internal use
- FL_EXPORT Fl_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
- array(bits), w(W), h(H), d(D), ld(LD), id(0) {}
- FL_EXPORT ~Fl_Image();
- FL_EXPORT void label(Fl_Widget*);
- FL_EXPORT void label(Fl_Menu_Item*);
- FL_EXPORT void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
- FL_EXPORT void draw(int X, int Y) {draw(X, Y, w, h, 0, 0);}
+
+ Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
+ Fl_Image(W,H), array(bits), d(D), ld(LD), id(0) {}
+ virtual ~Fl_RGB_Image();
+ virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
+ void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
+ virtual void label(Fl_Widget*w);
+ virtual void label(Fl_Menu_Item*m);
};
#endif
//
-// End of "$Id: Fl_Image.H,v 1.5.2.3 2001/01/22 15:13:37 easysw Exp $".
+// End of "$Id: Fl_Image.H,v 1.5.2.3.2.1 2001/08/05 23:58:54 easysw Exp $".
//