Commit Graph

47 Commits

Author SHA1 Message Date
Albrecht Schlosser fd5cd80935 Introduce "Modern CMake" in FLTK
This is a big commit and there are too many changes to list them all.
The main changes are:

- rename all CMake build options to 'FLTK_*'
- export library targets with namespace (prefix) 'fltk::'
- standardize shared library target names with suffix '-shared'
- set public build properties on libraries for consumers
- document library names and aliases in README.CMake.txt
- document changes in "Migrating Code from FLTK 1.3 to 1.4"
- partial backwards compatibility for old user projects

Included but not directly related changes:

- fix Windows (Visual Studio) DLL build
- add CMake function fl_debug_target() to show target properties
- don't build test programs if FLTK is a subproject
- internal: reformat CMake code: remove space before '('

Thanks to Matthias and Manolo for their help, testing, and feeback.
2024-02-07 18:37:34 +01:00
Albrecht Schlosser 1209e9dcd7 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 <FL/filename.H>

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)
2023-10-22 19:35:17 +02:00
Albrecht Schlosser 7b2c770ef7 Fix trailing comma in enums of public headers
Compiler warning: comma at end of enumerator list [-Wpedantic]

Note 1: I decided to fix these warnings although trailing commas in
enums are allowed at least since C++11.

Note 2: I fixed only public headers because these headers may be
compiled in user code. To do: check internal headers.
2023-04-13 20:14:36 +02:00
Matthias Melcher 44c874b731
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
2022-12-30 19:14:36 +01:00
Albrecht Schlosser bb7129dae2 Use the new Fl_Int_Vector class in Fl_Table
Replace local IntVector with Fl_Int_Vector
2022-11-06 16:32:29 +01:00
ManoloFLTK 5a7a70b895 Remove compiler warnings about unused parameters (issue #307) 2021-12-09 08:09:51 +01:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
Albrecht Schlosser dec1938f3c Make draw() protected (Fl_Tree + Fl_Table)
Widget draw() methods must be protected per FLTK convention.
2020-04-20 13:30:48 +02:00
Albrecht Schlosser 2828cbde2c Avoid #include's of unrelated system headers in Fl_Table*.H.
Possible side effect: programs that relied upon inclusion of unrelated
system headers by FL/Fl_Table.H or FL/Fl_Table_Row.H may fail to compile.

Removed include files (some only on certain platforms, list may be incomplete):

#include <FL/Fl.H>             // moved to implementation (.cxx)
#include <FL/Fl_Box.H>         // moved to implementation (.cxx)
#include <FL/Fl_Scrollbar.H>   // moved to implementation (.cxx)

#include <sys/types.h>
#include <string.h>            // memcpy
#include <malloc.h>            // WINDOWS only: malloc/realloc
#include <stdlib.h>            // UNIX: malloc/realloc


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-18 15:16:08 +00:00
Greg Ercolano 501b4f7a52 Document Fl_Table's protected member variables.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12230 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-27 16:29:30 +00:00
Greg Ercolano 1bb2ef7b0b Small doc clarifications for the Fl_Table::TableContext enum.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12229 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-27 01:40:21 +00:00
Greg Ercolano afd118047b Fl_Table was missing doxygen docs for several public + protected members.
Solves STR# 3381.

Also: standardized doxygen comment style in both files; 
      > /** */ doxygen commenting
      > 2 space indent

Removed some confusing non-doxygen comments, and rewrote some confusing ones.

Removed old license info Matt had imported from my original 2002 widget..
there was no reason for it to be in there; the Fl_Table code inside FLTK
is licensed under the FLTK GPL license, no need for the extra noise in the docs.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-04-26 20:12:34 +00:00
Albrecht Schlosser 29a9e89b39 Remove FLTK_ABI_VERSION from all but *tree*.* and documentation.
Everything related to Fl_Tree and its test and demo programs has been
cleaned.

Documentation needs updates.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-26 02:55:14 +00:00
Albrecht Schlosser 0a6be0a83f Fix compiler warnings (STR 2988), porting from branch-1.3.
This commit is the accumulated patch introduced in branch 1.3
in svn r 11094, 11095, and 11096.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-31 04:33:54 +00:00
Albrecht Schlosser 98ef8d52c9 Fix and improve Fl_Table docs, fix some other typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10799 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-07-18 23:59:54 +00:00
Greg Ercolano ff6dc202ae Small doc fixes for new tab_cell_nav() methods.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9843 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-23 08:14:08 +00:00
Greg Ercolano 81c20e30a4 o Added tab_cell_nav() method to control Tab/Shift-Tab navigation of table cells.
o Added move_cursor(R,C,shiftflag). Needed allow Shift-Tab not to create a reverse selection.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-03-23 07:55:09 +00:00
Greg Ercolano c853380472 Continued fix for STR#2889
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9731 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-23 20:07:22 +00:00
Matthias Melcher 78039ecb55 Replaced 10302 with 10301 for FLTK_ABI_VERSION
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-06 20:46:14 +00:00
Greg Ercolano efe0b2b939 Removed old TODO items that have been addressed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9346 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-14 20:37:55 +00:00
Greg Ercolano 3cf006f5c3 Solves STR #2681.
Added ABI-breaking Fl_Table::scrollbar_size() with new ABI #ifdefs.
tests/unittests program modified to test this feature if enabled.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-14 20:35:56 +00:00
Matthias Melcher c1caad3e62 STR 2714: remove lint (variables that have the same name as a function in the same scope).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-02 06:25:13 +00:00
Greg Ercolano 0fbe0257ab Fixed problem with Fl_Table::add() as per thread on fltk.general
entitled "Fl_Table::add() doesn't work properly?"



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-23 01:10:26 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Greg Ercolano 6fa9df7e90 Fixing STR #2679; Fl_Table makes use of FLTK's Fl::scrollbar_size() global.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-17 16:40:41 +00:00
Albrecht Schlosser c54e998967 Added FL_EXPORT for some more classes and structs to clean up MS DLL building.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8301 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-22 22:40:11 +00:00
Matthias Melcher bb6392f7ec Added Table and Tree support to Fluid.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-03 08:28:38 +00:00
Albrecht Schlosser 0c21b331b0 Added missing 'FL_EXPORT' to lots of classes.
This may not be complete yet...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8022 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-12 23:21:03 +00:00
Greg Ercolano 395f5a70aa Adjusted Fl_Table docs to reference new examples.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8003 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-10 18:31:38 +00:00
Greg Ercolano 9e2d044caa As per thread on fltk.development: "RFC: Docs - getting rid of .eps files"
Summary:
    Get rid of eps files, 
    change all doxygen '\image latex' references to eps files to png/jpeg instead,
    convert doxygen images from gif -> png (to support html+latex).

Actual operations:

		1) svn remove *.eps
		2) convert all gifs ->  png
		3) svn remove *.gif
		4) svn add *.png
		5) For jpeg/png images, change all \image latex foo.eps .. ->  \image latex foo.[jpg,png] ..
		6) For gif images, change all \image html foo.gif .. ->  \image html foo.png
		   and (harder to do): change \image latex foo.eps .. ->  \image latex foo.png ..
		7) Remove EPSFILES macro from documentation/Makefile 
		   and remove eps related dependencies that were added recently



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-08 23:53:04 +00:00
Greg Ercolano 65d02841c2 Added latex \image refs to tree+table docs,
and eps image filenames to documentation/Makefile.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7952 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-05 09:50:59 +00:00
Greg Ercolano 770c2c2eaf CMP mods: bracing, doxygen fixes for code examples and #if DOXYGEN -> #if FL_DOXYGEN.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7950 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-05 01:22:53 +00:00
Greg Ercolano 806542a84f Fixed Fl_Table's docs referencing example programs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7918 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-30 04:48:29 +00:00
Greg Ercolano 0ae522c5ca doxygen: fixes to example program filenames.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-26 12:06:52 +00:00
Greg Ercolano 76d205ddb5 Improved doxygen docs for draw_cell() parameters in the various contexts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7752 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-26 12:01:08 +00:00
Greg Ercolano e831cf9dcf doxygen fixes:
o Docs added for set_selection(), get_selection(), is_selected()
	o Renamed confusing variable names for get/set selection functions.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7751 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-26 11:30:58 +00:00
Greg Ercolano 25ca2dbfbc Doxygen improvements for Fl_Table.H;
o Added docs for the TableContext enum members (including CONTEXT_TABLE)
	o Fix another example indent issue.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7745 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-26 09:41:47 +00:00
Greg Ercolano 0ad1f56985 Enclosed old 'standalone widget' license with \verbatim block for clarity.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7744 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-26 09:09:17 +00:00
Greg Ercolano 5be6c04e46 Fixed Fl_Table doxygen example code (was missing all indenting).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7743 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-26 09:00:19 +00:00
Greg Ercolano 2bf58376e5 Documentation fixes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-05-19 07:22:37 +00:00
Matthias Melcher 2f82fd0663 Mixed bag. Please see CHANGES.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-20 21:14:47 +00:00
Albrecht Schlosser 51acfa41eb Replaced _WIN32 symbols that had crept in with UTF-8 and the
new Fl_Table widget with WIN32.

Todo: check, if the conditional in test/table.cxx is useful at all


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7022 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-01-23 13:48:50 +00:00
Albrecht Schlosser 4fa7fde790 Added missing svn properties and $Id$ tags.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6942 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-11-18 12:22:51 +00:00
Matthias Melcher 07a18370ad Added Fl_Tree source code, demo files, and documentation. Thanks, Greg!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-11-14 15:49:12 +00:00
Matthias Melcher 69601a6d58 Added doxygenified documentation for Fl_Table_Row
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6933 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-11-14 14:57:38 +00:00
Matthias Melcher e649ce327e Added doxygenified documentation for Fl_Table
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6931 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-11-14 14:34:29 +00:00
Matthias Melcher fefa82e0b1 Adding Gerg's Fl_Table widget to FLTK 1.3 with kind permission. Documentation not yet added Support for both Visual Studio IDE's not yet added.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-11-14 13:05:37 +00:00