FLTK logo

[master] 1182cd6 - 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 ]

[master] 1182cd6 - Make Fl_Table::get_selection() 'const' (#1305) "Albrecht Schlosser" 08:47 Sep 05  
 
commit 1182cd66ec66cc317af2db44d21c2e56b99536e8
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Fri Sep 5 17:38:05 2025 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Fri Sep 5 17:38:05 2025 +0200

    Make Fl_Table::get_selection() 'const' (#1305)
    
    See also branch-1.4 with FLTK_ABI_VERSION >= 10405:
      commit 9b9426bf6e1140b3f220c8868a1d97bdc5e7f544

 FL/Fl_Table.H    | 2 +-
 src/Fl_Table.cxx | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git FL/Fl_Table.H FL/Fl_Table.H
index fa3428e..2abd685 100644
--- FL/Fl_Table.H
+++ FL/Fl_Table.H
@@ -726,7 +726,7 @@ public:
     return(row_position());
   }
   int is_selected(int r, int c);                // selected cell
-  void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right);
+  void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right) const;
   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);
diff --git src/Fl_Table.cxx src/Fl_Table.cxx
index b7fb817..c3fddc5 100644
--- src/Fl_Table.cxx
+++ src/Fl_Table.cxx
@@ -1206,8 +1206,11 @@ int Fl_Table::is_selected(int r, int c) {
   \param[in] col_left  Returns the left column of selection area
   \param[in] row_bot   Returns the bottom row of selection area
   \param[in] col_right Returns the right column of selection area
+
+  \internal
+    This method is 'const' since FLTK 1.5 (and 1.4.5 ABI), see issue #1305
 */
-void Fl_Table::get_selection(int& row_top, int& col_left, int& row_bot, int& col_right) {
+void Fl_Table::get_selection(int& row_top, int& col_left, int& row_bot, int& col_right) const {
   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'.