Author: matt
Date: 2011-06-03 14:49:28 -0700 (Fri, 03 Jun 2011)
New Revision: 8779
Log:
123: a few more files... . Fl_Menu_Item is a beast that will be very hard to 
wrap (and probably remain in FLTK3 only for compatibility).

Modified:
   branches/branch-3.0/FL/Fl_Browser.H
   branches/branch-3.0/FL/Fl_Browser_.H
   branches/branch-3.0/FL/Fl_Chart.H
   branches/branch-3.0/FL/Fl_Check_Browser.H
   branches/branch-3.0/FL/Fl_Check_Button.H
   branches/branch-3.0/FL/Fl_Choice.H
   branches/branch-3.0/FL/Fl_Clock.H

Modified: branches/branch-3.0/FL/Fl_Browser.H
===================================================================
--- branches/branch-3.0/FL/Fl_Browser.H 2011-06-03 19:51:19 UTC (rev 8778)
+++ branches/branch-3.0/FL/Fl_Browser.H 2011-06-03 21:49:28 UTC (rev 8779)
@@ -3,6 +3,7 @@
 //
 // Browser header file for the Fast Light Tool Kit (FLTK).
 // FLTK 123 wrapper started
+//  - protected virtual functions missing
 //
 // Copyright 1998-2011 by Bill Spitzak and others.
 //
@@ -63,47 +64,162 @@
 
 public:
 
-  void remove(int line);
-  void add(const char* newtext, void* d = 0);
-  void insert(int line, const char* newtext, void* d = 0);
-  void move(int to, int from);
-  int  load(const char* filename);
-  void swap(int a, int b);
-  void clear();
-  int size() const { return lines; }
-  void size(int W, int H) { Fl_Widget::size(W, H); }
-  int topline() const ;
+  void remove(int line) {
+    ((fltk3::Browser*)_p)->remove(line);
+  }
+  
+  void add(const char* newtext, void* d = 0) {
+    ((fltk3::Browser*)_p)->add(newtext, d);
+  }
+  
+  void insert(int line, const char* newtext, void* d = 0) {
+    ((fltk3::Browser*)_p)->insert(line, newtext, d);
+  }
+  
+  void move(int to, int from) {
+    ((fltk3::Browser*)_p)->move(to, from);
+  }
+  
+  int  load(const char* filename) {
+    ((fltk3::Browser*)_p)->load(filename);
+  }
+  
+  void swap(int a, int b) {
+    ((fltk3::Browser*)_p)->swap(a, b);
+  }
+  
+  void clear() {
+    ((fltk3::Browser*)_p)->clear();
+  }
+  
+  int size() const { 
+    return ((fltk3::Browser*)_p)->size();
+  }
+
+  void size(int W, int H) { 
+    ((fltk3::Browser*)_p)->size(W, H);
+  }
+  
+  int topline() const {
+    return ((fltk3::Browser*)_p)->topline();
+  }
+  
   enum Fl_Line_Position { TOP, BOTTOM, MIDDLE };
-  void lineposition(int line, Fl_Line_Position pos);
-  void topline(int line) { lineposition(line, TOP); }
-  void bottomline(int line) { lineposition(line, BOTTOM); }
-  void middleline(int line) { lineposition(line, MIDDLE); }
-  int select(int line, int val=1);
-  int selected(int line) const ;
-  void show(int line);
-  void show() { Fl_Widget::show(); }
-  void hide(int line);
-  void hide() { Fl_Widget::hide(); }
-  int visible(int line) const ;
-  int value() const ;
-  void value(int line) { select(line); }
-  const char* text(int line) const ;
-  void text(int line, const char* newtext);
-  void* data(int line) const ;
-  void data(int line, void* d);
-  Fl_Browser(int X, int Y, int W, int H, const char *L = 0);
-  ~Fl_Browser() { clear(); }
-  char format_char() const { return format_char_; }
-  void format_char(char c) { format_char_ = c; }
-  char column_char() const { return column_char_; }
-  void column_char(char c) { column_char_ = c; }
-  const int* column_widths() const { return column_widths_; }
-  void column_widths(const int* arr) { column_widths_ = arr; }
-  int displayed(int line) const { return 
Fl_Browser_::displayed(find_line(line)); }
-  void make_visible(int line) ;
-  void icon(int line, Fl_Image* icon);
-  Fl_Image* icon(int line) const;
-  void remove_icon(int line);
+  
+  void lineposition(int line, Fl_Line_Position pos) {
+    ((fltk3::Browser*)_p)->lineposition(line, pos);
+  }
+  
+  void topline(int line) { 
+    ((fltk3::Browser*)_p)->topline(line);
+  }
+  
+  void bottomline(int line) { 
+    ((fltk3::Browser*)_p)->bottomline(line);
+  }
+  
+  void middleline(int line) { 
+    ((fltk3::Browser*)_p)->middleline(line);
+  }
+  
+  int select(int line, int val=1) {
+    return ((fltk3::Browser*)_p)->select(line, val);
+  }
+  
+  int selected(int line) const {
+    return ((fltk3::Browser*)_p)->selected(line);
+  }
+  
+  void show(int line) {
+    ((fltk3::Browser*)_p)->show(line);
+  }
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Browser, show(), show(), Show)
+  
+  void hide(int line) {
+    ((fltk3::Browser*)_p)->hide(line);
+  }
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Browser, hide(), hide(), Hide)
+  
+  int visible(int line) const {
+    return ((fltk3::Browser*)_p)->visible(line);
+  }
+  
+  int value() const {
+    return ((fltk3::Browser*)_p)->value();
+  }
+  
+  void value(int line) { 
+    ((fltk3::Browser*)_p)->value(line);
+  }
+  
+  const char* text(int line) const {
+    return ((fltk3::Browser*)_p)->text(line);
+  }
+  
+  void text(int line, const char* newtext) {
+    ((fltk3::Browser*)_p)->text(line, newtext);
+  }
+  
+  void* data(int line) const {
+    return ((fltk3::Browser*)_p)->data(line);
+  }
+  
+  void data(int line, void* d) {
+    ((fltk3::Browser*)_p)->data(line, d);
+  }
+
+  Fl_Browser() { /* empty */ }
+  
+  Fl_Browser(int X, int Y, int W, int H, const char *L = 0) {
+    _p = new fltk3::Browser(x, y, w, h, label);
+    _p->wrapper(this);
+  }
+  
+  char format_char() const { 
+    return ((fltk3::Browser*)_p)->format_char();
+  }
+  
+  void format_char(char c) { 
+    ((fltk3::Browser*)_p)->format_char(c);
+  }
+  
+  char column_char() const { 
+    return ((fltk3::Browser*)_p)->column_char();
+  }
+  
+  void column_char(char c) { 
+    ((fltk3::Browser*)_p)->column_char(c);
+  }
+  
+  const int* column_widths() const { 
+    return ((fltk3::Browser*)_p)->column_widths();
+  }
+  
+  void column_widths(const int* arr) {
+    ((fltk3::Browser*)_p)->column_widths(arr);
+  }
+  
+  int displayed(int line) const { 
+    return ((fltk3::Browser*)_p)->displayed(line);
+  }
+  
+  void make_visible(int line) {
+    ((fltk3::Browser*)_p)->make_visible(line);
+  }
+  
+  void icon(int line, Fl_Image* icon) {
+    ((fltk3::Browser*)_p)->icon( line, fltk3::_1to3_image(icon) );
+  }
+  
+  Fl_Image* icon(int line) const {
+    return fltk3::_3to1_image( ((fltk3::Browser*)_p)->icon(line) );
+  }
+  
+  void remove_icon(int line) {
+    ((fltk3::Browser*)_p)->remove_icon(line);
+  }
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_Browser_.H
===================================================================
--- branches/branch-3.0/FL/Fl_Browser_.H        2011-06-03 19:51:19 UTC (rev 
8778)
+++ branches/branch-3.0/FL/Fl_Browser_.H        2011-06-03 21:49:28 UTC (rev 
8779)
@@ -29,6 +29,7 @@
 #ifndef Fl_Browser__H
 #define Fl_Browser__H
 
+#include <fltk3/Browser_.h>
 #include "Fl_Group.H"
 #include "Fl_Scrollbar.H"
 #include "Fl.H"
@@ -45,6 +46,7 @@
 
 protected:
 
+  // FIXME: 123 virtual methods
   virtual void *item_first() const = 0;
   virtual void *item_next(void *item) const = 0;
   virtual void *item_prev(void *item) const = 0;
@@ -61,61 +63,179 @@
   virtual int incr_height() const ;    // average height of an item
   virtual void item_select(void *item,int val=1);
   virtual int item_selected(void *item) const ;
-  void *top() const { return top_; }
-  void *selection() const { return selection_; }
-  void new_list(); // completely clobber all data, as though list replaced
-  void deleting(void *item); // get rid of any pointers to item
-  void replacing(void *a,void *b); // change a pointers to b
-  void swapping(void *a,void *b); // exchange pointers a and b
-  void inserting(void *a,void *b); // insert b near a
-  int displayed(void *item) const ; // true if this item is visible
-  void redraw_line(void *item); // minimal update, no change in size
-  void redraw_lines() { damage(FL_DAMAGE_SCROLL); } // redraw all of them
-  void bbox(int &X,int &Y,int &W,int &H) const;
-  int leftedge() const;        // x position after scrollbar & border
-  void *find_item(int ypos); // item under mouse
-  void draw();
-  Fl_Browser_(int X,int Y,int W,int H,const char *L=0);
+  
+  void *top() const {
+    return ((fltk3::Browser_*)_p)->top();
+  }
+  
+  void *selection() const { 
+    return ((fltk3::Browser_*)_p)->selection();
+  }
+  
+  void new_list() {
+    ((fltk3::Browser_*)_p)->new_list();
+  }
+  
+  void deleting(void *item) {
+    ((fltk3::Browser_*)_p)->deleting(item);
+  }
+  
+  void replacing(void *a,void *b) {
+    ((fltk3::Browser_*)_p)->replacing(a, b);
+  }
+  
+  void swapping(void *a,void *b) {
+    ((fltk3::Browser_*)_p)->swapping(a, b);
+  }
+  
+  void inserting(void *a,void *b) {
+    ((fltk3::Browser_*)_p)->inserting(a, b);
+  }
+  
+  int displayed(void *item) const {
+    return ((fltk3::Browser_*)_p)->displayed(item);
+  }
+  
+  void redraw_line(void *item) {
+    ((fltk3::Browser_*)_p)->redraw_line(item);
+  }
+  
+  void redraw_lines() { 
+    ((fltk3::Browser_*)_p)->redraw_lines();
+  }
+  
+  void bbox(int &X,int &Y,int &W,int &H) const {
+    ((fltk3::Browser_*)_p)->bbox(X, Y, W, H);
+  }
+  
+  int leftedge() const {
+    return ((fltk3::Browser_*)_p)->leftedge();
+  }
+  
+  void *find_item(int ypos) {
+    return ((fltk3::Browser_*)_p)->find_item(ypos);
+  }
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Browser_, draw(), draw(), Draw)
+  
+  Fl_Browser_() { /* empty */ }
+  
+  Fl_Browser_(int X,int Y,int W,int H,const char *L=0) {
+    _p = new fltk3::Browser(x, y, w, h, label);
+    _p->wrapper(this);
+  }
 
 public:
 
-  Fl_Scrollbar scrollbar;
-  Fl_Scrollbar hscrollbar;
+  // FIXME: 123 Fl_Scrollbar scrollbar;
+  
+  // FIXME: 123 Fl_Scrollbar hscrollbar;
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Browser_, resize(int x, int y, int w, int h), 
resize(x, y, w, h), Resize)
 
-  int handle(int event);
-  void resize(int X,int Y,int W,int H);
-  int select(void *item,int val=1,int docallbacks=0);
-  int select_only(void *item,int docallbacks=0);
-  int deselect(int docallbacks=0);
-  int position() const { return position_; }
-  void position(int pos); // scroll to here
-  int hposition() const { return hposition_; }
-  void hposition(int); // pan to here
-  void display(void *item); // scroll so this item is shown
-  enum { // values for has_scrollbar()
-    HORIZONTAL = 1,            ///< Only show horizontal scrollbar.
-    VERTICAL = 2,              ///< Only show vertical scrollbar.
-    BOTH = 3,                  ///< Show both scrollbars. (default)
-    ALWAYS_ON = 4,             ///< Specified scrollbar(s) should 'always' be 
shown (to be used with HORIZONTAL/VERTICAL)
-    HORIZONTAL_ALWAYS = 5,     ///< Horizontal scrollbar always on.
-    VERTICAL_ALWAYS = 6,       ///< Vertical scrollbar always on.
-    BOTH_ALWAYS = 7            ///< Both scrollbars always on.
+  FLTK3_WRAPPER_VCALLS_OBJECT_INT(Browser_, handle(int event), handle(event), 
Handle)
+
+  int select(void *item,int val=1,int docallbacks=0) {
+    return ((fltk3::Browser_*)_p)->select(item, val, docallbacks);
+  }
+  
+  int select_only(void *item,int docallbacks=0) {
+    return ((fltk3::Browser_*)_p)->select_only(item, docallbacks);
+  }
+  
+  int deselect(int docallbacks=0) {
+    return ((fltk3::Browser_*)_p)->deselect(docallbacks);
+  }
+  
+  int position() const {
+    return ((fltk3::Browser_*)_p)->position();
+  }
+  
+  void position(int pos) {
+    ((fltk3::Browser_*)_p)->position(pos);
+  }
+  
+  int hposition() const { 
+    return ((fltk3::Browser_*)_p)->hposition();
+  }
+  
+  void hposition(int p) {
+    ((fltk3::Browser_*)_p)->hposition(p);
+  }
+  
+  void display(void *item) {
+    ((fltk3::Browser_*)_p)->display(item);
+  }
+  
+  enum {
+    HORIZONTAL = 1,
+    VERTICAL = 2,
+    BOTH = 3,
+    ALWAYS_ON = 4,
+    HORIZONTAL_ALWAYS = 5,
+    VERTICAL_ALWAYS = 6,
+    BOTH_ALWAYS = 7
   };
-  uchar has_scrollbar() const { return has_scrollbar_; }
-  void has_scrollbar(uchar mode) { has_scrollbar_ = mode; }
-  Fl_Font textfont() const { return textfont_; }
-  void textfont(Fl_Font font) { textfont_ = font; }
-  Fl_Fontsize textsize() const { return textsize_; }
-  void textsize(Fl_Fontsize size) { textsize_ = size; }
-  Fl_Color textcolor() const { return textcolor_; }
-  void textcolor(Fl_Color col) { textcolor_ = col; }
-  int scrollbar_size() const;
-  void scrollbar_size(int size);
-  int scrollbar_width() const;
-  void scrollbar_width(int width);
-  void scrollbar_right() { scrollbar.align(FL_ALIGN_RIGHT); }
-  void scrollbar_left() { scrollbar.align(FL_ALIGN_LEFT); }
-  void sort(int flags=0);
+  
+  uchar has_scrollbar() const { 
+    return ((fltk3::Browser_*)_p)->has_scrollbar();
+  }
+  
+  void has_scrollbar(uchar mode) {
+    ((fltk3::Browser_*)_p)->has_scrollbar(mode);
+  }
+  
+  Fl_Font textfont() const { 
+    return fltk3::_3to1_font( ((fltk3::Browser_*)_p)->textfont() ); 
+  }
+                             
+  void textfont(Fl_Font font) { 
+    ((fltk3::Browser_*)_p)->font( fltk3::_1to3_font(font) );
+  }
+  
+  Fl_Fontsize textsize() const { 
+    return fltk3::_3to1_fontsize( ((fltk3::Browser_*)_p)->textsize() );
+  }
+  
+  void textsize(Fl_Fontsize size) {
+    ((fltk3::Browser_*)_p)->textsize( fltk3::_1to3_fontsize(size); )
+  }
+  
+  Fl_Color textcolor() const { 
+    return fltk3::_3to1_color( ((fltk3::Browser_*)_p)->textcolor() );
+  }
+  
+  void textcolor(Fl_Color col) { 
+    ((fltk3::Browser_*)_p)->textcolor( fltk3::_1to3_color(col) );
+  }
+  
+  int scrollbar_size() const {
+    return ((fltk3::Browser_*)_p)->scrollbar_size();
+  }
+  
+  void scrollbar_size(int size) {
+    ((fltk3::Browser_*)_p)->scrollbar_size(size);
+  }
+  
+  int scrollbar_width() const {
+    return ((fltk3::Browser_*)_p)->scrollbar_width();
+  }
+  
+  void scrollbar_width(int width) {
+    ((fltk3::Browser_*)_p)->scrollbar_width(width);
+  }
+  
+  void scrollbar_right() { 
+    ((fltk3::Browser_*)_p)->scrollbar_right();
+  }
+  
+  void scrollbar_left() {
+    ((fltk3::Browser_*)_p)->scrollbar_left();
+  }
+  
+  void sort(int flags=0) {
+    ((fltk3::Browser_*)_p)->sort(flags);
+  }
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_Chart.H
===================================================================
--- branches/branch-3.0/FL/Fl_Chart.H   2011-06-03 19:51:19 UTC (rev 8778)
+++ branches/branch-3.0/FL/Fl_Chart.H   2011-06-03 21:49:28 UTC (rev 8779)
@@ -1,10 +1,10 @@
-#error header has not been ported to 3.0 yet
 //
 // "$Id$"
 //
 // Forms chart header file for the Fast Light Tool Kit (FLTK).
+// FLTK 123 wrapper finished
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2011 by Bill Spitzak and others.
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Library General Public
@@ -26,132 +26,118 @@
 //     http://www.fltk.org/str.php
 //
 
-/* \file
-   Fl_Chart widget . */
-
 #ifndef Fl_Chart_H
 #define Fl_Chart_H
 
-#ifndef Fl_Widget_H
+#include <fltk3/Chart.h>
 #include "Fl_Widget.H"
-#endif
 
-// values for type()
-#define FL_BAR_CHART           0       /**< type() for Bar Chart variant */
-#define FL_HORBAR_CHART                1       /**< type() for Horizontal Bar 
Chart variant */
-#define FL_LINE_CHART          2       /**< type() for Line Chart variant */
-#define FL_FILL_CHART          3       /**< type() for Fill Line Chart variant 
*/
-#define FL_SPIKE_CHART         4       /**< type() for Spike Chart variant */
-#define FL_PIE_CHART           5       /**< type() for Pie Chart variant */
-#define FL_SPECIALPIE_CHART    6       /**< type() for Special Pie Chart 
variant */
+#define FL_BAR_CHART           0
+#define FL_HORBAR_CHART                1
+#define FL_LINE_CHART          2
+#define FL_FILL_CHART          3
+#define FL_SPIKE_CHART         4
+#define FL_PIE_CHART           5
+#define FL_SPECIALPIE_CHART    6
 
-#define FL_FILLED_CHART  FL_FILL_CHART /**< for compatibility */
+#define FL_FILLED_CHART  FL_FILL_CHART
 
-#define FL_CHART_MAX           128     /**< max entries per chart */
-#define FL_CHART_LABEL_MAX     18      /**< max label length for entry */
+#define FL_CHART_MAX           128
+#define FL_CHART_LABEL_MAX     18
 
-/** For internal use only */
 struct FL_CHART_ENTRY {
-   float val;                          /**< For internal use only. */
-   unsigned col;                       /**< For internal use only. */
-   char str[FL_CHART_LABEL_MAX+1];     /**< For internal use only. */
+   float val;
+   unsigned col;
+   char str[FL_CHART_LABEL_MAX+1];
 };
 
-/**
-  \class Fl_Chart
-  \brief Fl_Chart displays simple charts.
-  It is provided for Forms compatibility.
-
-  \image html charts.png  
-  \image latex charts.png  "Fl_Chart" width=10cm
-  \todo Refactor Fl_Chart::type() information.
-
-  The type of an Fl_Chart object can be set using type(uchar t) to:
-  \li \c FL_BAR_CHART: Each sample value is drawn as a vertical bar.
-  \li \c FL_FILLED_CHART: The chart is filled from the bottom of the graph
-         to the sample values.
-  \li \c FL_HORBAR_CHART: Each sample value is drawn as a horizontal bar.
-  \li \c FL_LINE_CHART: The chart is drawn as a polyline with vertices at
-         each sample value.
-  \li \c FL_PIE_CHART: A pie chart is drawn with each sample value being
-         drawn as a proportionate slice in the circle.
-  \li \c FL_SPECIALPIE_CHART: Like \c FL_PIE_CHART, but the first slice is
-         separated from the pie.
-  \li \c FL_SPIKE_CHART: Each sample value is drawn as a vertical line.
- */
 class FL_EXPORT Fl_Chart : public Fl_Widget {
-    int numb;
-    int maxnumb;
-    int sizenumb;
-    FL_CHART_ENTRY *entries;
-    double min,max;
-    uchar autosize_;
-    Fl_Font textfont_;
-    Fl_Fontsize textsize_;
-    Fl_Color textcolor_;
+
 protected:
-    void draw();
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Widget, draw(), draw(), Draw)
+  
 public:
-    Fl_Chart(int X, int Y, int W, int H, const char *L = 0);
+  
+  Fl_chart() { /* empty */ }
+  
+  Fl_Chart(int X, int Y, int W, int H, const char *L = 0) {
+    _p = new fltk3::Chart(X, Y, W, H, L);
+    _p->wrapper(this);
+  }
 
-    ~Fl_Chart();
 
-    void clear();
+  void clear() {
+    ((fltk3::Chart*)_p)->clear();
+  }
 
-    void add(double val, const char *str = 0, unsigned col = 0);
+  void add(double val, const char *str = 0, unsigned col = 0) {
+    ((fltk3::Chart*)_p)->add(val, str, col);
+  }
 
-    void insert(int ind, double val, const char *str = 0, unsigned col = 0);
+  void insert(int ind, double val, const char *str = 0, unsigned col = 0) {
+    ((fltk3::Chart*)_p)->insert(ind, val, str, col);
+  }
 
-    void replace(int ind, double val, const char *str = 0, unsigned col = 0);
+  void replace(int ind, double val, const char *str = 0, unsigned col = 0) {
+    ((fltk3::Chart*)_p)->replace(ind, val, str, col);
+  }
 
-    /**
-      Gets the lower and upper bounds of the chart values.
-      \param[out] a, b are set to lower, upper
-     */
-    void bounds(double *a,double *b) const {*a = min; *b = max;}
+  void bounds(double *a,double *b) const {
+    ((fltk3::Chart*)_p)->bounds(a, b);
+  }
 
-    void bounds(double a,double b);
+  void bounds(double a,double b) {
+    ((fltk3::Chart*)_p)->bounds(a, b);
+  }
 
-    /**
-      Returns the number of data values in the chart.
-     */
-    int size() const {return numb;}
+  int size() const {
+    return ((fltk3::Chart*)_p)->size();
+  }
 
-    void size(int W, int H) { Fl_Widget::size(W, H); }
+  void size(int W, int H) {
+    ((fltk3::Chart*)_p)->size(W, H);
+  }
 
-    /**
-      Gets the maximum number of data values for a chart.
-     */
-    int maxsize() const {return maxnumb;}
+  int maxsize() const {
+    return ((fltk3::Chart*)_p)->maxsize();
+  }
 
-    void maxsize(int m);
+  void maxsize(int m) {
+    ((fltk3::Chart*)_p)->maxsize();
+  }
 
-    /** Gets the chart's text font */
-    Fl_Font textfont() const {return textfont_;}
-    /** Sets the chart's text font to \p s. */
-    void textfont(Fl_Font s) {textfont_ = s;}
+  Fl_Font textfont() const { 
+    return fltk3::_3to1_font( ((fltk3::Chart*)_p)->textfont() ); 
+  }
+  
+  void textfont(Fl_Font font) { 
+    ((fltk3::Chart*)_p)->font( fltk3::_1to3_font(font) );
+  }
+  
+  Fl_Fontsize textsize() const { 
+    return fltk3::_3to1_fontsize( ((fltk3::Chart*)_p)->textsize() );
+  }
+  
+  void textsize(Fl_Fontsize size) {
+    ((fltk3::Chart*)_p)->textsize( fltk3::_1to3_fontsize(size); )
+  }
+  
+  Fl_Color textcolor() const { 
+    return fltk3::_3to1_color( ((fltk3::Chart*)_p)->textcolor() );
+  }
+  
+  void textcolor(Fl_Color col) { 
+    ((fltk3::Chart*)_p)->textcolor( fltk3::_1to3_color(col) );
+  }
 
-    /** Gets the chart's text size */
-    Fl_Fontsize textsize() const {return textsize_;}
-    /** gets the chart's text size to \p s. */
-    void textsize(Fl_Fontsize s) {textsize_ = s;}
+  uchar autosize() const {
+    return ((fltk3::Chart*)_p)->autosize();
+  }
 
-    /** Gets the chart's text color */
-    Fl_Color textcolor() const {return textcolor_;}
-    /** gets the chart's text color to \p n. */
-    void textcolor(Fl_Color n) {textcolor_ = n;}
-
-    /**
-      Get whether the chart will automatically adjust the bounds of the chart.
-      \returns non-zero if auto-sizing is enabled and zero if disabled.
-     */
-    uchar autosize() const {return autosize_;}
-
-    /**
-      Set whether the chart will automatically adjust the bounds of the chart.
-      \param[in] n non-zero to enable automatic resizing, zero to disable.
-     */
-    void autosize(uchar n) {autosize_ = n;}
+  void autosize(uchar n) {
+    ((fltk3::Chart*)_p)->autosize(n);
+  }
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_Check_Browser.H
===================================================================
--- branches/branch-3.0/FL/Fl_Check_Browser.H   2011-06-03 19:51:19 UTC (rev 
8778)
+++ branches/branch-3.0/FL/Fl_Check_Browser.H   2011-06-03 21:49:28 UTC (rev 
8779)
@@ -1,10 +1,10 @@
-#error header has not been ported to 3.0 yet
 //
 // "$Id$"
 //
 // Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
+// FLTK 123 wrapper finished
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2011 by Bill Spitzak and others.
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Library General Public
@@ -26,93 +26,88 @@
 //     http://www.fltk.org/str.php
 //
 
-/* \file
-   Fl_Check_Browser widget . */
-
 #ifndef Fl_Check_Browser_H
 #define Fl_Check_Browser_H
 
+#include <fltk3/CheckBrowser.h>
 #include "Fl.H"
 #include "Fl_Browser_.H"
 
-/**
-  The Fl_Check_Browser widget displays a scrolling list of text
-  lines that may be selected and/or checked by the user.
-*/
 class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ {
-  /* required routines for Fl_Browser_ subclass: */
 
-  void *item_first() const;
-  void *item_next(void *) const;
-  void *item_prev(void *) const;
-  int item_height(void *) const;
-  int item_width(void *) const;
-  void item_draw(void *, int, int, int, int) const;
-  void item_select(void *, int);
-  int item_selected(void *) const;
+public:
 
-  /* private data */
+  Fl_Check_Browser() { /* empty */ }
+  
+  Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0) {
+    _p = new fltk3::CheckBrowser(x, y, w, h, l);
+    _p->wrapper(this);
+  }
 
-  public: // IRIX 5.3 C++ compiler doesn't support private structures...
+  int add(char *s) {
+    return ((fltk3::CheckBrowser*)_p)->add(s);
+  }
+  
+  int add(char *s, int b) {
+    return ((fltk3::CheckBrowser*)_p)->add(s, b);
+  }
+  
+  int remove(int item) {
+    return ((fltk3::CheckBrowser*)_p)->remove(item);
+  }
 
-#ifndef FL_DOXYGEN
-  /** For internal use only. */
-  struct cb_item {
-         cb_item *next;        /**< For internal use only. */
-         cb_item *prev;        /**< For internal use only. */
-         char checked;         /**< For internal use only. */
-         char selected;        /**< For internal use only. */
-         char *text;           /**< For internal use only. */
-  };
-#endif // !FL_DOXYGEN
+  int add(const char *s) { 
+    return ((fltk3::CheckBrowser*)_p)->add(s); 
+  }
+  
+  int add(const char *s, int b) { 
+    return ((fltk3::CheckBrowser*)_p)->add(s, b); 
+  }
 
-  private:
+  void clear() {
+    ((fltk3::CheckBrowser*)_p)->clear();
+  }
+  
+  int nitems() const { 
+    return ((fltk3::CheckBrowser*)_p)->nitems();
+  }
+  
+  int nchecked() const { 
+    return((fltk3::CheckBrowser*)_p)->nchecked();
+  }
+  
+  int checked(int item) const {
+    return ((fltk3::CheckBrowser*)_p)->checked(item);
+  }
+  
+  void checked(int item, int b) {
+    ((fltk3::CheckBrowser*)_p)->checked(item, b);
+  }
+  
+  void set_checked(int item) { 
+    ((fltk3::CheckBrowser*)_p)->set_checked(item);
+  }
+  
+  void check_all() {
+    ((fltk3::CheckBrowser*)_p)->check_all();
+  }
+  
+  void check_none() {
+    ((fltk3::CheckBrowser*)_p)->check_none();
+  }
+  
+  int value() const {
+    return ((fltk3::CheckBrowser*)_p)->value();
+  }
+  
+  char *text(int item) const {
+    return ((fltk3::CheckBrowser*)_p)->text(item);
+  }
 
-  cb_item *first;
-  cb_item *last;
-  cb_item *cache;
-  int cached_item;
-  int nitems_;
-  int nchecked_;
-  cb_item *find_item(int) const;
-  int lineno(cb_item *) const;
+protected:
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT_INT(CheckBrowser, handle(int event), 
handle(event), Handle)
 
-  public:
-
-  Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0);
-   /** The destructor deletes all list items and destroys the browser. */
-  ~Fl_Check_Browser() { clear(); }
-  int add(char *s);               // add an (unchecked) item
-  int add(char *s, int b);        // add an item and set checked
-                                 // both return the new nitems()
-  int remove(int item);           // delete an item. Returns nitems()
-
-  // inline const char * methods to avoid breaking binary compatibility...
-   /** See int Fl_Check_Browser::add(char *s) */
-  int add(const char *s) { return add((char *)s); }
-  /** See int Fl_Check_Browser::add(char *s) */
-  int add(const char *s, int b) { return add((char *)s, b); }
-
-  void clear();                   // delete all items
-  /**
-    Returns how many lines are in the browser.  The last line number is equal 
to
-    this.
-  */
-  int nitems() const { return nitems_; }
-  /**    Returns how many items are currently checked.  */
-  int nchecked() const { return nchecked_; }
-  int checked(int item) const;
-  void checked(int item, int b);
-  /**    Equivalent to Fl_Check_Browser::checked(item, 1).  */
-  void set_checked(int item) { checked(item, 1); }
-  void check_all();
-  void check_none();
-  int value() const;              // currently selected item
-  char *text(int item) const;     // returns pointer to internal buffer
-
-  protected:
-
-  int handle(int);
 };
 
 #endif // Fl_Check_Browser_H

Modified: branches/branch-3.0/FL/Fl_Check_Button.H
===================================================================
--- branches/branch-3.0/FL/Fl_Check_Button.H    2011-06-03 19:51:19 UTC (rev 
8778)
+++ branches/branch-3.0/FL/Fl_Check_Button.H    2011-06-03 21:49:28 UTC (rev 
8779)
@@ -2,8 +2,9 @@
 // "$Id$"
 //
 // Check button header file for the Fast Light Tool Kit (FLTK).
+// FLTK 123 wrapper finished
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2011 by Bill Spitzak and others.
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Library General Public

Modified: branches/branch-3.0/FL/Fl_Choice.H
===================================================================
--- branches/branch-3.0/FL/Fl_Choice.H  2011-06-03 19:51:19 UTC (rev 8778)
+++ branches/branch-3.0/FL/Fl_Choice.H  2011-06-03 21:49:28 UTC (rev 8779)
@@ -1,10 +1,11 @@
-#error header has not been ported to 3.0 yet
 //
 // "$Id$"
 //
 // Choice header file for the Fast Light Tool Kit (FLTK).
+// FLTK 123 wrapper started
+//  - FIXME: 123 - how to wrap Fl_Menu_Item?
 //
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2011 by Bill Spitzak and others.
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Library General Public
@@ -26,80 +27,39 @@
 //     http://www.fltk.org/str.php
 //
 
-/* \file
-   Fl_Choice widget . */
-
 #ifndef Fl_Choice_H
 #define Fl_Choice_H
 
+#include <fltk3/Choice.h>
 #include "Fl_Menu_.H"
 
-/**
-  \class Fl_Choice
-  \brief A button that is used to pop up a menu.
-
-  This is a button that, when pushed, pops up a menu (or hierarchy of menus)
-  defined by an array of Fl_Menu_Item objects.
-  Motif calls this an OptionButton.
-
-  The only difference between this and a Fl_Menu_Button is that the name of
-  the most recent chosen menu item is displayed inside the box, while the
-  label is displayed outside the box. However, since the use of this is most
-  often to control a single variable rather than do individual callbacks,
-  some of the Fl_Menu_Button methods are redescribed here in those terms.
-
-  When the user picks an item off the menu the value() is set to that item
-  and then the item's callback is done with the menu_button as the
-  \c Fl_Widget* argument. If the item does not have a callback the
-  menu_button's callback is done instead.
-
-  All three mouse buttons pop up the menu. The Forms behavior of the first
-  two buttons to increment/decrement the choice is not implemented.  This
-  could be added with a subclass, however.
-
-  The menu will also pop up in response to shortcuts indicated by putting
-  a '\&' character in the label().  See Fl_Button::shortcut(int s) for a
-  description of this.
-
-  Typing the shortcut() of any of the items will do exactly the same as when
-  you pick the item with the mouse.  The '\&' character in item names are
-  only looked at when the menu is popped up, however.
-
-  \image html choice.png
-  \image latex choice.png  "Fl_Choice" width=4cm
-  \todo Refactor the doxygen comments for Fl_Choice changed() documentation.
-
-  \li <tt>int Fl_Widget::changed() const</tt>
-      This value is true the user picks a different value. <em>It is turned
-      off by value() and just before doing a callback (the callback can turn
-      it back on if desired).</em>
-  \li <tt>void Fl_Widget::set_changed()</tt>
-      This method sets the changed() flag.
-  \li <tt>void Fl_Widget::clear_changed()</tt>
-      This method clears the changed() flag.
-  \li <tt>Fl_Boxtype Fl_Choice::down_box() const</tt>
-      Gets the current down box, which is used when the menu is popped up.
-      The default down box type is \c FL_DOWN_BOX.
-  \li <tt>void Fl_Choice::down_box(Fl_Boxtype b)</tt>
-      Sets the current down box type to \p b.
- */
 class FL_EXPORT Fl_Choice : public Fl_Menu_ {
+  
 protected:
-  void draw();
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Choice, draw(), draw(), Draw)
+  
 public:
-  int handle(int);
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT_INT(Choice, handle(int event), handle(event), 
Handle)
 
-  Fl_Choice(int X, int Y, int W, int H, const char *L = 0);
+  Fl_Choice(int X, int Y, int W, int H, const char *L = 0) {
+    _p = new fltk3::Choice(X, Y, W, H, L);
+    _p->wrapper(this);
+  }
 
-  /**
-    Gets the index of the last item chosen by the user.
-    The index is zero initially.
-   */
-  int value() const {return Fl_Menu_::value();}
+  int value() const {
+    return ((fltk3::Choice*)_p)->value();
+  }
 
-  int value(int v);
+  int value(int v) {
+    return ((fltk3::Choice*)_p)->value(v);
+  }
 
-  int value(const Fl_Menu_Item* v);
+  int value(const Fl_Menu_Item* v) {
+    return ((fltk3::Choice*)_p)->value(v);
+  }
+  
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_Clock.H
===================================================================
--- branches/branch-3.0/FL/Fl_Clock.H   2011-06-03 19:51:19 UTC (rev 8778)
+++ branches/branch-3.0/FL/Fl_Clock.H   2011-06-03 21:49:28 UTC (rev 8779)
@@ -1,8 +1,8 @@
-#error header has not been ported to 3.0 yet
 //
 // "$Id$"
 //
 // Clock header file for the Fast Light Tool Kit (FLTK).
+// FLTK 123 wrapper finished
 //
 // Copyright 1998-2010 by Bill Spitzak and others.
 //
@@ -26,109 +26,81 @@
 //     http://www.fltk.org/str.php
 //
 
-/* \file
-   Fl_Clock, Fl_Clock_Output widgets . */
-
 #ifndef Fl_Clock_H
 #define Fl_Clock_H
 
-#ifndef Fl_Widget_H
+#include <fltk3/Clock.h>
 #include "Fl_Widget.H"
-#endif
 
-// values for type:
-#define FL_SQUARE_CLOCK                0       /**< type() of Square Clock 
variant */
-#define FL_ROUND_CLOCK         1       /**< type() of Round Clock variant */
-#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK        /**< An analog clock is square 
*/
-#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */
+#define FL_SQUARE_CLOCK                0
+#define FL_ROUND_CLOCK         1
+#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK
+#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK
 
-// fabien: Please keep the horizontal formatting of both images in class desc, 
-// don't lose vert. space for nothing!
 
-/**
-  \class Fl_Clock_Output
-  \brief This widget can be used to display a program-supplied time.
-  
-  The time shown on the clock is not updated. To display the current time,
-  use Fl_Clock instead.
-
-  \htmlonly <BR>  <table align=CENTER border=1 cellpadding=5 >  
-  <caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> 
<TR><TD> \endhtmlonly
-  \image html clock.png  
-  \htmlonly </TD> <TD> \endhtmlonly
-  \image html round_clock.png 
-  \htmlonly </TD> </TR> </table> \endhtmlonly
-  \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
-  \image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
- */
 class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
-  int hour_, minute_, second_;
-  ulong value_;
-  void drawhands(Fl_Color,Fl_Color); // part of draw
+
 protected:
-  void draw();
-  void draw(int X, int Y, int W, int H);
+  
+  FLTK3_WRAPPER_VCALLS_OBJECT(Widget, draw(), draw(), Draw)
+
+  void draw(int X, int Y, int W, int H) {
+    ((fltk3::ClockOutput*)_p)->draw(X, Y, W, H);
+  }
+  
 public:
 
-  Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0);
+  Fl_Clock_Output() { /* empty */ }
+  
+  Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0) {
+    _p = new fltk3::ClockOutput(X, Y, W, H, L);
+    _p->wrapper(this);
+  }
 
-  void value(ulong v); // set to this Unix time
+  void value(ulong v) {
+    ((fltk3::ClockOutput*)_p)->value(v);
+  }
   
-  void value(int H, int m, int s);
+  void value(int H, int m, int s) {
+    ((fltk3::ClockOutput*)_p)->value(H, m ,s);
+  }
+  
+  ulong value() const {
+    return ((fltk3::ClockOutput*)_p)->value();
+  }
 
-  /**
-    Returns the displayed time.
-    Returns the time in seconds since the UNIX epoch (January 1, 1970).
-    \see value(ulong)
-   */
-  ulong value() const {return value_;}
+  int hour() const {
+    return ((fltk3::ClockOutput*)_p)->hour();
+  }
 
-  /**
-    Returns the displayed hour (0 to 23).
-    \see value(), minute(), second()
-   */
-  int hour() const {return hour_;}
+  int minute() const {
+    return ((fltk3::ClockOutput*)_p)->minute();
+  }
 
-  /**
-    Returns the displayed minute (0 to 59).
-    \see value(), hour(), second()
-   */
-  int minute() const {return minute_;}
-
-  /**
-    Returns the displayed second (0 to 60, 60=leap second).
-    \see value(), hour(), minute()
-   */
-  int second() const {return second_;}
+  int second() const {
+    return ((fltk3::ClockOutput*)_p)->second();
+  }
 };
 
-// a Fl_Clock displays the current time always by using a timeout:
 
-/**
-  \class Fl_Clock
-  \brief This widget provides a round analog clock display.
-
-  Fl_Clock is provided for Forms compatibility. 
-  It installs a 1-second timeout callback using Fl::add_timeout().
-  You can choose the rounded or square type of the clock with type(), see 
below.
-  \htmlonly <BR>  <table align=CENTER border=1 cellpadding=5 >  
-  <caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> 
<TR><TD> \endhtmlonly
-  \image html clock.png  
-  \htmlonly </TD> <TD> \endhtmlonly
-  \image html round_clock.png 
-  \htmlonly </TD> </TR> </table> \endhtmlonly
-  \image latex clock.png "FL_SQUARE_CLOCK type" width=4cm  
-  \image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
- */
 class FL_EXPORT Fl_Clock : public Fl_Clock_Output {
+
 public:
-  int handle(int);
 
-  Fl_Clock(int X, int Y, int W, int H,  const char *L = 0);
+  FLTK3_WRAPPER_VCALLS_OBJECT_INT(Widget, handle(int event), handle(event), 
Handle)
+
+  Fl_Clock() { /* empty */ }
   
-  Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L);
+  Fl_Clock(int X, int Y, int W, int H,  const char *L = 0) {
+    _p = new fltk3::Clock(X, Y, W, H, L);
+    _p->wrapper(this);
+  }
   
-  ~Fl_Clock();
+  Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L) {
+    _p = new fltk3::Clock(t, X, Y, W, H, L);
+    _p->wrapper(this);
+  }
+  
 };
 
 #endif

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

Reply via email to