Author: matt
Date: 2010-03-31 02:27:46 -0700 (Wed, 31 Mar 2010)
New Revision: 7377
Log:
Measily emulation of labeltype, boxtype and font for fltk2 emulation layer.

Modified:
   branches/branch-3.0/fltk/Style.h
   branches/branch-3.0/fltk/Widget.h
   branches/branch-3.0/test/hello2.cxx

Modified: branches/branch-3.0/fltk/Style.h
===================================================================
--- branches/branch-3.0/fltk/Style.h    2010-03-31 09:13:21 UTC (rev 7376)
+++ branches/branch-3.0/fltk/Style.h    2010-03-31 09:27:46 UTC (rev 7377)
@@ -26,6 +26,7 @@
 #ifndef fltk_Style_h
 #define fltk_Style_h
 
+#include <fltk3/Enumerations.H>
 #include "Color.h"
 
 namespace fltk {
@@ -38,6 +39,9 @@
 class FL_API Symbol;
 typedef Symbol Box;
 
+/*
+ The values below are currently emulated. In a future version of FLTK3, we 
+ really should port the FLTK2 way of handling boxtypes to FLTK3.
 extern FL_API Box* const UP_BOX;
 extern FL_API Box* const DOWN_BOX;
 extern FL_API Box* const THIN_UP_BOX;
@@ -63,8 +67,13 @@
 extern FL_API Box* const BORDER_FRAME;
 extern FL_API Box* const PLASTIC_UP_BOX;
 extern FL_API Box* const PLASTIC_DOWN_BOX;
-
+*/
+const enum Fl_Boxtype UP_BOX = FL_UP_BOX;
+  
 struct Font;
+/*
+The values below are currently emulated. In a future version of FLTK3, we 
+really should port the FLTK2 way of handling fonts to FLTK3.
 extern FL_API Font* const HELVETICA;
 extern FL_API Font* const HELVETICA_BOLD;
 extern FL_API Font* const HELVETICA_ITALIC;
@@ -81,14 +90,21 @@
 extern FL_API Font* const SCREEN_FONT;
 extern FL_API Font* const SCREEN_BOLD_FONT;
 extern FL_API Font* const ZAPF_DINGBATS;
+*/
+const Fl_Font HELVETICA_BOLD_ITALIC = FL_HELVETICA_BOLD_ITALIC;
 
 class LabelType;
+/*
+ The values below are currently emulated. In a future version of FLTK3, we 
+ really should port the FLTK2 way of handling labeltypes to FLTK3.
 extern FL_API LabelType* const NO_LABEL;
 extern FL_API LabelType* const NORMAL_LABEL;
 extern FL_API LabelType* const SYMBOL_LABEL; // same as NORMAL_LABEL
 extern FL_API LabelType* const SHADOW_LABEL;
 extern FL_API LabelType* const ENGRAVED_LABEL;
 extern FL_API LabelType* const EMBOSSED_LABEL;
+ */
+const enum Fl_Labeltype SHADOW_LABEL = FL_SHADOW_LABEL;
 
 class Style;
 

Modified: branches/branch-3.0/fltk/Widget.h
===================================================================
--- branches/branch-3.0/fltk/Widget.h   2010-03-31 09:13:21 UTC (rev 7376)
+++ branches/branch-3.0/fltk/Widget.h   2010-03-31 09:27:46 UTC (rev 7377)
@@ -230,20 +230,23 @@
   unsigned char scrollbar_width() const;
 #endif
   
-  void box(Box*)               ;
+  // Port to 3: void box(Box*)         ;
+  void box(Fl_Boxtype b) { _p->box(b); }
   
 #if 0
   void buttonbox(Box*)         ;
   void glyph(Symbol*)          ;
 #endif
   
-  void labelfont(Font*)                ;
+  // Port to 3: void labelfont(Font*)          ;
+  void labelfont(Fl_Font f) { _p->labelfont(f); }
   
 #if 0
   void textfont(Font*)         ;
 #endif
   
-  void labeltype(LabelType*)   ;
+  // Port to 3: void labeltype(LabelType*)     ;
+  void labeltype(Fl_Labeltype t) { _p->labeltype(t); }
   
 #if 0
   void color(Color)            ;

Modified: branches/branch-3.0/test/hello2.cxx
===================================================================
--- branches/branch-3.0/test/hello2.cxx 2010-03-31 09:13:21 UTC (rev 7376)
+++ branches/branch-3.0/test/hello2.cxx 2010-03-31 09:27:46 UTC (rev 7377)
@@ -35,10 +35,10 @@
   Window *window = new Window(300, 180);
   window->begin();
   Widget *box = new Widget(20, 40, 260, 100, "Hello, World!");
-  //box->box(UP_BOX);
-  //box->labelfont(HELVETICA_BOLD_ITALIC);
+  box->box(UP_BOX);
+  box->labelfont(HELVETICA_BOLD_ITALIC);
   box->labelsize(36);
-  //box->labeltype(SHADOW_LABEL);
+  box->labeltype(SHADOW_LABEL);
   window->end();
   window->show(argc, argv);
   return run();

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

Reply via email to