diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-22 15:35:02 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-22 15:35:02 +0000 |
| commit | f5258404959cff3a299c796676b553b843a94355 (patch) | |
| tree | f6820c57e99b0038b9bc734d7123d536a33af267 | |
| parent | 4323f46e2c31bc070036a9923711293f169ffb85 (diff) | |
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
36 files changed, 229 insertions, 202 deletions
diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H index f4dc0bdf3..c4864d36e 100644 --- a/FL/Fl_Bitmap.H +++ b/FL/Fl_Bitmap.H @@ -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). // @@ -38,9 +38,9 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image { Fl_Bitmask id; // for internal use 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_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_Image *copy(int W, int H); Fl_Image *copy() { return copy(w(), h()); } @@ -53,5 +53,5 @@ class FL_EXPORT Fl_Bitmap : public Fl_Image { #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 $". // diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index 77de42652..596b268a8 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -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). // @@ -32,16 +32,25 @@ class Fl_Widget; struct Fl_Menu_Item; class FL_EXPORT Fl_Image { - int w_, h_; + int w_, h_, d_, count_; + const char * const *data_; - public: + protected: - int w() const {return w_;} void w(int W) {w_ = W;} - int h() const {return h_;} void h(int H) {h_ = H;} + void d(int D) {d_ = D;} + void data(const char * const *p, int c) {data_ = p; count_ = c;} - Fl_Image(int W, int H) {w_ = W; h_ = H;} + public: + + int w() const {return w_;} + int h() const {return h_;} + int d() const {return d_;} + int count() const {return count_;} + const char * const *data() const {return data_;} + + Fl_Image(int W, int H, int D) {w_ = W; h_ = H; d_ = D; count_ = 0; data_ = 0;} virtual ~Fl_Image(); virtual Fl_Image *copy(int W, int H); Fl_Image *copy() { return copy(w(), h()); } @@ -59,12 +68,12 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image { const uchar *array; int alloc_array; // Non-zero if array was allocated - int d, ld; + int ld; Fl_Offscreen id; // for internal use 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_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_Image *copy(int W, int H); Fl_Image *copy() { return copy(w(), h()); } @@ -79,5 +88,5 @@ class FL_EXPORT Fl_RGB_Image : public Fl_Image { #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 $". // diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H index 609753016..60bf77b53 100644 --- a/FL/Fl_Pixmap.H +++ b/FL/Fl_Pixmap.H @@ -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). // @@ -38,19 +38,19 @@ struct Fl_Menu_Item; class FL_EXPORT Fl_Pixmap : public Fl_Image { void copy_data(); void delete_data(); + void set_data(const char * const *p); void measure(); public: - const char * const * data; int alloc_data; // Non-zero if data was allocated Fl_Offscreen id; // for internal use 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(uchar* const * d) : Fl_Image(-1,0), data((const char*const*)d), alloc_data(0), id(0), mask(0) {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 uchar* 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,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,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,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();} virtual ~Fl_Pixmap(); virtual Fl_Image *copy(int W, int H); Fl_Image *copy() { return copy(w(), h()); } @@ -65,5 +65,5 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image { #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 $". // diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 4c43c1aa3..34aeccfda 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -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). // @@ -81,7 +81,7 @@ void pixmap_image::write_static() { int l; for (l = 0; l < numlines; l++) { 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("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() { - if (p && p->data) { - char** real_data = (char**)(p->data); + if (p && p->data()) { + char** real_data = (char**)(p->data()); for (int i = 0; i < numlines; i++) delete[] real_data[i]; 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() { - if (p && p->data) { - char** real_data = (char**)(p->data); + if (p && p->data()) { + char** real_data = (char**)(p->data()); for (int i = 0; i < 3; i++) delete[] real_data[i]; 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 $". // diff --git a/src/Fl.cxx b/src/Fl.cxx index 514018de0..0c6d31b0d 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -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). // @@ -454,7 +454,7 @@ void fl_fix_focus() { } #ifndef WIN32 -Fl_Widget *fl_selection_requestor; // from Fl_cutpaste.C +Fl_Widget *fl_selection_requestor; // from Fl_cutpaste.cxx #endif // 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 $". // diff --git a/src/Fl_Chart.cxx b/src/Fl_Chart.cxx index daa5a2645..ebeffef6b 100644 --- a/src/Fl_Chart.cxx +++ b/src/Fl_Chart.cxx @@ -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). // @@ -32,7 +32,7 @@ #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); /* 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 $". // diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx index ce4580e74..36022cc72 100644 --- a/src/Fl_GIF_Image.cxx +++ b/src/Fl_GIF_Image.cxx @@ -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. // @@ -79,7 +79,8 @@ typedef unsigned char uchar; #define GETSHORT(var) var = NEXTBYTE; var += NEXTBYTE << 8 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) { 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: w(Width); h(Height); - alloc_data = 1; - data = new char*[Height+2]; + d(1); + new_data = new char*[Height+2]; // transparent pixel must be zero, swap if it isn't: 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): int length = sprintf((char*)(Suffix), "%d %d %d %d",Width,Height,-numcolors,1); - ((char **)data)[0] = new char[length+1]; - strcpy(((char **)data)[0], (char*)Suffix); + new_data[0] = new char[length+1]; + strcpy(new_data[0], (char*)Suffix); // 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]) { *p++ = remap[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: for (i=0; i<Height; i++) { - ((char **)data)[i+2] = new char[Width]; - memcpy(((char **)data)[i + 2], (char*)(Image + i*Width), Width); + new_data[i+2] = new char[Width]; + memcpy(new_data[i + 2], (char*)(Image + i*Width), Width); } + data(new_data, Height + 2); + alloc_data = 1; + 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 $". // diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 35d24818a..b6c61a727 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -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). // @@ -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) { - return new Fl_Image(W, H); + return new Fl_Image(W, H, d()); } 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) { // 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 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... xmod = w() % W; - xstep = (w() / W) * d; + xstep = (w() / W) * d(); ymod = h() % H; ystep = h() / H; // Allocate memory for the new image... - new_array = new uchar [W * H * d]; - new_image = new Fl_RGB_Image(new_array, W, H, d); + new_array = new uchar [W * H * d()]; + new_image = new Fl_RGB_Image(new_array, W, H, d()); new_image->alloc_array = 1; // Scale the image using a nearest-neighbor algorithm... 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 --) { - 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; xerr -= xmod; if (xerr <= 0) { 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, *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; // 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; int x, y; - if (d < 3) { + if (d() < 3) { 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 (x = 0; x < w(); x ++) { *new_ptr++ = (*old_ptr++ * ia + ig) >> 8; - if (d > 1) *new_ptr++ = *old_ptr++; + if (d() > 1) *new_ptr++ = *old_ptr++; } } else { 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 + ig) >> 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() { // Can only desaturate color images... - if (d < 3) return; + if (d() < 3) return; // Delete any existing pixmap/mask objects... if (id) { @@ -198,7 +198,7 @@ void Fl_RGB_Image::desaturate() { *new_ptr; int new_d; - new_d = d - 2; + new_d = d() - 2; new_array = new uchar[h() * w() * new_d]; // Copy the image data, converting to grayscale... @@ -206,9 +206,9 @@ void Fl_RGB_Image::desaturate() { int x, y; 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; - 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... @@ -216,8 +216,9 @@ void Fl_RGB_Image::desaturate() { array = new_array; alloc_array = 1; - d = new_d; ld = 0; + + d(new_d); } 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) { id = fl_create_offscreen(w(), h()); 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(); - if (d == 2 || d == 4) { + if (d() == 2 || d() == 4) { // Create alpha mask... int bmw = (w() + 7) / 8; 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... memset(bitmap, 0, bmw * h()); - 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 (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()) { if (*dataptr > dither[x & 15][y & 15]) *bitptr |= bit; 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 $". // diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index 35817f5ff..36479abb5 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -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). // @@ -24,7 +24,7 @@ // // 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...). // In theory you can replace this code with another subclass to change // 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 $". // diff --git a/src/Fl_Menu_.cxx b/src/Fl_Menu_.cxx index 76190328b..a884c15a9 100644 --- a/src/Fl_Menu_.cxx +++ b/src/Fl_Menu_.cxx @@ -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). // @@ -28,7 +28,7 @@ // This provides storage for a menu item, functions to add/modify/delete // 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_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 $". // diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index 06565782a..743e2f1fa 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -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). // @@ -26,7 +26,7 @@ // Draws X pixmap data, keeping it stashed in a server pixmap so it // 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 // it interferes with the color cube used by fl_draw_image). @@ -48,18 +48,19 @@ void Fl_Pixmap::measure() { int W, H; // ignore empty or bad pixmap data: - if (w()<0 && data) { - fl_measure_pixmap(data, W, H); + if (w()<0 && data()) { + fl_measure_pixmap(data(), W, H); w(W); h(H); } } void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) { // ignore empty or bad pixmap data: - if (!data) return; - if (w()<0) { - measure(); - if (WP==-1) { WP = w(); HP = h(); } + if (!data()) return; + if (w()<0) measure(); + if (WP==-1) { + WP = w(); + HP = h(); } if (!w()) return; // 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); uchar *bitmap = 0; fl_mask_bitmap = &bitmap; - fl_draw_pixmap(data, 0, 0, FL_BLACK); + fl_draw_pixmap(data(), 0, 0, FL_BLACK); fl_mask_bitmap = 0; if (bitmap) { mask = fl_create_bitmask(w(), h(), bitmap); @@ -143,15 +144,15 @@ void Fl_Pixmap::copy_data() { chars_per_line; // Characters per line // 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; // Allocate memory for the new array... if (ncolors < 0) new_data = new char *[h() + 2]; else new_data = new char *[h() + ncolors + 1]; - new_data[0] = new char[strlen(data[0]) + 1]; - strcpy(new_data[0], data[0]); + new_data[0] = new char[strlen(data()[0]) + 1]; + strcpy(new_data[0], data()[0]); // Copy colors... if (ncolors < 0) { @@ -159,31 +160,31 @@ void Fl_Pixmap::copy_data() { ncolors = -ncolors; new_row = new_data + 1; *new_row = new char[ncolors * 4]; - memcpy(*new_row, data[1], ncolors * 4); + memcpy(*new_row, data()[1], ncolors * 4); ncolors = 1; new_row ++; } else { // Copy standard XPM colormap values... for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) { - *new_row = new char[strlen(data[i + 1]) + 1]; - strcpy(*new_row, data[i + 1]); + *new_row = new char[strlen(data()[i + 1]) + 1]; + strcpy(*new_row, data()[i + 1]); } } // Copy image data... for (i = 0; i < h(); i ++, new_row ++) { *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... - data = new_data; + data(new_data, h() + ncolors + 1); alloc_data = 1; } Fl_Image *Fl_Pixmap::copy(int W, int H) { // 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 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 // 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; 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; new_row = new_data + 1; *new_row = new char[ncolors * 4]; - memcpy(*new_row, data[1], ncolors * 4); + memcpy(*new_row, data()[1], ncolors * 4); ncolors = 1; new_row ++; } else { // Copy standard XPM colormap values... for (i = 0, new_row = new_data + 1; i < ncolors; i ++, new_row ++) { - *new_row = new char[strlen(data[i + 1]) + 1]; - strcpy(*new_row, data[i + 1]); + *new_row = new char[strlen(data()[i + 1]) + 1]; + strcpy(*new_row, data()[i + 1]); } } // Copy image data... for (i = 0; i < h(); i ++, new_row ++) { *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... for (dy = h(), sy = 0, yerr = H / 2; dy > 0; dy --, new_row ++) { *new_row = new char[chars_per_line]; 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 --) { 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; return new_image; @@ -312,12 +313,12 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) { 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) { // Update FLTK colormap... ncolors = -ncolors; - uchar *cmap = (uchar *)(data[1]); + uchar *cmap = (uchar *)(data()[1]); for (color = 0; color < ncolors; color ++, cmap += 4) { cmap[1] = (ia * cmap[1] + ir) >> 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... for (color = 0; color < ncolors; color ++) { // 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; for (;;) { while (*p && isspace(*p)) p++; @@ -355,13 +356,13 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) { b = (ia * b + ib) >> 8; if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", - data[color + 1][0], - data[color + 1][1], r, g, b); - else sprintf(line, "%c c #%02X%02X%02X", data[color + 1][0], r, g, b); + data()[color + 1][0], + data()[color + 1][1], r, g, b); + else sprintf(line, "%c c #%02X%02X%02X", data()[color + 1][0], r, g, b); - delete[] (char *)data[color + 1]; - ((char **)data)[color + 1] = new char[strlen(line) + 1]; - strcpy((char *)data[color + 1], line); + delete[] (char *)data()[color + 1]; + ((char **)data())[color + 1] = new char[strlen(line) + 1]; + 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() { if (alloc_data) { - for (int i = 0; data[i]; i ++) delete[] (char *)data[i]; - delete[] (char **)data; + for (int i = 0; i < count(); i ++) delete[] (char *)data()[i]; + 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() { // Delete any existing pixmap/mask objects... if (id) { @@ -396,12 +409,12 @@ void Fl_Pixmap::desaturate() { chars_per_pixel;// Characters per color 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) { // Update FLTK colormap... ncolors = -ncolors; - uchar *cmap = (uchar *)(data[1]); + uchar *cmap = (uchar *)(data()[1]); for (i = 0; i < ncolors; i ++, cmap += 4) { g = (cmap[1] * 31 + cmap[2] * 61 + cmap[3] * 8) / 100; cmap[1] = cmap[2] = cmap[3] = g; @@ -410,7 +423,7 @@ void Fl_Pixmap::desaturate() { // Update standard XPM colormap... for (i = 0; i < ncolors; i ++) { // 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; for (;;) { while (*p && isspace(*p)) p++; @@ -435,18 +448,18 @@ void Fl_Pixmap::desaturate() { 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], - data[i + 1][1], g, g, g); - else sprintf(line, "%c c #%02X%02X%02X", data[i + 1][0], g, g, g); + if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0], + data()[i + 1][1], g, g, g); + else sprintf(line, "%c c #%02X%02X%02X", data()[i + 1][0], g, g, g); - delete[] (char *)data[i + 1]; - ((char **)data)[i + 1] = new char[strlen(line) + 1]; - strcpy((char *)data[i + 1], line); + delete[] (char *)data()[i + 1]; + ((char **)data())[i + 1] = new char[strlen(line) + 1]; + 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 $". // diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx index 65ea6e437..8f5ee3d92 100644 --- a/src/Fl_Tile.cxx +++ b/src/Fl_Tile.cxx @@ -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). // @@ -167,7 +167,7 @@ int Fl_Tile::handle(int event) { break; 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 case FL_RELEASE: { 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 $". // diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx index 18f34b52f..39036e08d 100644 --- a/src/Fl_Widget.cxx +++ b/src/Fl_Widget.cxx @@ -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). // @@ -124,7 +124,7 @@ int Fl_Widget::take_focus() { 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 // 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 $". // diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 97e2feb12..6fc5b2f44 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -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). // @@ -25,8 +25,8 @@ // The Fl_Window is a window in the fltk library. // 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 -// equivalent (but totally different) crap for MSWindows is in Fl_win32.C +// 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.cxx #include <FL/Fl.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 $". // diff --git a/src/Fl_Window_iconize.cxx b/src/Fl_Window_iconize.cxx index 7c33294df..5019bf36b 100644 --- a/src/Fl_Window_iconize.cxx +++ b/src/Fl_Window_iconize.cxx @@ -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). // @@ -25,7 +25,7 @@ #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() { 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 $". // diff --git a/src/Fl_abort.cxx b/src/Fl_abort.cxx index 8e0a4f112..94b8560f6 100644 --- a/src/Fl_abort.cxx +++ b/src/Fl_abort.cxx @@ -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). // @@ -24,7 +24,7 @@ // // 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. #include <FL/Fl.H> @@ -89,5 +89,5 @@ void (*Fl::error)(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 $". // diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx index 5516f8c5b..b4fe0b0d4 100644 --- a/src/Fl_arg.cxx +++ b/src/Fl_arg.cxx @@ -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). // @@ -53,7 +53,7 @@ static int match(const char *a, const char *match, int atleast = 1) { } // 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 return_i; static const char *name; @@ -365,5 +365,5 @@ int XParseGeometry(const char* string, int* x, int* y, #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 $". // diff --git a/src/Fl_cutpaste.cxx b/src/Fl_cutpaste.cxx index 55ab483ba..39bac69fd 100644 --- a/src/Fl_cutpaste.cxx +++ b/src/Fl_cutpaste.cxx @@ -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). // @@ -25,7 +25,7 @@ // 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 // 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 // -// 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 $". // diff --git a/src/Fl_cutpaste_win32.cxx b/src/Fl_cutpaste_win32.cxx index bf35031bb..bf400aad6 100644 --- a/src/Fl_cutpaste_win32.cxx +++ b/src/Fl_cutpaste_win32.cxx @@ -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). // @@ -25,7 +25,7 @@ // 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 // 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 $". // diff --git a/src/Fl_get_key.cxx b/src/Fl_get_key.cxx index 2fb0dd45d..0a10fd6a3 100644 --- a/src/Fl_get_key.cxx +++ b/src/Fl_get_key.cxx @@ -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). // @@ -29,12 +29,12 @@ // 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 -// 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/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) { if (k > FL_Button && k <= FL_Button+8) @@ -60,5 +60,5 @@ int Fl::get_key(int k) { #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 $". // diff --git a/src/Fl_get_key_win32.cxx b/src/Fl_get_key_win32.cxx index ec8d9fd51..b95ac0533 100755 --- a/src/Fl_get_key_win32.cxx +++ b/src/Fl_get_key_win32.cxx @@ -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). // @@ -31,7 +31,7 @@ #include <FL/win32.H> // 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: 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 $". // diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx index b96b0f9df..0f2f82185 100644 --- a/src/Fl_grab.cxx +++ b/src/Fl_grab.cxx @@ -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). // @@ -30,7 +30,7 @@ //////////////////////////////////////////////////////////////// // "Grab" is done while menu systems are up. This has several effects: // 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. // This also modifies how Fl_Window::show() works, on X it turns on // 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 $". // diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 800374362..9c08b3e7f 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -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). // @@ -24,7 +24,7 @@ // // 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. #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: -// 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: static const struct {unsigned short vk, fltk, extended;} vktab[] = { {VK_BACK, FL_BackSpace}, @@ -425,7 +425,7 @@ static int ms2fltk(int vk, int extended) { } #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 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() // 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* // faster by using X's background pixel erasing. We can make it // 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 // I use FL_GRAY for this and only do this cheat for windows that are // 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 $". // diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 9d86fc019..bb0010f8b 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -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). // @@ -543,7 +543,7 @@ int fl_handle(const XEvent& xevent) if (keysym >= 0xff91 && keysym <= 0xff9f) { // Try to make them turn into FL_KP+'c' so that NumLock is // 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: unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1); 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* // faster by using X's background pixel erasing. We can make it // 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 // is resized while a save-behind window is atop it. The previous @@ -936,5 +936,5 @@ void Fl_Window::make_current() { #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 $". // diff --git a/src/cmap.cxx b/src/cmap.cxx index 0c635f504..8c196d0f5 100644 --- a/src/cmap.cxx +++ b/src/cmap.cxx @@ -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). // @@ -109,7 +109,7 @@ static short cmap[256][3] = { // 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_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 $". // diff --git a/src/fl_arc.cxx b/src/fl_arc.cxx index 56a2b51d2..56c43a684 100644 --- a/src/fl_arc.cxx +++ b/src/fl_arc.cxx @@ -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). // @@ -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)); } -#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) { _fl_arc(x, y, r, r, 0, 360); } #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 $". // diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index 55bc9d472..da8794d59 100644 --- a/src/fl_boxtype.cxx +++ b/src/fl_boxtype.cxx @@ -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). // @@ -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); } -//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 { 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 $". // diff --git a/src/fl_color.cxx b/src/fl_color.cxx index 0915159ed..a64d7a93a 100644 --- a/src/fl_color.cxx +++ b/src/fl_color.cxx @@ -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). // @@ -90,7 +90,7 @@ static void figure_out_visual() { } 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 @@ -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 $". // diff --git a/src/fl_draw_image.cxx b/src/fl_draw_image.cxx index 0fb4c96ad..15102f52c 100644 --- a/src/fl_draw_image.cxx +++ b/src/fl_draw_image.cxx @@ -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). // @@ -347,7 +347,7 @@ mono32_converter(const uchar *from,uchar *to,int w, int delta) { 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 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 // -// 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 $". // diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index 853078d69..3e3b2b64d 100644 --- a/src/fl_draw_pixmap.cxx +++ b/src/fl_draw_pixmap.cxx @@ -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). // @@ -132,7 +132,7 @@ static void cb2(void*v, int x, int y, int w, uchar* buf) { #endif #ifdef WIN32 -// this is in Fl_arg.C: +// this is in Fl_arg.cxx: extern int fl_parse_color(const char*, uchar&, uchar&, uchar&); #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 $". // diff --git a/src/fl_overlay_visual.cxx b/src/fl_overlay_visual.cxx index 8d3538a0c..ddb6dd463 100644 --- a/src/fl_overlay_visual.cxx +++ b/src/fl_overlay_visual.cxx @@ -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). // @@ -26,7 +26,7 @@ // Return an overlay visual, if any. Also allocate a colormap and // record the depth for fl_color() to use. // 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> #if HAVE_OVERLAY @@ -99,5 +99,5 @@ XVisualInfo *fl_find_overlay_visual() { #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 $". // diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index 8b05a3cc7..0181b3c2a 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -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). // @@ -247,7 +247,7 @@ void fl_point(int x, int y) { #define STACK_MAX (STACK_SIZE - 1) static Region rstack[STACK_SIZE]; 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 // 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 $". // diff --git a/src/fl_set_font.cxx b/src/fl_set_font.cxx index 5bb63969a..6d0e93da5 100644 --- a/src/fl_set_font.cxx +++ b/src/fl_set_font.cxx @@ -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). // @@ -24,7 +24,7 @@ // // 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 <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;} // -// 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 $". // diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index fae99d4d8..c2f65aed1 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -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). // @@ -24,7 +24,7 @@ // // 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/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 $". // diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index 2b0348c60..3532b7d2b 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -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). // @@ -24,7 +24,7 @@ // // 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> #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 // -// 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 $". // diff --git a/src/gl_start.cxx b/src/gl_start.cxx index f0274eaf4..6135c5740 100644 --- a/src/gl_start.cxx +++ b/src/gl_start.cxx @@ -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). // @@ -44,7 +44,7 @@ #include <FL/fl_draw.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 int clip_state_number=-1; @@ -54,7 +54,7 @@ static int pw, ph; static Fl_Gl_Choice* gl_choice; #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() { if (!context) { @@ -113,5 +113,5 @@ int Fl::gl_visual(int mode, int *alist) { #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 $". // |
