diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_BMP_Image.cxx | 29 | ||||
| -rw-r--r-- | src/Fl_File_Chooser.cxx | 13 | ||||
| -rw-r--r-- | src/Fl_File_Chooser.fl | 17 | ||||
| -rw-r--r-- | src/Fl_Help_Dialog.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Help_Dialog.fl | 8 | ||||
| -rw-r--r-- | src/fl_ask.cxx | 18 |
6 files changed, 39 insertions, 48 deletions
diff --git a/src/Fl_BMP_Image.cxx b/src/Fl_BMP_Image.cxx index dc5e1f485..e10450a00 100644 --- a/src/Fl_BMP_Image.cxx +++ b/src/Fl_BMP_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_BMP_Image.cxx,v 1.1.2.9 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_BMP_Image.cxx,v 1.1.2.10 2002/08/30 16:58:16 easysw Exp $" // // Fl_BMP_Image routines. // @@ -239,24 +239,27 @@ Fl_BMP_Image::Fl_BMP_Image(const char *bmp) // I - File to read // Get a new color as needed... repcount --; - // Get the next color byte as needed... - if (color < 0) color = getc(fp); - // Extract the next pixel... if (bit == 0xf0) { - temp = (color >> 4) & 15; + // Get the next color byte as needed... + if (color < 0) temp = getc(fp); + else temp = color; + + // Copy the color value... + *ptr++ = colormap[(temp >> 4) & 15][2]; + *ptr++ = colormap[(temp >> 4) & 15][1]; + *ptr++ = colormap[(temp >> 4) & 15][0]; + bit = 0x0f; } else { - temp = color & 15; bit = 0xf0; - } -// printf("temp = %d\n", temp); + // Copy the color value... + *ptr++ = colormap[temp & 15][2]; + *ptr++ = colormap[temp & 15][1]; + *ptr++ = colormap[temp & 15][0]; + } - // Copy the color value... - *ptr++ = colormap[temp][2]; - *ptr++ = colormap[temp][1]; - *ptr++ = colormap[temp][0]; } if (!compression) { @@ -393,5 +396,5 @@ read_long(FILE *fp) { // I - File to read from // -// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.9 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_BMP_Image.cxx,v 1.1.2.10 2002/08/30 16:58:16 easysw Exp $". // diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx index 8ca8c9e21..927b1281d 100644 --- a/src/Fl_File_Chooser.cxx +++ b/src/Fl_File_Chooser.cxx @@ -173,7 +173,7 @@ Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char } { Fl_Group* o = new Fl_Group(0, 275, 480, 95); { Fl_Group* o = new Fl_Group(10, 275, 470, 20); - { Fl_Check_Button* o = previewButton = new Fl_Check_Button(405, 275, 75, 20, "Preview"); + { Fl_Check_Button* o = previewButton = new Fl_Check_Button(10, 275, 170, 20, "Preview"); o->down_box(FL_DOWN_BOX); o->value(1); o->shortcut(0x80070); @@ -246,16 +246,7 @@ Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char } callback_ = 0; data_ = 0; -directory_[0] = '\0'; -window->size_range(window->w(), window->h(), Fl::w(), Fl::h()); -type(t); -filter(p); -update_favorites(); -value(d); -type(t); -int e; -prefs_.get("preview", e, 1); -preview(e); +directory_[0] = ' } Fl_File_Chooser::~Fl_File_Chooser() { diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl index 4211ebb3a..fc52325d1 100644 --- a/src/Fl_File_Chooser.fl +++ b/src/Fl_File_Chooser.fl @@ -52,7 +52,7 @@ window->hide();} open code0 {favoritesButton->label(favorites_label);} } {} Fl_Button newButton { - callback {newdir();} selected + callback {newdir();} tooltip {Create a new directory.} image {new.xbm} xywh {455 10 25 25} labelsize 8 code0 {\#include <FL/Fl_Preferences.H>} } @@ -79,8 +79,8 @@ window->hide();} open } { Fl_Check_Button previewButton { label Preview - callback {preview(previewButton->value());} - xywh {405 275 75 20} down_box DOWN_BOX shortcut 0x80070 value 1 + callback {preview(previewButton->value());} selected + xywh {10 275 170 20} down_box DOWN_BOX shortcut 0x80070 value 1 code0 {previewButton->label(preview_label);} } Fl_Box {} { @@ -166,16 +166,7 @@ window->hide();} } code {callback_ = 0; data_ = 0; -directory_[0] = '\0'; -window->size_range(window->w(), window->h(), Fl::w(), Fl::h()); -type(t); -filter(p); -update_favorites(); -value(d); -type(t); -int e; -prefs_.get("preview", e, 1); -preview(e);} {} +directory_[0] = '} {} } Function {~Fl_File_Chooser()} {open } { diff --git a/src/Fl_Help_Dialog.cxx b/src/Fl_Help_Dialog.cxx index 2d1645555..b2e9844c2 100644 --- a/src/Fl_Help_Dialog.cxx +++ b/src/Fl_Help_Dialog.cxx @@ -2,6 +2,7 @@ #include "../FL/Fl_Help_Dialog.H" #include "flstring.h" +#include <FL/fl_ask.H> inline void Fl_Help_Dialog::cb_view__i(Fl_Help_View*, void*) { if (view_->changed()) @@ -118,6 +119,7 @@ Fl_Help_Dialog::Fl_Help_Dialog() { } { Fl_Button* o = new Fl_Button(425, 350, 95, 25, "Close"); o->callback((Fl_Callback*)cb_Close); + o->label(fl_close); } { Fl_Button* o = back_ = new Fl_Button(365, 350, 25, 25, "@<-"); o->tooltip("Show the previous help page."); diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl index 99b676eef..e948ed08e 100644 --- a/src/Fl_Help_Dialog.fl +++ b/src/Fl_Help_Dialog.fl @@ -2,7 +2,9 @@ version 1.0100 header_name {../FL/Fl_Help_Dialog.H} code_name {.cxx} -decl {\#include "flstring.h"} {selected +decl {\#include "flstring.h"} {} + +decl {\#include <FL/fl_ask.H>} {selected } class Fl_Help_Dialog {open @@ -15,8 +17,7 @@ class Fl_Help_Dialog {open } { Fl_Window window_ { label {Help Dialog} open - private xywh {470 380 530 385} type Double resizable - visible + private xywh {470 380 530 385} type Double resizable visible } { Fl_Group view_ { callback {if (view_->changed()) @@ -56,6 +57,7 @@ else if (view_->filename()) label Close callback {window_->hide();} xywh {425 350 95 25} + code0 {o->label(fl_close);} } Fl_Button back_ { label {@<-} diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index 87e8b1427..f3c25dbfa 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_ask.cxx,v 1.8.2.8.2.9 2002/06/06 14:22:05 easysw Exp $" +// "$Id: fl_ask.cxx,v 1.8.2.8.2.10 2002/08/30 16:58:16 easysw Exp $" // // Standard dialog functions for the Fast Light Tool Kit (FLTK). // @@ -72,7 +72,8 @@ static Fl_Window *makeform() { o->color(FL_WHITE); o->labelcolor(FL_BLUE); } - (button[0] = new Fl_Button(310, 70, 90, 23))->shortcut("^["); + button[0] = new Fl_Button(310, 70, 90, 23); + button[0]->shortcut("^["); button[0]->align(FL_ALIGN_INSIDE|FL_ALIGN_WRAP); button[1] = new Fl_Return_Button(210, 70, 90, 23); button[1]->align(FL_ALIGN_INSIDE|FL_ALIGN_WRAP); @@ -149,11 +150,15 @@ void resizeform() { icon->labelsize(icon_size - 10); input->resize(20 + icon_size, 10 + message_h, message_w, 25); - for (x = w, i = 2; i >= 0; i --) + for (x = w, i = 0; i < 3; i ++) if (button_w[i]) { x -= button_w[i]; button[i]->resize(x, h - 10 - max_h, button_w[i] - 10, max_h); + +// printf("button %d (%s) is %dx%d+%d,%d\n", i, button[i]->label(), +// button[i]->w(), button[i]->h(), +// button[i]->x(), button[i]->y()); } } @@ -206,6 +211,7 @@ const char* fl_no = "No"; const char* fl_yes= "Yes"; const char* fl_ok = "OK"; const char* fl_cancel= "Cancel"; +const char* fl_close= "Close"; // fltk functions: void fl_beep(int type) { @@ -311,10 +317,6 @@ static const char* input_innards(const char* fmt, va_list ap, input->show(); input->value(defstr); -#ifdef WIN32 - MessageBeep(MB_ICONQUESTION); -#endif // WIN32 - int r = innards(fmt, ap, fl_cancel, fl_ok, 0); input->hide(); message->position(60,25); @@ -342,5 +344,5 @@ const char *fl_password(const char *fmt, const char *defstr, ...) { } // -// End of "$Id: fl_ask.cxx,v 1.8.2.8.2.9 2002/06/06 14:22:05 easysw Exp $". +// End of "$Id: fl_ask.cxx,v 1.8.2.8.2.10 2002/08/30 16:58:16 easysw Exp $". // |
