Author: fabien
Date: 2009-07-03 17:24:26 -0700 (Fri, 03 Jul 2009)
New Revision: 6822
Log:
UTF8: Fl_Text_Display and related:
 + Modified selection buffer access methods to return const Fl_Text_Selection 
pointers. Added a non const get method for the main selection buffer.


Modified:
   branches/branch-1.3/FL/Fl_Text_Buffer.H
   branches/branch-1.3/FL/Fl_Text_Display.H
   branches/branch-1.3/src/Fl_Text_Display.cxx

Modified: branches/branch-1.3/FL/Fl_Text_Buffer.H
===================================================================
--- branches/branch-1.3/FL/Fl_Text_Buffer.H     2009-07-04 00:10:51 UTC (rev 
6821)
+++ branches/branch-1.3/FL/Fl_Text_Buffer.H     2009-07-04 00:24:26 UTC (rev 
6822)
@@ -242,11 +242,13 @@
     /**    Returns the current nul substitution character.  */
     char null_substitution_character() const { return mNullSubsChar; }
     /**    Returns the primary selection.  */
+    const Fl_Text_Selection* primary_selection() const { return &mPrimary; }
+    /**    Returns the primary selection.  */
     Fl_Text_Selection* primary_selection() { return &mPrimary; }
     /**    Returns the secondary selection.  */
-    Fl_Text_Selection* secondary_selection() { return &mSecondary; }
+    const Fl_Text_Selection* secondary_selection() const { return &mSecondary; 
}
     /**    Returns the current highlight selection.  */
-    Fl_Text_Selection* highlight_selection() { return &mHighlight; }
+    const Fl_Text_Selection* highlight_selection() const { return &mHighlight; 
}
 
   protected:
     void call_modify_callbacks(int pos, int nDeleted, int nInserted,

Modified: branches/branch-1.3/FL/Fl_Text_Display.H
===================================================================
--- branches/branch-1.3/FL/Fl_Text_Display.H    2009-07-04 00:10:51 UTC (rev 
6821)
+++ branches/branch-1.3/FL/Fl_Text_Display.H    2009-07-04 00:24:26 UTC (rev 
6822)
@@ -253,8 +253,8 @@
                          int *nextLineStart);
     int measure_proportional_character(char c, int colNum, int pos);
     int wrap_uses_character(int lineEndPos);
-    int range_touches_selection(Fl_Text_Selection *sel, int rangeStart,
-                                 int rangeEnd);
+    int range_touches_selection(const Fl_Text_Selection *sel, int rangeStart,
+                                 int rangeEnd) const;
 #ifndef FL_DOXYGEN
     int damage_range1_start, damage_range1_end;
     int damage_range2_start, damage_range2_end;

Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2009-07-04 00:10:51 UTC (rev 
6821)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2009-07-04 00:24:26 UTC (rev 
6822)
@@ -3011,8 +3011,8 @@
    Return true if the selection "sel" is rectangular, and touches a
    buffer position withing "rangeStart" to "rangeEnd"
 */
-int Fl_Text_Display::range_touches_selection(Fl_Text_Selection *sel,
-   int rangeStart, int rangeEnd) {
+int Fl_Text_Display::range_touches_selection(const Fl_Text_Selection *sel,
+   int rangeStart, int rangeEnd) const {
     return sel->selected() && sel->rectangular() && sel->end() >= rangeStart &&
            sel->start() <= rangeEnd;
 }

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

Reply via email to