From 35308e5c22569135c877d5b1a204ac169b73d70c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 30 Jul 2002 14:57:02 +0000 Subject: Added Fl::get_boxtype() method. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 4 ++++ FL/Fl.H | 5 +++-- documentation/Fl.html | 6 ++++++ src/fl_boxtype.cxx | 10 +++++++--- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index b782f8db9..6b5d66b2c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ CHANGES IN FLTK 1.1.0 - Documentation updates. + - "make install" didn't automatically (re)compile the + FLUID executable. + - Added an Fl::get_boxtype() method to get the current + drawing function for a specific box type. - Fl_Output and Fl_Multiline_Output didn't prevent middle-mouse pastes. - Fl_JPEG_Image didn't compile out-of-the-box with Cygwin diff --git a/FL/Fl.H b/FL/Fl.H index 3e3cdcb46..26ae6f4f4 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -1,5 +1,5 @@ // -// "$Id: Fl.H,v 1.8.2.11.2.18 2002/07/17 06:09:25 matthiaswm Exp $" +// "$Id: Fl.H,v 1.8.2.11.2.19 2002/07/30 14:57:02 easysw Exp $" // // Main header file for the Fast Light Tool Kit (FLTK). // @@ -215,6 +215,7 @@ public: static void set_labeltype(Fl_Labeltype, Fl_Labeltype from); // boxtypes: + static Fl_Box_Draw_F *get_boxtype(Fl_Boxtype); static void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar); static void set_boxtype(Fl_Boxtype, Fl_Boxtype from); static int box_dx(Fl_Boxtype); @@ -257,5 +258,5 @@ public: #endif // !Fl_H // -// End of "$Id: Fl.H,v 1.8.2.11.2.18 2002/07/17 06:09:25 matthiaswm Exp $". +// End of "$Id: Fl.H,v 1.8.2.11.2.19 2002/07/30 14:57:02 easysw Exp $". // diff --git a/documentation/Fl.html b/documentation/Fl.html index e240c5f06..5123c5939 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -80,6 +80,7 @@ state information and global methods for the current application.

  • focus
  • foreground
  • free_color
  • +
  • get_boxtype
  • get_color
  • get_font
  • get_font_name
  • @@ -704,6 +705,11 @@ between this and FL_WHITE. If overlay is non-zero then the color is freed from the overlay colormap. +

    Fl_Box_Draw_F *get_boxtype(Fl_Boxtype);

    + +

    Gets the current box drawing function for the specified box type. + +

    unsigned get_color(Fl_Color c);
    void get_color(Fl_Color c, uchar&r, uchar&g, uchar&b);

    diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index 60fcbda9a..1fca03fbb 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.8 2002/01/01 15:11:32 easysw Exp $" +// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.9 2002/07/30 14:57:02 easysw Exp $" // // Box drawing code for the Fast Light Tool Kit (FLTK). // @@ -190,7 +190,7 @@ static struct { Fl_Box_Draw_F *f; uchar dx, dy, dw, dh; int set; -} fl_box_table[] = { +} fl_box_table[256] = { // must match list in Enumerations.H!!! {fl_no_box, 0,0,0,0,1}, {fl_rectf, 0,0,0,0,1}, // FL_FLAT_BOX @@ -248,6 +248,10 @@ void fl_internal_boxtype(Fl_Boxtype t, Fl_Box_Draw_F* f) { } } +Fl_Box_Draw_F *Fl::get_boxtype(Fl_Boxtype t) { + return fl_box_table[t].f; +} + void Fl::set_boxtype(Fl_Boxtype t, Fl_Box_Draw_F* f, uchar a, uchar b, uchar c, uchar d) { fl_box_table[t].f = f; @@ -291,5 +295,5 @@ const { } // -// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.8 2002/01/01 15:11:32 easysw Exp $". +// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.9 2002/07/30 14:57:02 easysw Exp $". // -- cgit v1.2.3