FLTK logo

[branch-1.4] 9b9426b - Make Fl_Table::get_selection() 'const' (#1305)

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

[branch-1.4] 9b9426b - Make Fl_Table::get_selection() 'const' (#1305) "Albrecht Schlosser" 08:47 Sep 05  
 
commit 9b9426bf6e1140b3f220c8868a1d97bdc5e7f544
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Fri Sep 5 17:19:59 2025 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Fri Sep 5 17:28:59 2025 +0200

    Make Fl_Table::get_selection() 'const' (#1305)

 FL/Fl_Table.H    | 8 ++++++--
 src/Fl_Table.cxx | 6 +++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git FL/Fl_Table.H FL/Fl_Table.H
index 7fb80cd..8fce3e6 100644
--- FL/Fl_Table.H
+++ FL/Fl_Table.H
@@ -3,7 +3,7 @@
 //
 // Copyright 2002 by Greg Ercolano.
 // Copyright (c) 2004 O'ksi'D
-// Copyright 2023 by Bill Spitzak and others.
+// Copyright 2023-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -736,11 +736,15 @@ public:
     return(row_position());
   }
   int is_selected(int r, int c);                // selected cell
+#if FL_ABI_VERSION >= 10405 // Issue #1305
+  void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right) const;
+#else
   void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right);
+#endif
   void set_selection(int row_top, int col_left, int row_bot, int col_right);
   int move_cursor(int R, int C, int shiftselect);
   int move_cursor(int R, int C);
-  void resize(int X, int Y, int W, int H) FL_OVERRIDE; // fltk resize() FL_OVERRIDE
+  void resize(int X, int Y, int W, int H) FL_OVERRIDE; // fltk resize() override
 
   // This crashes sortapp() during init.
   //  void box(Fl_Boxtype val) {
diff --git src/Fl_Table.cxx src/Fl_Table.cxx
index c145d90..bf6278f 100644
--- src/Fl_Table.cxx
+++ src/Fl_Table.cxx
@@ -3,7 +3,7 @@
 //
 // Copyright 2002 by Greg Ercolano.
 // Copyright (c) 2004 O'ksi'D
-// Copyright 2023 by Bill Spitzak and others.
+// Copyright 2023-2025 by Bill Spitzak and others.
 //
 // This library is free software. Distribution and use rights are outlined in
 // the file "COPYING" which should have been included with this file.  If this
@@ -1246,7 +1246,11 @@ int Fl_Table::is_selected(int r, int c) {
   \param[in] row_bot   Returns the bottom row of selection area
   \param[in] col_right Returns the right column of selection area
 */
+#if FL_ABI_VERSION >= 10405 // Issue #1305
+void Fl_Table::get_selection(int& row_top, int& col_left, int& row_bot, int& col_right) const {
+#else
 void Fl_Table::get_selection(int& row_top, int& col_left, int& row_bot, int& col_right) {
+#endif
   if (select_col > current_col) {
     col_left  = current_col;
     col_right = select_col;
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

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