Author: matt
Date: 2012-06-01 01:26:19 -0700 (Fri, 01 Jun 2012)
New Revision: 9565
Log:
fltk3::NO_BOX is now NULL for compatibility. This solves a lot of issues 
(generating a few manageable new ones ;-)

Modified:
   branches/branch-3.0/fluid/Fl_Widget_Type.cxx
   branches/branch-3.0/src/fltk3/Box.cxx
   branches/branch-3.0/src/fltk3/Button.cxx
   branches/branch-3.0/src/fltk3/boxtype.cxx

Modified: branches/branch-3.0/fluid/Fl_Widget_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Widget_Type.cxx        2012-06-01 06:51:18 UTC 
(rev 9564)
+++ branches/branch-3.0/fluid/Fl_Widget_Type.cxx        2012-06-01 08:26:19 UTC 
(rev 9565)
@@ -2525,7 +2525,7 @@
   } else if (!strcmp(c,"box")) {
     const char* value = read_word();
     if ((bx = boxptr(value))) {
-      if (bx == ZERO_BOX) bx = 0L;
+      if (bx == ZERO_BOX) bx = fltk3::NO_BOX;
       o->box(bx);
     }
   } else if (is_button() && !strcmp(c,"down_box")) {

Modified: branches/branch-3.0/src/fltk3/Box.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Box.cxx       2012-06-01 06:51:18 UTC (rev 
9564)
+++ branches/branch-3.0/src/fltk3/Box.cxx       2012-06-01 08:26:19 UTC (rev 
9565)
@@ -77,7 +77,7 @@
 /*!
  Draws an empty rectangle (a.k.a. nothing).
  */
-fltk3::Box* const fltk3::NO_BOX = &noBox;
+fltk3::Box* const fltk3::NO_BOX = 0L;
 
 
 
//------------------------------------------------------------------------------

Modified: branches/branch-3.0/src/fltk3/Button.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Button.cxx    2012-06-01 06:51:18 UTC (rev 
9564)
+++ branches/branch-3.0/src/fltk3/Button.cxx    2012-06-01 08:26:19 UTC (rev 
9565)
@@ -89,7 +89,7 @@
   } else {
     col = color();
   }
-  draw_box(value() ? ( (down_box()!=fltk3::NO_BOX)? 
down_box():fltk3::down(box()) ) : box(), col);
+  draw_box(value() ? ( down_box()? down_box():fltk3::down(box()) ) : box(), 
col);
   draw_backdrop();
   if (labeltype() == fltk3::NORMAL_LABEL && value()) {
     fltk3::Color c = labelcolor();

Modified: branches/branch-3.0/src/fltk3/boxtype.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/boxtype.cxx   2012-06-01 06:51:18 UTC (rev 
9564)
+++ branches/branch-3.0/src/fltk3/boxtype.cxx   2012-06-01 08:26:19 UTC (rev 
9565)
@@ -364,7 +364,7 @@
   Returns the X offset for the given boxtype.
   \see box_dy()
 */
-int fltk3::box_dx(fltk3::Box* t) {return t->dx();}
+int fltk3::box_dx(fltk3::Box* t) {return t?t->dx():0;}
 
 /**
     Returns the Y offset for the given boxtype.
@@ -389,19 +389,19 @@
     for deriving custom widgets, where one wants to avoid drawing 
     over the widget's own border box().
 */
-int fltk3::box_dy(fltk3::Box* t) {return t->dy();}
+int fltk3::box_dy(fltk3::Box* t) {return t?t->dy():0;}
 
 /**
   Returns the width offset for the given boxtype.
   \see box_dy().
 */
-int fltk3::box_dw(fltk3::Box* t) {return t->dw();}
+int fltk3::box_dw(fltk3::Box* t) {return t?t->dw():0;}
 
 /**
   Returns the height offset for the given boxtype.
   \see box_dy().
 */
-int fltk3::box_dh(fltk3::Box* t) {return t->dh();}
+int fltk3::box_dh(fltk3::Box* t) {return t?t->dh():0;}
 
 /**
   Sets the drawing function for a given box type.

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to