FLTK logo

[Library] r8988 - in branches/branch-3.0: fltk3 fluid src src/xutf8 test

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r8988 - in branches/branch-3.0: fltk3 fluid src src/xutf8 test fltk-dev Aug 21, 2011  
 
Author: matt
Date: 2011-08-21 09:41:02 -0700 (Sun, 21 Aug 2011)
New Revision: 8988
Log:
FLTK3: removed all warnings (shortcut and keys are unsigned int now. We will need the additional bits to allow unicode shortcuts with arbitrary modifier.

Modified:
   branches/branch-3.0/fltk3/Browser_.h
   branches/branch-3.0/fltk3/Button.h
   branches/branch-3.0/fltk3/Chart.h
   branches/branch-3.0/fltk3/Counter.h
   branches/branch-3.0/fltk3/HelpView.h
   branches/branch-3.0/fltk3/Input_.h
   branches/branch-3.0/fltk3/MenuItem.h
   branches/branch-3.0/fltk3/Menu_.h
   branches/branch-3.0/fltk3/SysMenuBar.h
   branches/branch-3.0/fltk3/TextDisplay.h
   branches/branch-3.0/fltk3/TextEditor.h
   branches/branch-3.0/fltk3/Tree.h
   branches/branch-3.0/fltk3/ValueInput.h
   branches/branch-3.0/fltk3/ValueOutput.h
   branches/branch-3.0/fltk3/ValueSlider.h
   branches/branch-3.0/fltk3/Widget.h
   branches/branch-3.0/fltk3/osx.h
   branches/branch-3.0/fltk3/run.h
   branches/branch-3.0/fluid/Fl_Menu_Type.cxx
   branches/branch-3.0/fluid/Fl_Widget_Type.cxx
   branches/branch-3.0/fluid/Shortcut_Button.h
   branches/branch-3.0/fluid/file_make.cxx
   branches/branch-3.0/src/Fl.cxx
   branches/branch-3.0/src/Fl_Browser_.cxx
   branches/branch-3.0/src/Fl_Chart.cxx
   branches/branch-3.0/src/Fl_Counter.cxx
   branches/branch-3.0/src/Fl_Input_.cxx
   branches/branch-3.0/src/Fl_Menu_add.cxx
   branches/branch-3.0/src/Fl_Sys_Menu_Bar.cxx
   branches/branch-3.0/src/Fl_Text_Display.cxx
   branches/branch-3.0/src/Fl_Text_Editor.cxx
   branches/branch-3.0/src/Fl_Tree.cxx
   branches/branch-3.0/src/Fl_Value_Output.cxx
   branches/branch-3.0/src/Fl_Value_Slider.cxx
   branches/branch-3.0/src/Fl_cocoa.mm
   branches/branch-3.0/src/Fl_get_key_mac.cxx
   branches/branch-3.0/src/Fl_get_system_colors.cxx
   branches/branch-3.0/src/filename_list.cxx
   branches/branch-3.0/src/fl_ask.cxx
   branches/branch-3.0/src/fl_utf.cxx
   branches/branch-3.0/src/glut_compatability.cxx
   branches/branch-3.0/src/xutf8/mk_wcwidth.c
   branches/branch-3.0/test/keyboard.cxx

Modified: branches/branch-3.0/fltk3/Browser_.h
===================================================================
--- branches/branch-3.0/fltk3/Browser_.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Browser_.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -75,9 +75,6 @@
     int offset_;		// how far down top_ item the real_position is
     int max_width;	// widest object seen so far
     uchar has_scrollbar_;	// which scrollbars are enabled
-    fltk3::Font textfont_;
-    fltk3::Fontsize textsize_;
-    fltk3::Color textcolor_;
     void* top_;		// which item scrolling position is in
     void* selection_;	// which is selected (except for fltk3::MULTI_BROWSER)
     void *redraw1,*redraw2; // minimal update pointers
@@ -279,34 +276,6 @@
     void has_scrollbar(uchar mode) { has_scrollbar_ = mode; }
     
     /**
-     Gets the default text font for the lines in the browser.
-     \see textfont(), textsize(), textcolor()
-     */
-    fltk3::Font textfont() const { return textfont_; }
-    /**
-     Sets the default text font for the lines in the browser to \p font.
-     */
-    void textfont(fltk3::Font font) { textfont_ = font; }
-    
-    /**
-     Gets the default text size (in pixels) for the lines in the browser.
-     */
-    fltk3::Fontsize textsize() const { return textsize_; }
-    /**
-     Sets the default text size (in pixels) for the lines in the browser to \p size.
-     */
-    void textsize(fltk3::Fontsize size) { textsize_ = size; }
-    
-    /**
-     Gets the default text color for the lines in the browser.
-     */
-    fltk3::Color textcolor() const { return textcolor_; }
-    /**
-     Sets the default text color for the lines in the browser to color \p col.
-     */
-    void textcolor(fltk3::Color col) { textcolor_ = col; }
-    
-    /**
      Gets the current size of the scrollbars' troughs, in pixels.
      
      If this value is zero (default), this widget will use the 

Modified: branches/branch-3.0/fltk3/Button.h
===================================================================
--- branches/branch-3.0/fltk3/Button.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Button.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -88,7 +88,7 @@
     
     friend class ::Fl_Button;
     
-    int shortcut_;
+    unsigned int shortcut_;
     char value_;
     char oldval;
     uchar down_box_;
@@ -132,7 +132,7 @@
      Returns the current shortcut key for the button.
      \retval int
      */
-    int shortcut() const {return shortcut_;}
+    unsigned int shortcut() const {return shortcut_;}
     
     /**
      Sets the shortcut key to \c s.
@@ -153,7 +153,7 @@
      bits indicates a "don't care" setting).
      \param[in] s bitwise OR of key and shift flags
      */
-    void shortcut(int s) {shortcut_ = s;}
+    void shortcut(unsigned int s) {shortcut_ = s;}
     
     /**
      Returns the current down box type, which is drawn when value() is non-zero.

Modified: branches/branch-3.0/fltk3/Chart.h
===================================================================
--- branches/branch-3.0/fltk3/Chart.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Chart.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -86,9 +86,6 @@
     fltk3::CHART_ENTRY *entries;
     double min,max;
     uchar autosize_;
-    fltk3::Font textfont_;
-    fltk3::Fontsize textsize_;
-    fltk3::Color textcolor_;
   protected:
     void draw();
   public:
@@ -126,21 +123,6 @@
     
     void maxsize(int m);
     
-    /** Gets the chart's text font */
-    fltk3::Font textfont() const {return textfont_;}
-    /** Sets the chart's text font to \p s. */
-    void textfont(fltk3::Font s) {textfont_ = s;}
-    
-    /** Gets the chart's text size */
-    fltk3::Fontsize textsize() const {return textsize_;}
-    /** gets the chart's text size to \p s. */
-    void textsize(fltk3::Fontsize s) {textsize_ = s;}
-    
-    /** Gets the chart's text color */
-    fltk3::Color textcolor() const {return textcolor_;}
-    /** gets the chart's text color to \p n. */
-    void textcolor(fltk3::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.

Modified: branches/branch-3.0/fltk3/Counter.h
===================================================================
--- branches/branch-3.0/fltk3/Counter.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Counter.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -61,9 +61,6 @@
 
     friend class ::Fl_Counter;
     
-    fltk3::Font textfont_;
-    fltk3::Fontsize textsize_;
-    fltk3::Color textcolor_;
     double lstep_;
     uchar mouseobj;
     static void repeat_callback(void *);
@@ -103,23 +100,7 @@
     /**
      Returns the increment for normal step buttons.
      */
-    double step() const {return Valuator::step();}
-    
-    /** Gets the text font */
-    fltk3::Font textfont() const {return textfont_;}
-    /** Sets the text font to \p s */
-    void textfont(fltk3::Font s) {textfont_ = s;}
-    
-    /** Gets the font size */
-    fltk3::Fontsize textsize() const {return textsize_;}
-    /** Sets the font size to \p s */
-    void textsize(fltk3::Fontsize s) {textsize_ = s;}
-    
-    /** Gets the font color */
-    fltk3::Color textcolor() const {return textcolor_;}
-    /** Sets the font color to \p s */
-    void textcolor(fltk3::Color s) {textcolor_ = s;}
-    
+    double step() const {return Valuator::step();}    
   };
   
 }

Modified: branches/branch-3.0/fltk3/HelpView.h
===================================================================
--- branches/branch-3.0/fltk3/HelpView.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/HelpView.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -328,15 +328,21 @@
     /** Gets the size of the help view. */
     int		size() const { return (size_); }
     void		size(int W, int H) { Widget::size(W, H); }
-    /** Sets the default text color. */
+    /** Sets the default text color.
+     \todo this call overrides Widget::textcolor. That is bad!
+     */
     void		textcolor(fltk3::Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
     /** Returns the current default text color. */
     fltk3::Color	textcolor() const { return (defcolor_); }
-    /** Sets the default text font. */
+    /** Sets the default text font. 
+     \todo this call overrides Widget::textfont. That is bad!
+     */
     void		textfont(fltk3::Font f) { textfont_ = f; format(); }
     /** Returns the current default text font. */
     fltk3::Font       textfont() const { return (textfont_); }
-    /** Sets the default text size. */
+    /** Sets the default text size. 
+     \todo this call overrides Widget::textsize. That is bad!
+     */
     void		textsize(fltk3::Fontsize s) { textsize_ = s; format(); }
     /** Gets the default text size. */
     fltk3::Fontsize  textsize() const { return (textsize_); }

Modified: branches/branch-3.0/fltk3/Input_.h
===================================================================
--- branches/branch-3.0/fltk3/Input_.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Input_.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -142,20 +142,11 @@
     int maximum_size_;
     
     /** \internal Shortcut key that will fetch focus for this widget. */
-    int shortcut_;
+    unsigned int shortcut_;
     
     /** \internal This is set if no text but only the cursor needs updating. */
     uchar erase_cursor_only;
     
-    /** \internal The font used for the entire text. */
-    fltk3::Font textfont_;
-    
-    /** \internal Height of the font used for the entire text. */
-    fltk3::Fontsize textsize_;
-    
-    /** \internal color of the entire text */
-    fltk3::Color textcolor_;
-    
     /** \internal color of the text cursor */
     fltk3::Color cursor_color_;
     
@@ -378,7 +369,7 @@
     /** Return the shortcut key associated with this widget.
      \return shortcut keystroke
      \see fltk3::Button::shortcut() */
-    int shortcut() const {return shortcut_;}
+    unsigned int shortcut() const {return shortcut_;}
     
     /** 
      Sets the shortcut key associated with this widget.
@@ -386,37 +377,8 @@
      \param [in] s new shortcut keystroke 
      \see fltk3::Button::shortcut() 
      */
-    void shortcut(int s) {shortcut_ = s;}
+    void shortcut(unsigned int s) {shortcut_ = s;}
     
-    /** Gets the font of the text in the input field.
-     \return the current fltk3::Font index */
-    fltk3::Font textfont() const {return textfont_;}
-    
-    /** Sets the font of the text in the input field.
-     The text font defaults to \c fltk3::HELVETICA.
-     \param [in] s the new text font */
-    void textfont(fltk3::Font s) {textfont_ = s;}
-    
-    /** Gets the size of the text in the input field.
-     \return the text height in pixels */
-    fltk3::Fontsize textsize() const {return textsize_;}
-    
-    /** Sets the size of the text in the input field.
-     The text height defaults to \c fltk3::NORMAL_SIZE.
-     \param [in] s the new font height in pixel units */
-    void textsize(fltk3::Fontsize s) {textsize_ = s;}
-    
-    /** Gets the color of the text in the input field.
-     \return the text color
-     \see textcolor(fltk3::Color) */
-    fltk3::Color textcolor() const {return textcolor_;}
-    
-    /** Sets the color of the text in the input field.
-     The text color defaults to \c fltk3::FOREGROUND_COLOR.
-     \param [in] n new text color
-     \see textcolor() */
-    void textcolor(fltk3::Color n) {textcolor_ = n;}
-    
     /** Gets the color of the cursor.  
      \return the current cursor color */
     fltk3::Color cursor_color() const {return cursor_color_;}

Modified: branches/branch-3.0/fltk3/MenuItem.h
===================================================================
--- branches/branch-3.0/fltk3/MenuItem.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/MenuItem.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -120,7 +120,7 @@
    */
   struct FLTK3_EXPORT MenuItem {
     const char *text;	    ///< menu item text, returned by label()
-    int shortcut_;	    ///< menu item shortcut
+    unsigned int shortcut_;	    ///< menu item shortcut
     fltk3::Callback *callback_;   ///< menu item callback
     void *user_data_;	    ///< menu item user_data for the menu's callback
     int flags;		    ///< menu item flags like fltk3::MENU_TOGGLE, fltk3::MENU_RADIO
@@ -279,7 +279,7 @@
     void argument(long v) {user_data_ = (void*)v;}
     
     /** Gets what key combination shortcut will trigger the menu item. */
-    int shortcut() const {return shortcut_;}
+    unsigned int shortcut() const {return shortcut_;}
     
     /**
      Sets exactly what key combination will trigger the menu item.  The
@@ -296,7 +296,7 @@
      and Shift must be off if they are not in the shift flags (zero for the 
      other bits indicates a "don't care" setting).
      */
-    void shortcut(int s) {shortcut_ = s;}
+    void shortcut(unsigned int s) {shortcut_ = s;}
     /**
      Returns true if either fltk3::SUBMENU or fltk3::SUBMENU_POINTER
      is on in the flags. fltk3::SUBMENU indicates an embedded submenu
@@ -414,9 +414,9 @@
     void uncheck() {flags &= ~MENU_VALUE;}
     
     int insert(int,const char*,int,fltk3::Callback*,void* =0, int =0);
-    int add(const char*, int shortcut, fltk3::Callback*, void* =0, int = 0);
+    int add(const char*, unsigned int shortcut, fltk3::Callback*, void* =0, int = 0);
     
-    /** See int add(const char*, int shortcut, fltk3::Callback*, void*, int) */
+    /** See int add(const char*, unsigned int shortcut, fltk3::Callback*, void*, int) */
     int add(const char*a, const char* b, fltk3::Callback* c,
             void* d = 0, int e = 0) {
       return add(a,fltk3::old_shortcut(b),c,d,e);}

Modified: branches/branch-3.0/fltk3/Menu_.h
===================================================================
--- branches/branch-3.0/fltk3/Menu_.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Menu_.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -56,9 +56,6 @@
     
     uchar alloc;			// flag indicates if menu_ is a dynamic copy (=1) or not (=0)
     uchar down_box_;
-    fltk3::Font textfont_;
-    fltk3::Fontsize textsize_;
-    fltk3::Color textcolor_;
     
   public:
     Menu_(int,int,int,int,const char * =0);
@@ -93,13 +90,13 @@
     const fltk3::MenuItem *menu() const {return menu_;}
     void menu(const fltk3::MenuItem *m);
     void copy(const fltk3::MenuItem *m, void* user_data = 0);
-    int insert(int index, const char*, int shortcut, fltk3::Callback*, void* = 0, int = 0);
-    int  add(const char*, int shortcut, fltk3::Callback*, void* = 0, int = 0);
-    /** See int fltk3::Menu_::add(const char* label, int shortcut, fltk3::Callback*, void *user_data=0, int flags=0) */
+    int insert(int index, const char*, unsigned int shortcut, fltk3::Callback*, void* = 0, int = 0);
+    int  add(const char*, unsigned int shortcut, fltk3::Callback*, void* = 0, int = 0);
+    /** See int fltk3::Menu_::add(const char* label, unsigned int shortcut, fltk3::Callback*, void *user_data=0, int flags=0) */
     int  add(const char* a, const char* b, fltk3::Callback* c, void* d = 0, int e = 0) {
       return add(a,fltk3::old_shortcut(b),c,d,e);
     }
-    /** See int fltk3::Menu_::insert(const char* label, int shortcut, fltk3::Callback*, void *user_data=0, int flags=0) */
+    /** See int fltk3::Menu_::insert(const char* label, unsigned int shortcut, fltk3::Callback*, void *user_data=0, int flags=0) */
     int insert(int index, const char* a, const char* b, fltk3::Callback* c, void* d = 0, int e = 0) {
       return insert(index,a,fltk3::old_shortcut(b),c,d,e);
     }
@@ -111,7 +108,7 @@
     void replace(int,const char *);
     void remove(int);
     /** Changes the shortcut of item i to n.  */
-    void shortcut(int i, int s) {menu_[i].shortcut(s);}
+    void shortcut(int i, unsigned int s) {menu_[i].shortcut(s);}
     /** Sets the flags of item i.  For a list of the flags, see fltk3::MenuItem.  */
     void mode(int i,int fl) {menu_[i].flags = fl;}
     /** Gets the flags of item i.  For a list of the flags, see fltk3::MenuItem.  */
@@ -134,19 +131,6 @@
     /** Returns the title of item i.  */
     const char *text(int i) const {return menu_[i].text;}
     
-    /** Gets the current font of menu item labels.  */
-    fltk3::Font textfont() const {return textfont_;}
-    /**  Sets the current font of menu item labels.  */
-    void textfont(fltk3::Font c) {textfont_=c;}
-    /**  Gets the font size of menu item labels.  */
-    fltk3::Fontsize textsize() const {return textsize_;}
-    /**  Sets the font size of menu item labels.  */
-    void textsize(fltk3::Fontsize c) {textsize_=c;}
-    /** Get the current color of menu item labels.  */
-    fltk3::Color textcolor() const {return textcolor_;}
-    /** Sets the current color of menu item labels. */
-    void textcolor(fltk3::Color c) {textcolor_=c;}
-    
     /**
      This box type is used to surround the currently-selected items in the
      menus.  If this is fltk3::NO_BOX then it acts like 

Modified: branches/branch-3.0/fltk3/SysMenuBar.h
===================================================================
--- branches/branch-3.0/fltk3/SysMenuBar.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/SysMenuBar.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -60,8 +60,8 @@
       fltk3::sys_menu_bar = this;
     }
     void menu(const fltk3::MenuItem *m);
-    int add(const char* label, int shortcut, fltk3::Callback*, void *user_data=0, int flags=0);
-    int insert(int index, const char* label, int shortcut, fltk3::Callback *cb, void *user_data=0, int flags=0);
+    int add(const char* label, unsigned int shortcut, fltk3::Callback*, void *user_data=0, int flags=0);
+    int insert(int index, const char* label, unsigned int shortcut, fltk3::Callback *cb, void *user_data=0, int flags=0);
     void remove(int n);
     void replace(int rank, const char *name);
     void clear();

Modified: branches/branch-3.0/fltk3/TextDisplay.h
===================================================================
--- branches/branch-3.0/fltk3/TextDisplay.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/TextDisplay.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -240,51 +240,31 @@
    have no effects as shortcut_ is unused in this class and derived! 
    \return the current shortcut key
    */
-  int shortcut() const {return shortcut_;}
+  unsigned int shortcut() const {return shortcut_;}
   
   /**
    \todo FIXME : get set methods pointing on shortcut_ 
    have no effects as shortcut_ is unused in this class and derived! 
    \param s the new shortcut key
    */
-  void shortcut(int s) {shortcut_ = s;}
+  void shortcut(unsigned int s) {shortcut_ = s;}
   
   /**
-   Gets the default font used when drawing text in the widget.
-   \return current text font face unless overridden by a style
-   */
-  fltk3::Font textfont() const {return textfont_;}
-  
-  /**
    Sets the default font used when drawing text in the widget.
    \param s default text font face
+   \todo textfont is a method of Widget and should not have this side effect
    */
-  void textfont(fltk3::Font s) {textfont_ = s; mColumnScale = 0;}
+  void textfont(fltk3::Font s) {Widget::textfont(s); mColumnScale = 0;}
   
   /**
-   Gets the default size of text in the widget.
-   \return current text height unless overridden by a style
-   */
-  fltk3::Fontsize textsize() const {return textsize_;}
-  
-  /**
    Sets the default size of text in the widget.
    \param s new text size
+   \todo textsize is a method of Widget and should not have this side effect
    */
-  void textsize(fltk3::Fontsize s) {textsize_ = s; mColumnScale = 0;}
+  void textsize(fltk3::Fontsize s) {Widget::textsize(s); mColumnScale = 0;}
+  fltk3::Font textfont() const {return Widget::textfont();}
+  fltk3::Fontsize textsize() const {return Widget::textsize();}
   
-  /**
-   Gets the default color of text in the widget.
-   \return text color unless overridden by a style
-   */
-  fltk3::Color textcolor() const {return textcolor_;}
-  
-  /**
-   Sets the default color of text in the widget.
-   \param n new text color
-   */
-  void textcolor(fltk3::Color n) {textcolor_ = n;}
-  
   int wrapped_column(int row, int column) const;
   int wrapped_row(int row) const;
   void wrap_mode(int wrap, int wrap_margin);
@@ -467,12 +447,8 @@
   int display_insert_position_hint;
   struct { int x, y, w, h; } text_area;
   
-  int shortcut_;
+  unsigned int shortcut_;
   
-  fltk3::Font textfont_;
-  fltk3::Fontsize textsize_;
-  fltk3::Color textcolor_;
-  
   // The following are not presently used from the original NEdit code,
   // but are being put here so that future versions of fltk3::TextDisplay
   // can implement line numbers without breaking binary compatibility.

Modified: branches/branch-3.0/fltk3/TextEditor.h
===================================================================
--- branches/branch-3.0/fltk3/TextEditor.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/TextEditor.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -58,12 +58,12 @@
 
   public:
     /** Key function binding callback type */
-    typedef int (*KeyFunc)(int key, fltk3::TextEditor* editor);
+    typedef int (*KeyFunc)(unsigned int key, fltk3::TextEditor* editor);
     
     /** Simple linked list associating a key/state to a function */
     struct KeyBinding {
-      int          key;		///< the key pressed
-      int          state;	///< the state of key modifiers
+      unsigned int key;		///< the key pressed
+      unsigned int state;	///< the state of key modifiers
       KeyFunc     function;	///< associated function
       KeyBinding* next;	///< next key binding in the list
     };
@@ -84,51 +84,51 @@
      */
     int insert_mode() { return insert_mode_; }
     
-    void add_key_binding(int key, int state, KeyFunc f, KeyBinding** list);
+    void add_key_binding(unsigned key, unsigned state, KeyFunc f, KeyBinding** list);
     /** Adds a key of state "state" with the function "function" */
-    void add_key_binding(int key, int state, KeyFunc f)
+    void add_key_binding(unsigned key, unsigned state, KeyFunc f)
     { add_key_binding(key, state, f, &key_bindings); }
-    void remove_key_binding(int key, int state, KeyBinding** list);
+    void remove_key_binding(unsigned key, unsigned state, KeyBinding** list);
     /** Removes the key binding associated with the key "key" of state "state". */
-    void remove_key_binding(int key, int state)
+    void remove_key_binding(unsigned key, unsigned state)
     { remove_key_binding(key, state, &key_bindings); }
     void remove_all_key_bindings(KeyBinding** list);
     /** Removes all of the key bindings associated with the text editor or list. */
     void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); }
     void add_default_key_bindings(KeyBinding** list);
-    KeyFunc bound_key_function(int key, int state, KeyBinding* list);
+    KeyFunc bound_key_function(unsigned int key, unsigned int state, KeyBinding* list);
     /**  Returns the function associated with a key binding. */
-    KeyFunc bound_key_function(int key, int state)
+    KeyFunc bound_key_function(unsigned int key, unsigned int state)
     { return bound_key_function(key, state, key_bindings); }
     /**  Sets the default key function for unassigned keys. */
     void default_key_function(KeyFunc f) { default_key_function_ = f; }
     
     // functions for the built in default bindings
-    static int kf_default(int c, fltk3::TextEditor* e);
-    static int kf_ignore(int c, fltk3::TextEditor* e);
-    static int kf_backspace(int c, fltk3::TextEditor* e);
-    static int kf_enter(int c, fltk3::TextEditor* e);
-    static int kf_move(int c, fltk3::TextEditor* e);
-    static int kf_shift_move(int c, fltk3::TextEditor* e);
-    static int kf_ctrl_move(int c, fltk3::TextEditor* e);
-    static int kf_c_s_move(int c, fltk3::TextEditor* e);
-    static int kf_meta_move(int c, fltk3::TextEditor* e);
-    static int kf_m_s_move(int c, fltk3::TextEditor* e);
-    static int kf_home(int, fltk3::TextEditor* e);
-    static int kf_end(int c, fltk3::TextEditor* e);
-    static int kf_left(int c, fltk3::TextEditor* e);
-    static int kf_up(int c, fltk3::TextEditor* e);
-    static int kf_right(int c, fltk3::TextEditor* e);
-    static int kf_down(int c, fltk3::TextEditor* e);
-    static int kf_page_up(int c, fltk3::TextEditor* e);
-    static int kf_page_down(int c, fltk3::TextEditor* e);
-    static int kf_insert(int c, fltk3::TextEditor* e);
-    static int kf_delete(int c, fltk3::TextEditor* e);
-    static int kf_copy(int c, fltk3::TextEditor* e);
-    static int kf_cut(int c, fltk3::TextEditor* e);
-    static int kf_paste(int c, fltk3::TextEditor* e);
-    static int kf_select_all(int c, fltk3::TextEditor* e);
-    static int kf_undo(int c, fltk3::TextEditor* e);
+    static int kf_default(unsigned int c, fltk3::TextEditor* e);
+    static int kf_ignore(unsigned int c, fltk3::TextEditor* e);
+    static int kf_backspace(unsigned int c, fltk3::TextEditor* e);
+    static int kf_enter(unsigned int c, fltk3::TextEditor* e);
+    static int kf_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_shift_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_ctrl_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_c_s_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_meta_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_m_s_move(unsigned int c, fltk3::TextEditor* e);
+    static int kf_home(unsigned int, fltk3::TextEditor* e);
+    static int kf_end(unsigned int c, fltk3::TextEditor* e);
+    static int kf_left(unsigned int c, fltk3::TextEditor* e);
+    static int kf_up(unsigned int c, fltk3::TextEditor* e);
+    static int kf_right(unsigned int c, fltk3::TextEditor* e);
+    static int kf_down(unsigned int c, fltk3::TextEditor* e);
+    static int kf_page_up(unsigned int c, fltk3::TextEditor* e);
+    static int kf_page_down(unsigned int c, fltk3::TextEditor* e);
+    static int kf_insert(unsigned int c, fltk3::TextEditor* e);
+    static int kf_delete(unsigned int c, fltk3::TextEditor* e);
+    static int kf_copy(unsigned int c, fltk3::TextEditor* e);
+    static int kf_cut(unsigned int c, fltk3::TextEditor* e);
+    static int kf_paste(unsigned int c, fltk3::TextEditor* e);
+    static int kf_select_all(unsigned int c, fltk3::TextEditor* e);
+    static int kf_undo(unsigned int c, fltk3::TextEditor* e);
     
   protected:
     int handle_key();

Modified: branches/branch-3.0/fltk3/Tree.h
===================================================================
--- branches/branch-3.0/fltk3/Tree.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Tree.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -223,7 +223,7 @@
       callback_item(item);
       do_callback((fltk3::Widget*)this, user_data());
     }
-    fltk3::TreeItem *next_visible_item(fltk3::TreeItem *start, int dir);
+    fltk3::TreeItem *next_visible_item(fltk3::TreeItem *start, unsigned int dir);
     
   public:
     Tree(int X, int Y, int W, int H, const char *L=0);

Modified: branches/branch-3.0/fltk3/ValueInput.h
===================================================================
--- branches/branch-3.0/fltk3/ValueInput.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/ValueInput.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -100,7 +100,7 @@
      Returns the current shortcut key for the Input.
      \see fltk3::ValueInput::shortcut(int) 
      */
-    int shortcut() const {return input.shortcut();}
+    unsigned int shortcut() const {return input.shortcut();}
     /** 
      Sets the shortcut key to \p s. Setting this
      overrides the use of '&' in the label().  The value is a bitwise
@@ -118,7 +118,7 @@
      the shift flags (zero for the other bits indicates a "don't care"
      setting).
      */
-    void shortcut(int s) {input.shortcut(s);}
+    void shortcut(unsigned int s) {input.shortcut(s);}
     
     /** Gets the typeface of the text in the value box.  */
     fltk3::Font textfont() const {return input.textfont();}

Modified: branches/branch-3.0/fltk3/ValueOutput.h
===================================================================
--- branches/branch-3.0/fltk3/ValueOutput.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/ValueOutput.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -55,10 +55,7 @@
 
     friend class ::Fl_Value_Output;
 
-    fltk3::Font textfont_;
-    fltk3::Fontsize textsize_;
     uchar soft_;
-    fltk3::Color textcolor_;
     
   protected:
     void draw();
@@ -82,17 +79,6 @@
      */
     uchar soft() const {return soft_;}
     
-    /**    Gets the typeface of the text in the value box.  */
-    fltk3::Font textfont() const {return textfont_;}
-    /**    Sets the typeface of the text in the value box.  */
-    void textfont(fltk3::Font s) {textfont_ = s;}
-    /**    Gets the size of the text in the value box.  */
-    fltk3::Fontsize textsize() const {return textsize_;}
-    void textsize(fltk3::Fontsize s) {textsize_ = s;}
-    /**    Sets the color of the text in the value box.  */
-    fltk3::Color textcolor() const {return textcolor_;}
-    /**    Gets the color of the text in the value box.  */
-    void textcolor(fltk3::Color s) {textcolor_ = s;}
   };
   
 }

Modified: branches/branch-3.0/fltk3/ValueSlider.h
===================================================================
--- branches/branch-3.0/fltk3/ValueSlider.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/ValueSlider.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -49,26 +49,11 @@
 
     friend class ::Fl_Value_Slider;
 
-    fltk3::Font textfont_;
-    fltk3::Fontsize textsize_;
-    fltk3::Color textcolor_;
   protected:
     void draw();
   public:
     int handle(int);
     ValueSlider(int x,int y,int w,int h, const char *l = 0);
-    /**    Gets the typeface of the text in the value box.  */
-    fltk3::Font textfont() const {return textfont_;}
-    /**    Sets the typeface of the text in the value box.  */
-    void textfont(fltk3::Font s) {textfont_ = s;}
-    /**    Gets the size of the text in the value box.  */
-    fltk3::Fontsize textsize() const {return textsize_;}
-    /**    Sets the size of the text in the value box.  */
-    void textsize(fltk3::Fontsize s) {textsize_ = s;}
-    /**    Gets the color of the text in the value box.  */
-    fltk3::Color textcolor() const {return textcolor_;}
-    /**    Sets the color of the text in the value box.  */
-    void textcolor(fltk3::Color s) {textcolor_ = s;}
   };
   
 }

Modified: branches/branch-3.0/fltk3/Widget.h
===================================================================
--- branches/branch-3.0/fltk3/Widget.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/Widget.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -86,6 +86,12 @@
     fltk3::Fontsize size;
     /** text color */
     fltk3::Color color;
+    /** \internal The font used for the entire text. */
+    fltk3::Font textfont_;
+    /** \internal Height of the font used for the entire text. */
+    fltk3::Fontsize textsize_;
+    /** \internal color of the entire text */
+    fltk3::Color textcolor_;
     /** alignment of label */
     fltk3::Align align_;
     /** type of label. \see fltk3::Labeltype */
@@ -964,7 +970,37 @@
      \deprecated Use selection_color(unsigned) instead.
      */
     void color2(unsigned a) {color2_ = a;}
-  };
+
+    /** Gets the font of the text in the input field.
+     \return the current fltk3::Font index */
+    fltk3::Font textfont() const {return label_.textfont_;}
+    
+    /** Sets the font of the text in the input field.
+     The text font defaults to \c fltk3::HELVETICA.
+     \param [in] s the new text font */
+    void textfont(fltk3::Font s) {label_.textfont_ = s;}
+    
+    /** Gets the size of the text in the input field.
+     \return the text height in pixels */
+    fltk3::Fontsize textsize() const {return label_.textsize_;}
+    
+    /** Sets the size of the text in the input field.
+     The text height defaults to \c fltk3::NORMAL_SIZE.
+     \param [in] s the new font height in pixel units */
+    void textsize(fltk3::Fontsize s) {label_.textsize_ = s;}
+    
+    /** Gets the color of the text in the input field.
+     \return the text color
+     \see textcolor(fltk3::Color) */
+    fltk3::Color textcolor() const {return label_.textcolor_;}
+    
+    /** Sets the color of the text in the input field.
+     The text color defaults to \c fltk3::FOREGROUND_COLOR.
+     \param [in] n new text color
+     \see textcolor() */
+    void textcolor(fltk3::Color n) {label_.textcolor_ = n;}
+    
+};
   
   
   /**

Modified: branches/branch-3.0/fltk3/osx.h
===================================================================
--- branches/branch-3.0/fltk3/osx.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/osx.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -215,7 +215,7 @@
  * \param user_data   a pointer transmitted as 2nd argument to the callback.
  * \param shortcut    optional shortcut to attach to the "About myprog" menu item (e.g., fltk3::META+'a')
  */
-extern void fl_mac_set_about( fltk3::Callback *cb, void *user_data, int shortcut = 0);
+extern void fl_mac_set_about( fltk3::Callback *cb, void *user_data, unsigned int shortcut = 0);
 
 /** \brief The version number of the running Mac OS X (e.g., 100604 for 10.6.4)
  */

Modified: branches/branch-3.0/fltk3/run.h
===================================================================
--- branches/branch-3.0/fltk3/run.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fltk3/run.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -122,7 +122,7 @@
   extern int e_y_root;
   extern int e_dx;
   extern int e_dy;
-  extern int e_state;
+  extern unsigned int e_state;
   extern int e_clicks;
   extern int e_is_click;
   extern unsigned int e_keysym;
@@ -588,9 +588,9 @@
    so that the shift state is not correctly reported until the first event
    <I>after</I> the shift key is pressed or released.
    */
-  inline int event_state()	{return e_state;}
+  inline unsigned event_state()	{return e_state;}
   /** See int event_state() */
-  inline int event_state(int i) {return e_state&i;}
+  inline unsigned event_state(unsigned i) {return e_state&i;}
   /**
    Gets which key on the keyboard was last pushed.
    
@@ -656,7 +656,7 @@
    Under X this requires a round-trip to the server and is <I>much</I>
    slower than fltk3::event_key(int). \see event_key(int)
    */
-  int get_key(int key); // platform dependent
+  int get_key(unsigned int key); // platform dependent
   /** 
    Returns the text associated with the current event, including fltk3::PASTE or fltk3::DND_RELEASE events.
    This can be used in response to fltk3::KEYUP, fltk3::KEYDOWN, fltk3::PASTE, fltk3::DND_RELEASE.

Modified: branches/branch-3.0/fluid/Fl_Menu_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Menu_Type.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fluid/Fl_Menu_Type.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -592,7 +592,7 @@
   when(0); type(fltk3::TOGGLE_BUTTON);
   if (e == fltk3::KEYBOARD) {
     if (!value()) return 0;
-    int v = fltk3::event_text()[0];
+    unsigned v = fltk3::event_text()[0];
     if ( (v > 32 && v < 0x7f) || (v > 0xa0 && v <= 0xff) ) {
       if (isupper(v)) {
         v = tolower(v);

Modified: branches/branch-3.0/fluid/Fl_Widget_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Widget_Type.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fluid/Fl_Widget_Type.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -2223,7 +2223,7 @@
     write_c("%s%s->box(fltk3::%s);\n", indent(), var, boxname(o->box()));
 
   // write shortcut command if needed
-  int shortcut = 0;
+  unsigned int shortcut = 0;
   if (is_button()) shortcut = ((fltk3::Button*)o)->shortcut();
   else if (is_input()) shortcut = ((fltk3::Input_*)o)->shortcut();
   else if (is_value_input()) shortcut = ((fltk3::ValueInput*)o)->shortcut();
@@ -2612,7 +2612,7 @@
   } else if (!strcmp(c,"class")) {
     subclass(read_word());
   } else if (!strcmp(c,"shortcut")) {
-    int shortcut = strtol(read_word(),0,0);
+    unsigned int shortcut = strtol(read_word(),0,0);
     if (is_button()) ((fltk3::Button*)o)->shortcut(shortcut);
     else if (is_input()) ((fltk3::Input_*)o)->shortcut(shortcut);
     else if (is_value_input()) ((fltk3::ValueInput*)o)->shortcut(shortcut);

Modified: branches/branch-3.0/fluid/Shortcut_Button.h
===================================================================
--- branches/branch-3.0/fluid/Shortcut_Button.h	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fluid/Shortcut_Button.h	2011-08-21 16:41:02 UTC (rev 8988)
@@ -29,7 +29,7 @@
 
 class Shortcut_Button : public fltk3::Button {
 public:
-  int svalue;
+  unsigned int svalue;
   int handle(int);
   void draw();
   Shortcut_Button(int X,int Y,int W,int H, const char* l = 0) :

Modified: branches/branch-3.0/fluid/file_make.cxx
===================================================================
--- branches/branch-3.0/fluid/file_make.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/fluid/file_make.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -2286,7 +2286,7 @@
 static int write_test_makefile(FILE *out, Fl_Workspace_Type *workspace, const char *path, const char *base_dir, const char *tgt_base, Fl_Target_Type *first_target) {
 
   Fl_Target_Type *tgt;
-  Fl_Target_Dependency_Type * dep;
+  //Fl_Target_Dependency_Type * dep;
   Fl_File_Type *file;
   
   write_header(out, "Test/example program makefile for the Fast Light Tool Kit (FLTK).");

Modified: branches/branch-3.0/src/Fl.cxx
===================================================================
--- branches/branch-3.0/src/Fl.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -105,13 +105,14 @@
 		fltk3::e_y_root,
 		fltk3::e_dx,
 		fltk3::e_dy,
-		fltk3::e_state,
 		fltk3::e_clicks,
 		fltk3::e_is_click,
                 fltk3::e_original_keysym,
 		fltk3::scrollbar_size_ = 16;
 unsigned int fltk3::e_keysym;
+unsigned int fltk3::e_state;
 
+
 char		*fltk3::e_text = (char *)"";
 int		fltk3::e_length;
 

Modified: branches/branch-3.0/src/Fl_Browser_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Browser_.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Browser_.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -978,9 +978,9 @@
   //scrollbar.align(fltk3::ALIGN_LEFT|fltk3::ALIGN_BOTTOM); // back compatibility?
   hscrollbar.callback(hscrollbar_callback);
   hscrollbar.type(fltk3::HORIZONTAL);
-  textfont_ = fltk3::HELVETICA;
-  textsize_ = fltk3::NORMAL_SIZE;
-  textcolor_ = fltk3::FOREGROUND_COLOR;
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
   has_scrollbar_ = BOTH;
   max_width = 0;
   max_width_item = 0;

Modified: branches/branch-3.0/src/Fl_Chart.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Chart.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Chart.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -300,9 +300,9 @@
   sizenumb   = fltk3::CHART_MAX;
   autosize_  = 1;
   min = max  = 0;
-  textfont_  = fltk3::HELVETICA;
-  textsize_  = 10;
-  textcolor_ = fltk3::FOREGROUND_COLOR;
+  textfont(fltk3::HELVETICA);
+  textsize(10);
+  textcolor(fltk3::FOREGROUND_COLOR);
   entries    = (fltk3::CHART_ENTRY *)calloc(sizeof(fltk3::CHART_ENTRY), fltk3::CHART_MAX + 1);
 }
 

Modified: branches/branch-3.0/src/Fl_Counter.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Counter.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Counter.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -203,9 +203,9 @@
   Valuator::step(1, 10);
   lstep_ = 1.0;
   mouseobj = 0;
-  textfont_ = fltk3::HELVETICA;
-  textsize_ = fltk3::NORMAL_SIZE;
-  textcolor_ = fltk3::FOREGROUND_COLOR;
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
 }
 
 //

Modified: branches/branch-3.0/src/Fl_Input_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Input_.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Input_.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -1060,9 +1060,9 @@
   box(fltk3::DOWN_BOX);
   color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
   align(fltk3::ALIGN_LEFT);
-  textsize_ = fltk3::NORMAL_SIZE;
-  textfont_ = fltk3::HELVETICA;
-  textcolor_ = fltk3::FOREGROUND_COLOR;
+  textsize(fltk3::NORMAL_SIZE);
+  textfont(fltk3::HELVETICA);
+  textcolor(fltk3::FOREGROUND_COLOR);
   cursor_color_ = fltk3::FOREGROUND_COLOR; // was fltk3::BLUE
   mark_ = position_ = size_ = 0;
   bufsize = 0;

Modified: branches/branch-3.0/src/Fl_Menu_add.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_add.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Menu_add.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -112,7 +112,7 @@
 */
 int fltk3::MenuItem::add(
   const char *mytext,
-  int sc,
+  unsigned int sc,
   fltk3::Callback *cb,	
   void *data,
   int myflags
@@ -327,7 +327,7 @@
   \todo Raw integer shortcut needs examples. 
         Dependent on responses to http://fltk.org/newsgroups.php?gfltk.development+v:10086 and results of STR#2344
  */
-int fltk3::Menu_::add(const char *label,int shortcut,fltk3::Callback *callback,void *userdata,int flags) {
+int fltk3::Menu_::add(const char *label,unsigned int shortcut,fltk3::Callback *callback,void *userdata,int flags) {
   return(insert(-1,label,shortcut,callback,userdata,flags));	// -1: append
 }
 
@@ -367,7 +367,7 @@
 int fltk3::Menu_::insert(
   int index,
   const char *label,
-  int shortcut,
+  unsigned int shortcut,
   fltk3::Callback *callback,
   void *userdata,
   int flags

Modified: branches/branch-3.0/src/Fl_Sys_Menu_Bar.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Sys_Menu_Bar.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Sys_Menu_Bar.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -211,7 +211,7 @@
  *
  * @see fltk3::Menu_::add(const char* label, int shortcut, fltk3::Callback *cb, void *user_data, int flags) 
  */
-int fltk3::SysMenuBar::add(const char* label, int shortcut, fltk3::Callback *cb, void *user_data, int flags)
+int fltk3::SysMenuBar::add(const char* label, unsigned int shortcut, fltk3::Callback *cb, void *user_data, int flags)
 {
   fl_open_display();
   int rank = fltk3::Menu_::add(label, shortcut, cb, user_data, flags);
@@ -227,7 +227,7 @@
  *
  * @see fltk3::Menu_::insert(int index, const char* label, int shortcut, fltk3::Callback *cb, void *user_data, int flags) 
  */
-int fltk3::SysMenuBar::insert(int index, const char* label, int shortcut, fltk3::Callback *cb, void *user_data, int flags)
+int fltk3::SysMenuBar::insert(int index, const char* label, unsigned int shortcut, fltk3::Callback *cb, void *user_data, int flags)
 {
   fl_open_display();
   int rank = fltk3::Menu_::insert(index, label, shortcut, cb, user_data, flags);

Modified: branches/branch-3.0/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Text_Display.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Text_Display.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -459,7 +459,7 @@
   int fontHeight, firstLine, lastLine, line;
   
   /* find the line number range of the display */
-  fontHeight = mMaxsize ? mMaxsize : textsize_;
+  fontHeight = mMaxsize ? mMaxsize : textsize();
   firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight;
   lastLine = ( top + height - text_area.y ) / fontHeight + 1;
   
@@ -2637,7 +2637,7 @@
 #if 0
   int y, line, visLine, nCols, lineStart;
   char lineNumString[12];
-  int lineHeight = mMaxsize ? mMaxsize : textsize_;
+  int lineHeight = mMaxsize ? mMaxsize : textsize();
   int charWidth = TMPFONTWIDTH;   //mFontStruct->max_bounds.width;
   
   /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is

Modified: branches/branch-3.0/src/Fl_Text_Editor.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Text_Editor.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Text_Editor.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -180,7 +180,7 @@
 }
 
 /**  Returns the function associated with a key binding.*/
-fltk3::TextEditor::KeyFunc fltk3::TextEditor::bound_key_function(int key, int state, KeyBinding* list) {
+fltk3::TextEditor::KeyFunc fltk3::TextEditor::bound_key_function(unsigned int key, unsigned int state, KeyBinding* list) {
   KeyBinding* cur;
   for (cur = list; cur; cur = cur->next)
     if (cur->key == key)
@@ -201,7 +201,7 @@
 }
 
 /** Removes the key binding associated with the key "key" of state "state" */
-void fltk3::TextEditor::remove_key_binding(int key, int state, KeyBinding** list) {
+void fltk3::TextEditor::remove_key_binding(unsigned int key, unsigned int state, KeyBinding** list) {
   KeyBinding *cur, *last = 0;
   for (cur = *list; cur; last = cur, cur = cur->next)
     if (cur->key == key && cur->state == state) break;
@@ -211,7 +211,7 @@
   delete cur;
 }
 /** Adds a key of state "state" with the function "function" */
-void fltk3::TextEditor::add_key_binding(int key, int state, KeyFunc function,
+void fltk3::TextEditor::add_key_binding(unsigned key, unsigned state, KeyFunc function,
                                 KeyBinding** list) {
   KeyBinding* kb = new KeyBinding;
   kb->key = key;
@@ -231,7 +231,7 @@
 }
 
 /** Inserts the text associated with the key */
-int fltk3::TextEditor::kf_default(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_default(unsigned c, fltk3::TextEditor* e) {
   // FIXME: this function is a mess! Fix this!
   if (!c || (!isprint(c) && c != '\t')) return 0;
   char s[2] = "\0";
@@ -246,11 +246,11 @@
 }
 
 /** Ignores the keypress */
-int fltk3::TextEditor::kf_ignore(int, fltk3::TextEditor*) {
+int fltk3::TextEditor::kf_ignore(unsigned, fltk3::TextEditor*) {
   return 0; // don't handle
 }
 /**  Does a backspace in the current buffer.*/
-int fltk3::TextEditor::kf_backspace(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_backspace(unsigned, fltk3::TextEditor* e) {
   if (!e->buffer()->selected() && e->move_left()) {
     int p1 = e->insert_position();
     int p2 = e->buffer()->next_char(p1);
@@ -264,7 +264,7 @@
 }
 
 /** Inserts a newline at the current cursor position */
-int fltk3::TextEditor::kf_enter(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_enter(unsigned, fltk3::TextEditor* e) {
   kill_selection(e);
   e->insert("\n");
   e->show_insert_position();
@@ -278,7 +278,7 @@
 }
 
 /**  Moves the text cursor in the direction indicated by key c.*/
-int fltk3::TextEditor::kf_move(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_move(unsigned c, fltk3::TextEditor* e) {
   int i;
   int selected = e->buffer()->selected();
   if (!selected)
@@ -316,7 +316,7 @@
 }
 
 /**  Extends the current selection in the direction of key c.*/
-int fltk3::TextEditor::kf_shift_move(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_shift_move(unsigned c, fltk3::TextEditor* e) {
   kf_move(c, e);
   fltk3::text_drag_me(e->insert_position(), e);
   char *copy = e->buffer()->selection_text();
@@ -327,7 +327,7 @@
   return 1;
 }
 /** Moves the current text cursor in the direction indicated by control key */
-int fltk3::TextEditor::kf_ctrl_move(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_ctrl_move(unsigned c, fltk3::TextEditor* e) {
   if (!e->buffer()->selected())
     e->dragPos = e->insert_position();
   if (c != fltk3::UpKey && c != fltk3::DownKey) {
@@ -367,7 +367,7 @@
 }
 
 /** Moves the current text cursor in the direction indicated by meta key */
-int fltk3::TextEditor::kf_meta_move(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_meta_move(unsigned c, fltk3::TextEditor* e) {
   if (!e->buffer()->selected())
     e->dragPos = e->insert_position();
   if (c != fltk3::UpKey && c != fltk3::DownKey) {
@@ -395,65 +395,65 @@
 }
 
 /** Extends the current selection in the direction indicated by meta key c. */
-int fltk3::TextEditor::kf_m_s_move(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_m_s_move(unsigned c, fltk3::TextEditor* e) {
   kf_meta_move(c, e);
   fltk3::text_drag_me(e->insert_position(), e);
   return 1;
 }
 
 /** Extends the current selection in the direction indicated by control key c. */
-int fltk3::TextEditor::kf_c_s_move(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_c_s_move(unsigned c, fltk3::TextEditor* e) {
   kf_ctrl_move(c, e);
   fltk3::text_drag_me(e->insert_position(), e);
   return 1;
 }
 
 /**  Moves the text cursor to the beginning of the current line.*/
-int fltk3::TextEditor::kf_home(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_home(unsigned int, fltk3::TextEditor* e) {
     return kf_move(fltk3::HomeKey, e);
 }
 
 /**  Moves the text cursor to the end of the current line.*/
-int fltk3::TextEditor::kf_end(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_end(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::EndKey, e);
 }
 
 /**  Moves the text cursor one character to the left.*/
-int fltk3::TextEditor::kf_left(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_left(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::LeftKey, e);
 }
 
 /**  Moves the text cursor one line up.*/
-int fltk3::TextEditor::kf_up(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_up(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::UpKey, e);
 }
 
 /**  Moves the text cursor one character to the right.*/
-int fltk3::TextEditor::kf_right(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_right(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::RightKey, e);
 }
 /**  Moves the text cursor one line down.*/
-int fltk3::TextEditor::kf_down(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_down(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::DownKey, e);
 }
 
 /**  Moves the text cursor up one page.*/
-int fltk3::TextEditor::kf_page_up(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_page_up(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::PageUpKey, e);
 }
 
 /**  Moves the text cursor down one page.*/
-int fltk3::TextEditor::kf_page_down(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_page_down(unsigned int, fltk3::TextEditor* e) {
   return kf_move(fltk3::PageDownKey, e);
 }
 /**  Toggles the insert mode in the text editor.*/
-int fltk3::TextEditor::kf_insert(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_insert(unsigned int, fltk3::TextEditor* e) {
   e->insert_mode(e->insert_mode() ? 0 : 1);
   return 1;
 }
 
 /**  Does a delete of selected text or the current character in the current buffer.*/
-int fltk3::TextEditor::kf_delete(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_delete(unsigned int, fltk3::TextEditor* e) {
   if (!e->buffer()->selected()) {
     int p1 = e->insert_position();
     int p2 = e->buffer()->next_char(p1);
@@ -468,7 +468,7 @@
 }
 
 /**  Does a copy of selected text or the current character in the current buffer.*/
-int fltk3::TextEditor::kf_copy(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_copy(unsigned int, fltk3::TextEditor* e) {
   if (!e->buffer()->selected()) return 1;
   const char *copy = e->buffer()->selection_text();
   if (*copy) fltk3::copy(copy, strlen(copy), 1);
@@ -478,7 +478,7 @@
 }
 
 /**  Does a cut of selected text in the current buffer.*/
-int fltk3::TextEditor::kf_cut(int c, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_cut(unsigned int c, fltk3::TextEditor* e) {
   kf_copy(c, e);
   kill_selection(e);
   e->set_changed();
@@ -487,7 +487,7 @@
 }
 
 /**  Does a paste of selected text in the current buffer.*/
-int fltk3::TextEditor::kf_paste(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_paste(unsigned int, fltk3::TextEditor* e) {
   kill_selection(e);
   fltk3::paste(*e, 1);
   e->show_insert_position();
@@ -497,7 +497,7 @@
 }
 
 /**  Selects all text in the current buffer.*/
-int fltk3::TextEditor::kf_select_all(int, fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_select_all(unsigned int, fltk3::TextEditor* e) {
   e->buffer()->select(0, e->buffer()->length());
   const char *copy = e->buffer()->selection_text();
   if (*copy) fltk3::copy(copy, strlen(copy), 0);
@@ -505,7 +505,7 @@
   return 1;
 }
 /**  Undo last edit in the current buffer. Also deselect previous selection. */
-int fltk3::TextEditor::kf_undo(int , fltk3::TextEditor* e) {
+int fltk3::TextEditor::kf_undo(unsigned int , fltk3::TextEditor* e) {
   e->buffer()->unselect();
   fltk3::copy("", 0, 0);
   int crsr;

Modified: branches/branch-3.0/src/Fl_Tree.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Tree.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -329,7 +329,7 @@
 /// \param[in] dir The direction to search. Can be fltk3::UpKey or fltk3::DownKey.
 /// \returns The item found, or 0 if there's no visible items above/below the specified \p item.
 ///
-fltk3::TreeItem *fltk3::Tree::next_visible_item(fltk3::TreeItem *item, int dir) {
+fltk3::TreeItem *fltk3::Tree::next_visible_item(fltk3::TreeItem *item, unsigned int dir) {
   if ( ! item ) {				// no start item?
     item = ( dir == fltk3::UpKey ) ? last() : first();	// start at top or bottom
     if ( ! item ) return(0);
@@ -550,7 +550,7 @@
 	  set_item_focus(first());
 	}
 	if ( _item_focus ) {
-	  int ekey = fltk3::event_key();
+	  unsigned int ekey = fltk3::event_key();
 	  switch (ekey) {
 	    case fltk3::EnterKey:	// ENTER: selects current item only
 	    case fltk3::KPEnterKey:

Modified: branches/branch-3.0/src/Fl_Value_Output.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Output.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Value_Output.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -99,9 +99,9 @@
 : fltk3::Valuator(X,Y,W,H,l) {
   box(fltk3::NO_BOX);
   align(fltk3::ALIGN_LEFT);
-  textfont_ = fltk3::HELVETICA;
-  textsize_ = fltk3::NORMAL_SIZE;
-  textcolor_ = fltk3::FOREGROUND_COLOR;
+  textfont(fltk3::HELVETICA);
+  textsize(fltk3::NORMAL_SIZE);
+  textcolor(fltk3::FOREGROUND_COLOR);
   soft_ = 0;
 }
 

Modified: branches/branch-3.0/src/Fl_Value_Slider.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Slider.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_Value_Slider.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -37,9 +37,9 @@
 fltk3::ValueSlider::ValueSlider(int X, int Y, int W, int H, const char*l)
 : fltk3::Slider(X,Y,W,H,l) {
   step(1,100);
-  textfont_ = fltk3::HELVETICA;
-  textsize_ = 10;
-  textcolor_ = fltk3::FOREGROUND_COLOR;
+  textfont(fltk3::HELVETICA);
+  textsize(10);
+  textcolor(fltk3::FOREGROUND_COLOR);
 }
 
 void fltk3::ValueSlider::draw() {

Modified: branches/branch-3.0/src/Fl_cocoa.mm
===================================================================
--- branches/branch-3.0/src/Fl_cocoa.mm	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_cocoa.mm	2011-08-21 16:41:02 UTC (rev 8988)
@@ -1688,8 +1688,8 @@
   // First let's process the raw key press
   cocoaKeyboardHandler(theEvent);
 
-  int no_text_key = false;
-  static const int notext[] = { // keys that don't emit text
+  unsigned int no_text_key = false;
+  static const unsigned int notext[] = { // keys that don't emit text
     fltk3::BackSpaceKey, fltk3::PrintKey, fltk3::ScrollLockKey, fltk3::PauseKey,
     fltk3::InsertKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::EndKey, fltk3::PageDownKey,
     fltk3::LeftKey, fltk3::UpKey, fltk3::RightKey, fltk3::DownKey, 
@@ -3035,7 +3035,7 @@
 }
 @end
 
-void fl_mac_set_about( fltk3::Callback *cb, void *user_data, int shortcut) 
+void fl_mac_set_about( fltk3::Callback *cb, void *user_data, unsigned int shortcut) 
 {
   fl_open_display();
   fltk3::MenuItem aboutItem;

Modified: branches/branch-3.0/src/Fl_get_key_mac.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_key_mac.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_get_key_mac.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -87,7 +87,7 @@
 }
 
 //: returns true, if that key is pressed right now
-int fltk3::get_key(int k) {
+int fltk3::get_key(unsigned int k) {
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
   if(CGEventSourceKeyState != NULL) {
     return (int)CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState, fltk2mac(k) );

Modified: branches/branch-3.0/src/Fl_get_system_colors.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_system_colors.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/Fl_get_system_colors.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -63,7 +63,7 @@
   double powg = log(g/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
   if (!b) b = 1; else if (b==255) b = 254;
   double powb = log(b/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
-  for (int i = 0; i < fltk3::NUM_GRAY; i++) {
+  for (unsigned int i = 0; i < fltk3::NUM_GRAY; i++) {
     double gray = i/(fltk3::NUM_GRAY-1.0);
     fltk3::set_color(fltk3::gray_ramp(i),
 		  uchar(pow(gray,powr)*255+.5),

Modified: branches/branch-3.0/src/filename_list.cxx
===================================================================
--- branches/branch-3.0/src/filename_list.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/filename_list.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -140,7 +140,7 @@
   for (i=0; i<n; i++) {
     int newlen;
     dirent *de = (*list)[i];
-    int len = strlen(de->d_name);
+    unsigned int len = strlen(de->d_name);
 #ifdef __APPLE__
     newlen = len;
 #else

Modified: branches/branch-3.0/src/fl_ask.cxx
===================================================================
--- branches/branch-3.0/src/fl_ask.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/fl_ask.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -239,7 +239,7 @@
   if (enableHotspot)
     message_form->hotspot(button[0]);
   if (b0 && fltk3::Widget::label_shortcut(b0))
-    button[0]->shortcut(0);
+    button[0]->shortcut((unsigned)0);
   else
     button[0]->shortcut(fltk3::EscapeKey);
 

Modified: branches/branch-3.0/src/fl_utf.cxx
===================================================================
--- branches/branch-3.0/src/fl_utf.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/fl_utf.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -815,7 +815,7 @@
     wchar_t lbuf[1024];
     wchar_t* buf = lbuf;
     unsigned length = fltk3::utf8towc(src, srclen, buf, 1024);
-    int ret;
+    unsigned ret;
     if (length >= 1024) {
       buf = (wchar_t*)(malloc((length+1)*sizeof(wchar_t)));
       fltk3::utf8towc(src, srclen, buf, length+1);

Modified: branches/branch-3.0/src/glut_compatability.cxx
===================================================================
--- branches/branch-3.0/src/glut_compatability.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/glut_compatability.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -151,7 +151,7 @@
       break;
     } else {
       if (special) {
-	int k = fltk3::event_key();
+	unsigned k = fltk3::event_key();
 	if (k > fltk3::FKey && k <= fltk3::FLastKey) k -= fltk3::FKey;
 	special(k,ex,ey);
 	return 1;

Modified: branches/branch-3.0/src/xutf8/mk_wcwidth.c
===================================================================
--- branches/branch-3.0/src/xutf8/mk_wcwidth.c	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/src/xutf8/mk_wcwidth.c	2011-08-21 16:41:02 UTC (rev 8988)
@@ -76,8 +76,8 @@
 #endif
 
 struct interval {
-  int first;
-  int last;
+  unsigned int first;
+  unsigned int last;
 };
 
 /* auxiliary function for binary search in interval table */

Modified: branches/branch-3.0/test/keyboard.cxx
===================================================================
--- branches/branch-3.0/test/keyboard.cxx	2011-08-19 20:51:32 UTC (rev 8987)
+++ branches/branch-3.0/test/keyboard.cxx	2011-08-21 16:41:02 UTC (rev 8988)
@@ -65,7 +65,7 @@
   return 0;
 }
 
-struct keycode_table{int n; const char* text;} table[] = {
+struct keycode_table{unsigned n; const char* text;} table[] = {
   {fltk3::EscapeKey,      "fltk3::EscapeKey"},
   {fltk3::BackSpaceKey,   "fltk3::BackSpaceKey"},
   {fltk3::TabKey,         "fltk3::TabKey"},

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.