DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2838
Version: 1.3-feature


Attached file "Fl_Text_Display.H.diff"...


Link: http://www.fltk.org/str.php?L2838
Version: 1.3-feature
--- Fl_Text_Display.H.old       2012-04-27 12:59:32.566206093 +1000
+++ Fl_Text_Display.H.new       2012-05-05 15:03:38.656254703 +1000
@@ -30,6 +30,8 @@
 #include "Fl_Scrollbar.H"
 #include "Fl_Text_Buffer.H"
 
+#define FLTK_ABI_VERSION 10302
+
 /**
  \brief Rich text display widget.
  
@@ -38,6 +40,19 @@
  in the widget is managed by the Fl_Text_Buffer class. A single Text Buffer
  can be displayed by multiple Text Displays.
  */
+ 
+#if FLTK_ABI_VERSION >= 10302
+ 
+  /**
+   Style Table Attribute types - draw_string() and Style_Table_Entry 
+   */
+  enum {
+       STYLE_TABLE_ATTR_NONE                   = 0x00, /**< no Style attr */
+       STYLE_TABLE_ATTR_UNDERSCORE = 0x01, /**< do underscores a bit field */
+       STYLE_TABLE_ATTR_STRIKETHRU = 0x02, /**< do strike-through a bit field 
*/
+  };    
+#endif
+ 
 class FL_EXPORT Fl_Text_Display: public Fl_Group {
 
 public:
@@ -87,7 +102,7 @@
     WRAP_AT_BOUNDS  /**< wrap text so that it fits into the widget width */
   };    
   
-  friend void fl_text_drag_me(int pos, Fl_Text_Display* d);
+       friend void fl_text_drag_me(int pos, Fl_Text_Display* d);
   
   typedef void (*Unfinished_Style_Cb)(int, void *);
   
@@ -100,8 +115,30 @@
     Fl_Font     font;
     Fl_Fontsize size;
     unsigned    attr;
+#if FLTK_ABI_VERSION >= 10302
+    Fl_Color    color_BG;
+#endif
   };
   
+  
+#if FLTK_ABI_VERSION >= 10302
+private:
+  // needed to allow user defined background,selection colors
+  void init(Fl_Color background, Fl_Color selection);
+
+/*
+       // must keep optimised for speed so kill this comment and the function
+       // adjust background NOTE background must be already set
+  // as it uses background in its adjustment calculations
+ bool changedBackground(Fl_Color& pBackground, Fl_Color pSelection,
+                               int pStyle) const;
+*/                             
+  
+public:
+  Fl_Text_Display(int X, int Y, int W, int H, 
+                               Fl_Color background, Fl_Color selection, const 
char*l = 0);
+#endif
+
   Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0);
   ~Fl_Text_Display();
   
@@ -216,6 +253,13 @@
                       int nStyles, char unfinishedStyle,
                       Unfinished_Style_Cb unfinishedHighlightCB,
                       void *cbArg);
+#if FLTK_ABI_VERSION >= 10302
+  void highlight_data_BG(Fl_Text_Buffer *styleBuffer,
+                      const Style_Table_Entry *styleTable,
+                      int nStyles, char unfinishedStyle,
+                      Unfinished_Style_Cb unfinishedHighlightCB,
+                      void *cbArg);
+#endif
   
   int position_style(int lineStartPos, int lineLen, int lineIndex) const;
   
@@ -463,10 +507,17 @@
   
   /* Line number margin and width */
   int mLineNumLeft, mLineNumWidth;
+#if FLTK_ABI_VERSION >= 10302
+  bool mIsHighlightBG;
+#endif
 };
 
 #endif
 
 //
+#if FLTK_ABI_VERSION >= 10302
+// End of "$Id: Fl_Text_Display.H 9078 2012-05-04 20:08:48Z david $".
+#else 
 // End of "$Id: Fl_Text_Display.H 9078 2011-09-28 20:08:48Z matt $".
+#endif
 //
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to