mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Fix all references to '.C' files (now .cxx)
Update Fl_Image() class to track depth and data, so FLUID will be able to use it as the base class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Bitmap.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $"
|
// "$Id: Fl_Bitmap.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
// Bitmap header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -38,9 +38,9 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image {
|
|||||||
Fl_Bitmask id; // for internal use
|
Fl_Bitmask id; // for internal use
|
||||||
|
|
||||||
Fl_Bitmap(const uchar *bits, int W, int H) :
|
Fl_Bitmap(const uchar *bits, int W, int H) :
|
||||||
Fl_Image(W,H), array(bits), alloc_array(0), id(0) {}
|
Fl_Image(W,H,0), array(bits), alloc_array(0), id(0) {data(&((const char *)array), 1);}
|
||||||
Fl_Bitmap(const char *bits, int W, int H) :
|
Fl_Bitmap(const char *bits, int W, int H) :
|
||||||
Fl_Image(W,H), array((const uchar *)bits), alloc_array(0), id(0) {}
|
Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id(0) {data(&((const char *)array), 1);}
|
||||||
virtual ~Fl_Bitmap();
|
virtual ~Fl_Bitmap();
|
||||||
virtual Fl_Image *copy(int W, int H);
|
virtual Fl_Image *copy(int W, int H);
|
||||||
Fl_Image *copy() { return copy(w(), h()); }
|
Fl_Image *copy() { return copy(w(), h()); }
|
||||||
@@ -53,5 +53,5 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Bitmap.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $".
|
// End of "$Id: Fl_Bitmap.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+17
-8
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Image.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $"
|
// "$Id: Fl_Image.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Image header file for the Fast Light Tool Kit (FLTK).
|
// Image header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -32,16 +32,25 @@ class Fl_Widget;
|
|||||||
struct Fl_Menu_Item;
|
struct Fl_Menu_Item;
|
||||||
|
|
||||||
class FL_EXPORT Fl_Image {
|
class FL_EXPORT Fl_Image {
|
||||||
int w_, h_;
|
int w_, h_, d_, count_;
|
||||||
|
const char * const *data_;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
void w(int W) {w_ = W;}
|
||||||
|
void h(int H) {h_ = H;}
|
||||||
|
void d(int D) {d_ = D;}
|
||||||
|
void data(const char * const *p, int c) {data_ = p; count_ = c;}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
int w() const {return w_;}
|
int w() const {return w_;}
|
||||||
void w(int W) {w_ = W;}
|
|
||||||
int h() const {return h_;}
|
int h() const {return h_;}
|
||||||
void h(int H) {h_ = H;}
|
int d() const {return d_;}
|
||||||
|
int count() const {return count_;}
|
||||||
|
const char * const *data() const {return data_;}
|
||||||
|
|
||||||
Fl_Image(int W, int H) {w_ = W; h_ = H;}
|
Fl_Image(int W, int H, int D) {w_ = W; h_ = H; d_ = D; count_ = 0; data_ = 0;}
|
||||||
virtual ~Fl_Image();
|
virtual ~Fl_Image();
|
||||||
virtual Fl_Image *copy(int W, int H);
|
virtual Fl_Image *copy(int W, int H);
|
||||||
Fl_Image *copy() { return copy(w(), h()); }
|
Fl_Image *copy() { return copy(w(), h()); }
|
||||||
@@ -59,12 +68,12 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
|
|||||||
|
|
||||||
const uchar *array;
|
const uchar *array;
|
||||||
int alloc_array; // Non-zero if array was allocated
|
int alloc_array; // Non-zero if array was allocated
|
||||||
int d, ld;
|
int ld;
|
||||||
Fl_Offscreen id; // for internal use
|
Fl_Offscreen id; // for internal use
|
||||||
Fl_Bitmask mask; // for internal use (mask bitmap)
|
Fl_Bitmask mask; // for internal use (mask bitmap)
|
||||||
|
|
||||||
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
|
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) :
|
||||||
Fl_Image(W,H), array(bits), alloc_array(0), d(D), ld(LD), id(0) {}
|
Fl_Image(W,H,D), array(bits), alloc_array(0), ld(LD), id(0) {data(&((char *)array), 1);}
|
||||||
virtual ~Fl_RGB_Image();
|
virtual ~Fl_RGB_Image();
|
||||||
virtual Fl_Image *copy(int W, int H);
|
virtual Fl_Image *copy(int W, int H);
|
||||||
Fl_Image *copy() { return copy(w(), h()); }
|
Fl_Image *copy() { return copy(w(), h()); }
|
||||||
@@ -79,5 +88,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Image.H,v 1.5.2.3.2.3 2001/11/19 01:06:45 easysw Exp $".
|
// End of "$Id: Fl_Image.H,v 1.5.2.3.2.4 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+7
-7
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.4 2001/11/19 01:06:45 easysw Exp $"
|
// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.5 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Pixmap header file for the Fast Light Tool Kit (FLTK).
|
// Pixmap header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -38,19 +38,19 @@ struct Fl_Menu_Item;
|
|||||||
class FL_EXPORT Fl_Pixmap : public Fl_Image {
|
class FL_EXPORT Fl_Pixmap : public Fl_Image {
|
||||||
void copy_data();
|
void copy_data();
|
||||||
void delete_data();
|
void delete_data();
|
||||||
|
void set_data(const char * const *p);
|
||||||
void measure();
|
void measure();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const char * const * data;
|
|
||||||
int alloc_data; // Non-zero if data was allocated
|
int alloc_data; // Non-zero if data was allocated
|
||||||
Fl_Offscreen id; // for internal use
|
Fl_Offscreen id; // for internal use
|
||||||
Fl_Bitmask mask; // for internal use (mask bitmap)
|
Fl_Bitmask mask; // for internal use (mask bitmap)
|
||||||
|
|
||||||
explicit Fl_Pixmap(char * const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {measure();}
|
explicit Fl_Pixmap(char * const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
|
||||||
explicit Fl_Pixmap(uchar* const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {measure();}
|
explicit Fl_Pixmap(uchar* const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
|
||||||
explicit Fl_Pixmap(const char * const * d) : Fl_Image(-1,0), data(d), alloc_data(0), id(0), mask(0) {measure();}
|
explicit Fl_Pixmap(const char * const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
|
||||||
explicit Fl_Pixmap(const uchar* const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {measure();}
|
explicit Fl_Pixmap(const uchar* const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();}
|
||||||
virtual ~Fl_Pixmap();
|
virtual ~Fl_Pixmap();
|
||||||
virtual Fl_Image *copy(int W, int H);
|
virtual Fl_Image *copy(int W, int H);
|
||||||
Fl_Image *copy() { return copy(w(), h()); }
|
Fl_Image *copy() { return copy(w(), h()); }
|
||||||
@@ -65,5 +65,5 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.4 2001/11/19 01:06:45 easysw Exp $".
|
// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.5 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.3 2001/09/30 17:37:06 easysw Exp $"
|
// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.4 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Pixmap label support for the Fast Light Tool Kit (FLTK).
|
// Pixmap label support for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -81,7 +81,7 @@ void pixmap_image::write_static() {
|
|||||||
int l;
|
int l;
|
||||||
for (l = 0; l < numlines; l++) {
|
for (l = 0; l < numlines; l++) {
|
||||||
if (l) write_c(",\n");
|
if (l) write_c(",\n");
|
||||||
write_cstring(p->data[l],linelength[l]);
|
write_cstring(p->data()[l],linelength[l]);
|
||||||
}
|
}
|
||||||
write_c("\n};\n");
|
write_c("\n};\n");
|
||||||
write_c("static Fl_Pixmap %s(%s);\n",
|
write_c("static Fl_Pixmap %s(%s);\n",
|
||||||
@@ -188,8 +188,8 @@ pixmap_image::pixmap_image(const char *name, FILE *f) : Fluid_Image(name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pixmap_image::~pixmap_image() {
|
pixmap_image::~pixmap_image() {
|
||||||
if (p && p->data) {
|
if (p && p->data()) {
|
||||||
char** real_data = (char**)(p->data);
|
char** real_data = (char**)(p->data());
|
||||||
for (int i = 0; i < numlines; i++) delete[] real_data[i];
|
for (int i = 0; i < numlines; i++) delete[] real_data[i];
|
||||||
free((void*)real_data);
|
free((void*)real_data);
|
||||||
}
|
}
|
||||||
@@ -227,11 +227,11 @@ gif_image::gif_image(const char *name, FILE *f) : pixmap_image(name,0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gif_image::~gif_image() {
|
gif_image::~gif_image() {
|
||||||
if (p && p->data) {
|
if (p && p->data()) {
|
||||||
char** real_data = (char**)(p->data);
|
char** real_data = (char**)(p->data());
|
||||||
for (int i = 0; i < 3; i++) delete[] real_data[i];
|
for (int i = 0; i < 3; i++) delete[] real_data[i];
|
||||||
delete[] real_data;
|
delete[] real_data;
|
||||||
p->data = 0;
|
// p->data(0,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,5 +450,5 @@ Fluid_Image *ui_find_image(const char *oldname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.3 2001/09/30 17:37:06 easysw Exp $".
|
// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.4 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl.cxx,v 1.24.2.41.2.6 2001/11/17 18:29:05 easysw Exp $"
|
// "$Id: Fl.cxx,v 1.24.2.41.2.7 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Main event handling code for the Fast Light Tool Kit (FLTK).
|
// Main event handling code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -454,7 +454,7 @@ void fl_fix_focus() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
Fl_Widget *fl_selection_requestor; // from Fl_cutpaste.C
|
Fl_Widget *fl_selection_requestor; // from Fl_cutpaste.cxx
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This function is called by ~Fl_Widget() and by Fl_Widget::deactivate
|
// This function is called by ~Fl_Widget() and by Fl_Widget::deactivate
|
||||||
@@ -798,5 +798,5 @@ void Fl_Window::flush() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl.cxx,v 1.24.2.41.2.6 2001/11/17 18:29:05 easysw Exp $".
|
// End of "$Id: Fl.cxx,v 1.24.2.41.2.7 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.1 2001/10/29 03:44:32 easysw Exp $"
|
// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.2 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Forms-compatible chart widget for the Fast Light Tool Kit (FLTK).
|
// Forms-compatible chart widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#define ARCINC (2.0*M_PI/360.0)
|
#define ARCINC (2.0*M_PI/360.0)
|
||||||
|
|
||||||
// this function is in fl_boxtype.C:
|
// this function is in fl_boxtype.cxx:
|
||||||
void fl_rectbound(int x,int y,int w,int h, Fl_Color color);
|
void fl_rectbound(int x,int y,int w,int h, Fl_Color color);
|
||||||
|
|
||||||
/* Widget specific information */
|
/* Widget specific information */
|
||||||
@@ -378,5 +378,5 @@ void Fl_Chart::maxsize(int m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.1 2001/10/29 03:44:32 easysw Exp $".
|
// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.2 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+14
-10
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_GIF_Image.cxx,v 1.1.2.2 2001/11/20 05:13:23 easysw Exp $"
|
// "$Id: Fl_GIF_Image.cxx,v 1.1.2.3 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Fl_GIF_Image routines.
|
// Fl_GIF_Image routines.
|
||||||
//
|
//
|
||||||
@@ -79,7 +79,8 @@ typedef unsigned char uchar;
|
|||||||
#define GETSHORT(var) var = NEXTBYTE; var += NEXTBYTE << 8
|
#define GETSHORT(var) var = NEXTBYTE; var += NEXTBYTE << 8
|
||||||
|
|
||||||
Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
|
Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
|
||||||
FILE *GifFile; // file to read
|
FILE *GifFile; // File to read
|
||||||
|
char **new_data; // Data array
|
||||||
|
|
||||||
if ((GifFile = fopen(infname, "rb")) == NULL) {
|
if ((GifFile = fopen(infname, "rb")) == NULL) {
|
||||||
Fl::error("Unable to open %s!", infname);
|
Fl::error("Unable to open %s!", infname);
|
||||||
@@ -291,8 +292,8 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
|
|||||||
// allocate line pointer arrays:
|
// allocate line pointer arrays:
|
||||||
w(Width);
|
w(Width);
|
||||||
h(Height);
|
h(Height);
|
||||||
alloc_data = 1;
|
d(1);
|
||||||
data = new char*[Height+2];
|
new_data = new char*[Height+2];
|
||||||
|
|
||||||
// transparent pixel must be zero, swap if it isn't:
|
// transparent pixel must be zero, swap if it isn't:
|
||||||
if (has_transparent && transparent_pixel != 0) {
|
if (has_transparent && transparent_pixel != 0) {
|
||||||
@@ -334,11 +335,11 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
|
|||||||
// write the first line of xpm data (use suffix as temp array):
|
// write the first line of xpm data (use suffix as temp array):
|
||||||
int length = sprintf((char*)(Suffix),
|
int length = sprintf((char*)(Suffix),
|
||||||
"%d %d %d %d",Width,Height,-numcolors,1);
|
"%d %d %d %d",Width,Height,-numcolors,1);
|
||||||
((char **)data)[0] = new char[length+1];
|
new_data[0] = new char[length+1];
|
||||||
strcpy(((char **)data)[0], (char*)Suffix);
|
strcpy(new_data[0], (char*)Suffix);
|
||||||
|
|
||||||
// write the colormap
|
// write the colormap
|
||||||
((char **)data)[1] = (char*)(p = new uchar[4*numcolors]);
|
new_data[1] = (char*)(p = new uchar[4*numcolors]);
|
||||||
for (i = 0; i < ColorMapSize; i++) if (used[i]) {
|
for (i = 0; i < ColorMapSize; i++) if (used[i]) {
|
||||||
*p++ = remap[i];
|
*p++ = remap[i];
|
||||||
*p++ = Red[i];
|
*p++ = Red[i];
|
||||||
@@ -352,14 +353,17 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
|
|||||||
|
|
||||||
// split the image data into lines:
|
// split the image data into lines:
|
||||||
for (i=0; i<Height; i++) {
|
for (i=0; i<Height; i++) {
|
||||||
((char **)data)[i+2] = new char[Width];
|
new_data[i+2] = new char[Width];
|
||||||
memcpy(((char **)data)[i + 2], (char*)(Image + i*Width), Width);
|
memcpy(new_data[i + 2], (char*)(Image + i*Width), Width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data(new_data, Height + 2);
|
||||||
|
alloc_data = 1;
|
||||||
|
|
||||||
delete[] Image;
|
delete[] Image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.2 2001/11/20 05:13:23 easysw Exp $".
|
// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.3 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+24
-23
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.5 2001/11/20 05:13:23 easysw Exp $"
|
// "$Id: Fl_Image.cxx,v 1.5.2.3.2.6 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Image drawing code for the Fast Light Tool Kit (FLTK).
|
// Image drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -40,7 +40,7 @@ void Fl_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Fl_Image *Fl_Image::copy(int W, int H) {
|
Fl_Image *Fl_Image::copy(int W, int H) {
|
||||||
return new Fl_Image(W, H);
|
return new Fl_Image(W, H, d());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Image::color_average(Fl_Color c, float i) {
|
void Fl_Image::color_average(Fl_Color c, float i) {
|
||||||
@@ -63,7 +63,7 @@ Fl_RGB_Image::~Fl_RGB_Image() {
|
|||||||
|
|
||||||
Fl_Image *Fl_RGB_Image::copy(int W, int H) {
|
Fl_Image *Fl_RGB_Image::copy(int W, int H) {
|
||||||
// Optimize the simple copy where the width and height are the same...
|
// Optimize the simple copy where the width and height are the same...
|
||||||
if (W == w() && H == h()) return new Fl_RGB_Image(array, w(), h(), d, ld);
|
if (W == w() && H == h()) return new Fl_RGB_Image(array, w(), h(), d(), ld);
|
||||||
|
|
||||||
// OK, need to resize the image data; allocate memory and
|
// OK, need to resize the image data; allocate memory and
|
||||||
Fl_RGB_Image *new_image; // New RGB image
|
Fl_RGB_Image *new_image; // New RGB image
|
||||||
@@ -80,28 +80,28 @@ Fl_Image *Fl_RGB_Image::copy(int W, int H) {
|
|||||||
|
|
||||||
// Figure out Bresenheim step/modulus values...
|
// Figure out Bresenheim step/modulus values...
|
||||||
xmod = w() % W;
|
xmod = w() % W;
|
||||||
xstep = (w() / W) * d;
|
xstep = (w() / W) * d();
|
||||||
ymod = h() % H;
|
ymod = h() % H;
|
||||||
ystep = h() / H;
|
ystep = h() / H;
|
||||||
|
|
||||||
// Allocate memory for the new image...
|
// Allocate memory for the new image...
|
||||||
new_array = new uchar [W * H * d];
|
new_array = new uchar [W * H * d()];
|
||||||
new_image = new Fl_RGB_Image(new_array, W, H, d);
|
new_image = new Fl_RGB_Image(new_array, W, H, d());
|
||||||
new_image->alloc_array = 1;
|
new_image->alloc_array = 1;
|
||||||
|
|
||||||
// Scale the image using a nearest-neighbor algorithm...
|
// Scale the image using a nearest-neighbor algorithm...
|
||||||
for (dy = h(), sy = 0, yerr = H / 2, new_ptr = new_array; dy > 0; dy --) {
|
for (dy = h(), sy = 0, yerr = H / 2, new_ptr = new_array; dy > 0; dy --) {
|
||||||
for (dx = w(), xerr = W / 2, old_ptr = array + sy * (w() * d + ld);
|
for (dx = w(), xerr = W / 2, old_ptr = array + sy * (w() * d() + ld);
|
||||||
dx > 0;
|
dx > 0;
|
||||||
dx --) {
|
dx --) {
|
||||||
for (c = 0; c < d; c ++) *new_ptr++ = old_ptr[c];
|
for (c = 0; c < d(); c ++) *new_ptr++ = old_ptr[c];
|
||||||
|
|
||||||
old_ptr += xstep;
|
old_ptr += xstep;
|
||||||
xerr -= xmod;
|
xerr -= xmod;
|
||||||
|
|
||||||
if (xerr <= 0) {
|
if (xerr <= 0) {
|
||||||
xerr += W;
|
xerr += W;
|
||||||
old_ptr += d;
|
old_ptr += d();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ void Fl_RGB_Image::color_average(Fl_Color c, float i) {
|
|||||||
uchar *new_array,
|
uchar *new_array,
|
||||||
*new_ptr;
|
*new_ptr;
|
||||||
|
|
||||||
if (!alloc_array) new_array = new uchar[h() * w() * d];
|
if (!alloc_array) new_array = new uchar[h() * w() * d()];
|
||||||
else new_array = (uchar *)array;
|
else new_array = (uchar *)array;
|
||||||
|
|
||||||
// Get the color to blend with...
|
// Get the color to blend with...
|
||||||
@@ -152,13 +152,13 @@ void Fl_RGB_Image::color_average(Fl_Color c, float i) {
|
|||||||
const uchar *old_ptr;
|
const uchar *old_ptr;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if (d < 3) {
|
if (d() < 3) {
|
||||||
ig = (r * 31 + g * 61 + b * 8) / 100 * (256 - ia);
|
ig = (r * 31 + g * 61 + b * 8) / 100 * (256 - ia);
|
||||||
|
|
||||||
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld)
|
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld)
|
||||||
for (x = 0; x < w(); x ++) {
|
for (x = 0; x < w(); x ++) {
|
||||||
*new_ptr++ = (*old_ptr++ * ia + ig) >> 8;
|
*new_ptr++ = (*old_ptr++ * ia + ig) >> 8;
|
||||||
if (d > 1) *new_ptr++ = *old_ptr++;
|
if (d() > 1) *new_ptr++ = *old_ptr++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld)
|
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld)
|
||||||
@@ -166,7 +166,7 @@ void Fl_RGB_Image::color_average(Fl_Color c, float i) {
|
|||||||
*new_ptr++ = (*old_ptr++ * ia + ir) >> 8;
|
*new_ptr++ = (*old_ptr++ * ia + ir) >> 8;
|
||||||
*new_ptr++ = (*old_ptr++ * ia + ig) >> 8;
|
*new_ptr++ = (*old_ptr++ * ia + ig) >> 8;
|
||||||
*new_ptr++ = (*old_ptr++ * ia + ib) >> 8;
|
*new_ptr++ = (*old_ptr++ * ia + ib) >> 8;
|
||||||
if (d > 3) *new_ptr++ = *old_ptr++;
|
if (d() > 3) *new_ptr++ = *old_ptr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ void Fl_RGB_Image::color_average(Fl_Color c, float i) {
|
|||||||
|
|
||||||
void Fl_RGB_Image::desaturate() {
|
void Fl_RGB_Image::desaturate() {
|
||||||
// Can only desaturate color images...
|
// Can only desaturate color images...
|
||||||
if (d < 3) return;
|
if (d() < 3) return;
|
||||||
|
|
||||||
// Delete any existing pixmap/mask objects...
|
// Delete any existing pixmap/mask objects...
|
||||||
if (id) {
|
if (id) {
|
||||||
@@ -198,7 +198,7 @@ void Fl_RGB_Image::desaturate() {
|
|||||||
*new_ptr;
|
*new_ptr;
|
||||||
int new_d;
|
int new_d;
|
||||||
|
|
||||||
new_d = d - 2;
|
new_d = d() - 2;
|
||||||
new_array = new uchar[h() * w() * new_d];
|
new_array = new uchar[h() * w() * new_d];
|
||||||
|
|
||||||
// Copy the image data, converting to grayscale...
|
// Copy the image data, converting to grayscale...
|
||||||
@@ -206,9 +206,9 @@ void Fl_RGB_Image::desaturate() {
|
|||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld)
|
for (new_ptr = new_array, old_ptr = array, y = 0; y < h(); y ++, old_ptr += ld)
|
||||||
for (x = 0; x < w(); x ++, old_ptr += d) {
|
for (x = 0; x < w(); x ++, old_ptr += d()) {
|
||||||
*new_ptr++ = (31 * old_ptr[0] + 61 * old_ptr[1] + 8 * old_ptr[2]) / 100;
|
*new_ptr++ = (31 * old_ptr[0] + 61 * old_ptr[1] + 8 * old_ptr[2]) / 100;
|
||||||
if (d > 3) *new_ptr++ = old_ptr[3];
|
if (d() > 3) *new_ptr++ = old_ptr[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Free the old array as needed, and then set the new pointers/values...
|
// Free the old array as needed, and then set the new pointers/values...
|
||||||
@@ -216,8 +216,9 @@ void Fl_RGB_Image::desaturate() {
|
|||||||
|
|
||||||
array = new_array;
|
array = new_array;
|
||||||
alloc_array = 1;
|
alloc_array = 1;
|
||||||
d = new_d;
|
|
||||||
ld = 0;
|
ld = 0;
|
||||||
|
|
||||||
|
d(new_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
||||||
@@ -234,10 +235,10 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||||||
if (!id) {
|
if (!id) {
|
||||||
id = fl_create_offscreen(w(), h());
|
id = fl_create_offscreen(w(), h());
|
||||||
fl_begin_offscreen((Fl_Offscreen)id);
|
fl_begin_offscreen((Fl_Offscreen)id);
|
||||||
fl_draw_image(array, 0, 0, w(), h(), d, ld);
|
fl_draw_image(array, 0, 0, w(), h(), d(), ld);
|
||||||
fl_end_offscreen();
|
fl_end_offscreen();
|
||||||
|
|
||||||
if (d == 2 || d == 4) {
|
if (d() == 2 || d() == 4) {
|
||||||
// Create alpha mask...
|
// Create alpha mask...
|
||||||
int bmw = (w() + 7) / 8;
|
int bmw = (w() + 7) / 8;
|
||||||
uchar *bitmap = new uchar[bmw * h()];
|
uchar *bitmap = new uchar[bmw * h()];
|
||||||
@@ -283,8 +284,8 @@ void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||||||
// definitely fast...
|
// definitely fast...
|
||||||
memset(bitmap, 0, bmw * h());
|
memset(bitmap, 0, bmw * h());
|
||||||
|
|
||||||
for (dataptr = array + d - 1, y = 0; y < h(); y ++, dataptr += ld)
|
for (dataptr = array + d() - 1, y = 0; y < h(); y ++, dataptr += ld)
|
||||||
for (bitptr = bitmap + y * bmw, bit = 128, x = 0; x < w(); x ++, dataptr += d) {
|
for (bitptr = bitmap + y * bmw, bit = 128, x = 0; x < w(); x ++, dataptr += d()) {
|
||||||
if (*dataptr > dither[x & 15][y & 15])
|
if (*dataptr > dither[x & 15][y & 15])
|
||||||
*bitptr |= bit;
|
*bitptr |= bit;
|
||||||
if (bit > 1) bit >>= 1;
|
if (bit > 1) bit >>= 1;
|
||||||
@@ -340,5 +341,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.5 2001/11/20 05:13:23 easysw Exp $".
|
// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.6 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Input.cxx,v 1.10.2.15.2.3 2001/11/17 16:37:48 easysw Exp $"
|
// "$Id: Fl_Input.cxx,v 1.10.2.15.2.4 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Input widget for the Fast Light Tool Kit (FLTK).
|
// Input widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// This is the "user interface", it decodes user actions into what to
|
// This is the "user interface", it decodes user actions into what to
|
||||||
// do to the text. See also Fl_Input_.C, where the text is actually
|
// do to the text. See also Fl_Input_.cxx, where the text is actually
|
||||||
// manipulated (and some ui, in particular the mouse, is done...).
|
// manipulated (and some ui, in particular the mouse, is done...).
|
||||||
// In theory you can replace this code with another subclass to change
|
// In theory you can replace this code with another subclass to change
|
||||||
// the keybindings.
|
// the keybindings.
|
||||||
@@ -276,5 +276,5 @@ Fl_Input::Fl_Input(int x, int y, int w, int h, const char *l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.3 2001/11/17 16:37:48 easysw Exp $".
|
// End of "$Id: Fl_Input.cxx,v 1.10.2.15.2.4 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Menu_.cxx,v 1.7.2.8 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Common menu code for the Fast Light Tool Kit (FLTK).
|
// Common menu code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
// This provides storage for a menu item, functions to add/modify/delete
|
// This provides storage for a menu item, functions to add/modify/delete
|
||||||
// items, and a call for when the user picks a menu item.
|
// items, and a call for when the user picks a menu item.
|
||||||
|
|
||||||
// More code in Fl_Menu_add.C
|
// More code in Fl_Menu_add.cxx
|
||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Menu_.H>
|
#include <FL/Fl_Menu_.H>
|
||||||
@@ -172,5 +172,5 @@ void Fl_Menu_::clear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+59
-46
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.6 2001/11/20 05:13:23 easysw Exp $"
|
// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.7 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
|
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
// Draws X pixmap data, keeping it stashed in a server pixmap so it
|
// Draws X pixmap data, keeping it stashed in a server pixmap so it
|
||||||
// redraws fast.
|
// redraws fast.
|
||||||
|
|
||||||
// See fl_draw_pixmap.C for code used to get the actual data into pixmap.
|
// See fl_draw_pixmap.cxx for code used to get the actual data into pixmap.
|
||||||
// Implemented without using the xpm library (which I can't use because
|
// Implemented without using the xpm library (which I can't use because
|
||||||
// it interferes with the color cube used by fl_draw_image).
|
// it interferes with the color cube used by fl_draw_image).
|
||||||
|
|
||||||
@@ -48,18 +48,19 @@ void Fl_Pixmap::measure() {
|
|||||||
int W, H;
|
int W, H;
|
||||||
|
|
||||||
// ignore empty or bad pixmap data:
|
// ignore empty or bad pixmap data:
|
||||||
if (w()<0 && data) {
|
if (w()<0 && data()) {
|
||||||
fl_measure_pixmap(data, W, H);
|
fl_measure_pixmap(data(), W, H);
|
||||||
w(W); h(H);
|
w(W); h(H);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
||||||
// ignore empty or bad pixmap data:
|
// ignore empty or bad pixmap data:
|
||||||
if (!data) return;
|
if (!data()) return;
|
||||||
if (w()<0) {
|
if (w()<0) measure();
|
||||||
measure();
|
if (WP==-1) {
|
||||||
if (WP==-1) { WP = w(); HP = h(); }
|
WP = w();
|
||||||
|
HP = h();
|
||||||
}
|
}
|
||||||
if (!w()) return;
|
if (!w()) return;
|
||||||
// account for current clip region (faster on Irix):
|
// account for current clip region (faster on Irix):
|
||||||
@@ -77,7 +78,7 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||||||
fl_begin_offscreen(id);
|
fl_begin_offscreen(id);
|
||||||
uchar *bitmap = 0;
|
uchar *bitmap = 0;
|
||||||
fl_mask_bitmap = &bitmap;
|
fl_mask_bitmap = &bitmap;
|
||||||
fl_draw_pixmap(data, 0, 0, FL_BLACK);
|
fl_draw_pixmap(data(), 0, 0, FL_BLACK);
|
||||||
fl_mask_bitmap = 0;
|
fl_mask_bitmap = 0;
|
||||||
if (bitmap) {
|
if (bitmap) {
|
||||||
mask = fl_create_bitmask(w(), h(), bitmap);
|
mask = fl_create_bitmask(w(), h(), bitmap);
|
||||||
@@ -143,15 +144,15 @@ void Fl_Pixmap::copy_data() {
|
|||||||
chars_per_line; // Characters per line
|
chars_per_line; // Characters per line
|
||||||
|
|
||||||
// Figure out how many colors there are, and how big they are...
|
// Figure out how many colors there are, and how big they are...
|
||||||
sscanf(data[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
||||||
chars_per_line = chars_per_pixel * w() + 1;
|
chars_per_line = chars_per_pixel * w() + 1;
|
||||||
|
|
||||||
// Allocate memory for the new array...
|
// Allocate memory for the new array...
|
||||||
if (ncolors < 0) new_data = new char *[h() + 2];
|
if (ncolors < 0) new_data = new char *[h() + 2];
|
||||||
else new_data = new char *[h() + ncolors + 1];
|
else new_data = new char *[h() + ncolors + 1];
|
||||||
|
|
||||||
new_data[0] = new char[strlen(data[0]) + 1];
|
new_data[0] = new char[strlen(data()[0]) + 1];
|
||||||
strcpy(new_data[0], data[0]);
|
strcpy(new_data[0], data()[0]);
|
||||||
|
|
||||||
// Copy colors...
|
// Copy colors...
|
||||||
if (ncolors < 0) {
|
if (ncolors < 0) {
|
||||||
@@ -159,31 +160,31 @@ void Fl_Pixmap::copy_data() {
|
|||||||
ncolors = -ncolors;
|
ncolors = -ncolors;
|
||||||
new_row = new_data + 1;
|
new_row = new_data + 1;
|
||||||
*new_row = new char[ncolors * 4];
|
*new_row = new char[ncolors * 4];
|
||||||
memcpy(*new_row, data[1], ncolors * 4);
|
memcpy(*new_row, data()[1], ncolors * 4);
|
||||||
ncolors = 1;
|
ncolors = 1;
|
||||||
new_row ++;
|
new_row ++;
|
||||||
} else {
|
} else {
|
||||||
// Copy standard XPM colormap values...
|
// Copy standard XPM colormap values...
|
||||||
for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) {
|
for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) {
|
||||||
*new_row = new char[strlen(data[i + 1]) + 1];
|
*new_row = new char[strlen(data()[i + 1]) + 1];
|
||||||
strcpy(*new_row, data[i + 1]);
|
strcpy(*new_row, data()[i + 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy image data...
|
// Copy image data...
|
||||||
for (i = 0; i < h(); i ++, new_row ++) {
|
for (i = 0; i < h(); i ++, new_row ++) {
|
||||||
*new_row = new char[chars_per_line];
|
*new_row = new char[chars_per_line];
|
||||||
memcpy(*new_row, data[i + ncolors + 1], chars_per_line);
|
memcpy(*new_row, data()[i + ncolors + 1], chars_per_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update pointers...
|
// Update pointers...
|
||||||
data = new_data;
|
data(new_data, h() + ncolors + 1);
|
||||||
alloc_data = 1;
|
alloc_data = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fl_Image *Fl_Pixmap::copy(int W, int H) {
|
Fl_Image *Fl_Pixmap::copy(int W, int H) {
|
||||||
// Optimize the simple copy where the width and height are the same...
|
// Optimize the simple copy where the width and height are the same...
|
||||||
if (W == w() && H == h()) return new Fl_Pixmap(data);
|
if (W == w() && H == h()) return new Fl_Pixmap(data());
|
||||||
|
|
||||||
// OK, need to resize the image data; allocate memory and
|
// OK, need to resize the image data; allocate memory and
|
||||||
Fl_Pixmap *new_image; // New pixmap
|
Fl_Pixmap *new_image; // New pixmap
|
||||||
@@ -204,7 +205,7 @@ Fl_Image *Fl_Pixmap::copy(int W, int H) {
|
|||||||
chars_per_line; // Characters per line
|
chars_per_line; // Characters per line
|
||||||
|
|
||||||
// Figure out how many colors there are, and how big they are...
|
// Figure out how many colors there are, and how big they are...
|
||||||
sscanf(data[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
||||||
chars_per_line = chars_per_pixel * W + 1;
|
chars_per_line = chars_per_pixel * W + 1;
|
||||||
|
|
||||||
sprintf(new_info, "%d %d %d %d", W, H, ncolors, chars_per_pixel);
|
sprintf(new_info, "%d %d %d %d", W, H, ncolors, chars_per_pixel);
|
||||||
@@ -227,28 +228,28 @@ Fl_Image *Fl_Pixmap::copy(int W, int H) {
|
|||||||
ncolors = -ncolors;
|
ncolors = -ncolors;
|
||||||
new_row = new_data + 1;
|
new_row = new_data + 1;
|
||||||
*new_row = new char[ncolors * 4];
|
*new_row = new char[ncolors * 4];
|
||||||
memcpy(*new_row, data[1], ncolors * 4);
|
memcpy(*new_row, data()[1], ncolors * 4);
|
||||||
ncolors = 1;
|
ncolors = 1;
|
||||||
new_row ++;
|
new_row ++;
|
||||||
} else {
|
} else {
|
||||||
// Copy standard XPM colormap values...
|
// Copy standard XPM colormap values...
|
||||||
for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) {
|
for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) {
|
||||||
*new_row = new char[strlen(data[i + 1]) + 1];
|
*new_row = new char[strlen(data()[i + 1]) + 1];
|
||||||
strcpy(*new_row, data[i + 1]);
|
strcpy(*new_row, data()[i + 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy image data...
|
// Copy image data...
|
||||||
for (i = 0; i < h(); i ++, new_row ++) {
|
for (i = 0; i < h(); i ++, new_row ++) {
|
||||||
*new_row = new char[chars_per_line];
|
*new_row = new char[chars_per_line];
|
||||||
memcpy(*new_row, data[i + ncolors + 1], chars_per_line);
|
memcpy(*new_row, data()[i + ncolors + 1], chars_per_line);
|
||||||
}
|
}
|
||||||
// Scale the image using a nearest-neighbor algorithm...
|
// Scale the image using a nearest-neighbor algorithm...
|
||||||
for (dy = h(), sy = 0, yerr = H / 2; dy > 0; dy --, new_row ++) {
|
for (dy = h(), sy = 0, yerr = H / 2; dy > 0; dy --, new_row ++) {
|
||||||
*new_row = new char[chars_per_line];
|
*new_row = new char[chars_per_line];
|
||||||
new_ptr = *new_row;
|
new_ptr = *new_row;
|
||||||
|
|
||||||
for (dx = w(), xerr = W / 2, old_ptr = data[sy + ncolors + 1];
|
for (dx = w(), xerr = W / 2, old_ptr = data()[sy + ncolors + 1];
|
||||||
dx > 0;
|
dx > 0;
|
||||||
dx --) {
|
dx --) {
|
||||||
for (c = 0; c < chars_per_pixel; c ++) *new_ptr++ = old_ptr[c];
|
for (c = 0; c < chars_per_pixel; c ++) *new_ptr++ = old_ptr[c];
|
||||||
@@ -271,7 +272,7 @@ Fl_Image *Fl_Pixmap::copy(int W, int H) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new_image = new Fl_Pixmap((const char * const *)data);
|
new_image = new Fl_Pixmap(new_data);
|
||||||
new_image->alloc_data = 1;
|
new_image->alloc_data = 1;
|
||||||
|
|
||||||
return new_image;
|
return new_image;
|
||||||
@@ -312,12 +313,12 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) {
|
|||||||
chars_per_pixel;// Characters per color
|
chars_per_pixel;// Characters per color
|
||||||
|
|
||||||
|
|
||||||
sscanf(data[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
||||||
|
|
||||||
if (ncolors < 0) {
|
if (ncolors < 0) {
|
||||||
// Update FLTK colormap...
|
// Update FLTK colormap...
|
||||||
ncolors = -ncolors;
|
ncolors = -ncolors;
|
||||||
uchar *cmap = (uchar *)(data[1]);
|
uchar *cmap = (uchar *)(data()[1]);
|
||||||
for (color = 0; color < ncolors; color ++, cmap += 4) {
|
for (color = 0; color < ncolors; color ++, cmap += 4) {
|
||||||
cmap[1] = (ia * cmap[1] + ir) >> 8;
|
cmap[1] = (ia * cmap[1] + ir) >> 8;
|
||||||
cmap[2] = (ia * cmap[2] + ig) >> 8;
|
cmap[2] = (ia * cmap[2] + ig) >> 8;
|
||||||
@@ -327,7 +328,7 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) {
|
|||||||
// Update standard XPM colormap...
|
// Update standard XPM colormap...
|
||||||
for (color = 0; color < ncolors; color ++) {
|
for (color = 0; color < ncolors; color ++) {
|
||||||
// look for "c word", or last word if none:
|
// look for "c word", or last word if none:
|
||||||
const char *p = data[color + 1] + chars_per_pixel + 1;
|
const char *p = data()[color + 1] + chars_per_pixel + 1;
|
||||||
const char *previous_word = p;
|
const char *previous_word = p;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while (*p && isspace(*p)) p++;
|
while (*p && isspace(*p)) p++;
|
||||||
@@ -355,13 +356,13 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) {
|
|||||||
b = (ia * b + ib) >> 8;
|
b = (ia * b + ib) >> 8;
|
||||||
|
|
||||||
if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X",
|
if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X",
|
||||||
data[color + 1][0],
|
data()[color + 1][0],
|
||||||
data[color + 1][1], r, g, b);
|
data()[color + 1][1], r, g, b);
|
||||||
else sprintf(line, "%c c #%02X%02X%02X", data[color + 1][0], r, g, b);
|
else sprintf(line, "%c c #%02X%02X%02X", data()[color + 1][0], r, g, b);
|
||||||
|
|
||||||
delete[] (char *)data[color + 1];
|
delete[] (char *)data()[color + 1];
|
||||||
((char **)data)[color + 1] = new char[strlen(line) + 1];
|
((char **)data())[color + 1] = new char[strlen(line) + 1];
|
||||||
strcpy((char *)data[color + 1], line);
|
strcpy((char *)data()[color + 1], line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -369,11 +370,23 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) {
|
|||||||
|
|
||||||
void Fl_Pixmap::delete_data() {
|
void Fl_Pixmap::delete_data() {
|
||||||
if (alloc_data) {
|
if (alloc_data) {
|
||||||
for (int i = 0; data[i]; i ++) delete[] (char *)data[i];
|
for (int i = 0; i < count(); i ++) delete[] (char *)data()[i];
|
||||||
delete[] (char **)data;
|
delete[] (char **)data();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Fl_Pixmap::set_data(const char * const * p) {
|
||||||
|
int height, // Number of lines in image
|
||||||
|
ncolors; // Number of colors in image
|
||||||
|
|
||||||
|
if (p) {
|
||||||
|
sscanf(p[0],"%*d%d%d", &height, &ncolors);
|
||||||
|
if (ncolors < 0) data(p, height + 2);
|
||||||
|
else data(p, height + ncolors + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Fl_Pixmap::desaturate() {
|
void Fl_Pixmap::desaturate() {
|
||||||
// Delete any existing pixmap/mask objects...
|
// Delete any existing pixmap/mask objects...
|
||||||
if (id) {
|
if (id) {
|
||||||
@@ -396,12 +409,12 @@ void Fl_Pixmap::desaturate() {
|
|||||||
chars_per_pixel;// Characters per color
|
chars_per_pixel;// Characters per color
|
||||||
uchar r, g, b;
|
uchar r, g, b;
|
||||||
|
|
||||||
sscanf(data[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
sscanf(data()[0],"%*d%*d%d%d", &ncolors, &chars_per_pixel);
|
||||||
|
|
||||||
if (ncolors < 0) {
|
if (ncolors < 0) {
|
||||||
// Update FLTK colormap...
|
// Update FLTK colormap...
|
||||||
ncolors = -ncolors;
|
ncolors = -ncolors;
|
||||||
uchar *cmap = (uchar *)(data[1]);
|
uchar *cmap = (uchar *)(data()[1]);
|
||||||
for (i = 0; i < ncolors; i ++, cmap += 4) {
|
for (i = 0; i < ncolors; i ++, cmap += 4) {
|
||||||
g = (cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100;
|
g = (cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100;
|
||||||
cmap[1] = cmap[2] = cmap[3] = g;
|
cmap[1] = cmap[2] = cmap[3] = g;
|
||||||
@@ -410,7 +423,7 @@ void Fl_Pixmap::desaturate() {
|
|||||||
// Update standard XPM colormap...
|
// Update standard XPM colormap...
|
||||||
for (i = 0; i < ncolors; i ++) {
|
for (i = 0; i < ncolors; i ++) {
|
||||||
// look for "c word", or last word if none:
|
// look for "c word", or last word if none:
|
||||||
const char *p = data[i + 1] + chars_per_pixel + 1;
|
const char *p = data()[i + 1] + chars_per_pixel + 1;
|
||||||
const char *previous_word = p;
|
const char *previous_word = p;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while (*p && isspace(*p)) p++;
|
while (*p && isspace(*p)) p++;
|
||||||
@@ -435,18 +448,18 @@ void Fl_Pixmap::desaturate() {
|
|||||||
|
|
||||||
g = (r * 31 + g * 61 + b * 8) / 100;
|
g = (r * 31 + g * 61 + b * 8) / 100;
|
||||||
|
|
||||||
if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data[i + 1][0],
|
if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0],
|
||||||
data[i + 1][1], g, g, g);
|
data()[i + 1][1], g, g, g);
|
||||||
else sprintf(line, "%c c #%02X%02X%02X", data[i + 1][0], g, g, g);
|
else sprintf(line, "%c c #%02X%02X%02X", data()[i + 1][0], g, g, g);
|
||||||
|
|
||||||
delete[] (char *)data[i + 1];
|
delete[] (char *)data()[i + 1];
|
||||||
((char **)data)[i + 1] = new char[strlen(line) + 1];
|
((char **)data())[i + 1] = new char[strlen(line) + 1];
|
||||||
strcpy((char *)data[i + 1], line);
|
strcpy((char *)data()[i + 1], line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.6 2001/11/20 05:13:23 easysw Exp $".
|
// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.7 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Tile.cxx,v 1.5.2.5 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Tile widget for the Fast Light Tool Kit (FLTK).
|
// Tile widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -167,7 +167,7 @@ int Fl_Tile::handle(int event) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FL_DRAG:
|
case FL_DRAG:
|
||||||
// This is necessary if CONSOLIDATE_MOTION in Fl_x.C is turned off:
|
// This is necessary if CONSOLIDATE_MOTION in Fl_x.cxx is turned off:
|
||||||
// if (damage()) return 1; // don't fall behind
|
// if (damage()) return 1; // don't fall behind
|
||||||
case FL_RELEASE: {
|
case FL_RELEASE: {
|
||||||
if (!sdrag) return 0; // should not happen
|
if (!sdrag) return 0; // should not happen
|
||||||
@@ -196,5 +196,5 @@ int Fl_Tile::handle(int event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Tile.cxx,v 1.5.2.5 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.6 2001/11/03 05:11:34 easysw Exp $"
|
// "$Id: Fl_Widget.cxx,v 1.5.2.4.2.7 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Base widget class for the Fast Light Tool Kit (FLTK).
|
// Base widget class for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -124,7 +124,7 @@ int Fl_Widget::take_focus() {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void fl_throw_focus(Fl_Widget*); // in Fl_x.C
|
extern void fl_throw_focus(Fl_Widget*); // in Fl_x.cxx
|
||||||
|
|
||||||
// Destruction does not remove from any parent group! And groups when
|
// Destruction does not remove from any parent group! And groups when
|
||||||
// destroyed destroy all their children. This is convienent and fast.
|
// destroyed destroy all their children. This is convienent and fast.
|
||||||
@@ -249,5 +249,5 @@ int Fl_Widget::contains(const Fl_Widget *o) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.6 2001/11/03 05:11:34 easysw Exp $".
|
// End of "$Id: Fl_Widget.cxx,v 1.5.2.4.2.7 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Window.cxx,v 1.6.2.3 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_Window.cxx,v 1.6.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Window widget class for the Fast Light Tool Kit (FLTK).
|
// Window widget class for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
// The Fl_Window is a window in the fltk library.
|
// The Fl_Window is a window in the fltk library.
|
||||||
// This is the system-independent portions. The huge amount of
|
// This is the system-independent portions. The huge amount of
|
||||||
// crap you need to do to communicate with X is in Fl_x.C, the
|
// crap you need to do to communicate with X is in Fl_x.cxx, the
|
||||||
// equivalent (but totally different) crap for MSWindows is in Fl_win32.C
|
// equivalent (but totally different) crap for MSWindows is in Fl_win32.cxx
|
||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Window.H>
|
||||||
@@ -102,5 +102,5 @@ void Fl_Window::default_callback(Fl_Window* window, void* v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Window.cxx,v 1.6.2.3 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Window_iconize.cxx,v 1.5.2.3 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Window minification code for the Fast Light Tool Kit (FLTK).
|
// Window minification code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
|
|
||||||
extern char fl_show_iconic; // in Fl_x.C
|
extern char fl_show_iconic; // in Fl_x.cxx
|
||||||
|
|
||||||
void Fl_Window::iconize() {
|
void Fl_Window::iconize() {
|
||||||
if (!shown()) {
|
if (!shown()) {
|
||||||
@@ -41,5 +41,5 @@ void Fl_Window::iconize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Window_iconize.cxx,v 1.5.2.3 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_Window_iconize.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_abort.cxx,v 1.8.2.3 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_abort.cxx,v 1.8.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Warning/error message code for the Fast Light Tool Kit (FLTK).
|
// Warning/error message code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// This method is in it's own source file so that stdlib and stdio
|
// This method is in it's own source file so that stdlib and stdio
|
||||||
// do not need to be included in Fl.C:
|
// do not need to be included in Fl.cxx:
|
||||||
// You can also override this by redefining all of these.
|
// You can also override this by redefining all of these.
|
||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
@@ -89,5 +89,5 @@ void (*Fl::error)(const char* format, ...) = ::error;
|
|||||||
void (*Fl::fatal)(const char* format, ...) = ::error;
|
void (*Fl::fatal)(const char* format, ...) = ::error;
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_abort.cxx,v 1.8.2.3 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_abort.cxx,v 1.8.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_arg.cxx,v 1.5.2.8.2.1 2001/11/03 19:24:22 easysw Exp $"
|
// "$Id: Fl_arg.cxx,v 1.5.2.8.2.2 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Optional argument initialization code for the Fast Light Tool Kit (FLTK).
|
// Optional argument initialization code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -53,7 +53,7 @@ static int match(const char *a, const char *match, int atleast = 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// flags set by previously parsed arguments:
|
// flags set by previously parsed arguments:
|
||||||
extern char fl_show_iconic; // in Fl_x.C
|
extern char fl_show_iconic; // in Fl_x.cxx
|
||||||
static char arg_called;
|
static char arg_called;
|
||||||
static char return_i;
|
static char return_i;
|
||||||
static const char *name;
|
static const char *name;
|
||||||
@@ -365,5 +365,5 @@ int XParseGeometry(const char* string, int* x, int* y,
|
|||||||
#endif // ifdef WIN32
|
#endif // ifdef WIN32
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.1 2001/11/03 19:24:22 easysw Exp $".
|
// End of "$Id: Fl_arg.cxx,v 1.5.2.8.2.2 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_cutpaste.cxx,v 1.6.2.4 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_cutpaste.cxx,v 1.6.2.4.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Cut/paste code for the Fast Light Tool Kit (FLTK).
|
// Cut/paste code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// Implementation of cut and paste.
|
// Implementation of cut and paste.
|
||||||
|
|
||||||
// This is seperated from Fl.C mostly to test Fl::add_handler().
|
// This is seperated from Fl.cxx mostly to test Fl::add_handler().
|
||||||
// But this will save a small amount of code size in a program that
|
// But this will save a small amount of code size in a program that
|
||||||
// has no text editing fields or other things that call cut or paste.
|
// has no text editing fields or other things that call cut or paste.
|
||||||
|
|
||||||
@@ -158,5 +158,5 @@ void Fl::selection(Fl_Widget &owner, const char *stuff, int len) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_cutpaste.cxx,v 1.6.2.4 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_cutpaste.cxx,v 1.6.2.4.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_cutpaste_win32.cxx,v 1.5.2.8 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_cutpaste_win32.cxx,v 1.5.2.8.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// WIN32 cut/paste for the Fast Light Tool Kit (FLTK).
|
// WIN32 cut/paste for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// Implementation of cut and paste.
|
// Implementation of cut and paste.
|
||||||
|
|
||||||
// This is seperated from Fl.C mostly to test Fl::add_handler().
|
// This is seperated from Fl.cxx mostly to test Fl::add_handler().
|
||||||
// But this will save a small amount of code size in a program that
|
// But this will save a small amount of code size in a program that
|
||||||
// has no text editing fields or other things that call cut or paste.
|
// has no text editing fields or other things that call cut or paste.
|
||||||
|
|
||||||
@@ -135,5 +135,5 @@ void Fl::paste(Fl_Widget &receiver) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_cutpaste_win32.cxx,v 1.5.2.8 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_cutpaste_win32.cxx,v 1.5.2.8.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_get_key.cxx,v 1.5.2.3 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_get_key.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Keyboard state routines for the Fast Light Tool Kit (FLTK).
|
// Keyboard state routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -29,12 +29,12 @@
|
|||||||
|
|
||||||
// Return the current state of a key. This is the X version. I identify
|
// Return the current state of a key. This is the X version. I identify
|
||||||
// keys (mostly) by the X keysym. So this turns the keysym into a keycode
|
// keys (mostly) by the X keysym. So this turns the keysym into a keycode
|
||||||
// and looks it up in the X key bit vector, which Fl_x.C keeps track of.
|
// and looks it up in the X key bit vector, which Fl_x.cxx keeps track of.
|
||||||
|
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
|
|
||||||
extern char fl_key_vector[32]; // in Fl_x.C
|
extern char fl_key_vector[32]; // in Fl_x.cxx
|
||||||
|
|
||||||
int Fl::event_key(int k) {
|
int Fl::event_key(int k) {
|
||||||
if (k > FL_Button && k <= FL_Button+8)
|
if (k > FL_Button && k <= FL_Button+8)
|
||||||
@@ -60,5 +60,5 @@ int Fl::get_key(int k) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_get_key.cxx,v 1.5.2.3 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_get_key.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_get_key_win32.cxx,v 1.4.2.5 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_get_key_win32.cxx,v 1.4.2.5.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// WIN32 keyboard state routines for the Fast Light Tool Kit (FLTK).
|
// WIN32 keyboard state routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
#include <FL/win32.H>
|
#include <FL/win32.H>
|
||||||
|
|
||||||
// convert an Fltk (X) keysym to a MSWindows VK symbol:
|
// convert an Fltk (X) keysym to a MSWindows VK symbol:
|
||||||
// See also the inverse converter in Fl_win32.C
|
// See also the inverse converter in Fl_win32.cxx
|
||||||
// This table is in numeric order by Fltk symbol order for binary search:
|
// This table is in numeric order by Fltk symbol order for binary search:
|
||||||
|
|
||||||
static const struct {unsigned short vk, fltk;} vktab[] = {
|
static const struct {unsigned short vk, fltk;} vktab[] = {
|
||||||
@@ -132,5 +132,5 @@ int Fl::get_key(int k) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_get_key_win32.cxx,v 1.4.2.5 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_get_key_win32.cxx,v 1.4.2.5.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_grab.cxx,v 1.1.2.4 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: Fl_grab.cxx,v 1.1.2.4.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Grab/release code for the Fast Light Tool Kit (FLTK).
|
// Grab/release code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// "Grab" is done while menu systems are up. This has several effects:
|
// "Grab" is done while menu systems are up. This has several effects:
|
||||||
// Events are all sent to the "grab window", which does not even
|
// Events are all sent to the "grab window", which does not even
|
||||||
// have to be displayed (and in the case of Fl_Menu.C it isn't).
|
// have to be displayed (and in the case of Fl_Menu.cxx it isn't).
|
||||||
// The system is also told to "grab" events and send them to this app.
|
// The system is also told to "grab" events and send them to this app.
|
||||||
// This also modifies how Fl_Window::show() works, on X it turns on
|
// This also modifies how Fl_Window::show() works, on X it turns on
|
||||||
// override_redirect, it does similar things on WIN32.
|
// override_redirect, it does similar things on WIN32.
|
||||||
@@ -89,5 +89,5 @@ void Fl::grab(Fl_Window* w) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_grab.cxx,v 1.1.2.4 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: Fl_grab.cxx,v 1.1.2.4.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+7
-7
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.7 2001/11/19 20:59:59 easysw Exp $"
|
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.8 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// This file contains win32-specific code for fltk which is always linked
|
// This file contains win32-specific code for fltk which is always linked
|
||||||
// in. Search other files for "WIN32" or filenames ending in _win32.C
|
// in. Search other files for "WIN32" or filenames ending in _win32.cxx
|
||||||
// for other system-specific code.
|
// for other system-specific code.
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -360,7 +360,7 @@ static int mouse_event(Fl_Window *window, int what, int button,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// convert a MSWindows VK_x to an Fltk (X) Keysym:
|
// convert a MSWindows VK_x to an Fltk (X) Keysym:
|
||||||
// See also the inverse converter in Fl_get_key_win32.C
|
// See also the inverse converter in Fl_get_key_win32.cxx
|
||||||
// This table is in numeric order by VK:
|
// This table is in numeric order by VK:
|
||||||
static const struct {unsigned short vk, fltk, extended;} vktab[] = {
|
static const struct {unsigned short vk, fltk, extended;} vktab[] = {
|
||||||
{VK_BACK, FL_BackSpace},
|
{VK_BACK, FL_BackSpace},
|
||||||
@@ -425,7 +425,7 @@ static int ms2fltk(int vk, int extended) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if USE_COLORMAP
|
#if USE_COLORMAP
|
||||||
extern HPALETTE fl_select_palette(void); // in fl_color_win32.C
|
extern HPALETTE fl_select_palette(void); // in fl_color_win32.cxx
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Fl_Window* resize_bug_fix;
|
static Fl_Window* resize_bug_fix;
|
||||||
@@ -755,7 +755,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void fl_fix_focus(); // in Fl.C
|
void fl_fix_focus(); // in Fl.cxx
|
||||||
|
|
||||||
char fl_show_iconic; // hack for Fl_Window::iconic()
|
char fl_show_iconic; // hack for Fl_Window::iconic()
|
||||||
// int fl_background_pixel = -1; // color to use for background
|
// int fl_background_pixel = -1; // color to use for background
|
||||||
@@ -946,7 +946,7 @@ void Fl_Window::label(const char *name,const char *iname) {
|
|||||||
// If the box is a filled rectangle, we can make the redisplay *look*
|
// If the box is a filled rectangle, we can make the redisplay *look*
|
||||||
// faster by using X's background pixel erasing. We can make it
|
// faster by using X's background pixel erasing. We can make it
|
||||||
// actually *be* faster by drawing the frame only, this is done by
|
// actually *be* faster by drawing the frame only, this is done by
|
||||||
// setting fl_boxcheat, which is seen by code in fl_drawbox.C:
|
// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
|
||||||
// For WIN32 it looks like all windows share a background color, so
|
// For WIN32 it looks like all windows share a background color, so
|
||||||
// I use FL_GRAY for this and only do this cheat for windows that are
|
// I use FL_GRAY for this and only do this cheat for windows that are
|
||||||
// that color.
|
// that color.
|
||||||
@@ -1005,5 +1005,5 @@ void Fl_Window::make_current() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.7 2001/11/19 20:59:59 easysw Exp $".
|
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.8 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_x.cxx,v 1.24.2.24.2.5 2001/11/19 18:28:55 easysw Exp $"
|
// "$Id: Fl_x.cxx,v 1.24.2.24.2.6 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// X specific code for the Fast Light Tool Kit (FLTK).
|
// X specific code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -543,7 +543,7 @@ int fl_handle(const XEvent& xevent)
|
|||||||
if (keysym >= 0xff91 && keysym <= 0xff9f) {
|
if (keysym >= 0xff91 && keysym <= 0xff9f) {
|
||||||
// Try to make them turn into FL_KP+'c' so that NumLock is
|
// Try to make them turn into FL_KP+'c' so that NumLock is
|
||||||
// irrelevant, by looking at the shifted code. This matches the
|
// irrelevant, by looking at the shifted code. This matches the
|
||||||
// behavior of the translator in Fl_win32.C, and IMHO is the
|
// behavior of the translator in Fl_win32.cxx, and IMHO is the
|
||||||
// user-friendly result:
|
// user-friendly result:
|
||||||
unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1);
|
unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1);
|
||||||
if (keysym1 <= 0x7f || keysym1 > 0xff9f && keysym1 <= FL_KP_Last) {
|
if (keysym1 <= 0x7f || keysym1 > 0xff9f && keysym1 <= FL_KP_Last) {
|
||||||
@@ -900,7 +900,7 @@ void Fl_Window::label(const char *name,const char *iname) {
|
|||||||
// If the box is a filled rectangle, we can make the redisplay *look*
|
// If the box is a filled rectangle, we can make the redisplay *look*
|
||||||
// faster by using X's background pixel erasing. We can make it
|
// faster by using X's background pixel erasing. We can make it
|
||||||
// actually *be* faster by drawing the frame only, this is done by
|
// actually *be* faster by drawing the frame only, this is done by
|
||||||
// setting fl_boxcheat, which is seen by code in fl_drawbox.C:
|
// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
|
||||||
//
|
//
|
||||||
// On XFree86 (and prehaps all X's) this has a problem if the window
|
// On XFree86 (and prehaps all X's) this has a problem if the window
|
||||||
// is resized while a save-behind window is atop it. The previous
|
// is resized while a save-behind window is atop it. The previous
|
||||||
@@ -936,5 +936,5 @@ void Fl_Window::make_current() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.5 2001/11/19 18:28:55 easysw Exp $".
|
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.6 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: cmap.cxx,v 1.4.2.6 2001/05/05 23:39:01 spitzak Exp $"
|
// "$Id: cmap.cxx,v 1.4.2.6.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Colormap generation program for the Fast Light Tool Kit (FLTK).
|
// Colormap generation program for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -109,7 +109,7 @@ static short cmap[256][3] = {
|
|||||||
// The rest of the colormap is a gray ramp and table, filled in below:
|
// The rest of the colormap is a gray ramp and table, filled in below:
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is Fl::background from Fl_get_system_colors.C, with modifications:
|
// This is Fl::background from Fl_get_system_colors.cxx, with modifications:
|
||||||
|
|
||||||
#define FL_GRAY_RAMP 32
|
#define FL_GRAY_RAMP 32
|
||||||
#define FL_NUM_GRAY 24
|
#define FL_NUM_GRAY 24
|
||||||
@@ -175,5 +175,5 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: cmap.cxx,v 1.4.2.6 2001/05/05 23:39:01 spitzak Exp $".
|
// End of "$Id: cmap.cxx,v 1.4.2.6.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_arc.cxx,v 1.4.2.3 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: fl_arc.cxx,v 1.4.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Arc functions for the Fast Light Tool Kit (FLTK).
|
// Arc functions for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -66,12 +66,12 @@ void fl_arc(double x, double y, double r, double start, double end) {
|
|||||||
fl_vertex(x+r*cos(E), y-r*sin(E));
|
fl_vertex(x+r*cos(E), y-r*sin(E));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // portable version. X-specific one in fl_vertex.C
|
#if 0 // portable version. X-specific one in fl_vertex.cxx
|
||||||
void fl_circle(double x,double y,double r) {
|
void fl_circle(double x,double y,double r) {
|
||||||
_fl_arc(x, y, r, r, 0, 360);
|
_fl_arc(x, y, r, r, 0, 360);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_arc.cxx,v 1.4.2.3 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: fl_arc.cxx,v 1.4.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.2 2001/10/27 03:29:25 easysw Exp $"
|
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.3 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -259,7 +259,7 @@ void fl_draw_box(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) {
|
|||||||
if (t) fl_box_table[t].f(x,y,w,h,c);
|
if (t) fl_box_table[t].f(x,y,w,h,c);
|
||||||
}
|
}
|
||||||
|
|
||||||
//extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.C
|
//extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.cxx
|
||||||
|
|
||||||
void Fl_Widget::draw_box() const {
|
void Fl_Widget::draw_box() const {
|
||||||
int t = box_;
|
int t = box_;
|
||||||
@@ -284,5 +284,5 @@ const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.2 2001/10/27 03:29:25 easysw Exp $".
|
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.3 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_color.cxx,v 1.12.2.5.2.2 2001/10/29 03:44:33 easysw Exp $"
|
// "$Id: fl_color.cxx,v 1.12.2.5.2.3 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Color functions for the Fast Light Tool Kit (FLTK).
|
// Color functions for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -90,7 +90,7 @@ static void figure_out_visual() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned fl_cmap[256] = {
|
static unsigned fl_cmap[256] = {
|
||||||
#include "fl_cmap.h" // this is a file produced by "cmap.C":
|
#include "fl_cmap.h" // this is a file produced by "cmap.cxx":
|
||||||
};
|
};
|
||||||
|
|
||||||
#if HAVE_OVERLAY
|
#if HAVE_OVERLAY
|
||||||
@@ -370,5 +370,5 @@ Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_color.cxx,v 1.12.2.5.2.2 2001/10/29 03:44:33 easysw Exp $".
|
// End of "$Id: fl_color.cxx,v 1.12.2.5.2.3 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_draw_image.cxx,v 1.5.2.6 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: fl_draw_image.cxx,v 1.5.2.6.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Image drawing routines for the Fast Light Tool Kit (FLTK).
|
// Image drawing routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -347,7 +347,7 @@ mono32_converter(const uchar *from,uchar *to,int w, int delta) {
|
|||||||
|
|
||||||
static void figure_out_visual() {
|
static void figure_out_visual() {
|
||||||
|
|
||||||
fl_xpixel(FL_BLACK); // setup fl_redmask, etc, in fl_color.C
|
fl_xpixel(FL_BLACK); // setup fl_redmask, etc, in fl_color.cxx
|
||||||
fl_xpixel(FL_WHITE); // also make sure white is allocated
|
fl_xpixel(FL_WHITE); // also make sure white is allocated
|
||||||
|
|
||||||
static XPixmapFormatValues *pfvlist;
|
static XPixmapFormatValues *pfvlist;
|
||||||
@@ -573,5 +573,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_draw_image.cxx,v 1.5.2.6 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: fl_draw_image.cxx,v 1.5.2.6.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.2 2001/11/19 01:06:45 easysw Exp $"
|
// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.3 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
|
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -132,7 +132,7 @@ static void cb2(void*v, int x, int y, int w, uchar* buf) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// this is in Fl_arg.C:
|
// this is in Fl_arg.cxx:
|
||||||
extern int fl_parse_color(const char*, uchar&, uchar&, uchar&);
|
extern int fl_parse_color(const char*, uchar&, uchar&, uchar&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -273,5 +273,5 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.2 2001/11/19 01:06:45 easysw Exp $".
|
// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.3 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_overlay_visual.cxx,v 1.4.2.5 2001/05/19 21:30:23 spitzak Exp $"
|
// "$Id: fl_overlay_visual.cxx,v 1.4.2.5.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// X overlay support for the Fast Light Tool Kit (FLTK).
|
// X overlay support for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
// Return an overlay visual, if any. Also allocate a colormap and
|
// Return an overlay visual, if any. Also allocate a colormap and
|
||||||
// record the depth for fl_color() to use.
|
// record the depth for fl_color() to use.
|
||||||
// Another disgusting X interface, based on code extracted and
|
// Another disgusting X interface, based on code extracted and
|
||||||
// purified with great difficulty from XLayerUtil.C:
|
// purified with great difficulty from XLayerUtil.cxx:
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#if HAVE_OVERLAY
|
#if HAVE_OVERLAY
|
||||||
@@ -99,5 +99,5 @@ XVisualInfo *fl_find_overlay_visual() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_overlay_visual.cxx,v 1.4.2.5 2001/05/19 21:30:23 spitzak Exp $".
|
// End of "$Id: fl_overlay_visual.cxx,v 1.4.2.5.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_rect.cxx,v 1.10.2.4 2001/01/22 15:13:41 easysw Exp $"
|
// "$Id: fl_rect.cxx,v 1.10.2.4.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
|
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -247,7 +247,7 @@ void fl_point(int x, int y) {
|
|||||||
#define STACK_MAX (STACK_SIZE - 1)
|
#define STACK_MAX (STACK_SIZE - 1)
|
||||||
static Region rstack[STACK_SIZE];
|
static Region rstack[STACK_SIZE];
|
||||||
static int rstackptr=0;
|
static int rstackptr=0;
|
||||||
int fl_clip_state_number=0; // used by gl_begin.C to update GL clip
|
int fl_clip_state_number=0; // used by gl_begin.cxx to update GL clip
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
// Missing X call: (is this the fastest way to init a 1-rectangle region?)
|
// Missing X call: (is this the fastest way to init a 1-rectangle region?)
|
||||||
@@ -388,5 +388,5 @@ int fl_clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_rect.cxx,v 1.10.2.4 2001/01/22 15:13:41 easysw Exp $".
|
// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_set_font.cxx,v 1.5.2.3 2001/01/22 15:13:41 easysw Exp $"
|
// "$Id: fl_set_font.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Font utilities for the Fast Light Tool Kit (FLTK).
|
// Font utilities for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Add a font to the internal table.
|
// Add a font to the internal table.
|
||||||
// Also see fl_set_fonts.C which adds all possible fonts.
|
// Also see fl_set_fonts.cxx which adds all possible fonts.
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
@@ -71,5 +71,5 @@ void Fl::set_font(Fl_Font fnum, const char* name) {
|
|||||||
const char* Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;}
|
const char* Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_set_font.cxx,v 1.5.2.3 2001/01/22 15:13:41 easysw Exp $".
|
// End of "$Id: fl_set_font.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_vertex.cxx,v 1.5.2.3 2001/01/22 15:13:41 easysw Exp $"
|
// "$Id: fl_vertex.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Portable drawing routines for the Fast Light Tool Kit (FLTK).
|
// Portable drawing routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Portable drawing code for drawing arbitrary shapes with
|
// Portable drawing code for drawing arbitrary shapes with
|
||||||
// simple 2D transformations. See also fl_arc.C
|
// simple 2D transformations. See also fl_arc.cxx
|
||||||
|
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
@@ -223,5 +223,5 @@ void fl_circle(double x, double y,double r) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_vertex.cxx,v 1.5.2.3 2001/01/22 15:13:41 easysw Exp $".
|
// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: gl_draw.cxx,v 1.7.2.5 2001/03/14 17:20:02 spitzak Exp $"
|
// "$Id: gl_draw.cxx,v 1.7.2.5.2.1 2001/11/22 15:35:01 easysw Exp $"
|
||||||
//
|
//
|
||||||
// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
|
// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Functions from <FL/gl.h>
|
// Functions from <FL/gl.h>
|
||||||
// See also Fl_Gl_Window and gl_start.C
|
// See also Fl_Gl_Window and gl_start.cxx
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#if HAVE_GL
|
#if HAVE_GL
|
||||||
@@ -155,5 +155,5 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: gl_draw.cxx,v 1.7.2.5 2001/03/14 17:20:02 spitzak Exp $".
|
// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.1 2001/11/22 15:35:01 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: gl_start.cxx,v 1.6.2.5 2001/03/14 17:20:02 spitzak Exp $"
|
// "$Id: gl_start.cxx,v 1.6.2.5.2.1 2001/11/22 15:35:02 easysw Exp $"
|
||||||
//
|
//
|
||||||
// OpenGL context routines for the Fast Light Tool Kit (FLTK).
|
// OpenGL context routines for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include "Fl_Gl_Choice.H"
|
#include "Fl_Gl_Choice.H"
|
||||||
|
|
||||||
extern int fl_clip_state_number; // in fl_rect.C
|
extern int fl_clip_state_number; // in fl_rect.cxx
|
||||||
|
|
||||||
static GLContext context;
|
static GLContext context;
|
||||||
static int clip_state_number=-1;
|
static int clip_state_number=-1;
|
||||||
@@ -54,7 +54,7 @@ static int pw, ph;
|
|||||||
static Fl_Gl_Choice* gl_choice;
|
static Fl_Gl_Choice* gl_choice;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.C
|
Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.cxx
|
||||||
|
|
||||||
void gl_start() {
|
void gl_start() {
|
||||||
if (!context) {
|
if (!context) {
|
||||||
@@ -113,5 +113,5 @@ int Fl::gl_visual(int mode, int *alist) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: gl_start.cxx,v 1.6.2.5 2001/03/14 17:20:02 spitzak Exp $".
|
// End of "$Id: gl_start.cxx,v 1.6.2.5.2.1 2001/11/22 15:35:02 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user