From 1209e9dcd7e1e97bedc747d06ba4eea837562158 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 22 Oct 2023 19:30:37 +0200 Subject: Make Fl_String and Fl_Int_Vector private (#789) - add CMake option 'OPTION_USE_STD' - add configure option '--enable-use_std' - move FL/Fl_String.H to src/Fl_String.H - move FL/Fl_Int_Vector.H to src/Fl_Int_Vector.H - remove Fl_String from demo program examples/callbacks.cxx - remove Fl_Int_Vector from public header FL/Fl_Table.H - some methods of Fl_Table are no longer inline - add CMake option OPTION_USE_STD to allow std::string in some selected functions and methods Experimental, may be removed before release: - use either Fl_Int_Vector or std::vector in Fl_Table depending on CMake OPTION_USE_STD or configure --enable-use_std Move all fl_filename* functions that use Fl_String to fluid Main changes in fluid: - add fluid_filename.h and .cxx - include "fluid_filename.h" rather than Update fl_input(), fl_password() and test/ask - add maxchar parameter to fl_input() and fl_password() - fl_input_str() and fl_password_str() are optional and return std::string if enabled (FLTK_USE_STD) --- FL/Fl_Int_Vector.H | 166 ----------------------------------------------------- 1 file changed, 166 deletions(-) delete mode 100644 FL/Fl_Int_Vector.H (limited to 'FL/Fl_Int_Vector.H') diff --git a/FL/Fl_Int_Vector.H b/FL/Fl_Int_Vector.H deleted file mode 100644 index d21e8668c..000000000 --- a/FL/Fl_Int_Vector.H +++ /dev/null @@ -1,166 +0,0 @@ -// -// An STL-ish vector without templates for the Fast Light Tool Kit (FLTK). -// -// Copyright 2002 by Greg Ercolano. -// Copyright 2022-2023 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 -// file is missing or damaged, see the license at: -// -// https://www.fltk.org/COPYING.php -// -// Please see the following page on how to report bugs and issues: -// -// https://www.fltk.org/bugs.php -// - -#ifndef Fl_Int_Vector_H -#define Fl_Int_Vector_H - -#include - -/** \file FL/Fl_Int_Vector.H - An STL-ish vector implemented without templates. -*/ - -/** - An STL-ish vector without templates. - - Handles dynamic memory management of an integer array, and allows - array elements to be accessed with zero based indexing: v[0], v[1].. - - Common use: - \code - #include - #include - int main() { - Fl_Int_Vector v; - - // Create an array of values 11,22,33: - v.push_back(11); // add first element - v.push_back(22); // add second element - v.push_back(33); // add third element - - // Assignment by subscript - v[1] = 222; // changes 2nd element from 22 to 222 - - // Loop through printing the values - for ( unsigned int i=0; i